jiaosong
2023-08-18 26e4b49b3b51e123e9ce2b055c8e0d37d35df260
server/src/main/java/doumeemes/service/business/impl/SalaryParamServiceImpl.java
@@ -237,7 +237,6 @@
            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(), "导入数据内容【产品名称】有误!");
            }
@@ -252,18 +251,6 @@
            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())
@@ -278,7 +265,7 @@
            salaryParam.setRootDepartId(department.getRootId());
            salaryParam.setDepartId(department.getId());
            salaryParam.setProcedureId(procedures.getId());
            salaryParam.setMaterialId(materialDistribute1.getId());
            salaryParam.setMaterialId(materialDistribute.getId());
            salaryParam.setSalary(salaryParamImportDTO.getSalary());
            salaryParam.setNum(new BigDecimal(salaryParamImportDTO.getNum()));
            salaryParam.setTimes(getIntegerTimes(salaryParamImportDTO.getTimesName()));
@@ -291,7 +278,7 @@
            }).orElse(0);
            salaryParam.setUnqualified(unqualified);
            Integer type = Optional.ofNullable(salaryParamImportDTO.getUnqualified()).map(s -> {
            Integer type = Optional.ofNullable(salaryParamImportDTO.getType()).map(s -> {
                if ("计件".equals(s)) {
                    return 0;
                } else {