ycl-server/src/main/java/com/ycl/platform/controller/YwUnitController.java
@@ -83,7 +83,7 @@ } @GetMapping("/work/list") @ApiOperation(value = "工单列表", notes = "工单列表") @ApiOperation(value = "统计运维单位工单数量", notes = "统计运维单位工单数量") public Result workList(DistributeWorkOrderQuery query) { return ywUnitService.workList(query); } ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml
@@ -96,6 +96,9 @@ <if test="query.unitId != null"> AND wo.unit_id = #{query.unitId} </if> <if test="query.unitId == null"> AND wo.unit_id is not null </if> <if test="query.status != null and query.status != ''"> AND wo.status = #{query.status} </if> ycl-server/src/main/resources/mapper/zgyw/YwUnitMapper.xml
@@ -35,10 +35,10 @@ <select id="workList" resultType="integer"> SELECT count(*) count(DISTINCT wo.id) FROM t_work_order wo INNER JOIN t_monitor tm ON wo.serial_number = tm.serial_number AND #{query.unitId} INNER JOIN t_monitor tm ON wo.serial_number = tm.serial_number INNER JOIN t_yw_point yp ON yp.serial_number = wo.serial_number AND yp.deleted = 0 INNER JOIN t_work_order_error_type et ON wo.work_order_no = et.work_order_no INNER JOIN sys_dict_data da ON da.dict_value = et.error_name AND da.dict_type = 'error_type' @@ -46,7 +46,7 @@ collection="query.errorTypeList" open="(" separator="," close=")" item="errorType">#{errorType}</foreach> </if> WHERE wo.deleted = 0 wo.unit_id = #{query.unitId} AND wo.deleted = 0 <if test="query.status != null and query.status != ''"> AND wo.status = #{query.status} </if>