rentaiming
2024-07-29 b10ab69ad0b3ba71837b48515e2c4eab7b4694a4
ruoyi-modules/ruoyi-management/src/main/java/com/ruoyi/management/service/impl/SlVolumeProductionRkglServiceImpl.java
@@ -139,10 +139,11 @@
    }
    @Override
    public void addVolumeProductionRkgl(VolumeProductionRkglDTO volumeProductionRkglDTO) {
    public Long addVolumeProductionRkgl(VolumeProductionRkglDTO volumeProductionRkglDTO) {
        Long userid = SecurityUtils.getUserId();
        SlVolumeProductionRkgl slVolumeProductionRkgl=null;
        if (volumeProductionRkglDTO.getId()==null){
            SlVolumeProductionRkgl slVolumeProductionRkgl=new  SlVolumeProductionRkgl();
            new  SlVolumeProductionRkgl();
            slVolumeProductionRkgl.setAttachmentUrl(volumeProductionRkglDTO.getAttachmentUrl());
            slVolumeProductionRkgl.setAuthorizationUrl(volumeProductionRkglDTO.getAuthorization());
            slVolumeProductionRkgl.setAuditStatus(1);
@@ -155,24 +156,26 @@
            slVolumeProductionRkgl.setRemark(volumeProductionRkglDTO.getRemark());
            this.save(slVolumeProductionRkgl);
        }else{
            SlVolumeProductionRkgl byId = this.getById(volumeProductionRkglDTO.getId());
            slVolumeProductionRkgl = this.getById(volumeProductionRkglDTO.getId());
            if (volumeProductionRkglDTO.getSource()!=null){
                byId.setSource(volumeProductionRkglDTO.getSource());
                slVolumeProductionRkgl.setSource(volumeProductionRkglDTO.getSource());
            }
            if (volumeProductionRkglDTO.getRemark()!=null){
                byId.setRemark(volumeProductionRkglDTO.getRemark());
                slVolumeProductionRkgl.setRemark(volumeProductionRkglDTO.getRemark());
            }
            if (volumeProductionRkglDTO.getSupplierId()!=null){
                byId.setSupplierId(volumeProductionRkglDTO.getSupplierId());
                slVolumeProductionRkgl.setSupplierId(volumeProductionRkglDTO.getSupplierId());
            }
            if (volumeProductionRkglDTO.getAttachmentUrl()!=null){
                byId.setAttachmentUrl(volumeProductionRkglDTO.getAttachmentUrl());
                slVolumeProductionRkgl.setAttachmentUrl(volumeProductionRkglDTO.getAttachmentUrl());
            }
            if (volumeProductionRkglDTO.getAuthorization()!=null){
                byId.setAuthorizationUrl(volumeProductionRkglDTO.getAuthorization());
                slVolumeProductionRkgl.setAuthorizationUrl(volumeProductionRkglDTO.getAuthorization());
            }
            this.updateById(byId);
            this.updateById(slVolumeProductionRkgl);
        }
        return slVolumeProductionRkgl.getId();
    }
    @Override