jiaosong
2023-08-15 91b92422716cb4c5d0433f77fd2d6d45a69639c4
server/src/main/java/doumeemes/service/business/impl/SalaryParamServiceImpl.java
@@ -54,6 +54,8 @@
    @Override
    public Integer create(SalaryParam salaryParam) {
        LoginUserInfo principal = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        SalaryParam insert = new SalaryParam();
@@ -178,7 +180,7 @@
                || Objects.isNull(s.getDepartName())
                || Objects.isNull(s.getMaterialCode())
                || Objects.isNull(s.getProcedureName())
                || Objects.isNull(s.getNUM())){
                || Objects.isNull(s.getNum())){
                throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "导入数据内容有误!");
            }
        });
@@ -214,7 +216,7 @@
            proceduresWrapper.lambda()
                    .eq(Procedures::getName,salaryParamImportDTO.getProcedureName())
                    .eq(Procedures::getRootDepartId,department.getRootId())
                    .eq(Procedures::getDepartId,department.getId())
                    .eq(Procedures::getOrgId,department.getId())
                    .last("limit 1");
            Procedures procedures = proceduresMapper.selectOne(proceduresWrapper);
            if (Objects.isNull(procedures)){
@@ -226,10 +228,8 @@
            salaryParam.setProcedureId(procedures.getId());
            salaryParam.setMaterialId(material.getId());
            salaryParam.setSalary(salaryParamImportDTO.getSalary());
            salaryParam.setNum(new BigDecimal(salaryParamImportDTO.getNUM()));
            salaryParam.setNum(new BigDecimal(salaryParamImportDTO.getNum()));
            salaryParam.setTimes(getIntegerTimes(salaryParamImportDTO.getTimesName()));
            Integer unqualified = Optional.ofNullable(salaryParamImportDTO.getUnqualified()).map(s -> {
                if ("否".equals(s)) {
                    return 0;
@@ -265,7 +265,7 @@
                m = Integer.parseInt(a.substring(hIndex >=0?hIndex+2:0,mIndex));
            }
            if(sIndex > mIndex){
               s = Integer.parseInt(a.substring(mIndex >=0?mIndex+2:0,mIndex));
               s = Integer.parseInt(a.substring(mIndex >= 0 ? mIndex+2 : 0, sIndex));
            }
            return  h*3600+m*60+s;
        }catch (Exception e){