Browse Source

#检修流程

zhongwei
yang_shj 1 year ago
parent
commit
c7d39b2403
  1. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/OperAccessMaterialMapper.xml
  2. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/OperAccessTaskMapper.xml
  3. 15
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/AccessTaskV4ServiceImpl.java
  4. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessTaskServiceImpl.java
  5. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/WindServiceImpl.java

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/OperAccessMaterialMapper.xml

@ -30,7 +30,7 @@
</resultMap>
<select id="getList" resultType="com.hnac.hzims.operational.access.entity.OperAccessMaterialEntity">
SELECT * FROM HZIMS_OPER_ACCESS_MATERIAL
WHERE IS_DELETE = 0
WHERE IS_DELETED = 0
<if test="planId !=null and planId != ''">
AND PLAN_ID = #{planId,jdbcType=BIGINT}
</if>

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

@ -53,7 +53,8 @@
left join hzims_oper_access_plan p
on t.plan_id = p.id
WHERE
t1.IS_DELETED =0
t.IS_DELETED =0
and t.status != 4
<if test="req.id != null">
and t.id = #{req.id}
</if>
@ -63,9 +64,6 @@
<if test="req.handler != null">
AND t.`HANDLER`=#{req.handler}
</if>
<if test="req.status != null">
AND t.`STATUS`=#{req.status}
</if>
<if test="req.planId != null">
AND p.ID =#{req.planId}
</if>

15
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/AccessTaskV4ServiceImpl.java

@ -123,10 +123,20 @@ public class AccessTaskV4ServiceImpl implements AccessTaskV4Service {
if (CollectionUtil.isEmpty(entity.getAccessMaterials())) {
return;
}
materialService.saveOrUpdateBatch(entity.getAccessMaterials().stream().peek(material -> {
List<OperAccessMaterialEntity> exists = materialService.list(new LambdaQueryWrapper<OperAccessMaterialEntity>() {{
eq(OperAccessMaterialEntity::getPlanId, entity.getPlanId());
eq(OperAccessMaterialEntity::getIsDeleted, 0L);
}});
if(CollectionUtil.isNotEmpty(exists)){
materialService.deleteLogic(exists.stream().map(OperAccessMaterialEntity::getId).collect(Collectors.toList()));
}
for (OperAccessMaterialEntity material : entity.getAccessMaterials()){
material.setId(null);
material.setPlanId(entity.getPlanId());
material.setTaskId(entity.getId());
}).collect(Collectors.toList()));
materialService.save(material);
}
}
/**
@ -169,6 +179,7 @@ public class AccessTaskV4ServiceImpl implements AccessTaskV4Service {
if(ObjectUtil.isNotEmpty(variables.get("examine")) && (Boolean) variables.get("examine")){
entity.setTaskName("流程结束");
entity.setNextStepOperator("流程结束,无需人员处理");
entity.setStatus(4);
// 检修台账保存
this.statiticsSave(entity);
// 更新任务数据

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

@ -212,6 +212,7 @@ public class OperAccessTaskServiceImpl extends BaseServiceImpl<OperAccessTaskMap
@Override
public R<IPage<OperAccessTaskVO>> list(OperAccessTaskDTO req, Query query) {
IPage<OperAccessTaskVO> page = Condition.getPage(query);
req.setHandler(AuthUtil.getUserId());
List<OperAccessTaskVO> data = mapper.pageCondition(page, req);
page.setRecords(OperAccessTaskWrapper.build().listVOExtras(data));
return R.data(page);

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/WindServiceImpl.java

@ -14,6 +14,7 @@ import com.hnac.hzims.operational.fill.vo.GenerateVo;
import com.hnac.hzims.operational.fill.vo.QueryVo;
import com.hnac.hzims.operational.fill.vo.WindVo;
import com.hnac.hzims.operational.fill.wrapper.GenerateWrapper;
import com.hnac.hzims.operational.fill.wrapper.WindWrapper;
import com.hnac.hzims.operational.main.vo.GenerationPowerVo;
import com.hnac.hzims.operational.main.vo.PowerMonthVo;
import lombok.AllArgsConstructor;
@ -65,7 +66,7 @@ public class WindServiceImpl extends BaseServiceImpl<WindMapper, WindEntity> imp
orderByDesc("create_time");
}};
IPage pages = super.page(Condition.getPage(query), queryWrapper);
List list = GenerateWrapper.build().listVO(pages.getRecords());
List list = WindWrapper.build().listVO(pages.getRecords());
return R.data(pages.setRecords(list));
}

Loading…
Cancel
Save