jiangping
2023-08-18 6ad10e278e9193bd65314a2f3c954ab16e8c104f
修复bug
已修改5个文件
30 ■■■■ 文件已修改
server/src/main/java/doumeemes/api/business/SalaryParamController.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/java/doumeemes/dao/business/vo/SalaryParamVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/java/doumeemes/service/business/impl/SalaryParamServiceImpl.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/java/doumeemes/service/ext/impl/PlansExtServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/java/doumeemes/service/ext/impl/WorkorderExtServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
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查询")
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;
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()));
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);
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);
        //查询全部投料和产出