| | |
| | | |
| | | @Override |
| | | public Integer create(SalaryParam salaryParam) { |
| | | |
| | | |
| | | LoginUserInfo principal = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | |
| | | SalaryParam insert = new SalaryParam(); |
| | |
| | | || 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(), "导入数据内容有误!"); |
| | | } |
| | | }); |
| | |
| | | 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)){ |
| | |
| | | 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; |
| | |
| | | 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){ |