From 709298cfae022fb0753d27c4d4143e93284fe22e Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期五, 18 八月 2023 09:52:43 +0800
Subject: [PATCH] 111
---
server/src/main/java/doumeemes/service/ext/impl/WorkorderRecordStandardServiceImpl.java | 15 ++++++++-------
server/src/main/java/doumeemes/service/ext/impl/WorkorderExtServiceImpl.java | 16 ++++++----------
server/src/main/java/doumeemes/service/system/impl/WxLoginServiceImpl.java | 11 +++++++++++
server/src/main/java/doumeemes/service/ext/impl/PlansExtServiceImpl.java | 4 ++++
server/src/main/resources/mappers/PlansExtMapper.xml | 2 +-
5 files changed, 30 insertions(+), 18 deletions(-)
diff --git a/server/src/main/java/doumeemes/service/ext/impl/PlansExtServiceImpl.java b/server/src/main/java/doumeemes/service/ext/impl/PlansExtServiceImpl.java
index cea6336..4fa1d66 100644
--- a/server/src/main/java/doumeemes/service/ext/impl/PlansExtServiceImpl.java
+++ b/server/src/main/java/doumeemes/service/ext/impl/PlansExtServiceImpl.java
@@ -661,6 +661,8 @@
order.setUrgent(mp.getUrgent());
order.setFactoryId(mp.getFactoryId());
order.setBackorderId(mp.getBackorderId());
+ order.setUnqualifiedNum(param.getUnqualifiedNum());
+ order.setQualifiedNum(param.getQualifiedNum());
order.setOriginId(systemDictDataBiz.queryByCode(Constants.WORKORDER_SOURCE,Constants.WORKORDER_SOURCE_PLAN).getId());
//宸ュ崟缂栫爜
order.setCode(workorderExtService.getNextCode(user.getCompany().getId()));
@@ -1626,6 +1628,8 @@
param.setProUserList(autoWorkReportDTO.getProUserList());
param.setPlanNum(num.intValue());
//鐢熸垚宸ュ崟淇℃伅
+ param.setUnqualifiedNum(autoWorkReportDTO.getCreateWorkorderRecordDTO().getUnQualifiedNum().intValue());
+ param.setQualifiedNum(autoWorkReportDTO.getCreateWorkorderRecordDTO().getQualifiedNum().intValue());
Workorder workorder = this.distributeDone(user,param,num.intValue());
//宸ュ崟鎶曟枡璁板綍
CreateMaterialDTO createMaterialDTO = new CreateMaterialDTO();
diff --git a/server/src/main/java/doumeemes/service/ext/impl/WorkorderExtServiceImpl.java b/server/src/main/java/doumeemes/service/ext/impl/WorkorderExtServiceImpl.java
index b5e1a8a..bda445e 100644
--- a/server/src/main/java/doumeemes/service/ext/impl/WorkorderExtServiceImpl.java
+++ b/server/src/main/java/doumeemes/service/ext/impl/WorkorderExtServiceImpl.java
@@ -755,7 +755,7 @@
* @param param
*/
@Override
- @Async
+// @Async
public void statisticNum(Workorder param){
if(param.getPlanId()== null){
if(param.getId()== null){
@@ -828,14 +828,10 @@
&& item.getOmodel()!=null
&& (Constants.equalsInteger(item.getOmodel().getStatus() ,Constants.WORKORDER_STATUS.baogong)
||Constants.equalsInteger(item.getOmodel().getStatus() ,Constants.WORKORDER_STATUS.instock))){
- //濡傛灉鏄骇鍑�
- if(Constants.equalsInteger(item.getDoneType(),Constants.ZERO)){
- //濡傛灉鏄悎鏍间骇鍑猴紝绱鏁伴噺
- qulifiedNum += Constants.formatBigdecimal(item.getNum()).intValue();
- }else{
- //濡傛灉鏄笉鑹骇鍑猴紝绱鏁伴噺
- unqulifiedNum += Constants.formatBigdecimal(item.getNum()).intValue();
- }
+ //濡傛灉鏄悎鏍间骇鍑猴紝绱鏁伴噺
+ qulifiedNum += Constants.formatBigdecimal(BigDecimal.valueOf(item.getQualifiedNum())).intValue();
+ //濡傛灉鏄笉鑹骇鍑猴紝绱鏁伴噺
+ unqulifiedNum += Constants.formatBigdecimal(BigDecimal.valueOf(item.getUnqualifiedNum())).intValue();
}
}
}
@@ -858,7 +854,7 @@
if(!Objects.isNull(plan.getWorkPlansId())){
//鏇存柊涓昏鍗曟暟鎹俊鎭�
if(plansMapper.selectCount(new QueryWrapper<Plans>()
- .in("STATUS",0,1,4)
+ .in("STATUS",0,1,4,5)
.eq("DELETED",Constants.ZERO)
.ne("id",p.getId())
.eq("WORK_PLANS_ID",plan.getWorkPlansId()))<=Constants.ZERO){
diff --git a/server/src/main/java/doumeemes/service/ext/impl/WorkorderRecordStandardServiceImpl.java b/server/src/main/java/doumeemes/service/ext/impl/WorkorderRecordStandardServiceImpl.java
index 1e0a085..c8a744d 100644
--- a/server/src/main/java/doumeemes/service/ext/impl/WorkorderRecordStandardServiceImpl.java
+++ b/server/src/main/java/doumeemes/service/ext/impl/WorkorderRecordStandardServiceImpl.java
@@ -830,13 +830,14 @@
if (bomDetailList == null || bomDetailList.size() == 0) {
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "瀵逛笉璧凤紝璇ョ敓浜х墿鏂欑殑bom閰嶇疆鏈夎锛岃鑱旂郴绠$悊鍛橈紒");
}
-// for (BomDetailExtListVO i :bomDetailList) {
-// //鏌ヨ鏄惁鎶曟枡
-// if(workorderRecordExtMapper.selectCount(new QueryWrapper<WorkorderRecord>()
-// .eq("DELETED",Constants.ZERO).eq("MATERIAL_ID",i.getMaterialId()).eq("TYPE",Constants.ZERO))<=0){
-// throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀛樺湪鏈姇鏂橞OM鐗╂枡锛屾棤娉曡繘琛屾姤宸�");
-// }
-// }
+ for (BomDetailExtListVO i :bomDetailList) {
+ //鏌ヨ鏄惁鎶曟枡
+ if(workorderRecordExtMapper.selectCount(new QueryWrapper<WorkorderRecord>()
+ .eq("WORKORDER_ID",mp.getId())
+ .eq("DELETED",Constants.ZERO).eq("MATERIAL_ID",i.getMaterialId()).eq("TYPE",Constants.ZERO))<=0){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀛樺湪鏈姇鏂橞OM鐗╂枡锛屾棤娉曡繘琛屾姤宸�");
+ }
+ }
}
WOutbound outbound = new WOutbound();
diff --git a/server/src/main/java/doumeemes/service/system/impl/WxLoginServiceImpl.java b/server/src/main/java/doumeemes/service/system/impl/WxLoginServiceImpl.java
index 83c9733..a474ea4 100644
--- a/server/src/main/java/doumeemes/service/system/impl/WxLoginServiceImpl.java
+++ b/server/src/main/java/doumeemes/service/system/impl/WxLoginServiceImpl.java
@@ -11,6 +11,7 @@
import doumeemes.core.utils.Constants;
import doumeemes.core.utils.HttpsUtil;
import doumeemes.core.utils.Utils;
+import doumeemes.dao.business.model.Company;
import doumeemes.dao.business.model.CompanyUser;
import doumeemes.dao.business.model.Department;
import doumeemes.dao.ext.CompanyExtMapper;
@@ -69,6 +70,8 @@
@Autowired
private SystemLoginLogService systemLoginLogService;
+ @Autowired
+ private CompanyExtMapper companyExtMapper;
/**
@@ -107,6 +110,11 @@
if(Objects.isNull(department)){
throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈠埌缁戝畾閮ㄩ棬淇℃伅");
}
+ Company company = companyExtMapper.selectById(department.getCompanyId());
+ if(Objects.isNull(company)||company.getStatus().equals(Constants.ONE)){
+ wxLoginVO.setLoginStatus(Constants.ONE);
+ return wxLoginVO;
+ }
SystemUser systemUser = systemUserMapper.selectById(companyUser.getUserId());
//鏌ヨ鐢ㄦ埛鏁版嵁
LoginDTO dto = new LoginDTO();
@@ -137,6 +145,9 @@
wxLoginVO.setLoginStatus(Constants.ZERO);
wxLoginVO.setSession(session);
return wxLoginVO;
+ }catch (BusinessException e) {
+ wxLoginVO.setLoginStatus(Constants.ONE);
+ return wxLoginVO;
}catch (AuthenticationException e) {
BusinessException ee = null;
loginLog.setSuccess(Boolean.FALSE);
diff --git a/server/src/main/resources/mappers/PlansExtMapper.xml b/server/src/main/resources/mappers/PlansExtMapper.xml
index c0d7430..b139223 100644
--- a/server/src/main/resources/mappers/PlansExtMapper.xml
+++ b/server/src/main/resources/mappers/PlansExtMapper.xml
@@ -778,7 +778,7 @@
<!-- AND #{endDate} >= `a`.`PLAN_DATE`-->
<!-- </if>-->
<if test="mixParam != null and mixParam!=''">
- AND (mmodel.name like concat('%',#{mixParam},'%') or mmodel.code like concat('%',#{mixParam},'%') or pmodel.name like concat('%',#{mixParam},'%'))
+ AND (mmodel.name like concat('%',#{mixParam},'%') or mmodel.code like concat('%',#{mixParam},'%') or pmodel.name like concat('%',#{mixParam},'%') or a.BATCH like concat('%',#{mixParam},'%') or w.SALESORDER like concat('%',#{mixParam},'%') )
</if>
<if test="usermodelInvalidTime != null">
AND `usermodel`.`INVALID_TIME` = #{usermodelInvalidTime}
--
Gitblit v1.9.3