BOM变更审核

This commit is contained in:
z 2025-02-17 14:38:30 +08:00
parent 8029dbb894
commit 53b79e2bbf
5 changed files with 24 additions and 12 deletions

View File

@ -93,7 +93,8 @@ public class TaskDispatchDO extends BaseDO {
@TableField(exist = false) @TableField(exist = false)
private String projectSubCode; private String projectSubCode;
@TableField(exist = false)
private String name;
@TableField(exist = false) @TableField(exist = false)
private String planCode; private String planCode;

View File

@ -302,12 +302,12 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
LocalDateTime projectEndTime = deliverOrderDO.getProjectEndTime(); LocalDateTime projectEndTime = deliverOrderDO.getProjectEndTime();
LocalDate projectEndDay = projectEndTime.toLocalDate(); LocalDate projectEndDay = projectEndTime.toLocalDate();
if (today.equals(projectEndDay.minusDays(1))) { if (today.equals(projectEndDay.minusDays(1))) {
BdgzsomthingDO.setThings("生产任务单编号:"+deliverOrderDO.getCode()+"生产任务单明天到期");//事件名称 BdgzsomthingDO.setThings("生产任务单编号:"+deliverOrderDO.getCode()+" 工序:"+deliverOrderDO.getName()+"明天到期");//事件名称
} else if (today.equals(projectEndDay)) { } else if (today.equals(projectEndDay)) {
BdgzsomthingDO.setThings("生产任务单编号:"+deliverOrderDO.getCode()+"生产任务单今日到期");//事件名称 BdgzsomthingDO.setThings("生产任务单编号:"+deliverOrderDO.getCode()+" 工序:"+deliverOrderDO.getName()+"今日到期");//事件名称
System.out.println("projectEndTime 是今天"); System.out.println("projectEndTime 是今天");
} else if (today.isAfter(projectEndDay)) { } else if (today.isAfter(projectEndDay)) {
BdgzsomthingDO.setThings("生产任务单编号:"+deliverOrderDO.getCode()+"生产任务单已逾期");//事件名称 BdgzsomthingDO.setThings("生产任务单编号:"+deliverOrderDO.getCode()+" 工序:"+deliverOrderDO.getName()+"已逾期");//事件名称
}else{ }else{
BdgzsomthingDO.setAttr4("1"); BdgzsomthingDO.setAttr4("1");
} }
@ -402,11 +402,11 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
LocalDateTime projectEndTime = deliverOrderDO.getProjectEndTime(); LocalDateTime projectEndTime = deliverOrderDO.getProjectEndTime();
LocalDate projectEndDay = projectEndTime.toLocalDate(); LocalDate projectEndDay = projectEndTime.toLocalDate();
if (today5.equals(projectEndDay.minusDays(1))) { if (today5.equals(projectEndDay.minusDays(1))) {
BdgzsomthingDO.setThings("装配任务单编号:"+deliverOrderDO.getCode()+"装配任务单明天到期");//事件名称 BdgzsomthingDO.setThings("装配任务单编号:"+deliverOrderDO.getCode()+" 工序:"+deliverOrderDO.getName()+"装配任务单明天到期");//事件名称
} else if (today5.equals(projectEndDay)) { } else if (today5.equals(projectEndDay)) {
BdgzsomthingDO.setThings("装配任务单编号:"+deliverOrderDO.getCode()+"装配任务单今日到期");//事件名称 BdgzsomthingDO.setThings("装配任务单编号:"+deliverOrderDO.getCode()+" 工序:"+deliverOrderDO.getName()+"今日到期");//事件名称
} else if (today5.isAfter(projectEndDay)) { } else if (today5.isAfter(projectEndDay)) {
BdgzsomthingDO.setThings("装配任务单编号:"+deliverOrderDO.getCode()+"装配任务单已逾期");//事件名称 BdgzsomthingDO.setThings("装配任务单编号:"+deliverOrderDO.getCode()+" 工序:"+deliverOrderDO.getName()+"已逾期");//事件名称
}else{ }else{
BdgzsomthingDO.setAttr4("1"); BdgzsomthingDO.setAttr4("1");
} }

View File

@ -30,6 +30,7 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDeta
import com.chanko.yunxi.mes.module.heli.dal.dataobject.shenhe.ShenheDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.shenhe.ShenheDO;
import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.plan.PlanMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.plantask.PlanTaskMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.plantask.PlanTaskMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomDetailMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomDetailMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomMapper;
@ -103,6 +104,8 @@ public class ProcessBomServiceImpl implements ProcessBomService {
private DictDataMapper dictDataMapper; private DictDataMapper dictDataMapper;
@Resource @Resource
private AdminUserService adminUserService; private AdminUserService adminUserService;
@Resource
private PlanMapper planMapper;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Long createProcessBom(ProcessBomSaveReqVO createReqVO) { public Long createProcessBom(ProcessBomSaveReqVO createReqVO) {
@ -563,9 +566,10 @@ public class ProcessBomServiceImpl implements ProcessBomService {
} }
if (ObjectUtil.isEmpty(attentiontodoRespVO.getAttr4())){ if (ObjectUtil.isEmpty(attentiontodoRespVO.getAttr4())){
ProcessBomDO processBomDO = processBomMapper.selectById(updateReqVO.getId()); // ProcessBomDO processBomDO = processBomMapper.selectById(updateReqVO.getId());
if (ObjectUtil.isNotEmpty(processBomDO)){ PlanDO planDO = planMapper.selectOne(new LambdaQueryWrapper<PlanDO>().eq(PlanDO::getPlanNo, getplanid.getPlanNo()));
AdminUserDO user = adminUserService.getUser(Long.valueOf(processBomDO.getCreator())); if (ObjectUtil.isNotEmpty(planDO)){
AdminUserDO user = adminUserService.getUser(Long.valueOf(planDO.getCreator()));
if (ObjectUtil.isNotEmpty(user)){ if (ObjectUtil.isNotEmpty(user)){
BdgzsomthingDO.setClick(user.getNickname()); BdgzsomthingDO.setClick(user.getNickname());
} }

View File

@ -19,9 +19,10 @@
select c.code,d.end_time project_end_time from pro_task_dispatch c,(SELECT b.*, COALESCE(SUM(a.amount), 0) AS total_amount select c.code,d.end_time project_end_time,d.name from pro_task_dispatch c,(SELECT b.*,c.name as name, COALESCE(SUM(a.amount), 0) AS total_amount
FROM pro_task_dispatch_detail b FROM pro_task_dispatch_detail b
LEFT JOIN pro_task_report a ON a.dispatch_detail_id = b.id LEFT JOIN pro_task_report a ON a.dispatch_detail_id = b.id
LEFT JOIN base_procedure c ON b.procedure_id=c.id
WHERE b.end_time &lt;= DATE_ADD(CURDATE(), INTERVAL 1 DAY) and b.tenant_id =#{param1} and b.procedure_status!=2 WHERE b.end_time &lt;= DATE_ADD(CURDATE(), INTERVAL 1 DAY) and b.tenant_id =#{param1} and b.procedure_status!=2
GROUP BY b.id GROUP BY b.id
HAVING COALESCE(SUM(a.amount), 0) &lt; b.amount) d HAVING COALESCE(SUM(a.amount), 0) &lt; b.amount) d
@ -54,9 +55,10 @@
select c.code,d.end_time project_end_time from pro_task_dispatch c,(SELECT b.*, COALESCE(SUM(a.amount), 0) AS total_amount select c.code,d.end_time project_end_time from pro_task_dispatch c,d.name(SELECT b.*, ,c.name as name,COALESCE(SUM(a.amount), 0) AS total_amount
FROM pro_task_dispatch_detail b FROM pro_task_dispatch_detail b
LEFT JOIN pro_task_report a ON a.dispatch_detail_id = b.id LEFT JOIN pro_task_report a ON a.dispatch_detail_id = b.id
LEFT JOIN base_procedure c ON b.procedure_id=c.id
WHERE b.end_time &lt;= DATE_ADD(CURDATE(), INTERVAL 1 DAY) and b.tenant_id =#{param1} and b.procedure_status!=2 WHERE b.end_time &lt;= DATE_ADD(CURDATE(), INTERVAL 1 DAY) and b.tenant_id =#{param1} and b.procedure_status!=2
GROUP BY b.id GROUP BY b.id
HAVING COALESCE(SUM(a.amount), 0) &lt; b.amount) d HAVING COALESCE(SUM(a.amount), 0) &lt; b.amount) d

View File

@ -758,6 +758,11 @@ const handlePaysee =async (row: any) => {
router.push({ path: '/quality/unqualifiedNotificationApprove', state: { idid: row.idid } }); router.push({ path: '/quality/unqualifiedNotificationApprove', state: { idid: row.idid } });
await bdgzsomthingApi.updatebdgzsomthingbyidoneandok(row.id) // await bdgzsomthingApi.updatebdgzsomthingbyidoneandok(row.id) //
} }
if (row.type == 'BOM变更审核') {
// router.push({ path: '/processDesign/heli/processdesign/bomShenhe', state: { idid: row.idid } });
// router.push({ path: '/processDesign/heli/processdesign/bomShenhe', state: { idid: row.idid } });
await bdgzsomthingApi.updatebdgzsomthingbyidoneandok(row.id) //
}
if (row.type == '装配任务到期'){ if (row.type == '装配任务到期'){
await bdgzsomthingApi.updatebdgzsomthingbyidoneandok(row.id) // await bdgzsomthingApi.updatebdgzsomthingbyidoneandok(row.id) //
} }