|
|
|
@ -28,6 +28,8 @@ import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
|
|
|
import org.springblade.desk.common.enums.MesApprovalRecordBizTypeEnum; |
|
|
|
|
|
|
|
import org.springblade.desk.common.service.IMesApprovalRecordService; |
|
|
|
import org.springblade.desk.dashboard.constant.BatchConstant; |
|
|
|
import org.springblade.desk.dashboard.constant.BatchConstant; |
|
|
|
import org.springblade.desk.dashboard.pojo.dto.DsBatchPreservePlanDTO; |
|
|
|
import org.springblade.desk.dashboard.pojo.dto.DsBatchPreservePlanDTO; |
|
|
|
import org.springblade.desk.dashboard.pojo.entity.*; |
|
|
|
import org.springblade.desk.dashboard.pojo.entity.*; |
|
|
|
@ -90,6 +92,9 @@ public class DsBatchPreservePlanServiceImpl extends BaseServiceImpl<DsBatchPrese |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
IDsMainSaltAddQuantityService mainSaltAddQuantityService; |
|
|
|
IDsMainSaltAddQuantityService mainSaltAddQuantityService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
IMesApprovalRecordService mesApprovalRecordService; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public IPage<DsBatchPreservePlanVO> selectDsBatchPreservePlanPage(IPage<DsBatchPreservePlanVO> page, DsBatchPreservePlanVO dsBatchPreservePlan) { |
|
|
|
public IPage<DsBatchPreservePlanVO> selectDsBatchPreservePlanPage(IPage<DsBatchPreservePlanVO> page, DsBatchPreservePlanVO dsBatchPreservePlan) { |
|
|
|
|
|
|
|
|
|
|
|
@ -134,7 +139,10 @@ public class DsBatchPreservePlanServiceImpl extends BaseServiceImpl<DsBatchPrese |
|
|
|
batchPreservePlan.setPreservePlanStatus("1"); |
|
|
|
batchPreservePlan.setPreservePlanStatus("1"); |
|
|
|
save(batchPreservePlan); |
|
|
|
save(batchPreservePlan); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//创建代办
|
|
|
|
//创建代办
|
|
|
|
|
|
|
|
mesApprovalRecordService.createApproval |
|
|
|
|
|
|
|
(batchPreservePlan.getId(), MesApprovalRecordBizTypeEnum.BATCH_PLANNING_CATEGORY.getDesc(),AuthUtil.getUser().getUserId(),new Date()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
@ -145,13 +153,16 @@ public class DsBatchPreservePlanServiceImpl extends BaseServiceImpl<DsBatchPrese |
|
|
|
DsBatchPreservePlanEntity batchPreservePlanEntity = batchPreservePlanMapper.selectById(dsBatchPreservePlan.getId()); |
|
|
|
DsBatchPreservePlanEntity batchPreservePlanEntity = batchPreservePlanMapper.selectById(dsBatchPreservePlan.getId()); |
|
|
|
if(dsBatchPreservePlan.getIsPass()){ |
|
|
|
if(dsBatchPreservePlan.getIsPass()){ |
|
|
|
batchPreservePlanEntity.setApprovalStatus(BatchConstant.DIRECTOR_STATUS_RECEIPT); |
|
|
|
batchPreservePlanEntity.setApprovalStatus(BatchConstant.DIRECTOR_STATUS_RECEIPT); |
|
|
|
|
|
|
|
//审批通过
|
|
|
|
|
|
|
|
mesApprovalRecordService.passApproval(dsBatchPreservePlan.getId(), MesApprovalRecordBizTypeEnum.BATCH_PLANNING_CATEGORY.getDesc(), AuthUtil.getUserId(), new Date()); |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
batchPreservePlanEntity.setApprovalStatus(BatchConstant.DIRECTOR_STATUS_ASSIGN); |
|
|
|
batchPreservePlanEntity.setApprovalStatus(BatchConstant.DIRECTOR_STATUS_ASSIGN); |
|
|
|
|
|
|
|
//审批驳回
|
|
|
|
|
|
|
|
mesApprovalRecordService.rejectApproval(dsBatchPreservePlan.getId(), MesApprovalRecordBizTypeEnum.BATCH_PLANNING_CATEGORY.getDesc(), AuthUtil.getUserId(), new Date()); |
|
|
|
} |
|
|
|
} |
|
|
|
batchPreservePlanEntity.setApprovalOpinion(dsBatchPreservePlan.getApprovalOpinion()); |
|
|
|
batchPreservePlanEntity.setApprovalOpinion(dsBatchPreservePlan.getApprovalOpinion()); |
|
|
|
updateById(batchPreservePlanEntity); |
|
|
|
|
|
|
|
return true; |
|
|
|
return updateById(batchPreservePlanEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@ -159,13 +170,16 @@ public class DsBatchPreservePlanServiceImpl extends BaseServiceImpl<DsBatchPrese |
|
|
|
DsBatchPreservePlanEntity batchPreservePlanEntity = batchPreservePlanMapper.selectById(dsBatchPreservePlan.getId()); |
|
|
|
DsBatchPreservePlanEntity batchPreservePlanEntity = batchPreservePlanMapper.selectById(dsBatchPreservePlan.getId()); |
|
|
|
if(dsBatchPreservePlan.getIsPass()){ |
|
|
|
if(dsBatchPreservePlan.getIsPass()){ |
|
|
|
batchPreservePlanEntity.setApprovalStatus(BatchConstant.FACTORY_STATUS_RECEIPT); |
|
|
|
batchPreservePlanEntity.setApprovalStatus(BatchConstant.FACTORY_STATUS_RECEIPT); |
|
|
|
|
|
|
|
//审批通过
|
|
|
|
|
|
|
|
mesApprovalRecordService.passApproval(dsBatchPreservePlan.getId(), MesApprovalRecordBizTypeEnum.BATCH_PLANNING_CATEGORY.getDesc(), AuthUtil.getUserId(), new Date()); |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
batchPreservePlanEntity.setApprovalStatus(BatchConstant.FACTORY_STATUS_ASSIGN); |
|
|
|
batchPreservePlanEntity.setApprovalStatus(BatchConstant.FACTORY_STATUS_ASSIGN); |
|
|
|
|
|
|
|
//审批驳回
|
|
|
|
|
|
|
|
mesApprovalRecordService.rejectApproval(dsBatchPreservePlan.getId(), MesApprovalRecordBizTypeEnum.BATCH_PLANNING_CATEGORY.getDesc(), AuthUtil.getUserId(), new Date()); |
|
|
|
} |
|
|
|
} |
|
|
|
batchPreservePlanEntity.setApprovalOpinion(dsBatchPreservePlan.getApprovalOpinion()); |
|
|
|
batchPreservePlanEntity.setApprovalOpinion(dsBatchPreservePlan.getApprovalOpinion()); |
|
|
|
updateById(batchPreservePlanEntity); |
|
|
|
|
|
|
|
return true; |
|
|
|
return updateById(batchPreservePlanEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
|