jiaosong
2023-08-18 4d94726acad17e5cdcf828e21cab762e8b39921c
server/src/main/java/doumeemes/service/business/impl/SalaryParamServiceImpl.java
@@ -46,7 +46,6 @@
    @Autowired
    private MaterialMapper materialMapper;
    @Autowired
    private MaterialDistributeMapper materialDistributeMapper;
@@ -65,6 +64,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(),"同一个物料在相同工序不能重复配置哦!");
        }
@@ -205,6 +205,7 @@
            wrapper.lambda()
                    .eq(Department::getName,salaryParamImportDTO.getDepartName())
                    .eq(Department::getType,Constants.DEPART_TYPE.factory)
                    .eq(Department::getDeleted,Constants.ZERO)
                    .last("limit 1");
            Department department = departmentMapper.selectOne(wrapper);
            if (Objects.isNull(department)){
@@ -215,6 +216,7 @@
            materialWrapper.lambda()
                    .eq(Material::getCode,salaryParamImportDTO.getMaterialCode())
                    .eq(Material::getRootDepartId,department.getRootId())
                    .eq(Material::getDeleted,Constants.ZERO)
                    .last("limit 1");
            Material material = materialMapper.selectOne(materialWrapper);