From 6ad10e278e9193bd65314a2f3c954ab16e8c104f Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 18 八月 2023 21:57:03 +0800
Subject: [PATCH] 修复bug
---
server/src/main/java/doumeemes/dao/business/vo/SalaryParamVO.java | 4 ++--
server/src/main/java/doumeemes/service/ext/impl/WorkorderExtServiceImpl.java | 2 +-
server/src/main/java/doumeemes/service/business/impl/SalaryParamServiceImpl.java | 17 ++++++++++++++++-
server/src/main/java/doumeemes/api/business/SalaryParamController.java | 5 ++++-
server/src/main/java/doumeemes/service/ext/impl/PlansExtServiceImpl.java | 2 ++
5 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/server/src/main/java/doumeemes/api/business/SalaryParamController.java b/server/src/main/java/doumeemes/api/business/SalaryParamController.java
index 7d71e9b..98dfe1b 100644
--- a/server/src/main/java/doumeemes/api/business/SalaryParamController.java
+++ b/server/src/main/java/doumeemes/api/business/SalaryParamController.java
@@ -6,6 +6,7 @@
import doumeemes.core.model.ApiResponse;
import doumeemes.core.model.PageWrap;
import doumeemes.core.model.PageData;
+import doumeemes.core.utils.DateUtil;
import doumeemes.dao.business.model.SalaryParam;
import doumeemes.dao.business.vo.SalaryParamVO;
import doumeemes.dao.ext.dto.SalaryParamDTO;
@@ -24,6 +25,8 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -88,7 +91,7 @@
@PostMapping("/exportExcel")
@RequiresPermissions("business:salaryparam:exportExcel")
public void exportExcel (@RequestBody PageWrap<SalaryParamDTO> pageWrap, HttpServletResponse response) {
- ExcelExporter.build(SalaryParamVO.class).export(salaryParamService.findPage(pageWrap).getRecords(), "璁剧疆绫�-缁╂晥宸ヨ祫閰嶇疆琛�", response);
+ ExcelExporter.build(SalaryParamVO.class).export(salaryParamService.findPage(pageWrap).getRecords(), "璁剧疆绫�-缁╂晥宸ヨ祫閰嶇疆琛�"+ LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")), response);
}
@ApiOperation("鏍规嵁ID鏌ヨ")
diff --git a/server/src/main/java/doumeemes/dao/business/vo/SalaryParamVO.java b/server/src/main/java/doumeemes/dao/business/vo/SalaryParamVO.java
index cb4da76..c362faa 100644
--- a/server/src/main/java/doumeemes/dao/business/vo/SalaryParamVO.java
+++ b/server/src/main/java/doumeemes/dao/business/vo/SalaryParamVO.java
@@ -18,7 +18,7 @@
private Integer id;
@ApiModelProperty(value = "鍒涘缓浜虹紪鐮�")
- @ExcelColumn(name="鍒涘缓浜虹紪鐮�",index = 11)
+ @ExcelColumn(name="鍒涘缓浜哄悕绉�",index = 11)
private String createUserName;
@ApiModelProperty(value = "鍒涘缓鏃堕棿")
@@ -71,7 +71,7 @@
@ExcelColumn(name="鏍囧噯鏃堕暱锛堢锛�",index =8)
private String times;
- @ApiModelProperty(value = "涓嶈壇鍝佹槸鍚﹁鍏� 0鍚� 1鏄�")
+ @ApiModelProperty(value = "涓嶈壇鍝佹槸鍚﹁鍏�")
@ExcelColumn(name="涓嶈壇鍝佹槸鍚﹁鍏� 0鍚� 1鏄�",index = 9 ,valueMapping = "0=鍚�;1=鏄�")
private Integer unqualified;
diff --git a/server/src/main/java/doumeemes/service/business/impl/SalaryParamServiceImpl.java b/server/src/main/java/doumeemes/service/business/impl/SalaryParamServiceImpl.java
index 767be19..355ca24 100644
--- a/server/src/main/java/doumeemes/service/business/impl/SalaryParamServiceImpl.java
+++ b/server/src/main/java/doumeemes/service/business/impl/SalaryParamServiceImpl.java
@@ -11,6 +11,7 @@
import doumeemes.dao.business.*;
import doumeemes.dao.business.model.*;
import doumeemes.dao.business.vo.SalaryParamVO;
+import doumeemes.dao.ext.MaterialExtMapper;
import doumeemes.dao.ext.dto.SalaryParamDTO;
import doumeemes.dao.ext.dto.SalaryParamImportDTO;
import doumeemes.dao.ext.vo.DepartmentExtListVO;
@@ -70,6 +71,7 @@
insert.setProcedureId(salaryParam.getProcedureId());
insert.setMaterialId(salaryParam.getMaterialId());
insert.setDeleted((byte) Constants.ZERO);
+ insert.setType(salaryParam.getType());
if(findOne(insert) != null){
throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"鍚屼竴涓墿鏂欏湪鐩稿悓宸ュ簭涓嶈兘閲嶅閰嶇疆鍝︼紒");
}
@@ -235,6 +237,7 @@
if (Objects.isNull(material)){
throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "瀵煎叆鏁版嵁鍐呭銆愪骇鍝佺紪鐮併�戞湁璇紒");
}
+<<<<<<< HEAD
if (Objects.nonNull(material) && !Objects.equals(material.getName(),salaryParamImportDTO.getMaterialName())){
throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "瀵煎叆鏁版嵁鍐呭銆愪骇鍝佸悕绉般�戞湁璇紒");
}
@@ -249,6 +252,18 @@
if (Objects.isNull(materialDistribute)){
throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "瀵煎叆鏁版嵁鍐呭銆愪骇鍝佺紪鐮併�戞湁璇紒");
}
+=======
+ QueryWrapper<MaterialDistribute> materialDistribute = new QueryWrapper<>();
+ materialDistribute.lambda()
+ .eq(MaterialDistribute::getDeleted,Constants.ZERO)
+ .eq(MaterialDistribute::getMaterialId,material.getId())
+ .eq(MaterialDistribute::getRootDepartId,department.getRootId())
+ .eq(MaterialDistribute::getDepartId,department.getParentId());
+ MaterialDistribute materialDistribute1 = materialDistributeMapper.selectOne(materialDistribute);
+// if (Objects.nonNull(material) && !Objects.equals(material.getName(),salaryParamImportDTO.getMaterialName())){
+// throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "瀵煎叆鏁版嵁鍐呭銆愪骇鍝佸悕绉般�戞湁璇紒");
+// }
+>>>>>>> 4d94726acad17e5cdcf828e21cab762e8b39921c
QueryWrapper<Procedures> proceduresWrapper = new QueryWrapper<>();
proceduresWrapper.lambda()
.eq(Procedures::getName,salaryParamImportDTO.getProcedureName())
@@ -263,7 +278,7 @@
salaryParam.setRootDepartId(department.getRootId());
salaryParam.setDepartId(department.getId());
salaryParam.setProcedureId(procedures.getId());
- salaryParam.setMaterialId(materialDistribute.getId());
+ salaryParam.setMaterialId(materialDistribute1.getId());
salaryParam.setSalary(salaryParamImportDTO.getSalary());
salaryParam.setNum(new BigDecimal(salaryParamImportDTO.getNum()));
salaryParam.setTimes(getIntegerTimes(salaryParamImportDTO.getTimesName()));
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 6991000..961192c 100644
--- a/server/src/main/java/doumeemes/service/ext/impl/PlansExtServiceImpl.java
+++ b/server/src/main/java/doumeemes/service/ext/impl/PlansExtServiceImpl.java
@@ -1617,6 +1617,8 @@
public void autoWorkReport(LoginUserInfo user, AutoWorkReportDTO autoWorkReportDTO){
if(Objects.isNull(autoWorkReportDTO)
|| Objects.isNull(autoWorkReportDTO.getCreateWorkorderRecordDTO())
+ || Objects.isNull(autoWorkReportDTO.getProUserList())
+ || Objects.isNull(autoWorkReportDTO.getProUserList().size()==0)
|| Objects.isNull(autoWorkReportDTO.getCreateWorkorderRecordDTO().getUnQualifiedNum())|| autoWorkReportDTO.getCreateWorkorderRecordDTO().getUnQualifiedNum().compareTo(BigDecimal.ZERO) < Constants.ZERO
|| Objects.isNull(autoWorkReportDTO.getCreateWorkorderRecordDTO().getQualifiedNum())|| autoWorkReportDTO.getCreateWorkorderRecordDTO().getQualifiedNum().compareTo(BigDecimal.ZERO) < Constants.ZERO){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
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 78cc8f8..73db15a 100644
--- a/server/src/main/java/doumeemes/service/ext/impl/WorkorderExtServiceImpl.java
+++ b/server/src/main/java/doumeemes/service/ext/impl/WorkorderExtServiceImpl.java
@@ -370,7 +370,7 @@
rParam.setPlanId(pageWrap.getId());
rParam.setDeleted(Constants.ZERO);
//宸插畬宸ユ暟閲�
-// plan.setDoneNum(0);
+ plan.setDoneNum(0);
//宸插垎閰嶆暟閲�
plan.setDistributNum(0);
//鏌ヨ鍏ㄩ儴鎶曟枡鍜屼骇鍑�
--
Gitblit v1.9.3