xubh пре 5 година
родитељ
комит
dcc766e517

+ 2 - 0
src/main/java/com/minpay/db/table/own/mapper/ShOrderMapper.java

@@ -9,4 +9,6 @@ import java.util.Map;
 public interface ShOrderMapper extends  IMINMybatisEntityMapper{
 	//查询订单列表
 	List<Map<String, String>> queryOrder(Map<String, String> map, MINRowBounds row);
+
+    Map<String, String> queryOrderStatistics(Map<String, String> p);
 }

+ 6 - 0
src/main/java/com/minpay/shouhuo/ShOrderManageAction.java

@@ -102,6 +102,12 @@ public class ShOrderManageAction implements IMINAction {
 		ls = Service.lookup(IFormatService.class).formatDateTime(ls, "createTime");
 		ls = new MINCopyFormat("{isDraw:'isDrawdesc',payMode:'payModedesc','state':'statedesc','pickupStt':'pickupSttdesc'}").format(ls);
 		ls = Service.lookup(IFormatService.class).formatEnum(ls, "{isDrawdesc:'IS_DRAW',payModedesc:'PAY_TYPE',statedesc:'ORDER_STATE',pickupSttdesc:'ORDER_PICKUP_STT'}");
+
+
+		Map<String, String> lss = Service.lookup(IMINDataBaseService.class).getMybatisMapper(ShOrderMapper.class).queryOrderStatistics(p);
+
+
+		res.set("statistics", lss);
 		// 设置返回值
 		res.set(IMINBusinessConstant.F_PAGING_LAY, ls);
 		res.set(IMINBusinessConstant.F_PAGING_COUNT, rows.getCount());

+ 40 - 0
src/main/resources/com/minpay/db/table/own/mapper/ShOrderMapper.xml

@@ -65,4 +65,44 @@
 		order by  a.VOI_CREATE_TIME desc
 	</select>
 
+	<select id="queryOrderStatistics" resultType="hashmap" parameterType="java.lang.String">
+		select
+			count(1)  number,
+			sum(VOI_ORDER_AMT)	sumAmt
+		FROM
+		vm_order_inf a LEFT JOIN vm_person_inf b on a.VOI_PERSON_ID = b.VCI_ID
+		LEFT JOIN  vm_equipment_inf c on a.VOI_EQUIPMENT_ID = c.VEQ_ID
+		WHERE 1=1 and a.VOI_OPERATION = '0'
+		<if test="dates!=null and dates != ''">
+			and substr(a.VOI_CREATE_TIME,1,8) between substr((#{dates,jdbcType=VARCHAR}),1,8)
+			and substr((#{dates,jdbcType=VARCHAR}),12,19)
+		</if>
+		<if test="equipmentId != null and equipmentId != ''">
+			and a.VOI_EQUIPMENT_ID = #{equipmentId,jdbcType=VARCHAR}
+		</if>
+		<if test="equipmentName != null and equipmentName != ''">
+			and c.VEQ_NAME like CONCAT('%', #{equipmentName,jdbcType=VARCHAR}, '%')
+		</if>
+		<if test="freightwayId != null and freightwayId != ''">
+			and a.VOI_EQUREL_ID = #{freightwayId,jdbcType=VARCHAR}
+		</if>
+		<if test="payMode != null and payMode != ''">
+			and a.VOI_PAY_MODE = #{payMode,jdbcType=VARCHAR}
+		</if>
+		<if test="playerId != null and playerId != ''">
+			and a.VOI_PERSON_ID = #{playerId,jdbcType=VARCHAR}
+		</if>
+		<if test="state != null and state != ''">
+			and a.VOI_IS_DRAW = #{state,jdbcType=VARCHAR}
+		</if>
+		<if test="orderNo != null and orderNo != ''">
+			and a.VOI_ID = #{orderNo,jdbcType=VARCHAR}
+		</if>
+		<if test="branchId != null and branchId != ''">
+			and a.VOI_BRANCHID = #{branchId,jdbcType=VARCHAR}
+		</if>
+		order by  a.VOI_CREATE_TIME desc
+	</select>
+
+
 </mapper>

+ 19 - 4
src/main/webapp/admin/orderManage/orderManage.html

@@ -58,6 +58,21 @@
 				<label class="f12-gray4">玩家ID:</label>
 				<input onchange = "changeSelectCon(7,this,'inp')"   class="search-select" type="tel" name="personId"  id ="personId" lay-verify="personId"  autocomplete="off" placeholder="请输入玩家ID" class="layui-input">
 			</div>
+			<div class="d-dashed" style="margin: 10px 0;"></div>
+			<div class="layui-inline">
+				<label class="f12-gray4">总销售金额:</label>
+				<div class="layui-input-inline">
+					<input type="text" class="layui-input" id="sumAmt" name="sumAmt" style="border:none;color: red" disabled="disabled" class="search-select">
+				</div>
+			</div>
+			<div class="layui-inline">
+				<label class="f12-gray4">总订单笔数:</label>
+				<div class="layui-input-inline">
+					<input type="text" class="layui-input" id="number" name="number" style="border:none;color: red" disabled="disabled" class="search-select">
+				</div>
+			</div>
+
+
 		</div>
 	</form>
 
@@ -69,7 +84,7 @@
 </body>
 <script src="../../js/min-loader-next.js"></script>
 <script type="text/html" id="barDemo">
-	<a class="layui-btn layui-btn-xs" lay-event="look">订单详情</a>
+	<!--<a class="layui-btn layui-btn-xs" lay-event="look">订单详情</a>-->
 	{{#  if(d.state == '00' && d.isUsed == '01' && d.pickupStt == '00' ){ }}
 	<a class="layui-btn layui-btn-xs" lay-event="cancel">订单作废</a>
 	{{#  } }}
@@ -129,16 +144,16 @@
 				,{field: 'payModedesc', title: '支付类型', width:'8%'}
 				,{field: 'orderAmt', title: '订单价格', width:'8%'}
 				,{field: 'createTime', title: '创建时间', width: '14%'}
-				,{field: 'operate', title: '操作', width: '14%', toolbar: '#barDemo',fixed: 'right'}
+				,{field: 'operate', title: '操作', width: '8%', toolbar: '#barDemo',fixed: 'right'}
 			]]
 			,done: function(res, curr, count){
 				//如果是异步请求数据方式,res即为你接口返回的信息。
 				//如果是直接赋值的方式,res即为:{data: [], count: 99} data为当前页数据、count为数据总长度
 				console.log(res);
-
 				//得到当前页码
 				console.log(curr);
-
+				$('#number').val(res.statistics.number);
+				$('#sumAmt').val(res.statistics.sumAmt);
 				//得到数据总量
 				console.log(count);
 			}