|
|
@ -8,10 +8,7 @@ import com.hnac.hzims.message.dto.BusinessMessageDTO; |
|
|
|
import com.hnac.hzims.message.fegin.IMessageClient; |
|
|
|
import com.hnac.hzims.message.fegin.IMessageClient; |
|
|
|
import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; |
|
|
|
import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; |
|
|
|
import com.hnac.hzims.operational.access.dto.*; |
|
|
|
import com.hnac.hzims.operational.access.dto.*; |
|
|
|
import com.hnac.hzims.operational.access.entity.OperAccessContentDetailEntity; |
|
|
|
import com.hnac.hzims.operational.access.entity.*; |
|
|
|
import com.hnac.hzims.operational.access.entity.OperAccessContentEntity; |
|
|
|
|
|
|
|
import com.hnac.hzims.operational.access.entity.OperAccessMaterialEntity; |
|
|
|
|
|
|
|
import com.hnac.hzims.operational.access.entity.OperAccessTaskDetailEntity; |
|
|
|
|
|
|
|
import com.hnac.hzims.operational.access.service.*; |
|
|
|
import com.hnac.hzims.operational.access.service.*; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
@ -119,6 +116,7 @@ public class AccessPlanV4ServiceImpl implements AccessPlanV4Service{ |
|
|
|
for (OperAccessMaterialDTO material : entity.getAccessMaterials()){ |
|
|
|
for (OperAccessMaterialDTO material : entity.getAccessMaterials()){ |
|
|
|
material.setId(null); |
|
|
|
material.setId(null); |
|
|
|
material.setPlanId(entity.getId()); |
|
|
|
material.setPlanId(entity.getId()); |
|
|
|
|
|
|
|
material.setIsDeleted(0); |
|
|
|
materialService.save(material); |
|
|
|
materialService.save(material); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -226,17 +224,24 @@ public class AccessPlanV4ServiceImpl implements AccessPlanV4Service{ |
|
|
|
* @param entity |
|
|
|
* @param entity |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void startTaskProcess(AccessPlanV4DTO entity) { |
|
|
|
private void startTaskProcess(AccessPlanV4DTO entity) { |
|
|
|
|
|
|
|
// 查询计划数据
|
|
|
|
|
|
|
|
OperAccessPlanEntity plan = planService.getById(entity.getId()); |
|
|
|
|
|
|
|
if(ObjectUtil.isEmpty(plan)){ |
|
|
|
|
|
|
|
throw new ServiceException("未查询到检修计划!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for(OperAccessContentDTO item : entity.getAccessContents()){ |
|
|
|
for(OperAccessContentDTO item : entity.getAccessContents()){ |
|
|
|
//任务参数
|
|
|
|
//任务参数
|
|
|
|
AccessTaskV4DTO task = BeanUtil.copy(item, AccessTaskV4DTO.class); |
|
|
|
AccessTaskV4DTO task = BeanUtil.copy(item, AccessTaskV4DTO.class); |
|
|
|
task.setStatus(1); |
|
|
|
task.setStatus(1); |
|
|
|
task.setCreateTime(new Date()); |
|
|
|
task.setCreateTime(new Date()); |
|
|
|
task.setCreateUser(entity.getCreateUser()); |
|
|
|
task.setCreateUser(plan.getCreateUser()); |
|
|
|
task.setProcDefId(entity.getProcDefId()); |
|
|
|
task.setProcDefId(plan.getProcDefId()); |
|
|
|
task.setHandler(item.getManager()); |
|
|
|
task.setHandler(item.getManager()); |
|
|
|
task.setPlanId(entity.getId()); |
|
|
|
task.setPlanId(plan.getId()); |
|
|
|
task.setContentId(item.getId()); |
|
|
|
task.setContentId(item.getId()); |
|
|
|
task.setEmCode(item.getEmCode()); |
|
|
|
task.setEmCode(item.getEmCode()); |
|
|
|
|
|
|
|
task.setTenantId(plan.getTenantId()); |
|
|
|
task.setCreateUser(item.getManager()); |
|
|
|
task.setCreateUser(item.getManager()); |
|
|
|
// 任务详情
|
|
|
|
// 任务详情
|
|
|
|
if(CollectionUtil.isNotEmpty(item.getAccessContentDetails())){ |
|
|
|
if(CollectionUtil.isNotEmpty(item.getAccessContentDetails())){ |
|
|
|