From 493c9b9c40506bd19659b6d0ad5758748305d208 Mon Sep 17 00:00:00 2001 From: yxheli Date: Thu, 23 Jan 2025 15:27:17 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MaterialPlanDetailDO.java | 2 + .../dataobject/pgmaster/PgMasterLineDO.java | 2 + .../heli/dal/dataobject/plan/PlanDO.java | 2 + .../storagelogNow/StorageLogNowDO.java | 2 + .../taskdispatch/TaskDispatchDO.java | 2 + .../zjpgmaster/ZjPgMasterLineDO.java | 2 + .../attentiontodo/AttentiontodoMapper.java | 1 + .../deliverorder/DeliverOrderMapper.java | 1 + .../MaterialPlanDetailMapper.java | 1 + .../dal/mysql/pgmaster/PgMasterMapper.java | 2 + .../heli/dal/mysql/plan/PlanMapper.java | 1 + .../mysql/storagelog/StorageLogNowMapper.java | 1 + .../taskdispatch/TaskDispatchMapper.java | 2 + .../attentiontodo/AttentiontodoService.java | 1 + .../AttentiontodoServiceImpl.java | 4 + .../bdgzsomthing/bdgzsomthingServiceImpl.java | 188 ++++++++++++++++++ .../MaterialPlanDetailServiceImpl.java | 23 +++ .../processbom/ProcessBomServiceImpl.java | 62 ++++++ .../projectorder/ProjectOrderServiceImpl.java | 51 +++-- .../PurchaseOrderServiceImpl.java | 29 +++ .../UnqualifiedNotificationServiceImpl.java | 26 +++ .../attentiontodo/AttentiontodoMapper.xml | 11 + .../deliverorder/DeliverOrderMapper.xml | 29 +++ .../MaterialPlanDetailMapper.xml | 22 ++ .../mapper/pgmaster/PgMasterMapper.xml | 50 +++++ .../main/resources/mapper/plan/PlanMapper.xml | 146 ++++++++++++++ .../mapper/storagelog/StorageLogNowMapper.xml | 39 +++- .../taskdispatch/TaskDispatchMapper.xml | 35 ++++ 28 files changed, 713 insertions(+), 24 deletions(-) diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/materialplandetail/MaterialPlanDetailDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/materialplandetail/MaterialPlanDetailDO.java index 1808d45..a0d7fb1 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/materialplandetail/MaterialPlanDetailDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/materialplandetail/MaterialPlanDetailDO.java @@ -74,5 +74,7 @@ public class MaterialPlanDetailDO extends BaseDO { private String projectMaterialPlanNo; @TableField(exist = false) private String named; + @TableField(exist = false) + private Long creator; } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pgmaster/PgMasterLineDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pgmaster/PgMasterLineDO.java index 99a140f..5e3b6e0 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pgmaster/PgMasterLineDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pgmaster/PgMasterLineDO.java @@ -155,5 +155,7 @@ public class PgMasterLineDO extends BaseDO { @TableField(exist = false) private String nickName; + @TableField(exist = false) + private Long creator; } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/plan/PlanDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/plan/PlanDO.java index 7888d64..9ee5e92 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/plan/PlanDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/plan/PlanDO.java @@ -199,6 +199,8 @@ public class PlanDO extends BaseDO { private String mouldName; @TableField(exist = false) private String processDesignType; + @TableField(exist = false) + private Long creator; diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/storagelogNow/StorageLogNowDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/storagelogNow/StorageLogNowDO.java index 0167c09..ff3ea8d 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/storagelogNow/StorageLogNowDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/storagelogNow/StorageLogNowDO.java @@ -58,4 +58,6 @@ public class StorageLogNowDO extends BaseDO { @TableField(exist = false) private Long matUnitId; + @TableField(exist = false) + private Long creator; } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDO.java index aba7142..8572d17 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDO.java @@ -133,6 +133,8 @@ public class TaskDispatchDO extends BaseDO { @TableField(exist = false) private Long requiredEndDate; + @TableField(exist = false) + private Long creator; @TableField(exist = false) private String craftContent; diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/zjpgmaster/ZjPgMasterLineDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/zjpgmaster/ZjPgMasterLineDO.java index 0d293d5..445c70a 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/zjpgmaster/ZjPgMasterLineDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/zjpgmaster/ZjPgMasterLineDO.java @@ -130,6 +130,8 @@ public class ZjPgMasterLineDO extends BaseDO { @TableField(exist = false) private String nickName; + @TableField(exist = false) + private Long creator; diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/attentiontodo/AttentiontodoMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/attentiontodo/AttentiontodoMapper.java index 7dffb47..30cae18 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/attentiontodo/AttentiontodoMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/attentiontodo/AttentiontodoMapper.java @@ -71,4 +71,5 @@ public interface AttentiontodoMapper extends BaseMapperX { int deleteall(AttentiontodoSaveReqVO createReqVO); List selectByIdlist(Integer id); + List getAttentiontodolistdaiban(Integer id); } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/deliverorder/DeliverOrderMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/deliverorder/DeliverOrderMapper.java index 6a7ceb2..bbc0e5f 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/deliverorder/DeliverOrderMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/deliverorder/DeliverOrderMapper.java @@ -64,6 +64,7 @@ public interface DeliverOrderMapper extends BaseMapperX { List selectPagemyn(Long id); + List selectPagemyn1(); void showendmoney(Long id); } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/materialplandetail/MaterialPlanDetailMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/materialplandetail/MaterialPlanDetailMapper.java index b6d7c23..004db6d 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/materialplandetail/MaterialPlanDetailMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/materialplandetail/MaterialPlanDetailMapper.java @@ -79,5 +79,6 @@ public interface MaterialPlanDetailMapper extends BaseMapperX selectafterten(Long id); + List selectafterten1(); } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/pgmaster/PgMasterMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/pgmaster/PgMasterMapper.java index 7244528..245deab 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/pgmaster/PgMasterMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/pgmaster/PgMasterMapper.java @@ -74,5 +74,7 @@ public interface PgMasterMapper extends BaseMapperX { } List selectgcjinsert(Long id); + List selectgcjinsert1(); List selectgcjinsertzj(Long id); + List selectgcjinsertzj1(); } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/plan/PlanMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/plan/PlanMapper.java index cc5f7a8..f0fef4e 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/plan/PlanMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/plan/PlanMapper.java @@ -122,5 +122,6 @@ public interface PlanMapper extends BaseMapperX { // .orderByDesc(PlanDO::getId)); // } List selectfhtj(Long txrid); +List selectfhtj1(); } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/storagelog/StorageLogNowMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/storagelog/StorageLogNowMapper.java index bb223d9..49129fc 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/storagelog/StorageLogNowMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/storagelog/StorageLogNowMapper.java @@ -27,6 +27,7 @@ import java.util.List; public interface StorageLogNowMapper extends BaseMapperX { List selectPagesmall(Long id); + List selectPagesmall1(); List selectPagesmallbyid(String id); default PageResult selectPage(StorageLogPageReqVO reqVO) { MPJLambdaWrapper query = new MPJLambdaWrapper<>(); diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchMapper.java index 16e4ce9..1b793dc 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchMapper.java @@ -30,7 +30,9 @@ import java.util.List; public interface TaskDispatchMapper extends BaseMapperX { List getzplist(Long id); + List getzplist1(); List getsclist(Long id); + List getsclist1(); public int deleteDetailByIds(List ids); default PageResult selectPage(TaskDispatchPageReqVO reqVO) { diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/attentiontodo/AttentiontodoService.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/attentiontodo/AttentiontodoService.java index 8048096..00d1df8 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/attentiontodo/AttentiontodoService.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/attentiontodo/AttentiontodoService.java @@ -45,6 +45,7 @@ public interface AttentiontodoService { */ AttentiontodoDO getAttentiontodo(Integer id); List getAttentiontodolist(Integer id); + List getAttentiontodolistdaiban(Integer id); /** * 获得待办关注分页 diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/attentiontodo/AttentiontodoServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/attentiontodo/AttentiontodoServiceImpl.java index 4108437..2f529b1 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/attentiontodo/AttentiontodoServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/attentiontodo/AttentiontodoServiceImpl.java @@ -96,6 +96,10 @@ public class AttentiontodoServiceImpl implements AttentiontodoService { public List getAttentiontodolist(Integer id) { return attentiontodoMapper.selectByIdlist(id); } + @Override + public List getAttentiontodolistdaiban(Integer id) { + return attentiontodoMapper.getAttentiontodolistdaiban(id); + } @Override public PageResult getAttentiontodoPage(AttentiontodoPageReqVO pageReqVO) { diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/bdgzsomthing/bdgzsomthingServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/bdgzsomthing/bdgzsomthingServiceImpl.java index f358722..b039231 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/bdgzsomthing/bdgzsomthingServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/bdgzsomthing/bdgzsomthingServiceImpl.java @@ -1,9 +1,12 @@ package com.chanko.yunxi.mes.module.heli.service.bdgzsomthing; import cn.hutool.core.collection.CollUtil; +import cn.hutool.http.useragent.UserAgentUtil; +import cn.hutool.system.SystemUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils; import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchPageReqVO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderDO; @@ -27,6 +30,9 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageLogNowMapper import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchMapper; import com.chanko.yunxi.mes.module.heli.enums.TaskDispatchTypeEnum; +import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService; +import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi; +import com.chanko.yunxi.mes.module.system.controller.admin.user.UserController; import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO; import com.chanko.yunxi.mes.module.system.service.user.AdminUserService; import com.fasterxml.jackson.databind.ObjectMapper; @@ -39,6 +45,7 @@ import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -71,6 +78,11 @@ import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExcept @Service @Validated public class bdgzsomthingServiceImpl implements bdgzsomthingService { + @Resource + private AdminUserApi userApi; + + @Autowired + private AttentiontodoService attentiontodoService; @Resource private TaskDispatchDetailMapper taskDispatchDetailMapper; @Resource @@ -217,6 +229,27 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { // PageResult pageResult = processBomService.getProcessBomPagesall(); //库存低于安全库存 List attentiontodook = attentiontodoMapper.selectByIdlist(2);//查找该类型的待办和关注人 改 +// String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(2); + if (attentiontodook1.size()<1){ + + List pageResult = storageLogNowMapper.selectPagesmall1();//查询符合条件的值 + for (StorageLogNowDO storageLogNowDO : pageResult) { + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("库存低于安全库存"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCreator()).getNickname()); + attentiontodoDO.setLevel("1"); + attentiontodook.add(attentiontodoDO); + + + } + + + + + } + for (AttentiontodoDO attentiontodoRespVO : attentiontodook) { List pageResult = storageLogNowMapper.selectPagesmall(attentiontodoRespVO.getTxrid());//查询符合条件的值 @@ -267,6 +300,30 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { List attentiontodookddfh = attentiontodoMapper.selectByIdlist(3);//查找该类型的待办和关注人 改 // List pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值 + List attentiontodook3 = attentiontodoService.getAttentiontodolistdaiban(3); + if (attentiontodook3.size()<1){ + + List pageResult = deliverOrderMapper.selectPagemyn1();//查询符合条件的值 + for (DeliverOrderDO storageLogNowDO : pageResult) { + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("订单发货满一年"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCustomerId()).getNickname()); + attentiontodoDO.setLevel("1"); + attentiontodookddfh.add(attentiontodoDO); + + + } + + } + + + + + + + + for (AttentiontodoDO attentiontodoRespVO : attentiontodookddfh) { List deliverOrderDOS = deliverOrderMapper.selectPagemyn(attentiontodoRespVO.getTxrid()); { @@ -315,6 +372,26 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { //生产任务派工单 到期当天逾期 List attentiontodookddfh6 = attentiontodoMapper.selectByIdlist(6);//查找该类型的待办和关注人 改 + + List attentiontodook6 = attentiontodoService.getAttentiontodolistdaiban(6);//改两个数字 + if (attentiontodook6.size()<1){ //改对应 + + List pageResult = taskDispatchMapper.getsclist1();//复制条件+改 + for (TaskDispatchDO storageLogNowDO : pageResult) { + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("生产任务到期"); //改内容 + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCreator()).getNickname()); //改对应 + attentiontodoDO.setLevel("1"); + attentiontodookddfh6.add(attentiontodoDO); + + + } + + } + + + // List pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值 //查数据 TaskDispatchPageReqVO taskDispatchPageReqVO = new TaskDispatchPageReqVO(); @@ -396,6 +473,26 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { List attentiontodookddfh5 = attentiontodoMapper.selectByIdlist(5);//查找该类型的待办和关注人 改 // List pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值 //查数据 + List attentiontodook5 = attentiontodoService.getAttentiontodolistdaiban(5);//改两个数字 + if (attentiontodook5.size()<1){ //改对应 + + List pageResult = taskDispatchMapper.getzplist1();//复制条件+改 + for (TaskDispatchDO storageLogNowDO : pageResult) { + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("装配任务到期"); //改内容 + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCreator()).getNickname()); //改对应 + attentiontodoDO.setLevel("1"); + attentiontodookddfh5.add(attentiontodoDO); + + + } + + } + + + + //获取今天日期 @@ -461,6 +558,32 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { //过程检查-质检 到期当天逾期 List attentiontodookddfh7 = attentiontodoMapper.selectByIdlist(7);//查找该类型的待办和关注人 改 + + + List attentiontodook7 = attentiontodoService.getAttentiontodolistdaiban(7);//改两个数字 + if (attentiontodook7.size()<1){ //改对应 + + List pageResult = pgMasterMapper.selectgcjinsert1();//复制条件+改 + for (PgMasterLineDO storageLogNowDO : pageResult) { + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("质检任务到期前"); //改内容 + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCreator()).getNickname()); //改对应 + attentiontodoDO.setLevel("1"); + attentiontodookddfh7.add(attentiontodoDO); + + + } + + } + + + + + + + + // List pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值 //查数据 // TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO(); @@ -532,6 +655,28 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { //终检-质检 到期当天逾期 List attentiontodookddfh7o = attentiontodoMapper.selectByIdlist(7);//查找该类型的待办和关注人 改 + + + + List attentiontodook70 = attentiontodoService.getAttentiontodolistdaiban(7);//改两个数字 + if (attentiontodook70.size()<1){ //改对应 + + List pageResult = pgMasterMapper.selectgcjinsertzj1();//复制条件+改 + for (ZjPgMasterLineDO storageLogNowDO : pageResult) { + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("质检任务到期前"); //改内容 + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCreator()).getNickname()); //改对应 + attentiontodoDO.setLevel("1"); + attentiontodookddfh7o.add(attentiontodoDO); + + + } + + } + + + // List pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值 //查数据 // TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO(); @@ -604,6 +749,27 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { //生产工艺 到期当天逾期 List attentiontodookddfh4 = attentiontodoMapper.selectByIdlist(4);//查找该类型的待办和关注人 改 + + + + List attentiontodook4 = attentiontodoService.getAttentiontodolistdaiban(4);//改两个数字 + if (attentiontodook4.size()<1){ //改对应 + + List pageResult = planMapper.selectfhtj1();//复制条件+改 + for (PlanDO storageLogNowDO : pageResult) { + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("设计任务到期"); //改内容 + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCreator()).getNickname()); //改对应 + attentiontodoDO.setLevel("1"); + attentiontodookddfh4.add(attentiontodoDO); + + + } + + } + + // List pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值 //查数据 // TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO(); @@ -689,6 +855,28 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { //物料需求计划到期前十天 到期当天逾期 List attentiontodookddfh9 = attentiontodoMapper.selectByIdlist(9);//查找该类型的待办和关注人 改 + + List attentiontodook9 = attentiontodoService.getAttentiontodolistdaiban(9);//改两个数字 + if (attentiontodook9.size()<1){ //改对应 + + List pageResult = materialPlanDetailMapper.selectafterten1();//复制条件+改 + for (MaterialPlanDetailDO storageLogNowDO : pageResult) { + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("《物料需求计划》的采购"); //改内容 + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCreator()).getNickname()); //改对应 + attentiontodoDO.setLevel("1"); + attentiontodookddfh9.add(attentiontodoDO); + + + } + + } + + + + + // List pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值 //查数据 // TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO(); diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/materialplandetail/MaterialPlanDetailServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/materialplandetail/MaterialPlanDetailServiceImpl.java index 6e8ef59..ceac9a5 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/materialplandetail/MaterialPlanDetailServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/materialplandetail/MaterialPlanDetailServiceImpl.java @@ -1,5 +1,6 @@ package com.chanko.yunxi.mes.module.heli.service.materialplandetail; +import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils; import com.chanko.yunxi.mes.module.heli.controller.admin.storagelog.vo.StorageLogPageReqVO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthingDO; @@ -7,6 +8,8 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplan.MaterialPlan import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO; import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.materialplan.MaterialPlanMapper; +import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService; +import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -33,6 +36,11 @@ import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*; @Service @Validated public class MaterialPlanDetailServiceImpl implements MaterialPlanDetailService { + @Resource + private AdminUserApi userApi; + + @Autowired + private AttentiontodoService attentiontodoService; @Resource private MaterialPlanMapper materialPlanMapper; @Resource @@ -62,6 +70,21 @@ public class MaterialPlanDetailServiceImpl implements MaterialPlanDetailService List attentiontodook = attentiontodoMapper.selectByIdlist(8);//查找该类型的待办和关注人 改 + String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(8); + if (attentiontodook1.size()<1){ + { + + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("《物料需求计划》提交后"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(nickname); + attentiontodoDO.setLevel("1"); + attentiontodook.add(attentiontodoDO); + + } + + } for (AttentiontodoDO attentiontodoRespVO : attentiontodook) { { // for (StorageLogNowDO storageLogNowDO : pageResult) { diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/processbom/ProcessBomServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/processbom/ProcessBomServiceImpl.java index 32a4bac..6c80b95 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/processbom/ProcessBomServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/processbom/ProcessBomServiceImpl.java @@ -12,6 +12,7 @@ import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils; import com.chanko.yunxi.mes.framework.dict.core.util.DictFrameworkUtils; import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils; import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum; +import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils; import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomImportExcelVO; import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomPageReqVO; import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomSaveReqVO; @@ -33,13 +34,16 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomDetailMap import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.shenhe.ShenheMapper; import com.chanko.yunxi.mes.module.heli.enums.ProcessBomStatusEnum; +import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService; import com.chanko.yunxi.mes.module.heli.service.composition.CompositionService; import com.chanko.yunxi.mes.module.heli.service.material.MaterialService; import com.chanko.yunxi.mes.module.heli.service.plantaskbom.PlanTaskBomService; +import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi; import com.chanko.yunxi.mes.module.system.controller.admin.dict.vo.data.DictDataPageReqVO; import com.chanko.yunxi.mes.module.system.dal.dataobject.dict.DictDataDO; import com.chanko.yunxi.mes.module.system.dal.mysql.dict.DictDataMapper; import org.apache.poi.ss.formula.functions.T; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; @@ -78,6 +82,11 @@ public class ProcessBomServiceImpl implements ProcessBomService { @Resource private ProcessBomMapper processBomMapper; @Resource + private AdminUserApi userApi; + + @Autowired + private AttentiontodoService attentiontodoService; + @Resource private ProcessBomDetailMapper processBomDetailMapper; @Resource private MaterialService materialService; @@ -515,6 +524,23 @@ public class ProcessBomServiceImpl implements ProcessBomService { if (hasBomType4) { PlanDO getplanid = processBomMapper.getplanid(updateObj.getPlanId()); List attentiontodook = attentiontodoMapper.selectByIdlist(13);// 改 + String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(13); + if (attentiontodook1.size()<1){ + { + + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("BOM变更审核通过后"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(nickname); + attentiontodoDO.setLevel("1"); + attentiontodook.add(attentiontodoDO); + + } + + } + + for (AttentiontodoDO attentiontodoRespVO : attentiontodook) { { // for (StorageLogNowDO storageLogNowDO : pageResult) { @@ -686,6 +712,24 @@ public class ProcessBomServiceImpl implements ProcessBomService { .anyMatch(bomDetail -> bomDetail.getBomType() == 4); if (hasBomType4) { List attentiontodook = attentiontodoMapper.selectByIdlist(14);// 改 + + String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(14); + if (attentiontodook1.size()<1){ + { + + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("BOM变更通知"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(nickname); + attentiontodoDO.setLevel("1"); + attentiontodook.add(attentiontodoDO); + + } + + } + + for (AttentiontodoDO attentiontodoRespVO : attentiontodook) { { // for (StorageLogNowDO storageLogNowDO : pageResult) { @@ -733,6 +777,24 @@ public class ProcessBomServiceImpl implements ProcessBomService { if(hasBomType4){ List attentiontodook = attentiontodoMapper.selectByIdlist(12);// 改 + + String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(12); + if (attentiontodook1.size()<1){ + { + + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("BOM变更审核"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(nickname); + attentiontodoDO.setLevel("1"); + attentiontodook.add(attentiontodoDO); + + } + + } + + for (AttentiontodoDO attentiontodoRespVO : attentiontodook) { { // for (StorageLogNowDO storageLogNowDO : pageResult) { diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/projectorder/ProjectOrderServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/projectorder/ProjectOrderServiceImpl.java index b552bc8..56bc0f8 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/projectorder/ProjectOrderServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/projectorder/ProjectOrderServiceImpl.java @@ -444,32 +444,41 @@ public class ProjectOrderServiceImpl implements ProjectOrderService { createProjectOrder(operateReqVO); if(operateReqVO.getHasPrice().equals(1)&&(operateReqVO.getPrice()==null)){ //订单有价格但是没录价格 - String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook = attentiontodoService.getAttentiontodolist(1);//查找该类型的待办和关注人 改 - AttentiontodoDO attentiontodoDO = attentiontodook.get(0); - boolean containsAaa = attentiontodook.stream() - .anyMatch(item -> nickname.equals(item.getAttr4())); - if (!containsAaa){ + String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(1); + if (attentiontodook1.size()<1){ { - // for (StorageLogNowDO storageLogNowDO : pageResult) { - bdgzsomthingDO BdgzsomthingDO = new bdgzsomthingDO(); - BdgzsomthingDO.setThingname(attentiontodoDO.getEvent());//事件名称 - BdgzsomthingDO.setThings(operateReqVO.getProjectName()+operateReqVO.getContractNo()+"价格没有录入系统");//事件名称 - BdgzsomthingDO.setAttr2(operateReqVO.getCode());//因为不用跳转所以为null -// BdgzsomthingDO.setClicktime(attentiontodoRespVO.getRemindtime());//提醒周期 -// BdgzsomthingDO.setShowname(new Date());比较创建时间,不用单独填写 - BdgzsomthingDO.setDborgz("待办"); - BdgzsomthingDO.setClick(nickname);//提醒人 - BdgzsomthingDO.setLevel("紧急"); -// BdgzsomthingDO.setClick(attentiontodoRespVO.getRemindman());//提醒人 - BdgzsomthingDO.setYesorno("0");//是否点击 - BdgzsomthingDO.setAttr4("0");//是否已处理 - BdgzsomthingDO.setAttr3(operateReqVO.getId().toString());//获取数据当前表的id -// BdgzsomthingDO.setShowname(operateReqVO.getCreateTime());//获取数据当前表的创建事件 改 - bdgzsomthingMapper.insert(BdgzsomthingDO); + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("订单有价格"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(nickname); + attentiontodoDO.setLevel("1"); + attentiontodook.add(attentiontodoDO); + + + + // for (StorageLogNowDO storageLogNowDO : pageResult) { +// bdgzsomthingDO BdgzsomthingDO = new bdgzsomthingDO(); +// BdgzsomthingDO.setThingname("订单有价格");//事件名称 +// BdgzsomthingDO.setThings(operateReqVO.getProjectName()+operateReqVO.getContractNo()+"价格没有录入系统");//事件名称 +// BdgzsomthingDO.setAttr2(operateReqVO.getCode());//因为不用跳转所以为null +//// BdgzsomthingDO.setClicktime(attentiontodoRespVO.getRemindtime());//提醒周期 +//// BdgzsomthingDO.setShowname(new Date());比较创建时间,不用单独填写 +// BdgzsomthingDO.setDborgz("待办"); +// BdgzsomthingDO.setClick(nickname);//提醒人 +// BdgzsomthingDO.setLevel("紧急"); +//// BdgzsomthingDO.setClick(attentiontodoRespVO.getRemindman());//提醒人 +// BdgzsomthingDO.setYesorno("0");//是否点击 +// BdgzsomthingDO.setAttr4("0");//是否已处理 +// +// BdgzsomthingDO.setAttr3(operateReqVO.getId().toString());//获取数据当前表的id +//// BdgzsomthingDO.setShowname(operateReqVO.getCreateTime());//获取数据当前表的创建事件 改 +// bdgzsomthingMapper.insert(BdgzsomthingDO); diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/purchaseorder/PurchaseOrderServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/purchaseorder/PurchaseOrderServiceImpl.java index 15113a8..801009b 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/purchaseorder/PurchaseOrderServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/purchaseorder/PurchaseOrderServiceImpl.java @@ -2,6 +2,7 @@ package com.chanko.yunxi.mes.module.heli.service.purchaseorder; import cn.hutool.core.util.ObjectUtil; import com.chanko.yunxi.mes.framework.security.core.LoginUser; +import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils; import com.chanko.yunxi.mes.module.heli.controller.admin.orderyf.vo.OrderYfSaveReqVO; import com.chanko.yunxi.mes.module.heli.controller.admin.plan.vo.PlanPageReqVO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO; @@ -14,9 +15,12 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMap import com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.shenhe.ShenheMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.supplier.SupplierMapper; +import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService; import com.chanko.yunxi.mes.module.heli.service.orderyf.OrderYfService; import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService; +import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi; import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; import org.springframework.validation.annotation.Validated; @@ -47,6 +51,12 @@ import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*; @Service @Validated public class PurchaseOrderServiceImpl implements PurchaseOrderService { + + @Resource + private AdminUserApi userApi; + + @Autowired + private AttentiontodoService attentiontodoService; @Resource private com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper bdgzsomthingMapper; @Resource @@ -141,6 +151,25 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService { bdgzsomthingMapper.updateokone(abc); //采购订单收货完成 List attentiontodook = attentiontodoMapper.selectByIdlist(10);//查找该类型的待办和关注人 改 + + String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(10); + if (attentiontodook1.size()<1){ + { + + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("《采购订单》到货时通知检验"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(nickname); + attentiontodoDO.setLevel("1"); + attentiontodook.add(attentiontodoDO); + + } + + } + + + for (AttentiontodoDO attentiontodoRespVO : attentiontodook) { { // for (StorageLogNowDO storageLogNowDO : pageResult) { diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/unqualifiednotification/UnqualifiedNotificationServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/unqualifiednotification/UnqualifiedNotificationServiceImpl.java index 35d3e24..cbd8e2a 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/unqualifiednotification/UnqualifiedNotificationServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/unqualifiednotification/UnqualifiedNotificationServiceImpl.java @@ -17,8 +17,11 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.unqualifiednotification.Unqual import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum; import com.chanko.yunxi.mes.module.heli.enums.CodeEnum; import com.chanko.yunxi.mes.module.heli.enums.UnqualifiedNotificationStatusEnum; +import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService; import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService; import com.chanko.yunxi.mes.module.heli.service.unqualifiednotificationfile.UnqualifiedNotificationFileService; +import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; @@ -42,6 +45,11 @@ import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.UNQUALIF @Service @Validated public class UnqualifiedNotificationServiceImpl implements UnqualifiedNotificationService { + @Resource + private AdminUserApi userApi; + + @Autowired + private AttentiontodoService attentiontodoService; @Resource private com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper bdgzsomthingMapper; @Resource @@ -69,6 +77,24 @@ public class UnqualifiedNotificationServiceImpl implements UnqualifiedNotificati //质检通知单预警 { List attentiontodook = attentiontodoMapper.selectByIdlist(15);// 改 + + String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(15); + if (attentiontodook1.size()<1){ + { + + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("质检通知单"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(nickname); + attentiontodoDO.setLevel("1"); + attentiontodook.add(attentiontodoDO); + + } + + } + + for (AttentiontodoDO attentiontodoRespVO : attentiontodook) { { // for (StorageLogNowDO storageLogNowDO : pageResult) { diff --git a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/attentiontodo/AttentiontodoMapper.xml b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/attentiontodo/AttentiontodoMapper.xml index 489d617..e0f7432 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/attentiontodo/AttentiontodoMapper.xml +++ b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/attentiontodo/AttentiontodoMapper.xml @@ -26,5 +26,16 @@ FROM db_attentiontodo a WHERE a.attr2 = #{param1} + \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/deliverorder/DeliverOrderMapper.xml b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/deliverorder/DeliverOrderMapper.xml index 2da8b54..22e1ca3 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/deliverorder/DeliverOrderMapper.xml +++ b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/deliverorder/DeliverOrderMapper.xml @@ -40,6 +40,35 @@ t.id ORDER BY t.id DESC + + + \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/pgmaster/PgMasterMapper.xml b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/pgmaster/PgMasterMapper.xml index c87a676..6de4a09 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/pgmaster/PgMasterMapper.xml +++ b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/pgmaster/PgMasterMapper.xml @@ -31,6 +31,29 @@ FROM quality_bg_master_line WHERE zj_mx_id = b.zj_mx_id GROUP BY zj_mx_id ) +) + + + @@ -60,5 +83,32 @@ GROUP BY zj_mx_id + + \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/plan/PlanMapper.xml b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/plan/PlanMapper.xml index 6d37cd5..ce8ec7a 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/plan/PlanMapper.xml +++ b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/plan/PlanMapper.xml @@ -155,5 +155,151 @@ where a.progress not like '%100%' + \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/storagelog/StorageLogNowMapper.xml b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/storagelog/StorageLogNowMapper.xml index 818c3ca..d1da2f8 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/storagelog/StorageLogNowMapper.xml +++ b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/storagelog/StorageLogNowMapper.xml @@ -109,12 +109,13 @@ b.mat_code id, b.create_time, b.mat_name, - b.total_storage_ok_qty + b.total_storage_ok_qty, + b.creator FROM (SELECT mat_code, create_time, - mat_name, + mat_name,creator, id, SUM(storage_ok_qty) AS total_storage_ok_qty FROM @@ -123,13 +124,45 @@ mat_code, create_time, mat_name, - id) b + id,creator) b JOIN base_material a ON b.mat_code = a.code WHERE b.total_storage_ok_qty < a.inv_safe and a.tenant_id =#{param1} + + + + + + + + select c.code,d.end_time project_end_time,d.creator from pro_task_dispatch c,(SELECT b.*, COALESCE(SUM(a.amount), 0) AS total_amount + FROM pro_task_dispatch_detail b + LEFT JOIN pro_task_report a ON a.dispatch_detail_id = b.id + WHERE b.end_time <= DATE_ADD(CURDATE(), INTERVAL 1 DAY) + GROUP BY b.id + HAVING COALESCE(SUM(a.amount), 0) < b.amount) d + where d.dispatch_id =c.id and c.dispatch_type ='PRODUCTION' + + DELETE FROM pro_task_dispatch_detail WHERE dispatch_id IN From e50878bcff82386a373ae7be88872f97f5ff9e09 Mon Sep 17 00:00:00 2001 From: yxheli Date: Thu, 23 Jan 2025 16:54:49 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../materialplandetail/MaterialPlanDetailDO.java | 4 ++-- .../dal/dataobject/pgmaster/PgMasterLineDO.java | 4 ++-- .../module/heli/dal/dataobject/plan/PlanDO.java | 4 ++-- .../dataobject/storagelogNow/StorageLogNowDO.java | 4 ++-- .../dataobject/taskdispatch/TaskDispatchDO.java | 4 ++-- .../dataobject/zjpgmaster/ZjPgMasterLineDO.java | 3 ++- .../bdgzsomthing/bdgzsomthingServiceImpl.java | 14 +++++++------- 7 files changed, 19 insertions(+), 18 deletions(-) diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/materialplandetail/MaterialPlanDetailDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/materialplandetail/MaterialPlanDetailDO.java index a0d7fb1..0895962 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/materialplandetail/MaterialPlanDetailDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/materialplandetail/MaterialPlanDetailDO.java @@ -74,7 +74,7 @@ public class MaterialPlanDetailDO extends BaseDO { private String projectMaterialPlanNo; @TableField(exist = false) private String named; - @TableField(exist = false) - private Long creator; + + private String creator; } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pgmaster/PgMasterLineDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pgmaster/PgMasterLineDO.java index 5e3b6e0..9150970 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pgmaster/PgMasterLineDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pgmaster/PgMasterLineDO.java @@ -155,7 +155,7 @@ public class PgMasterLineDO extends BaseDO { @TableField(exist = false) private String nickName; - @TableField(exist = false) - private Long creator; + + private String creator; } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/plan/PlanDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/plan/PlanDO.java index 9ee5e92..7f95d0e 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/plan/PlanDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/plan/PlanDO.java @@ -199,8 +199,8 @@ public class PlanDO extends BaseDO { private String mouldName; @TableField(exist = false) private String processDesignType; - @TableField(exist = false) - private Long creator; + + private String creator; diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/storagelogNow/StorageLogNowDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/storagelogNow/StorageLogNowDO.java index ff3ea8d..9677eec 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/storagelogNow/StorageLogNowDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/storagelogNow/StorageLogNowDO.java @@ -58,6 +58,6 @@ public class StorageLogNowDO extends BaseDO { @TableField(exist = false) private Long matUnitId; - @TableField(exist = false) - private Long creator; + + private String creator; } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDO.java index 8572d17..945dabb 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDO.java @@ -133,8 +133,8 @@ public class TaskDispatchDO extends BaseDO { @TableField(exist = false) private Long requiredEndDate; - @TableField(exist = false) - private Long creator; + + private String creator; @TableField(exist = false) private String craftContent; diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/zjpgmaster/ZjPgMasterLineDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/zjpgmaster/ZjPgMasterLineDO.java index 445c70a..a8abf8c 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/zjpgmaster/ZjPgMasterLineDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/zjpgmaster/ZjPgMasterLineDO.java @@ -130,8 +130,9 @@ public class ZjPgMasterLineDO extends BaseDO { @TableField(exist = false) private String nickName; + @TableField(exist = false) - private Long creator; + private String creator; diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/bdgzsomthing/bdgzsomthingServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/bdgzsomthing/bdgzsomthingServiceImpl.java index b039231..cb39f8e 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/bdgzsomthing/bdgzsomthingServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/bdgzsomthing/bdgzsomthingServiceImpl.java @@ -238,7 +238,7 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); attentiontodoDO.setEvent("库存低于安全库存"); attentiontodoDO.setAttr5("1"); - attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCreator()).getNickname()); + attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); attentiontodoDO.setLevel("1"); attentiontodook.add(attentiontodoDO); @@ -381,7 +381,7 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); attentiontodoDO.setEvent("生产任务到期"); //改内容 attentiontodoDO.setAttr5("1"); - attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCreator()).getNickname()); //改对应 + attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应 attentiontodoDO.setLevel("1"); attentiontodookddfh6.add(attentiontodoDO); @@ -481,7 +481,7 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); attentiontodoDO.setEvent("装配任务到期"); //改内容 attentiontodoDO.setAttr5("1"); - attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCreator()).getNickname()); //改对应 + attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应 attentiontodoDO.setLevel("1"); attentiontodookddfh5.add(attentiontodoDO); @@ -568,7 +568,7 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); attentiontodoDO.setEvent("质检任务到期前"); //改内容 attentiontodoDO.setAttr5("1"); - attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCreator()).getNickname()); //改对应 + attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应 attentiontodoDO.setLevel("1"); attentiontodookddfh7.add(attentiontodoDO); @@ -666,7 +666,7 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); attentiontodoDO.setEvent("质检任务到期前"); //改内容 attentiontodoDO.setAttr5("1"); - attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCreator()).getNickname()); //改对应 + attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应 attentiontodoDO.setLevel("1"); attentiontodookddfh7o.add(attentiontodoDO); @@ -760,7 +760,7 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); attentiontodoDO.setEvent("设计任务到期"); //改内容 attentiontodoDO.setAttr5("1"); - attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCreator()).getNickname()); //改对应 + attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应 attentiontodoDO.setLevel("1"); attentiontodookddfh4.add(attentiontodoDO); @@ -864,7 +864,7 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); attentiontodoDO.setEvent("《物料需求计划》的采购"); //改内容 attentiontodoDO.setAttr5("1"); - attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCreator()).getNickname()); //改对应 + attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应 attentiontodoDO.setLevel("1"); attentiontodookddfh9.add(attentiontodoDO); From f6664a7a8e6f50cfa420dbd1563130165ad0f481 Mon Sep 17 00:00:00 2001 From: yxheli Date: Thu, 23 Jan 2025 17:00:35 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=A7=E4=BA=8E?= =?UTF-8?q?=E5=8F=B7=E5=B0=8F=E4=BA=8E=E5=8F=B7=E8=BD=AC=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/plan/PlanMapper.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/plan/PlanMapper.xml b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/plan/PlanMapper.xml index ce8ec7a..018b113 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/plan/PlanMapper.xml +++ b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/plan/PlanMapper.xml @@ -180,7 +180,7 @@ y.plan_no FROM ( SELECT * FROM project_plan_sub pps WHERE blank_date IS NOT NULL - AND blank_date<= DATE_ADD(CURDATE(), INTERVAL 1 DAY) + AND blank_date<= DATE_ADD(CURDATE(), INTERVAL 1 DAY) ) x JOIN project_plan y ON x.project_plan_id = y.id ) c ON c.project_plan_id = d.plan_id AND c.project_sub_id = d.project_sub_id @@ -227,7 +227,7 @@ y.plan_no FROM ( SELECT * FROM project_plan_sub pps WHERE three_dim_date IS NOT NULL - AND three_dim_date<= DATE_ADD(CURDATE(), INTERVAL 1 DAY) + AND three_dim_date<= DATE_ADD(CURDATE(), INTERVAL 1 DAY) ) x JOIN project_plan y ON x.project_plan_id = y.id ) c ON c.project_plan_id = d.plan_id AND c.project_sub_id = d.project_sub_id @@ -274,7 +274,7 @@ y.plan_no FROM ( SELECT * FROM project_plan_sub pps WHERE two_dim_date IS NOT NULL - AND two_dim_date <= DATE_ADD(CURDATE(), INTERVAL 1 DAY) + AND two_dim_date <= DATE_ADD(CURDATE(), INTERVAL 1 DAY) ) x JOIN project_plan y ON x.project_plan_id = y.id ) c ON c.project_plan_id = d.plan_id AND c.project_sub_id = d.project_sub_id From a0a11116d02562eb4d720f0c34e26392d4a66d76 Mon Sep 17 00:00:00 2001 From: think <1787994136@qq.com> Date: Thu, 23 Jan 2025 17:23:09 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E6=8F=92=E6=B4=BB=E9=A1=BA=E5=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/heli/ygjx/index.ts | 19 +++ .../src/views/heli/ygjx/index.vue | 145 ++++++++++++++++++ 2 files changed, 164 insertions(+) create mode 100644 mes-ui/mes-ui-admin-vue3/src/api/heli/ygjx/index.ts create mode 100644 mes-ui/mes-ui-admin-vue3/src/views/heli/ygjx/index.vue diff --git a/mes-ui/mes-ui-admin-vue3/src/api/heli/ygjx/index.ts b/mes-ui/mes-ui-admin-vue3/src/api/heli/ygjx/index.ts new file mode 100644 index 0000000..f2a9a02 --- /dev/null +++ b/mes-ui/mes-ui-admin-vue3/src/api/heli/ygjx/index.ts @@ -0,0 +1,19 @@ +import request from '@/config/axios' + +export interface ZjPgMasterVO { + id: number + pgNumber: string + taskNo: string + taskId: number + projectId: number + projectNo: string + projectName: string + pgUser: number + pgDatetime: Date + yearMonth: string +} + +// 查询质量派工单过程检验行分页 +export const getZjPgMasterLinePage = async (params) => { + return await request.get({ url: `/heli/ygJx/task-dispatch-detail/page`, params }) +} diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/ygjx/index.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/ygjx/index.vue new file mode 100644 index 0000000..c3a4d82 --- /dev/null +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/ygjx/index.vue @@ -0,0 +1,145 @@ + + + \ No newline at end of file From 3ded5085eb1e81d5591e6e512671137c9ab288bb Mon Sep 17 00:00:00 2001 From: MisG <1520956343@qq.com> Date: Thu, 23 Jan 2025 17:37:23 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E3=80=81=E8=A3=85=E9=85=8D=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=B4=BE=E5=B7=A5=E5=8D=95=E8=AE=A1=E5=88=92=E6=8F=90=E9=86=92?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dal/mysql/taskdispatch/TaskDispatchDetailMapper.java | 2 +- .../src/views/heli/taskdispatch/detail.vue | 5 +++-- .../src/views/heli/taskdispatch/detailDialog.vue | 7 ++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java index beda93d..0c43a13 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java @@ -477,7 +477,7 @@ public interface TaskDispatchDetailMapper extends BaseMapperX 0) { // 如果超时,返回符合条件的结果 diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/taskdispatch/detail.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/taskdispatch/detail.vue index 5599991..00d7af0 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/taskdispatch/detail.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/taskdispatch/detail.vue @@ -707,7 +707,9 @@ watch( } console.log(`第 ${index + 1} 行的预计工时变化为: ${newWorkTime}`); console.log("detail==", detail) - openDialogWT(detail); + if(detail.startTime){ + openDialogWT(detail); + } } ); watches.push(unwatch); // 存储当前的取消监听函数 @@ -719,7 +721,6 @@ watch( const openDialogWT = async (dataParam) => { taskDD.value = null; taskDD.value = dataParam.startTime; - console.log("taskDD==", taskDD) const data = await TaskDispatchApi.getTaskDispatchDetailListByWorkTime(dataParam); //debugger dataList.value = []; diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/taskdispatch/detailDialog.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/taskdispatch/detailDialog.vue index db76541..0a5b087 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/taskdispatch/detailDialog.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/taskdispatch/detailDialog.vue @@ -753,8 +753,10 @@ watch( return; } console.log(`第 ${index + 1} 行的预计工时变化为: ${newWorkTime}`); - console.log("detail==", detail) - openDialogWT(detail); + console.log("detail=", detail.startTime) + if(detail.startTime){ + openDialogWT(detail); + } } ); watches.push(unwatch); // 存储当前的取消监听函数 @@ -766,7 +768,6 @@ watch( const openDialogWT = async (dataParam) => { taskDD.value = null; taskDD.value = dataParam.startTime; - console.log("taskDD==", taskDD) const data = await TaskdispatchApi.getTaskDispatchDetailListByWorkTime(dataParam); //debugger dataList.value = []; From 35768acf9e21ceb6b23e4a294adb0fb9b341492a Mon Sep 17 00:00:00 2001 From: think <1787994136@qq.com> Date: Thu, 23 Jan 2025 17:38:21 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E5=BC=80=E5=8F=91=E5=91=98=E5=B7=A5?= =?UTF-8?q?=E7=BB=A9=E6=95=88=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/ygjx/YgJxController.java | 39 +++++++++++++++++++ .../admin/ygjx/vo/YgjxPageReqVO.java | 25 ++++++++++++ .../TaskDispatchDetailMapper.java | 27 +++++++++++++ .../taskdispatch/TaskDispatchService.java | 2 + .../taskdispatch/TaskDispatchServiceImpl.java | 7 ++++ 5 files changed, 100 insertions(+) create mode 100644 mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/ygjx/YgJxController.java create mode 100644 mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/ygjx/vo/YgjxPageReqVO.java diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/ygjx/YgJxController.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/ygjx/YgJxController.java new file mode 100644 index 0000000..4daabe0 --- /dev/null +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/ygjx/YgJxController.java @@ -0,0 +1,39 @@ +package com.chanko.yunxi.mes.module.heli.controller.admin.ygjx + ; + +import com.chanko.yunxi.mes.framework.common.pojo.CommonResult; +import com.chanko.yunxi.mes.framework.common.pojo.PageResult; +import com.chanko.yunxi.mes.module.heli.controller.admin.ygjx.vo.YgjxPageReqVO; +import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO; +import com.chanko.yunxi.mes.module.heli.service.taskdispatch.TaskDispatchService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.extern.slf4j.Slf4j; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.validation.Valid; + +import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success; + +@Slf4j +@Tag(name = "管理后台 - 车间") +@RestController +@RequestMapping("/heli/ygJx") +@Validated +public class YgJxController { + @Resource + private TaskDispatchService taskDispatchService; + + @GetMapping("/task-dispatch-detail/page") + @Operation(summary = "获得派工明细分页") + @PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')") + public CommonResult> getTaskDispatchPageDetail(@Valid YgjxPageReqVO pageReqVO) { + PageResult pageResult = taskDispatchService.getGroupTaskDispatchDetailPage(pageReqVO); + return success(pageResult); + } +} diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/ygjx/vo/YgjxPageReqVO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/ygjx/vo/YgjxPageReqVO.java new file mode 100644 index 0000000..76e778a --- /dev/null +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/ygjx/vo/YgjxPageReqVO.java @@ -0,0 +1,25 @@ +package com.chanko.yunxi.mes.module.heli.controller.admin.ygjx.vo; + +import com.chanko.yunxi.mes.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Schema(description = "管理后台 - 员工绩效 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class YgjxPageReqVO extends PageParam { + + @Schema(description = "年月,唯一") + private String yearMonth; + + @Schema(description = "工号/名称,唯一", example = "芋艿") + private String workerIdOrName; + + @Schema(description = "制造设备", example = "14307") + private Long manufacturingEquipment; + + +} diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java index beda93d..ba0946d 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java @@ -6,6 +6,8 @@ import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX; import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchDetailPageReqVO; import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchDetailTotalVO; import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskPlanJDBaoBiaoPageReqVO; +import com.chanko.yunxi.mes.module.heli.controller.admin.ygjx.vo.YgjxPageReqVO; +import com.chanko.yunxi.mes.module.heli.dal.dataobject.equipmanufacture.EquipManufactureDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO; @@ -35,6 +37,31 @@ import java.util.Set; @Mapper public interface TaskDispatchDetailMapper extends BaseMapperX { + default PageResult selectPageGroup(YgjxPageReqVO pageReqVO) { + MPJLambdaWrapper query = new MPJLambdaWrapper<>(); + query.select( "DATE_FORMAT(t.create_time, '%Y-%m') as yearMonth,\n" + + " t.owner," + + " t.device_model," + + " max(c.name) as manufacturingEquipment," + + " sum(t.work_time) as totalPlannedHours," + + " sum(b.work_time) as totalReportedHours," + + " sum(t.amount) as totalDispatchedQuantity," + + " sum(b.amount) as totalReportedQuantity,max(u2.username) as workerId ,max(u2.nickname) as workerName ") + .leftJoin(TaskReportDO.class,"b",TaskReportDO::getDispatchDetailId,TaskDispatchDetailDO::getId) + .leftJoin(EquipManufactureDO.class,"c",EquipManufactureDO::getId,TaskDispatchDetailDO::getDeviceModel) + .leftJoin("system_users u2 on u2.id = t.owner"); + if (pageReqVO.getWorkerIdOrName()!= null &&!pageReqVO.getWorkerIdOrName().isEmpty()) { + query.and(i -> i.like("u2.username", pageReqVO.getWorkerIdOrName()).or().like("u2.nickname", pageReqVO.getWorkerIdOrName())); + } + query.isNotNull(TaskReportDO::getOwner) + .isNotNull(TaskDispatchDetailDO::getOwner) + .eq(pageReqVO.getYearMonth() !=null&&pageReqVO.getYearMonth()!="","DATE_FORMAT(t.create_time, '%Y-%m')",pageReqVO.getYearMonth()) + .eq(pageReqVO.getManufacturingEquipment() !=null&&pageReqVO.getManufacturingEquipment()>0,"t.device_model",pageReqVO.getManufacturingEquipment()) + .groupBy("DATE_FORMAT(t.create_time, '%Y-%m'),t.OWNER,t.device_model"); + + return selectPage(pageReqVO, query); + } + public int updateOwnerAndPostIdById(@Param("id") Long id,@Param("type") Integer type); List planBbPage(@Param("reqVO")TaskPlanJDBaoBiaoPageReqVO reqVO); List planBb(@Param("reqVO")TaskPlanJDBaoBiaoPageReqVO reqVO); diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskdispatch/TaskDispatchService.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskdispatch/TaskDispatchService.java index 88e9d7b..2d67852 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskdispatch/TaskDispatchService.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskdispatch/TaskDispatchService.java @@ -2,6 +2,7 @@ package com.chanko.yunxi.mes.module.heli.service.taskdispatch; import com.chanko.yunxi.mes.framework.common.pojo.PageResult; import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.*; +import com.chanko.yunxi.mes.module.heli.controller.admin.ygjx.vo.YgjxPageReqVO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO; @@ -76,6 +77,7 @@ public interface TaskDispatchService { void deleteTaskDispatchDetail(Long id); + PageResult getGroupTaskDispatchDetailPage(YgjxPageReqVO pageReqVO); PageResult getTaskDispatchDetailPage(TaskDispatchDetailPageReqVO pageReqVO); PageResult getTaskDispatchDetailPageWx(TaskDispatchDetailPageReqVO pageReqVO); TaskDispatchDetailDO getTaskDispatchDetail(TaskDispatchDetailPageReqVO pageReqVO); diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskdispatch/TaskDispatchServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskdispatch/TaskDispatchServiceImpl.java index 30bf443..e271935 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskdispatch/TaskDispatchServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskdispatch/TaskDispatchServiceImpl.java @@ -10,6 +10,7 @@ import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils; import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX; import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum; import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.*; +import com.chanko.yunxi.mes.module.heli.controller.admin.ygjx.vo.YgjxPageReqVO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.equipmanufacture.EquipManufactureDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.fpuserdetail.FpUserDetailDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO; @@ -328,6 +329,12 @@ public class TaskDispatchServiceImpl implements TaskDispatchService { taskDispatchDetailMapper.deleteByDispatchId(id); } + @Override + public PageResult getGroupTaskDispatchDetailPage(YgjxPageReqVO pageReqVO) { + + return taskDispatchDetailMapper.selectPageGroup(pageReqVO); + } + @Override public PageResult getTaskDispatchDetailPage(TaskDispatchDetailPageReqVO pageReqVO) { List fpUserDetailDOS = fpUserDetailMapper.selectList(new LambdaQueryWrapper().eq(FpUserDetailDO::getBusyId, pageReqVO.getOwner())); From 26f379916e6555a054d1ba69bf13d8b447b05ef8 Mon Sep 17 00:00:00 2001 From: think <1787994136@qq.com> Date: Thu, 23 Jan 2025 17:47:05 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=91=98=E5=B7=A5?= =?UTF-8?q?=E7=BB=A9=E6=95=88=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../taskdispatch/TaskDispatchDetailDO.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDetailDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDetailDO.java index 8f61b7e..9a32d3f 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDetailDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDetailDO.java @@ -152,4 +152,27 @@ public class TaskDispatchDetailDO extends BaseDO { private Integer numAmount; @TableField(exist = false) private Long beginProduce; + + @TableField(exist = false) + private String yearMonth; + + @TableField(exist = false) + private String manufacturingEquipment; + + @TableField(exist = false) + private BigDecimal totalPlannedHours; + + @TableField(exist = false) + private BigDecimal totalReportedHours; + + @TableField(exist = false) + private Integer totalDispatchedQuantity; + + @TableField(exist = false) + private Integer totalReportedQuantity; + @TableField(exist = false) + private String workerId; + @TableField(exist = false) + private String workerName; + } From 806ae14a9a946671e5aa05fb9ca9de77034c85fd Mon Sep 17 00:00:00 2001 From: think <1787994136@qq.com> Date: Fri, 24 Jan 2025 12:14:37 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E4=BC=98=E5=8C=96sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dal/mysql/taskdispatch/TaskDispatchDetailMapper.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java index 4889b32..2904a5e 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java @@ -42,13 +42,17 @@ public interface TaskDispatchDetailMapper extends BaseMapperX i.like("u2.username", pageReqVO.getWorkerIdOrName()).or().like("u2.nickname", pageReqVO.getWorkerIdOrName())); From 71697bcd0a671146096e7d1a8a9bc45b33b610f7 Mon Sep 17 00:00:00 2001 From: Ledo Date: Mon, 27 Jan 2025 01:28:27 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E8=B7=9F=E8=B8=AA?= =?UTF-8?q?=EF=BC=8C=E5=B0=8F=E7=A8=8B=E5=BA=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/track/vo/TrackRespVO.java | 5 +- .../projectorder/ProjectOrderSubDO.java | 13 ++- .../heli/dal/dataobject/track/TrackDO.java | 6 +- .../processdesign/ProcessDesignMapper.java | 8 +- .../heli/dal/mysql/track/TrackMapper.java | 71 ++++++++-------- .../taskdispatch/TaskDispatchServiceImpl.java | 10 +++ .../heli/service/track/TrackServiceImpl.java | 85 ++++++++++++------- mes-ui/mes-ui-admin-vue3/.env.base | 1 - .../src/views/heli/plantrack/index.vue | 26 ++---- 9 files changed, 137 insertions(+), 88 deletions(-) diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/track/vo/TrackRespVO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/track/vo/TrackRespVO.java index b225124..ffa3712 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/track/vo/TrackRespVO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/track/vo/TrackRespVO.java @@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.math.BigDecimal; +import java.time.LocalDateTime; import java.util.*; import java.util.*; import com.alibaba.excel.annotation.*; @@ -86,5 +87,7 @@ public class TrackRespVO { @Schema(description = "完成状态") @ExcelProperty("完成状态") private Integer isover; - + @Schema(description = "项目结束日期") + @ExcelProperty("项目结束日期") + private LocalDateTime projectEndTime; } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/projectorder/ProjectOrderSubDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/projectorder/ProjectOrderSubDO.java index f79a36d..d603f15 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/projectorder/ProjectOrderSubDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/projectorder/ProjectOrderSubDO.java @@ -5,6 +5,8 @@ import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO; import lombok.*; import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.Date; import java.util.Set; /** @@ -111,9 +113,18 @@ public class ProjectOrderSubDO extends BaseDO { @TableField(exist = false) private String reportDateFormat; - + @TableField(exist = false) + private String planCode; + @TableField(exist = false) + private Integer planType; @TableField(exist = false) private BigDecimal progress; + @TableField(exist = false) + private Integer totalReportAmount; + @TableField(exist = false) + private LocalDateTime projectEndTime; +// @TableField(exist = false) +// private Date projectStartTime; @TableField(exist = false) private Integer property; } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/track/TrackDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/track/TrackDO.java index 8288d38..e232776 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/track/TrackDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/track/TrackDO.java @@ -3,6 +3,7 @@ package com.chanko.yunxi.mes.module.heli.dal.dataobject.track; import lombok.*; import java.math.BigDecimal; +import java.time.LocalDateTime; import java.util.*; import com.baomidou.mybatisplus.annotation.*; import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO; @@ -83,11 +84,11 @@ public class TrackDO extends BaseDO { /** * 总报工时间 */ - private BigDecimal reportAllHour; + private Integer reportAllHour; /** * 总预计工时 */ - private BigDecimal reportPreviewHour; + private Integer reportPreviewHour; /** * 总报工数量 */ @@ -96,5 +97,6 @@ public class TrackDO extends BaseDO { * 完成状态 */ private Integer isover; + private LocalDateTime projectEndTime; } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/processdesign/ProcessDesignMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/processdesign/ProcessDesignMapper.java index 8cde572..952bfe8 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/processdesign/ProcessDesignMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/processdesign/ProcessDesignMapper.java @@ -45,8 +45,14 @@ public interface ProcessDesignMapper extends BaseMapperX { .leftJoin("system_users u4 on u4.id = b.two_dim_owner") .leftJoin("system_users u5 on u5.id = b.three_dim_owner") .leftJoin("(select progress,process_design_id,blueprint_link FROM pro_process_design_progress where id in (select max(id) FROM pro_process_design_progress GROUP BY process_design_id) ) z on z.process_design_id = t.id") - .orderByDesc(ProcessDesignDO::getId) .disableSubLogicDel(); + if(reqVO.getPgType() == 0){ + query.orderByAsc(ProjectOrderDO::getCode); + }else { + query.orderByDesc(ProjectOrderDO::getCode); + } + + query.like(!StringUtils.isEmpty(reqVO.getPlanCode()), PlanDO::getPlanNo, reqVO.getPlanCode()) .like(!StringUtils.isEmpty(reqVO.getProjectCode()), ProjectOrderDO::getCode, reqVO.getProjectCode()) .like(!StringUtils.isEmpty(reqVO.getCustomerName()), CustomerDO::getName, reqVO.getCustomerName()) diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/track/TrackMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/track/TrackMapper.java index bde4bbb..18c609e 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/track/TrackMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/track/TrackMapper.java @@ -6,7 +6,9 @@ import com.baomidou.mybatisplus.generator.IFill; import com.chanko.yunxi.mes.framework.common.pojo.PageResult; import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX; import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX; +import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderSubPageReqVO; import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchDetailPageReqVO; +import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderSubDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansub.PlanSubDO; @@ -19,6 +21,7 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatch import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskreport.TaskReportDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.track.TrackDO; +import com.chanko.yunxi.mes.module.heli.dal.mysql.projectorder.ProjectOrderSubMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper; import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO; import com.github.yulichang.wrapper.MPJLambdaWrapper; @@ -33,36 +36,36 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.track.vo.*; @Mapper public interface TrackMapper extends BaseMapperX { - default PageResult selectPage(TrackPageReqVO reqVO, TaskDispatchDetailMapper taskDispatchDetailMapper) { - TaskDispatchDetailPageReqVO dispatchDetailPageReqVO = new TaskDispatchDetailPageReqVO(); - dispatchDetailPageReqVO.setPageSize(reqVO.getPageSize()).setPageNo(reqVO.getPageNo()); - MPJLambdaWrapper query = new MPJLambdaWrapper<>(); - query.select(TaskDispatchDetailDO::getAmount) - .select(TaskDispatchDetailDO::getWorkTime) - .select(TaskDispatchDetailDO::getProcedureId) - .select(TaskDispatchDetailDO::getProcedureStatus) - .select("pod.code as projectCode,pod.project_name as projectName") + default PageResult selectPage(TrackPageReqVO reqVO, ProjectOrderSubMapper projectOrderSubMapper) { + ProjectOrderSubPageReqVO projectOrderSubPageReqVO = new ProjectOrderSubPageReqVO(); + projectOrderSubPageReqVO.setPageSize(reqVO.getPageSize()).setPageNo(reqVO.getPageNo()); + MPJLambdaWrapper query = new MPJLambdaWrapper<>(); + query.select(ProjectOrderSubDO::getAmount) + .select(ProjectOrderSubDO::getName) + .select("pod.code as projectCode,pod.project_name as projectName,pod.project_end_time as projectEndTime") .select("pl.plan_no as planCode,pl.status as planType") - .select("tpd.bom_detail_id as bomDetailId") - .select("pos.name as projectSubName,ps.project_sub_code as projectSubCode") - .leftJoin(TaskDispatchDO.class,"tpd",TaskDispatchDO::getId,TaskDispatchDetailDO::getDispatchId) - .leftJoin(ProjectOrderSubDO.class,"pos",ProjectOrderSubDO::getId,TaskDispatchDO::getProjectSubId) - .leftJoin(ProjectOrderDO.class,"pod",ProjectOrderDO::getId,TaskDispatchDO::getProjectId) - .leftJoin(PlanDO.class,"pl",PlanDO::getId,TaskDispatchDO::getPlanId) - .leftJoin(PlanSubDO.class,"ps",PlanSubDO::getProjectSubId,TaskDispatchDO::getProjectSubId) - .leftJoin(TaskReportDO.class,"tr",TaskReportDO::getDispatchDetailId,TaskDispatchDetailDO::getId) - .leftJoin(AdminUserDO.class,"u",AdminUserDO::getId,TaskDispatchDetailDO::getOwner) - .leftJoin(ProcessBomDO.class,"pb",ProcessBomDO::getProjectSubId,TaskDispatchDO::getProjectSubId) - .ne(ProcessBomDO::getBomStatus,3) - .selectSum(TaskReportDO::getAmount,"totalReportAmount").selectSum(TaskReportDO::getWorkTime,"totalWorkTime") - .ne(ProjectOrderDO::getStatus,3) - .groupBy(TaskDispatchDetailDO::getId) - .getSelectDistinct(); + .select("ps.project_sub_code as projectSubCode") + .leftJoin(ProjectOrderDO.class,"pod",ProjectOrderDO::getId,ProjectOrderSubDO::getProjectOrderId) + .leftJoin(PlanSubDO.class,"ps",PlanSubDO::getProjectSubId,ProjectOrderSubDO::getId) + .leftJoin(PlanDO.class,"pl",PlanDO::getId,PlanSubDO::getProjectPlanId) + .leftJoin(DeliverOrderSubDO.class,"dos",DeliverOrderSubDO::getSaleOrderSubId,ProjectOrderSubDO::getId) + .eq(DeliverOrderSubDO::getCategory,"DELIVER_LIST") + .selectSum(DeliverOrderSubDO::getAmount,"totalReportAmount")//总共发货数量 +// .leftJoin(AdminUserDO.class,"u",AdminUserDO::getId,TaskDispatchDetailDO::getOwner) +// .leftJoin(ProcessBomDO.class,"pb",ProcessBomDO::getProjectSubId,TaskDispatchDO::getProjectSubId) +// .ne(ProcessBomDO::getBomStatus,3) +// .selectSum(TaskReportDO::getAmount,"totalReportAmount").selectSum(TaskReportDO::getWorkTime,"totalWorkTime") + .eq(ProjectOrderDO::getOrderStatus,32) //已启动 + .ne(ProjectOrderDO::getDeliveryStatus,3) //不为全部发货 + .orderByDesc(ProjectOrderDO::getProjectEndTime) + .isNotNull(DeliverOrderSubDO::getSaleOrderSubId) + .groupBy(ProjectOrderSubDO::getId); +// .getSelectDistinct(); if (reqVO.getProjectCode()!=null&&!reqVO.getProjectCode().trim().equals("")){ query.like(ProjectOrderDO::getCode,reqVO.getProjectCode()); } if (reqVO.getPlanCode()!=null && !reqVO.getPlanCode().trim().equals("")){ - query.like(PlanDO::getPlanNo,reqVO.getPlanCode()); + query.like(ProjectOrderDO::getProjectName,reqVO.getPlanCode()); } if (reqVO.getProjectOrderSubCode()!=null && !reqVO.getProjectOrderSubCode().trim().equals("")){ query.like(PlanSubDO::getProjectSubCode,reqVO.getProjectOrderSubCode()); @@ -70,15 +73,15 @@ public interface TrackMapper extends BaseMapperX { if (reqVO.getProjectOrderSubName()!=null && !reqVO.getProjectOrderSubName().trim().equals("")){ query.like(ProjectOrderSubDO::getName,reqVO.getProjectOrderSubName()); } - if (reqVO.getBomDetailName()!=null && !reqVO.getBomDetailName().trim().equals("")){ - query .select("pbd.material_name as materialName") - .leftJoin(ProcessBomDetailDO.class,"pbd",ProcessBomDetailDO::getId,TaskDispatchDO::getBomDetailId) - .like(ProcessBomDetailDO::getMaterialName,reqVO.getBomDetailName()); - } - if (reqVO.getOwner()!=null){ - query.eq(AdminUserDO::getId,reqVO.getOwner()); - } - return taskDispatchDetailMapper.selectPage(dispatchDetailPageReqVO, query); +// if (reqVO.getBomDetailName()!=null && !reqVO.getBomDetailName().trim().equals("")){ +// query .select("pbd.material_name as materialName") +// .leftJoin(ProcessBomDetailDO.class,"pbd",ProcessBomDetailDO::getId,TaskDispatchDO::getBomDetailId) +// .like(ProcessBomDetailDO::getMaterialName,reqVO.getBomDetailName()); +// } +// if (reqVO.getOwner()!=null){ +// query.eq(AdminUserDO::getId,reqVO.getOwner()); +// } + return projectOrderSubMapper.selectPage(projectOrderSubPageReqVO, query); } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskdispatch/TaskDispatchServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskdispatch/TaskDispatchServiceImpl.java index e271935..b7db35a 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskdispatch/TaskDispatchServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskdispatch/TaskDispatchServiceImpl.java @@ -412,6 +412,16 @@ public class TaskDispatchServiceImpl implements TaskDispatchService { if(operate == TaskReportOperateEnum.END || operate == TaskReportOperateEnum.SUBMIT){ throw exception(TASK_DISPATCH_TASK_NO_PERMISSION_FOR_OPERATE); } + if(operate==TaskReportOperateEnum.START){ + List historyReportList = taskReportMapper.selectList(new LambdaQueryWrapper() {{ + eq(TaskReportDO::getDispatchDetailId, taskDispatchDetailDO.getId()) + .ne(TaskReportDO::getAmount, 0); + }}); + int historyReportAmount = historyReportList.stream().mapToInt(TaskReportDO::getAmount).sum(); + if (taskDispatchDetailDO.getAmount() <= historyReportAmount){ + throw exception(TASK_DISPATCH_TASK_IS_OVER); + } + } lastReportDO = new TaskReportDO(); }else{ // 如有 diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/track/TrackServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/track/TrackServiceImpl.java index e2ce2fe..bef0d96 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/track/TrackServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/track/TrackServiceImpl.java @@ -3,17 +3,24 @@ package com.chanko.yunxi.mes.module.heli.service.track; import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO; +import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderSubDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO; import com.chanko.yunxi.mes.module.heli.dal.mysql.material.MaterialMapper; + +import java.time.format.DateTimeFormatter; +import java.time.temporal.ChronoUnit; import com.chanko.yunxi.mes.module.heli.dal.mysql.procedure.ProcedureMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomDetailMapper; +import com.chanko.yunxi.mes.module.heli.dal.mysql.projectorder.ProjectOrderSubMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.taskreport.TaskReportMapper; import org.springframework.stereotype.Service; import javax.annotation.Resource; import org.springframework.validation.annotation.Validated; import org.springframework.transaction.annotation.Transactional; - +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.time.LocalDateTime; import java.util.*; import com.chanko.yunxi.mes.module.heli.controller.admin.track.vo.*; import com.chanko.yunxi.mes.module.heli.dal.dataobject.track.TrackDO; @@ -38,7 +45,7 @@ public class TrackServiceImpl implements TrackService { @Resource private TrackMapper trackMapper; @Resource - private TaskDispatchDetailMapper taskDispatchDetailMapper; + private ProjectOrderSubMapper projectOrderSubMapper; @Resource private ProcessBomDetailMapper processBomDetailDO; @Resource @@ -84,50 +91,66 @@ public class TrackServiceImpl implements TrackService { @Override public PageResult getTrackPage(TrackPageReqVO pageReqVO) { - PageResult taskDispatchDetailDOPageResult = trackMapper.selectPage(pageReqVO, taskDispatchDetailMapper); + PageResult projectOrderSubDOPageResult = trackMapper.selectPage(pageReqVO, projectOrderSubMapper); PageResult pageResult = new PageResult<>(); - pageResult.setTotalPages(taskDispatchDetailDOPageResult.getTotalPages()); - pageResult.setTotal(taskDispatchDetailDOPageResult.getTotal()); - List list = taskDispatchDetailDOPageResult.getList(); + pageResult.setTotalPages(projectOrderSubDOPageResult.getTotalPages()); + pageResult.setTotal(projectOrderSubDOPageResult.getTotal()); + List list = projectOrderSubDOPageResult.getList(); List trackDOS = new ArrayList<>(); + // 当前时间 + LocalDateTime currentTime = LocalDateTime.now(); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + pageResult.setList(trackDOS); //如果零件名字为空就查一下零 - for (TaskDispatchDetailDO to : list) { + for (ProjectOrderSubDO to : list) { + // 计算两个时间之间的天数差异 + long daysBetween = ChronoUnit.DAYS.between(currentTime, to.getProjectEndTime()); + // 四舍五入到最接近的整数 + BigDecimal daysDifference = BigDecimal.valueOf(daysBetween).setScale(0, RoundingMode.HALF_UP); TrackDO trackDO = new TrackDO(); trackDOS.add(trackDO); trackDO.setProjectCode(to.getProjectCode()) .setProjectName(to.getProjectName()) .setPlanCode(to.getPlanCode()) .setPlanStatus(to.getPlanType()) - .setProjectOrderSubName(to.getProjectSubName()) + .setProjectOrderSubName(to.getName()) .setProjectOrderSubCode(to.getProjectSubCode()) - .setProcessId(to.getProcedureId()) - .setReportAmount(to.getTotalReportAmount()) - .setDispatchAmount(to.getAmount()) - .setReportPreviewHour(to.getWorkTime()) - .setReportAllHour(to.getTotalWorkTime()) + .setDispatchAmount(to.getAmount()) //总 +// .setReportAmount(to.getTotalReportAmount()) //已发货 + .setProcessName(formatter.format(to.getProjectEndTime())) +// .setProjectEndTime(to.getProjectEndTime()) + .setReportAmount(daysDifference.intValue())//日期 +// .setProcessId(to.getProcedureId()) + .setReportAllHour(to.getTotalReportAmount()) //已发货数量 + .setReportPreviewHour(to.getAmount()-to.getTotalReportAmount()); //未发货数量 + + + +// .setReportPreviewHour(to.getWorkTime()) +// .setReportAllHour(to.getTotalWorkTime()) ; - if (to.getProcedureStatus() == 2){ - trackDO.setIsover(2); - }else { - trackDO.setIsover(1); - } +// if (to.getProcedureStatus() == 2){ +// trackDO.setIsover(2); +// }else { +// trackDO.setIsover(1); +// } //1.零件名字if (reqVO.getBomDetailName()!=null && !reqVO.getBomDetailName().trim().equals("")) - if (to.getBomDetailId()!=null && (pageReqVO.getBomDetailName() == null || pageReqVO.getBomDetailName().trim().equals(""))){ - ProcessBomDetailDO processBomDetailDO1 = processBomDetailDO.selectById(to.getBomDetailId()); - - if(processBomDetailDO1!=null&&processBomDetailDO1.getMaterialName()!=null){ - trackDO.setBomDetailName(processBomDetailDO1.getMaterialName()); - } - } - if (to.getProcedureId()!=null){ - ProcedureDO procedureDO = procedureMapper.selectById(to.getProcedureId()); - if (procedureDO!=null){ - trackDO.setProcessName(procedureDO.getName()); - } - } +// if (to.getBomDetailId()!=null && (pageReqVO.getBomDetailName() == null || pageReqVO.getBomDetailName().trim().equals(""))){ +// ProcessBomDetailDO processBomDetailDO1 = processBomDetailDO.selectById(to.getBomDetailId()); +// +// if(processBomDetailDO1!=null&&processBomDetailDO1.getMaterialName()!=null){ +// trackDO.setBomDetailName(processBomDetailDO1.getMaterialName()); +// } +// } +// if (to.getProcedureId()!=null){ +// ProcedureDO procedureDO = procedureMapper.selectById(to.getProcedureId()); +// if (procedureDO!=null){ +// trackDO.setProcessName(procedureDO.getName()); +// } +// } } return pageResult; diff --git a/mes-ui/mes-ui-admin-vue3/.env.base b/mes-ui/mes-ui-admin-vue3/.env.base index 58b155d..c7dfbb3 100644 --- a/mes-ui/mes-ui-admin-vue3/.env.base +++ b/mes-ui/mes-ui-admin-vue3/.env.base @@ -14,7 +14,6 @@ VITE_UPLOAD_BATCH_URL='http://127.0.0.1:8080/admin-api/infra/file/uploadBatch' # 接口前缀 VITE_API_BASEPATH=/dev-api - # 接口地址 VITE_API_URL=/admin-api diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/plantrack/index.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/plantrack/index.vue index 501524d..26ee23e 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/plantrack/index.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/plantrack/index.vue @@ -11,10 +11,10 @@ class="!w-240px" /> - + - + 查 询 重 置 @@ -72,19 +72,11 @@ - - - - - - - - - + + + + +