rentaiming
2024-07-25 454cb87bf4ecfae8a54e0afac1b2d8e9c58e9f62
ruoyi-modules/ruoyi-management/src/main/java/com/ruoyi/management/service/impl/SlVolumeProductionRkServiceImpl.java
@@ -104,14 +104,30 @@
    }
    @Override
    public void addVolumeProductionRkgl(SlVolumeProductionRkListDTO slVolumeProductionRkListDTO) {
        List<Long> materialsId = slVolumeProductionRkListDTO.getMaterialsId();
        for (Long m:materialsId){
    public void addVolumeProductionRkgl(List<SlVolumeProductionRkListDTO> slVolumeProductionRkListDTO) {
        for (SlVolumeProductionRkListDTO m:slVolumeProductionRkListDTO){
            SlVolumeProductionRk slVolumeProductionRk=new SlVolumeProductionRk();
            slVolumeProductionRk.setVolumeProductionRkglId(slVolumeProductionRkListDTO.getVolumeProductionRkglId());
            slVolumeProductionRk.setMaterialsId(m);
            slVolumeProductionRk.setManagementId(slVolumeProductionRkListDTO.getManagementId());
            slVolumeProductionRk.setVolumeProductionRkglId(m.getVolumeProductionRkglId());
            slVolumeProductionRk.setMaterialsId(m.getMaterialsId());
            slVolumeProductionRk.setManagementId(m.getManagementId());
            slVolumeProductionRk.setRkNumber("CD-"+new Date().getTime());
            if ( m.getErwmNum()!=null){
                slVolumeProductionRk.setErwmNum( m.getErwmNum());
            }if ( m.getRkPice()!=null){
                slVolumeProductionRk.setRkPice( m.getRkPice());
            }if ( m.getRkNum()!=null){
                slVolumeProductionRk.setRkNum( m.getRkNum());
            }if ( m.getShelfId()!=null){
                slVolumeProductionRk.setShelfId( m.getShelfId());
            }if ( m.getRkModel()!=null){
                slVolumeProductionRk.setRkModel( m.getRkModel());
            }if ( m.getStoreManagementNumber()!=null){
                slVolumeProductionRk.setStoreManagementNumber( m.getStoreManagementNumber());
            }if ( m.getRkNumber()!=null){
                slVolumeProductionRk.setRkNumber( m.getRkNumber());
            }
            this.save(slVolumeProductionRk);
        }