| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description 物品模板 |
| | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("categoryId", categoryId); |
| | | |
| | | List<BaseWarehouse> baseWarehouseList = baseWarehouseService.getByAgencyId(agencyId); |
| | | baseWarehouseList.forEach(baseWarehouse -> { |
| | | Integer isDefault = baseWarehouse.getIsDefault(); |
| | | if (isDefault == 1) { |
| | | map.put("warehouseId", baseWarehouse.getId()); |
| | | List<BaseWarehouse> baseWarehouseList = baseWarehouseService.getByAgencyId(agencyId,(short)1,(short)1); |
| | | if (CollectionUtils.isEmpty(baseWarehouseList)){ |
| | | return ResponseValue.error("机构无默认仓库!"); |
| | | |
| | | } |
| | | }); |
| | | map.put("warehouseId", baseWarehouseList.get(0).getId()); |
| | | |
| | | String sql = "SELECT DISTINCT bgt.id,bgt.GOODS_NAME FROM l_wh_goods g LEFT JOIN base_goods_template bgt ON g.BASE_GOODS_TEMPLATE_ID = bgt.id " |
| | | + "WHERE WAREHOUSE_TYPE = 0 " |
| | |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.web.ResponseValue; |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description 仓库管理 |
| | |
| | | // if (agencyId == null) { |
| | | // return ResponseValue.error("机构id为空"); |
| | | // } |
| | | List<BaseWarehouse> list = this.baseWarehouseService.getByAgencyId(agencyId); |
| | | List<BaseWarehouse> list = this.baseWarehouseService.getByAgencyId(agencyId,null,null); |
| | | if (list == null) { |
| | | return ResponseValue.error("查询失败!"); |
| | | } |
| | |
| | | import com.consum.base.pojo.LWhFormProcureParam; |
| | | import com.consum.base.pojo.LWhProcureModelParam; |
| | | import com.consum.base.pojo.query.FormProcureQry; |
| | | import com.consum.base.pojo.response.FormProcureVO; |
| | | import com.consum.base.pojo.response.FromProcureTemplateInfoVO; |
| | | import com.consum.base.pojo.response.GoodsModelVO; |
| | | import com.consum.base.pojo.response.LWhFormProcureExtendVO; |
| | | import com.consum.base.pojo.response.LWhFormProcureGoodsVO; |
| | | import com.consum.base.service.BaseGoodsTemplateServiceImpl; |
| | | import com.consum.base.service.BaseWarehouseServiceImpl; |
| | | import com.consum.base.service.FinSysTenantServiceImpl; |
| | | import com.consum.base.service.LOrgSupplierServiceImpl; |
| | | import com.consum.base.service.LWhFormProcureCoreService; |
| | | import com.consum.base.service.LWhFormProcureGoodsService; |
| | | import com.consum.base.service.LWhFormProcureService; |
| | | import com.consum.base.service.LWhGoodsService; |
| | | import com.consum.base.service.LWhProcureModelService; |
| | | import com.consum.model.po.BaseGoodsTemplate; |
| | | import com.consum.model.po.BaseWarehouse; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.LOrgSupplier; |
| | | import com.consum.model.po.LWhFormProcure; |
| | | import com.consum.model.po.LWhFormProcureGoods; |
| | | import com.consum.model.po.LWhProcureModel; |
| | | import com.consum.base.pojo.response.*; |
| | | import com.consum.base.service.*; |
| | | import com.consum.model.po.*; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.CollectionUtils; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import java.lang.reflect.Field; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | import javax.annotation.Resource; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.lang.reflect.Field; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @ClassName LWhFormProcureController |
| | |
| | | model.setCounts(counts); |
| | | model.setWorehouseCount(goodsModelNum); |
| | | model.setSupplier(supplier); |
| | | model.setTotalAmount(price*counts); |
| | | procureModelList.add(model); |
| | | } |
| | | procureGoodList.add(procureGood); |
| | |
| | | import com.consum.base.core.utils.IdUtil; |
| | | import com.consum.base.core.utils.MapUtils; |
| | | import com.consum.base.core.utils.MapperUtil; |
| | | import com.consum.base.pojo.LWhFormTransferGoodsInfoParam; |
| | | import com.consum.base.pojo.LWhFormTransferParam; |
| | | import com.consum.base.pojo.ProcureModelInfoDto; |
| | | import com.consum.base.pojo.UseRecordDto; |
| | | import com.consum.base.pojo.UseRecordSkuDto; |
| | | import com.consum.base.pojo.*; |
| | | import com.consum.base.pojo.query.TransferQry; |
| | | import com.consum.base.pojo.response.FormTransferVO; |
| | | import com.consum.base.pojo.response.FromTransferTemplateInfoVO; |
| | | import com.consum.base.pojo.response.LWHFromTransferExtendVO; |
| | | import com.consum.base.pojo.response.TransferInfoVO; |
| | | import com.consum.base.service.BaseGoodsModelsServiceImpl; |
| | | import com.consum.base.service.LWhFormTransferCoreService; |
| | | import com.consum.base.service.LWhFormTransferServiceImpl; |
| | | import com.consum.base.service.LWhProcureModelService; |
| | | import com.consum.base.service.LWhProcureModelUserRecordServiceImpl; |
| | | import com.consum.base.service.LWhProcureModelUserServiceImpl; |
| | | import com.consum.model.po.BaseGoodsModels; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.LWhFormTransfer; |
| | | import com.consum.model.po.LWhProcureModel; |
| | | import com.consum.model.po.LWhProcureModelUser; |
| | | import com.consum.model.po.LWhProcureModelUserRecord; |
| | | import com.consum.base.service.*; |
| | | import com.consum.model.po.*; |
| | | import com.consum.model.vo.LWhFormOutputVo; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @Description 调拨管理 |
| | |
| | | private LWhProcureModelUserRecordServiceImpl lWhProcureModelUserRecordService; |
| | | @Autowired |
| | | private BaseGoodsModelsServiceImpl baseGoodsModelsService; |
| | | |
| | | @Autowired |
| | | private BaseWarehouseServiceImpl baseWarehouseService; |
| | | /** |
| | | * @Description 新增 |
| | | */ |
| | |
| | | }) |
| | | @PostMapping("/output") |
| | | public ResponseValue output(Long id) { |
| | | // 出库前 设置出库仓库 |
| | | FinSysTenantUser sysTenantUser = this.getSysInfo(); |
| | | String agencyId = sysTenantUser.getTenantId(); |
| | | List<BaseWarehouse> baseWarehouseList = baseWarehouseService.getByAgencyId(Long.valueOf(agencyId), (short) 1, (short) 1); |
| | | if (CollectionUtils.isEmpty(baseWarehouseList)){ |
| | | return ResponseValue.error("机构无默认仓库!"); |
| | | } |
| | | BaseWarehouse baseWarehouse = baseWarehouseList.get(0); |
| | | Long wareHouseId = baseWarehouse.getId(); |
| | | String warehouseName = baseWarehouse.getWarehouseName(); |
| | | LWhFormTransfer lWhFormTransfer = new LWhFormTransfer(id); |
| | | lWhFormTransfer.setOutWarehouseId(wareHouseId); |
| | | lWhFormTransfer.setOutWarehouseName(warehouseName); |
| | | lWhFormTransferService.update(lWhFormTransfer); |
| | | lWhFormTransferCoreService.doTransferOutPut(id, getCurrentUser()); |
| | | return ResponseValue.success(); |
| | | } |
| | |
| | | |
| | | /** |
| | | * @ClassName WhBusinessEnum |
| | | |
| | | * @Date 2023/10/24 |
| | | * @Description 单据类型 |
| | | * @Version 1.0 |
| | |
| | | /** |
| | | * 报废 |
| | | */ |
| | | BAOFEI((short) 5); |
| | | BAOFEI((short) 5), |
| | | /** |
| | | * 部门物品回退仓库 |
| | | */ |
| | | BUMENTUIHUI((short) 6), |
| | | /** |
| | | * 物品盘点 |
| | | */ |
| | | PANDIAN((short) 7), |
| | | ; |
| | | |
| | | private short value; |
| | | |
| | |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Description 仓库管理 |
| | |
| | | * @Author 卢庆阳 |
| | | * @Date 2023/10/27 |
| | | */ |
| | | public List<BaseWarehouse> getByAgencyId(Long agencyId) { |
| | | public List<BaseWarehouse> getByAgencyId(Long agencyId, Short isDefault, Short states) { |
| | | StringBuilder sql = new StringBuilder("SELECT * FROM base_warehouse WHERE 1 = 1 "); |
| | | HashMap<String, Object> paramts = new HashMap<>(); |
| | | |
| | |
| | | sql.append(" and AGENCY_ID =:AGENCY_ID "); |
| | | paramts.put("AGENCY_ID", agencyId); |
| | | } |
| | | // 是否为默认仓库 |
| | | if (isDefault != null) { |
| | | sql.append(" and IS_DEFAULT =:isDefault "); |
| | | paramts.put("isDefault", isDefault); |
| | | } |
| | | // 状态 |
| | | if (states != null) { |
| | | sql.append(" and states =:states "); |
| | | paramts.put("states", states); |
| | | } |
| | | return select(sql.toString(), paramts, new BaseWarehouse()); |
| | | } |
| | | |
| | |
| | | import com.consum.model.po.LWhProcureModelUser; |
| | | import com.consum.model.po.LWhProcureModelUserRecord; |
| | | import com.walker.infrastructure.utils.NumberGenerator; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import javax.annotation.Resource; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName LGoodsUserRecordCoreService |
| | |
| | | // 将所有物品设置为未分发 |
| | | List<Long> srappedGoodsIds = lWhGoodsService.queryScrappedGoodsIds(inWarehouseType, inWarehouseId, transBusinessId, null, null, null, null); |
| | | lWhGoodsService.modGoodsTransfering(srappedGoodsIds, null, null, null, 3); |
| | | // 删除该调拨单旧有使用记录 |
| | | lGoodsUserRecordService.delete(new LGoodsUserRecord(), "where TRANS_BUSINESS_ID =" + transBusinessId, new HashMap<>()); |
| | | // 设置旧的LAST_RECORD= 0 |
| | | lGoodsUserRecordService.updSetNotLast(srappedGoodsIds); |
| | | //插入新的 |
| | |
| | | package com.consum.base.service; |
| | | |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName LGoodsUserRecordServiceImpl |
| | |
| | | public int updSetNotLast(List<Long> outGoodsIds) { |
| | | return this.update(updSetNotLast + StringUtils.join(outGoodsIds, ",") + ")", new String[]{}); |
| | | } |
| | | |
| | | /** |
| | | * 通过 调拨单ID 或者 分发记录表id 删除 |
| | | */ |
| | | private static String DEL_BY_TRANDS_AND_RECORDID = "delete from L_GOODS_USER_RECORD where 1=1"; |
| | | |
| | | public int delByTrandsAndRecordId(Long transBusinessId, Long procureModelUserRecordId) { |
| | | if (transBusinessId == null && procureModelUserRecordId == null) { |
| | | return 0; |
| | | } |
| | | ArrayList<Object> params = new ArrayList<>(); |
| | | StringBuilder sql = new StringBuilder(DEL_BY_TRANDS_AND_RECORDID); |
| | | if (transBusinessId != null) { |
| | | sql.append(" and TRANS_BUSINESS_ID =?"); |
| | | params.add(transBusinessId); |
| | | } |
| | | if (procureModelUserRecordId != null) { |
| | | sql.append(" and PROCURE_MODEL_USER_RECORD_ID =?"); |
| | | params.add(procureModelUserRecordId); |
| | | } |
| | | return update(sql.toString(), params.toArray()); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.consum.base.service; |
| | | |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class LGoodsWhRecordServiceImpl extends BaseServiceImpl { |
| | | private static String insert_new_record = "INSERT INTO L_GOODS_WH_RECORD (WAREHOUSE_FLOW_ID,DEAL_TIME,LAST_RECORD, WH_GOODS_ID,WAREHOUSE_TYPE, WAREHOUSE_ID)SELECT ?, ?,1,ID, WAREHOUSE_TYPE, WAREHOUSE_ID FROM L_WH_GOODS WHERE ID IN (?)"; |
| | | private static String insert_new_record = "INSERT INTO L_GOODS_WH_RECORD (WAREHOUSE_FLOW_ID,DEAL_TIME,LAST_RECORD, WH_GOODS_ID,WAREHOUSE_TYPE, WAREHOUSE_ID)SELECT ?, ?,1,ID, WAREHOUSE_TYPE, WAREHOUSE_ID FROM L_WH_GOODS WHERE ID IN ("; |
| | | |
| | | public int insertNewRecord(List<Long> outGoodsIds, long lWarehouseFlowId, long dealTime) { |
| | | this.updSetNotLast(outGoodsIds); |
| | | ArrayList<Object> params = new ArrayList<>(); |
| | | params.add(lWarehouseFlowId); |
| | | params.add(dealTime); |
| | | params.add(outGoodsIds); |
| | | return this.update(insert_new_record, params.toArray()); |
| | | return this.update(insert_new_record + StringUtils.join(outGoodsIds, ",") + ")", params.toArray()); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 设置为非最新 |
| | | */ |
| | | private static String updSetNotLast = "update L_GOODS_WH_RECORD set LAST_RECORD = 0 where WH_GOODS_ID in(?) and LAST_RECORD=1"; |
| | | private static String updSetNotLast = "update L_GOODS_WH_RECORD set LAST_RECORD = 0 where LAST_RECORD=1 and WH_GOODS_ID in("; |
| | | |
| | | public int updSetNotLast(List<Long> outGoodsIds) { |
| | | ArrayList<Object> params = new ArrayList<>(); |
| | | params.add(outGoodsIds); |
| | | return this.update(updSetNotLast, params.toArray()); |
| | | return this.update(updSetNotLast + StringUtils.join(outGoodsIds, ",") + ")", new String[]{}); |
| | | } |
| | | } |
| | |
| | | whGoodsRecord.setThisCount(modelCount); |
| | | whGoodsRecord.setEndCount(goodsModelNum + modelCount); |
| | | |
| | | long totalPrice = 0; |
| | | //将同型号的物品插入 库存物品详情 |
| | | List<LWhProcureModel> lWhProcureModels = sameModelList.get(baseGoodsModelsId); |
| | | lWhProcureModels.forEach(item -> { |
| | | for (LWhProcureModel item : lWhProcureModels) { |
| | | //供应商 |
| | | String supplier = item.getSupplier(); |
| | | //价格 |
| | | Long price = item.getPrice(); |
| | | //物品个数 |
| | | Integer counts = item.getCounts(); |
| | | totalPrice = totalPrice + counts*price; |
| | | sameGoodsInsertMore(warehouseFlowId, warehouseType, warehouseId, whGoodsRecordId, (short) 1, warehouseName, |
| | | classification, tempGoodsId, goodsName, baseGoodsModelsId, modelName, |
| | | supplier, buyType, goodsUnit, price, procureTime, 1, dealTime, counts); |
| | | }); |
| | | }; |
| | | whGoodsRecord.setTotalPrice(totalPrice); |
| | | } |
| | | lWhGoodsRecordService.insert(whGoodsRecord); |
| | | }); |
| | |
| | | whFormOutput.setOutputName("调拨出库"); |
| | | whFormOutput.setWarehouseId(outWarehouseId); |
| | | whFormOutput.setWarehouseName(outWarehouseName); |
| | | // 这样就查询不到该条记录 |
| | | whFormOutput.setAgencyId(null); |
| | | whFormOutput.setAgencyName(null); |
| | | whFormOutput.setOperatorId(currentUser.getId()); |
| | |
| | | // 出库单ID |
| | | Long outWarehouseFormId = null; |
| | | try { |
| | | // 根据调拨单 生成 出库单 |
| | | // 根据调拨单 生成 出库单 这样就能公用出库 |
| | | outWarehouseFormId = lWhFormOutputCoreService.createOutFormByTransId(whFormTransferId, currentUser, dealTime); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage()); |
| | | return; |
| | | } |
| | | //单据类型。0仓库调拨;1部门分发;2部门物品回退 |
| | | Integer businessType = lWhFormTransfer.getBusinessType(); |
| | | businessType = businessType == null ? 0 : businessType; |
| | | WhBusinessEnum businessEnum = WhBusinessEnum.DIAOBO; |
| | | if (businessType == 0) { |
| | | businessEnum = WhBusinessEnum.DIAOBO; |
| | | } else if (businessType == 1) { |
| | | businessEnum = WhBusinessEnum.BUMENFENFA; |
| | | } else if (businessType == 2) { |
| | | businessEnum = WhBusinessEnum.BUMENTUIHUI; |
| | | } |
| | | // 出库单 出库,返回 出库单流水Id |
| | | Long lWarehouseFlowId = lWhFormOutputCoreService.outFormByTransId(outWarehouseFormId, WhBusinessEnum.DIAOBO, currentUser, dealTime); |
| | | Long lWarehouseFlowId = lWhFormOutputCoreService.outFormByTransId(outWarehouseFormId, businessEnum, currentUser, dealTime); |
| | | |
| | | // 更新调拨单 |
| | | lWhFormTransfer = new LWhFormTransfer(whFormTransferId); |
| | |
| | | List<Long> outGoodsIds = getGoodsidByFlowId(outWarehouseFlowId, oldRecordId); |
| | | // 库存物品详情(L_WH_GOODS)中 状态设置为1 |
| | | lWhGoodsService.modGoodsTransfering(outGoodsIds, inWarehouseType, inWarehouseId, inWarehouseName, goodsStatus); |
| | | //此时要往 物品使用记录【L_GOODS_USER_RECORD】添加数据 |
| | | if (businessType == 1){ |
| | | // 1部门分发 此时要往 物品使用记录【L_GOODS_USER_RECORD】添加数据 |
| | | //查询部门分发使用人 |
| | | LWhProcureModelUser lWhProcureModelUser = new LWhProcureModelUser(); |
| | | lWhProcureModelUser.setTransBusinessId(whFormTransferId); |
| | |
| | | } |
| | | //批量插入使用人记录 |
| | | lGoodsUserRecordService.insertBatch(goodsUserRecordList); |
| | | } |
| | | //将保管仓库信息更新到 物品仓库保管记录【L_GOODS_WH_RECORD】 |
| | | lGoodsWhRecordService.insertNewRecord(outGoodsIds, inWarehouseFlowId, dealTime); |
| | | |
| | |
| | | lWhGoodsRecordDetails.setWhGoodsRecordId(oldRecordId); |
| | | List<LWhGoodsRecordDetails> goodsRecordDetailsList = lWhGoodsRecordDetailsService.select(lWhGoodsRecordDetails); |
| | | for (LWhGoodsRecordDetails whGoodsRecordDetails : goodsRecordDetailsList) { |
| | | whGoodsRecordDetails.setId(NumberGenerator.getLongSequenceNumber()); |
| | | whGoodsRecordDetails.setId(null); |
| | | whGoodsRecordDetails.setWhGoodsRecordId(whGoodsRecord.getId()); |
| | | whGoodsRecordDetails.setThisType(1); |
| | | } |
| | | lWhGoodsRecordDetailsService.insertBatch(goodsRecordDetailsList); |
| | |
| | | import com.consum.base.pojo.response.FormTransferGoodsVO; |
| | | import com.consum.base.pojo.response.GoodsModelVO; |
| | | import com.consum.base.pojo.response.LWHFromTransferExtendVO; |
| | | import com.consum.model.po.BaseGoodsModels; |
| | | import com.consum.model.po.BaseWarehouse; |
| | | import com.consum.model.po.FinSysTenant; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.LWhFormOutput; |
| | | import com.consum.model.po.LWhFormTransfer; |
| | | import com.consum.model.po.LWhGoodsRecord; |
| | | import com.consum.model.po.LWhProcureModel; |
| | | import com.consum.model.po.LWhProcureModelUser; |
| | | import com.consum.model.po.*; |
| | | import com.consum.model.vo.LWhFormOutputVo; |
| | | import com.consum.model.vo.LWhGoodsRecordVo; |
| | | import com.iplatform.model.po.S_user_core; |
| | |
| | | import com.walker.infrastructure.utils.DateUtils; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.BeanUtils; |
| | | 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; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description 调拨管理 |
| | |
| | | log.error("仓库不存在"); |
| | | throw new Exception("仓库不存在"); |
| | | } |
| | | lWhFormTransfer.setInWarehouseId(warehouse.getId()); |
| | | lWhFormTransfer.setInWarehouseName(warehouse.getWarehouseName()); |
| | | lWhFormTransfer.setInAgencyId(Long.valueOf(tenantId)); |
| | | lWhFormTransfer.setInAgencyName(sysInfo.getTenantName()); |