Browse Source

修改检修任务统计导出

zhongwei
tyty 1 year ago
parent
commit
25ce94c260
  1. 19
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessTaskController.java
  2. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/OperAccessTaskMapper.java
  3. 38
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/OperAccessTaskMapper.xml
  4. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/IOperAccessTaskService.java
  5. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessTaskServiceImpl.java

19
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessTaskController.java

@ -87,24 +87,37 @@ public class OperAccessTaskController extends BladeController {
return service.detail(id); return service.detail(id);
} }
/** /**
* 分页 * 分页
*/ */
@ApiLog @ApiLog
@PostMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 50)
@OperationAnnotation(moduleName = "检修管理",title = "我的检修任务",operatorType = OperatorType.MOBILE,businessType = @OperationAnnotation(moduleName = "检修管理",title = "我的检修任务",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE, BusinessType.GENCODE,
action = "分页查询我的检修任务列表") action = "分页查询我的检修任务列表")
@ApiOperation(value = "分页 查询参数:name,code,handler,status,planId,planCode") @ApiOperation(value = "分页 查询参数:name,code,handler,status,planId,planCode")
public R<IPage<OperAccessTaskVO>> list(OperAccessTaskDTO req, Query query) {
return service.list(req, query);
}
/**
* 分页
*/
@ApiLog
@PostMapping("/listByStatus")
@ApiOperationSupport(order = 50)
@OperationAnnotation(moduleName = "检修管理",title = "检修任务",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页查询我的检修任务列表")
@ApiOperation(value = "分页 查询参数:name,code,handler,status,planId,planCode")
public R<IPage<OperAccessTaskVO>> list(@RequestBody OperAccessTaskDTO req) { public R<IPage<OperAccessTaskVO>> list(@RequestBody OperAccessTaskDTO req) {
Query query=new Query(); Query query=new Query();
query.setCurrent(req.getCurrent()); query.setCurrent(req.getCurrent());
query.setSize(req.getSize()); query.setSize(req.getSize());
return service.list(req, query); return service.listByStatus(req, query);
} }
/** /**
* 获取检修台账 * 获取检修台账
*/ */

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/OperAccessTaskMapper.java

@ -28,6 +28,9 @@ public interface OperAccessTaskMapper extends UserDataScopeBaseMapper<OperAccess
@UserDataAuth @UserDataAuth
List<OperAccessTaskVO> pageCondition(IPage page, @Param("req") OperAccessTaskDTO req); List<OperAccessTaskVO> pageCondition(IPage page, @Param("req") OperAccessTaskDTO req);
List<OperAccessTaskVO> pageConditionByStatus(IPage page, @Param("req") OperAccessTaskDTO req);
List<OperAccessTaskEntity> selectByEmCode(String emCode,List<String> list); List<OperAccessTaskEntity> selectByEmCode(String emCode,List<String> list);
@SqlParser(filter = true) @SqlParser(filter = true)

38
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/OperAccessTaskMapper.xml

@ -65,6 +65,43 @@
<if test="req.code != null and req.code != ''"> <if test="req.code != null and req.code != ''">
AND t.`CODE` LIKE CONCAT('%',#{req.code},'%') AND t.`CODE` LIKE CONCAT('%',#{req.code},'%')
</if> </if>
<if test="req.handler != null">
AND t.`HANDLER`=#{req.handler}
</if>
<if test="req.planId != null">
AND p.ID =#{req.planId}
</if>
<if test="req.name != null and req.name != ''">
AND t.`NAME` LIKE CONCAT('%',#{req.name},'%')
</if>
<if test="req.excludeNullTicket != null and req.excludeNullTicket == 1">
and t.`TICKET_ID` is null
</if>
<if test="req.startTime != null and req.startTime != ''">
and t.`PLAN_START_TIME` &gt; #{req.startTime}
</if>
<if test="req.endTime != null and req.startTime != '' ">
and t.`PLAN_START_TIME` &lt; #{req.endTime}
</if>
<if test="req.deptIds != null">
and t.create_dept in
<foreach collection="req.deptIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
ORDER BY t.create_time DESC
</select>
<select id="pageConditionByStatus" resultType="com.hnac.hzims.operational.access.vo.OperAccessTaskVO">
SELECT t.*,p.name as planName
FROM hzims_oper_access_task t
left join hzims_oper_access_plan p
on t.plan_id = p.id
WHERE
t.IS_DELETED =0
<if test="req.code != null and req.code != ''">
AND t.`CODE` LIKE CONCAT('%',#{req.code},'%')
</if>
<if test="req.ids != null"> <if test="req.ids != null">
AND t.id in AND t.id in
<foreach collection="req.ids" item="item" index="index" open="(" close=")" separator=","> <foreach collection="req.ids" item="item" index="index" open="(" close=")" separator=",">
@ -97,7 +134,6 @@
</if> </if>
ORDER BY t.create_time DESC ORDER BY t.create_time DESC
</select> </select>
<select id="selectByEmCode" resultType="com.hnac.hzims.operational.access.entity.OperAccessTaskEntity" parameterType="list"> <select id="selectByEmCode" resultType="com.hnac.hzims.operational.access.entity.OperAccessTaskEntity" parameterType="list">
select * from hzims_oper_access_task select * from hzims_oper_access_task
where IS_DELETED = 0 where IS_DELETED = 0

1
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/IOperAccessTaskService.java

@ -33,6 +33,7 @@ public interface IOperAccessTaskService extends BaseService<OperAccessTaskEntity
R<OperAccessTaskVO> detail(Long id); R<OperAccessTaskVO> detail(Long id);
R<IPage<OperAccessTaskVO>> list(OperAccessTaskDTO req, Query query); R<IPage<OperAccessTaskVO>> list(OperAccessTaskDTO req, Query query);
R<IPage<OperAccessTaskVO>> listByStatus(OperAccessTaskDTO req, Query query);
List<OperAccessTaskEntity> getByEmCode(String emCode,List<String> list); List<OperAccessTaskEntity> getByEmCode(String emCode,List<String> list);

8
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessTaskServiceImpl.java

@ -228,6 +228,14 @@ public class OperAccessTaskServiceImpl extends BaseServiceImpl<OperAccessTaskMap
} }
@Override @Override
public R<IPage<OperAccessTaskVO>> listByStatus(OperAccessTaskDTO req, Query query) {
IPage<OperAccessTaskVO> page = Condition.getPage(query);
List<OperAccessTaskVO> data = mapper.pageConditionByStatus(page, req);
page.setRecords(OperAccessTaskWrapper.build().listVOExtras(data));
return R.data(page);
}
@Override
public List<OperAccessTaskEntity> getByEmCode(String emCode, List<String> list) { public List<OperAccessTaskEntity> getByEmCode(String emCode, List<String> list) {
return this.baseMapper.selectByEmCode(emCode, list); return this.baseMapper.selectByEmCode(emCode, list);
} }

Loading…
Cancel
Save