| | |
| | | import com.consum.base.core.CodeGeneratorService; |
| | | import com.consum.base.core.param.BaseWarehouseParam1; |
| | | import com.consum.base.pojo.*; |
| | | import com.consum.base.util.IdUtil; |
| | | import com.consum.base.core.utils.IdUtil; |
| | | import com.consum.model.po.*; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.DateUtils; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | |
| | | } |
| | | //2.新增物品型号记录 |
| | | List<LWhFormOutputGoodsParams> goodsList = param.getGoods(); |
| | | List<LWhProcureModel> modelList = new ArrayList<>(); |
| | | for (LWhFormOutputGoodsParams goods : goodsList) { |
| | | List<LWhProcureModelParams> models = goods.getModels(); |
| | | List<LWhProcureModel> modelList = new ArrayList<>(); |
| | | for (LWhProcureModelParams model : models) { |
| | | LWhProcureModel lWhProcureModel = new LWhProcureModel(); |
| | | lWhProcureModel.setId(IdUtil.generateId()); |
| | |
| | | lWhProcureModel.setWorehouseCount(goodsNum); |
| | | modelList.add(lWhProcureModel); |
| | | } |
| | | int flag2 = this.lWhProcureModelService.insert(modelList); |
| | | if (flag2 != modelList.size()) { |
| | | log.error("新增物品型号失败"); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return 0; |
| | | } |
| | | } |
| | | int flag2 = this.lWhProcureModelService.insert(modelList); |
| | | if (flag2 != modelList.size()) { |
| | | log.error("新增物品型号失败"); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return 0; |
| | | } |
| | | |
| | | //3.根据出库单出库 |