jiaosong
2023-08-18 26e4b49b3b51e123e9ce2b055c8e0d37d35df260
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);
@@ -1652,8 +1654,8 @@
        Workorder param = new Workorder();
        param.setPlanId(autoWorkReportDTO.getPlansId());
        param.setPlanDate(new Date());
        CompanyUser companyUser= companyUserExtMapper.selectById(autoWorkReportDTO.getProUserList().get(Constants.ZERO));
        param.setCreateUser(companyUser.getUserId());
//        CompanyUser companyUser= companyUserExtMapper.selectById(autoWorkReportDTO.getProUserList().get(Constants.ZERO));
        param.setCreateUser(autoWorkReportDTO.getProUserList().get(Constants.ZERO));
        param.setProGroupId(autoWorkReportDTO.getProGroupId());
        param.setProUserList(autoWorkReportDTO.getProUserList());
        param.setPlanNum(num.intValue());