From f5623e6c538ebff2dfe38ff04bdb996307e7aa84 Mon Sep 17 00:00:00 2001 From: luqingyang <lqy5492@163.com> Date: 星期二, 31 十月 2023 17:03:35 +0800 Subject: [PATCH] 库存盘点 相关代码 --- consum-base/src/main/java/com/consum/base/service/LWhFormInventoryGoodsServiceImpl.java | 57 + consum-base/src/main/java/com/consum/base/controller/LWhFormInventoryController.java | 144 +++ consum-base/src/main/java/com/consum/base/controller/LWhFormInventoryGoodsController.java | 51 + consum-base/src/main/java/com/consum/base/core/CodeGeneratorEnum.java | 6 consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventory_mapper.java | 465 +++++++++++ consum-base/src/main/java/com/consum/base/pojo/LWhFormInventoryParam.java | 111 ++ consum-model-pojo/src/main/java/com/consum/model/po/LWhFormOutput_mapper.java | 38 consum-base/src/main/java/com/consum/base/pojo/LWhFormInventoryDto.java | 21 consum-model-pojo/src/main/java/com/consum/model/po/LWhFormTransfer_mapper.java | 38 consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventoryGoods_mapper.java | 373 +++++++++ consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventory.java | 480 ++++++++++++ consum-model-pojo/src/main/java/com/consum/model/po/LWhFormOutput.java | 44 + consum-base/src/main/java/com/consum/base/service/LWhFormInventoryServiceImpl.java | 173 ++++ consum-model-pojo/src/main/java/com/consum/model/po/LWhFormTransfer.java | 44 + consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventoryGoods.java | 326 ++++++++ 15 files changed, 2,367 insertions(+), 4 deletions(-) diff --git a/consum-base/src/main/java/com/consum/base/controller/LWhFormInventoryController.java b/consum-base/src/main/java/com/consum/base/controller/LWhFormInventoryController.java new file mode 100644 index 0000000..3aff362 --- /dev/null +++ b/consum-base/src/main/java/com/consum/base/controller/LWhFormInventoryController.java @@ -0,0 +1,144 @@ +package com.consum.base.controller; + +import com.consum.base.BaseController; +import com.consum.base.pojo.LWhFormInventoryDto; +import com.consum.base.pojo.LWhFormInventoryParam; +import com.consum.base.service.LWhFormInventoryServiceImpl; +import com.consum.model.po.BaseCategory; +import com.consum.model.po.FinSysTenantUser; +import com.consum.model.po.LWhFormInventory; +import com.iplatform.model.po.S_user_core; +import com.walker.db.page.GenericPager; +import com.walker.web.ResponseValue; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description 鐩樼偣 + * @Author 鍗㈠簡闃� + * @Date 2023/10/23 + */ +@RestController +@RequestMapping("/pc/l/wh/form/inventory") +public class LWhFormInventoryController extends BaseController { + + @Autowired + private LWhFormInventoryServiceImpl lWhFormInventoryService; + + /** + * @Description 鏂板 + * @Author 鍗㈠簡闃� + * @Date 2023/10/31 + */ + @PostMapping("/add") + public ResponseValue add(@RequestBody LWhFormInventoryParam param) { + //鏍规嵁鐩樼偣浜篿d鏌ヨ鐩樼偣浜� + S_user_core operatorUser = this.getUser(param.getOperatorId()); + //鏍规嵁鐩戠洏浜篿d鏌ヨ鐩戠洏浜� + S_user_core operatorUser2 = this.getUser(param.getOperatorId2()); + int result = this.lWhFormInventoryService.add(param, this.getSysInfo(),operatorUser,operatorUser2); + if (result > 0) return ResponseValue.success(1); + return ResponseValue.error("鏂板澶辫触锛�"); + } + + /** + * @Description 鐩樼偣鍗曞垪琛ㄦ煡璇� + * @Author 鍗㈠簡闃� + * @Date 2023/10/31 + */ + @GetMapping("/list") + public ResponseValue queryList(LWhFormInventoryParam param) { + FinSysTenantUser sysInfo = this.getSysInfo(); + if (sysInfo == null) { + return ResponseValue.error("鐧诲綍鐢ㄦ埛淇℃伅涓嶅瓨鍦�"); + } + GenericPager<LWhFormInventory> pager = this.lWhFormInventoryService.queryList(param,sysInfo); + return ResponseValue.success(pager); + } + + /** + * @Description 缂栬緫 + * @Author 鍗㈠簡闃� + * @Date 2023/10/31 + */ + @PostMapping("/edit") + public ResponseValue edit(@RequestBody LWhFormInventoryParam param) { + LWhFormInventory lWhFormInventory = lWhFormInventoryService.get(new LWhFormInventory(param.getId())); + if (lWhFormInventory == null) { + return ResponseValue.error("缂栬緫澶辫触锛�"); + } + if (lWhFormInventory.getStates() != 0) { + return ResponseValue.error("鏈紑濮嬬姸鎬佹墠鑳界紪杈戯紒"); + } + int num = lWhFormInventoryService.delete(new LWhFormInventory(param.getId())); + if (num == 0) { + return ResponseValue.error("缂栬緫澶辫触锛�"); + } + ResponseValue add = this.add(param); + if (add.getCode() == ResponseValue.CODE_SUCCESS) { + return ResponseValue.success(1); + } + + return ResponseValue.error("缂栬緫澶辫触锛�"); + } + + /** + * @Description 鏍规嵁id鍒犻櫎 + */ + @DeleteMapping("/del") + public ResponseValue delById(Long id) { + if (id == null) { + return ResponseValue.error("鍙傛暟涓嶈兘涓虹┖锛�"); + } + LWhFormInventory lWhFormInventory = lWhFormInventoryService.get(new LWhFormInventory(id)); + if (lWhFormInventory == null) { + return ResponseValue.error("鍒犻櫎澶辫触锛�"); + } + if (lWhFormInventory.getStates() != 0) { + return ResponseValue.error("鏈紑濮嬬姸鎬佹墠鑳藉垹闄わ紒"); + } + int num = lWhFormInventoryService.delete(new LWhFormInventory(id)); + if (num == 0) { + return ResponseValue.error("鍒犻櫎澶辫触锛�"); + } + + return ResponseValue.success(1); + } + + /** + * @Description 鐩樼偣 + * @Author 鍗㈠簡闃� + * @Date 2023/10/31 + */ + @GetMapping("/select/pdList") + public ResponseValue queryPdList(Long id) { + if (id == null) { + return ResponseValue.error("鐩樼偣澶辫触锛�"); + } + + List list = this.lWhFormInventoryService.queryPdList(id); + return ResponseValue.success(list); + } + + /** + * 鏆傚瓨 + * @author 鍗㈠簡闃� + * @date 2023/10/31 + */ + @PostMapping("/temporaryStorage") + public ResponseValue temporaryStorage(@RequestBody LWhFormInventoryDto dto) { + if (dto == null) { + return ResponseValue.error("鍙傛暟閿欒"); + } + + int num = this.lWhFormInventoryService.temporaryStorage(dto); + return num > 0 ? ResponseValue.success(1) : ResponseValue.error("淇敼澶辫触锛�"); + } + + + +} + diff --git a/consum-base/src/main/java/com/consum/base/controller/LWhFormInventoryGoodsController.java b/consum-base/src/main/java/com/consum/base/controller/LWhFormInventoryGoodsController.java new file mode 100644 index 0000000..5ff7a89 --- /dev/null +++ b/consum-base/src/main/java/com/consum/base/controller/LWhFormInventoryGoodsController.java @@ -0,0 +1,51 @@ +package com.consum.base.controller; + +import com.consum.base.BaseController; +import com.consum.base.pojo.LWhFormInventoryParam; +import com.consum.base.service.LWhFormInventoryGoodsServiceImpl; +import com.consum.base.service.LWhFormInventoryServiceImpl; +import com.consum.model.po.FinSysTenantUser; +import com.consum.model.po.LWhFormInventory; +import com.consum.model.po.LWhFormInventoryGoods; +import com.iplatform.model.po.S_user_core; +import com.walker.db.page.GenericPager; +import com.walker.web.ResponseValue; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description 鐩樼偣鍗曠墿鍝� + * @Author 鍗㈠簡闃� + * @Date 2023/10/31 + */ +@RestController +@RequestMapping("/pc/l/wh/form/inventory/goods") +public class LWhFormInventoryGoodsController extends BaseController { + + @Autowired + private LWhFormInventoryGoodsServiceImpl inventoryGoodsService; + + /** + * @Description 鏍规嵁鐩樼偣鍗昳d鏌ヨ鐩樼偣鍗曠墿鍝�(缁х画鐩樼偣) + * @Author 鍗㈠簡闃� + * @Date 2023/10/31 + * @return + */ + @GetMapping("/list") + public ResponseValue queryList(Long id) { + FinSysTenantUser sysInfo = this.getSysInfo(); + if (sysInfo == null) { + return ResponseValue.error("鐧诲綍鐢ㄦ埛淇℃伅涓嶅瓨鍦�"); + } + if (id == null) { + ResponseValue.error("鍙傛暟閿欒"); + } + List<LWhFormInventoryGoods> list = this.inventoryGoodsService.getByInventoryId(id); + return ResponseValue.success(list); + } + + +} + diff --git a/consum-base/src/main/java/com/consum/base/core/CodeGeneratorEnum.java b/consum-base/src/main/java/com/consum/base/core/CodeGeneratorEnum.java index b1cee62..60f2ed2 100644 --- a/consum-base/src/main/java/com/consum/base/core/CodeGeneratorEnum.java +++ b/consum-base/src/main/java/com/consum/base/core/CodeGeneratorEnum.java @@ -24,10 +24,16 @@ Transfer("DB"), /** + * 鐩樼偣鍗曠紪鐮侊紝绠�鍐欙細PD + */ + Inventory("PD"), + + /** * 鍑哄簱鍗曠紪鐮侊紝绠�鍐欙細CK */ OutPut_Warehouse("CK"); + private String value; CodeGeneratorEnum(String prefix) { diff --git a/consum-base/src/main/java/com/consum/base/pojo/LWhFormInventoryDto.java b/consum-base/src/main/java/com/consum/base/pojo/LWhFormInventoryDto.java new file mode 100644 index 0000000..24be92c --- /dev/null +++ b/consum-base/src/main/java/com/consum/base/pojo/LWhFormInventoryDto.java @@ -0,0 +1,21 @@ +package com.consum.base.pojo; + +import com.consum.model.po.LWhFormInventory; +import com.consum.model.po.LWhFormInventoryGoods; + +import java.util.List; + +public class LWhFormInventoryDto extends LWhFormInventory { + /** + * 鐩樼偣鍗曠墿鍝� + */ + private List<LWhFormInventoryGoods> inventoryGoodsList; + + public List<LWhFormInventoryGoods> getInventoryGoodsList() { + return inventoryGoodsList; + } + + public void setInventoryGoodsList(List<LWhFormInventoryGoods> inventoryGoodsList) { + this.inventoryGoodsList = inventoryGoodsList; + } +} diff --git a/consum-base/src/main/java/com/consum/base/pojo/LWhFormInventoryParam.java b/consum-base/src/main/java/com/consum/base/pojo/LWhFormInventoryParam.java new file mode 100644 index 0000000..e4182d9 --- /dev/null +++ b/consum-base/src/main/java/com/consum/base/pojo/LWhFormInventoryParam.java @@ -0,0 +1,111 @@ +package com.consum.base.pojo; + +import com.walker.web.param.ParamRequest; + +public class LWhFormInventoryParam extends ParamRequest { + private Long id; + /** + * 鐩樼偣鍗曞彿 + */ + private String businessFormCode; + /** + * 鐩樼偣鍗曞悕 + */ + private String businessFormName; + /** + * 浠撳簱缂栧彿 + */ + private Long warehouseId; + /** + * 鐩樼偣浜� + */ + private Long operatorId; + /** + * 鐩戠洏浜� + */ + private Integer operatorId2; + /** + * 澶囨敞 + */ + private String beiz1; + /** + * 鐩樼偣鏃堕棿 寮�濮� + */ + private Long inventoryDateStart; + /** + * 鐩樼偣鏃堕棿 缁撴潫 + */ + private Long inventoryDateEnd; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getBusinessFormCode() { + return businessFormCode; + } + + public void setBusinessFormCode(String businessFormCode) { + this.businessFormCode = businessFormCode; + } + + public String getBusinessFormName() { + return businessFormName; + } + + public void setBusinessFormName(String businessFormName) { + this.businessFormName = businessFormName; + } + + public Long getWarehouseId() { + return warehouseId; + } + + public void setWarehouseId(Long warehouseId) { + this.warehouseId = warehouseId; + } + + public Long getOperatorId() { + return operatorId; + } + + public void setOperatorId(Long operatorId) { + this.operatorId = operatorId; + } + + public Integer getOperatorId2() { + return operatorId2; + } + + public void setOperatorId2(Integer operatorId2) { + this.operatorId2 = operatorId2; + } + + public String getBeiz1() { + return beiz1; + } + + public void setBeiz1(String beiz1) { + this.beiz1 = beiz1; + } + + public Long getInventoryDateStart() { + return inventoryDateStart; + } + + public void setInventoryDateStart(Long inventoryDateStart) { + this.inventoryDateStart = inventoryDateStart; + } + + public Long getInventoryDateEnd() { + return inventoryDateEnd; + } + + public void setInventoryDateEnd(Long inventoryDateEnd) { + this.inventoryDateEnd = inventoryDateEnd; + } +} diff --git a/consum-base/src/main/java/com/consum/base/service/LWhFormInventoryGoodsServiceImpl.java b/consum-base/src/main/java/com/consum/base/service/LWhFormInventoryGoodsServiceImpl.java new file mode 100644 index 0000000..d353518 --- /dev/null +++ b/consum-base/src/main/java/com/consum/base/service/LWhFormInventoryGoodsServiceImpl.java @@ -0,0 +1,57 @@ +package com.consum.base.service; + +import com.consum.base.util.IdUtil; +import com.consum.model.po.LWhFormInventoryGoods; +import com.walker.jdbc.service.BaseServiceImpl; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * @Description 鐩樼偣鍗曠墿鍝� + * @Author 鍗㈠簡闃� + * @Date 2023/10/31 + */ +@Slf4j +@Service +public class LWhFormInventoryGoodsServiceImpl extends BaseServiceImpl { + + /** + * @Description 鏍规嵁鐩樼偣鍗昳d鏌ヨ鐩樼偣鍗曠墿鍝� + * @Author 鍗㈠簡闃� + * @Date 2023/10/31 + * @return + */ + public List<LWhFormInventoryGoods> getByInventoryId(Long id) { + LWhFormInventoryGoods inventoryGoods = new LWhFormInventoryGoods(); + inventoryGoods.setWhFormInventoryId(id); + return this.select(inventoryGoods); + } + + /** + * @Description 鏂板鐩樼偣鍗曠墿鍝佽褰� + * @Author 鍗㈠簡闃� + * @Date 2023/10/31 + * @return + */ + public int add(List<Map<String, Object>> list, Long warehouseId) { + List<LWhFormInventoryGoods> inventoryGoodsList = new ArrayList<>(); + for (Map<String, Object> map : list) { + LWhFormInventoryGoods inventoryGoods = new LWhFormInventoryGoods(); + inventoryGoods.setId(IdUtil.generateId()); + inventoryGoods.setWhFormInventoryId(warehouseId); + inventoryGoods.setBaseGoodsTemplateId((Long) map.get("id")); + inventoryGoods.setGoodsTemplateName((String) map.get("goodsname")); + inventoryGoods.setUnit((String) map.get("unit")); + inventoryGoods.setBaseGoodsModelsId((Long) map.get("modelsid")); + inventoryGoods.setBaseGoodsModelsName((String) map.get("goodsTemplateId")); + inventoryGoods.setInitCounts((Integer) map.get("endcount")); + + inventoryGoodsList.add(inventoryGoods); + } + return this.insert(inventoryGoodsList); + } +} diff --git a/consum-base/src/main/java/com/consum/base/service/LWhFormInventoryServiceImpl.java b/consum-base/src/main/java/com/consum/base/service/LWhFormInventoryServiceImpl.java new file mode 100644 index 0000000..5076e20 --- /dev/null +++ b/consum-base/src/main/java/com/consum/base/service/LWhFormInventoryServiceImpl.java @@ -0,0 +1,173 @@ +package com.consum.base.service; + +import com.consum.base.core.CodeGeneratorEnum; +import com.consum.base.core.CodeGeneratorService; +import com.consum.base.pojo.LWhFormInventoryDto; +import com.consum.base.pojo.LWhFormInventoryParam; +import com.consum.base.util.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.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @Description 鐩樼偣 + * @Author 鍗㈠簡闃� + * @Date 2023/10/23 + */ +@Slf4j +@Service +public class LWhFormInventoryServiceImpl extends BaseServiceImpl { + + @Autowired + private CodeGeneratorService codeGeneratorService; + @Autowired + private BaseWarehouseServiceImpl baseWarehouseService; + @Autowired + private FinSysTenantUserServiceImpl finSysTenantUserService; + @Autowired + private LWhFormInventoryGoodsServiceImpl inventoryGoodsService; + + + private static final String QUERY_LIST = "select * from l_wh_form_inventory where 1=1 "; + + private static final String QUERY_PD_List = "SELECT bgt.GOODS_NAME goodsName,model.MODEL_NAME modelName,bgt.CLASSIFICATION,model.UNIT,\n" + + " record.endCount,bgt.ID goodsTemplateId,model.ID modelsId\n" + + "FROM BASE_GOODS_MODELS model\n" + + " LEFT JOIN (SELECT COUNT(1) endCount, BASE_GOODS_MODELS_ID\n" + + " FROM L_WH_GOODS\n" + + " WHERE WAREHOUSE_TYPE = 0\n" + + " AND WAREHOUSE_ID = 1\n" + + " AND STATES = ?\n" + + " GROUP BY BASE_GOODS_MODELS_ID) record ON record.BASE_GOODS_MODELS_ID = model.id\n" + + "left join base_goods_template bgt on bgt.ID = model.GOODS_TEMPLATES_ID; "; + + /** + * @Description 鏂板 + * @Author 鍗㈠簡闃� + * @Date 2023/10/31 + * @param param + * @param currentUser 褰撳墠鐧诲綍鐢ㄦ埛 + * @param operatorUser 鐩樼偣浜� + * @param operatorUser2 鐩戠洏浜� + * @return + */ + public int add(LWhFormInventoryParam param, FinSysTenantUser currentUser, S_user_core operatorUser, S_user_core operatorUser2) { + //鏂板鐩樼偣鍗� + LWhFormInventory lWhFormInventory = new LWhFormInventory(); + BeanUtils.copyProperties(param,lWhFormInventory); + lWhFormInventory.setId(IdUtil.generateId()); + //鐩樼偣鍗曠紪鐮� + String businessFormCode = codeGeneratorService.createBusinessFormCode(CodeGeneratorEnum.Inventory); + lWhFormInventory.setBusinessFormCode(businessFormCode); + //鏍规嵁浠撳簱id鏌ヨ浠撳簱 + BaseWarehouse baseWarehouse = this.baseWarehouseService.getById(param.getWarehouseId()); + if (baseWarehouse != null) { + lWhFormInventory.setWarehouseName(baseWarehouse.getWarehouseName()); + } + lWhFormInventory.setOperatorName(operatorUser.getUser_name()); + lWhFormInventory.setOperatorName2(operatorUser2.getUser_name()); + lWhFormInventory.setStates(0); + lWhFormInventory.setAgencyId(Long.valueOf(currentUser.getTenantId())); + lWhFormInventory.setAgencyName(currentUser.getTenantName()); + lWhFormInventory.setCreatorId(currentUser.getSysUserId()); + lWhFormInventory.setCreatorName(currentUser.getUserName()); + lWhFormInventory.setCreateTime(DateUtils.getDateTimeNumber(System.currentTimeMillis())); + + return this.insert(lWhFormInventory); + } + + /** + * @Description 鐩樼偣鍗曞垪琛ㄦ煡璇� + * @Author 鍗㈠簡闃� + * @Date 2023/10/31 + */ + public GenericPager<LWhFormInventory> queryList(LWhFormInventoryParam param, FinSysTenantUser sysInfo) { + StringBuilder sql = new StringBuilder(QUERY_LIST); + HashMap<String, Object> paramts = new HashMap<>(); + + //鐩樼偣鍗曞彿 + if (!StringUtils.isEmpty(param.getBusinessFormCode())) { + sql.append(" and BUSINESS_FORM_CODE like:BUSINESS_FORM_CODE "); + paramts.put("BUSINESS_FORM_CODE", StringUtils.CHAR_PERCENT + param.getBusinessFormCode() + StringUtils.CHAR_PERCENT); + } + //鐩樼偣鍗曞悕绉� + if (!StringUtils.isEmpty(param.getBusinessFormName())) { + sql.append(" and BUSINESS_FORM_NAME =:BUSINESS_FORM_NAME "); + paramts.put("BUSINESS_FORM_NAME", StringUtils.CHAR_PERCENT + param.getBusinessFormName() + StringUtils.CHAR_PERCENT); + } + //浠撳簱缂栧彿 + if (param.getWarehouseId() != null) { + sql.append(" and WAREHOUSE_ID =:WAREHOUSE_ID "); + paramts.put("WAREHOUSE_ID", param.getWarehouseId()); + } + //鐩樼偣鏃堕棿 + if (param.getInventoryDateStart() != null) { + sql.append(" and INVENTORY_DATE >=:inventoryDateStart "); + paramts.put("inventoryDateStart", param.getInventoryDateStart() * 1000000); + } + if (param.getInventoryDateEnd() != null) { + sql.append(" and INVENTORY_DATE <:inventoryDateEnd "); + paramts.put("inventoryDateEnd", param.getInventoryDateEnd() * 1000000 + 240000); + } + //鏈烘瀯 + sql.append(" and AGENCY_ID =:AGENCY_ID "); + paramts.put("AGENCY_ID", sysInfo.getTenantId()); + + sql.append(" ORDER BY CREATE_TIME DESC "); + return selectSplit(sql.toString(), paramts, new LWhFormInventory()); + } + + /** + * @Description 鐩樼偣 + * @Author 鍗㈠簡闃� + * @Date 2023/10/31 + * @param id 鐩樼偣鍗昳d + */ + public List queryPdList(Long id) { + //1.鏍规嵁鐩樼偣鍗昳d鏌ヨ鐩樼偣鍗� + LWhFormInventory lWhFormInventory = this.get(new LWhFormInventory(id)); + if (lWhFormInventory == null) { + log.error("鐩樼偣澶辫触"); + } + //2.鏌ヨ鐩樼偣鍗曟暟鎹� + List<Map<String, Object>> list = this.select(QUERY_PD_List, new Object[]{lWhFormInventory.getWarehouseId()}); + if (CollectionUtils.isEmpty(list)) { + log.error("鐩樼偣澶辫触"); + return null; + } + //3.鏂板鐩樼偣鍗曠墿鍝佽褰� + int flag = inventoryGoodsService.add(list, lWhFormInventory.getWarehouseId()); + if (flag != list.size()) { + log.error("鏂板鐩樼偣鍗曡褰�"); + return null; + } + //4.鏍规嵁鐩樼偣鍗昳d鏌ヨ鐩樼偣鍗曠墿鍝� + return inventoryGoodsService.getByInventoryId(id); + } + + /** + * 鏆傚瓨 + * @author 鍗㈠簡闃� + * @date 2023/10/31 + */ + public int temporaryStorage(LWhFormInventoryDto dto) { + //1.鏍规嵁鐩樼偣鍗昳d鏌ヨ鐩樼偣鍗� + + //2.鍒犻櫎鐩樼偣鍗曠墿鍝� + //3.鏂板鐩樼偣鍗曠墿鍝� + return 0; + } +} diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventory.java b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventory.java new file mode 100644 index 0000000..c28bd11 --- /dev/null +++ b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventory.java @@ -0,0 +1,480 @@ + +package com.consum.model.po; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.walker.jdbc.BasePo; + +/** + * 琛ㄥ悕:L_WH_FORM_INVENTORY * + * @author genrator + */ +@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY) +public class LWhFormInventory extends BasePo<LWhFormInventory> { + // 搴忓垪鍖栫増鏈彿 + private static final long serialVersionUID = 1L; + + // 涓婚敭 + private Long id = null; + @JsonIgnore + protected boolean isset_id = false; + + // 灞炴�у垪琛� + private String businessFormCode = null; + @JsonIgnore + protected boolean isset_businessFormCode = false; + + private String businessFormName = null; + @JsonIgnore + protected boolean isset_businessFormName = false; + + private Integer warehouseType = null; + @JsonIgnore + protected boolean isset_warehouseType = false; + + private Long warehouseId = null; + @JsonIgnore + protected boolean isset_warehouseId = false; + + private String warehouseName = null; + @JsonIgnore + protected boolean isset_warehouseName = false; + + private Long operatorId = null; + @JsonIgnore + protected boolean isset_operatorId = false; + + private String operatorName = null; + @JsonIgnore + protected boolean isset_operatorName = false; + + private Integer states = null; + @JsonIgnore + protected boolean isset_states = false; + + private Long operatorId2 = null; + @JsonIgnore + protected boolean isset_operatorId2 = false; + + private String operatorName2 = null; + @JsonIgnore + protected boolean isset_operatorName2 = false; + + private String beiz1 = null; + @JsonIgnore + protected boolean isset_beiz1 = false; + + private Long agencyId = null; + @JsonIgnore + protected boolean isset_agencyId = false; + + private String agencyName = null; + @JsonIgnore + protected boolean isset_agencyName = false; + + private Long creatorId = null; + @JsonIgnore + protected boolean isset_creatorId = false; + + private String creatorName = null; + @JsonIgnore + protected boolean isset_creatorName = false; + + private Long inventoryDate = null; + @JsonIgnore + protected boolean isset_inventoryDate = false; + + private Long createTime = null; + @JsonIgnore + protected boolean isset_createTime = false; + + private Long stopTime = null; + @JsonIgnore + protected boolean isset_stopTime = false; + + /** + * 榛樿鏋勯�犲嚱鏁� + */ + public LWhFormInventory() { + } + + /** + * 鏍规嵁涓婚敭鏋勯�犲璞� + */ + public LWhFormInventory(Long id) { + this.setId(id); + } + + /** + * 璁剧疆涓婚敭鍊� + */ + @Override + public void setPkValue(Object value) { + this.setId((Long) value); + } + + public Long getId() { + return this.id; + } + + public void setId(Long id) { + this.id = id; + this.isset_id = true; + } + + @JsonIgnore + public boolean isEmptyId() { + return this.id == null; + } + + public String getBusinessFormCode() { + return this.businessFormCode; + } + + public void setBusinessFormCode(String businessFormCode) { + this.businessFormCode = businessFormCode; + this.isset_businessFormCode = true; + } + + @JsonIgnore + public boolean isEmptyBusinessFormCode() { + return this.businessFormCode == null || this.businessFormCode.length() == 0; + } + + public String getBusinessFormName() { + return this.businessFormName; + } + + public void setBusinessFormName(String businessFormName) { + this.businessFormName = businessFormName; + this.isset_businessFormName = true; + } + + @JsonIgnore + public boolean isEmptyBusinessFormName() { + return this.businessFormName == null || this.businessFormName.length() == 0; + } + + public Integer getWarehouseType() { + return this.warehouseType; + } + + public void setWarehouseType(Integer warehouseType) { + this.warehouseType = warehouseType; + this.isset_warehouseType = true; + } + + @JsonIgnore + public boolean isEmptyWarehouseType() { + return this.warehouseType == null; + } + + public Long getWarehouseId() { + return this.warehouseId; + } + + public void setWarehouseId(Long warehouseId) { + this.warehouseId = warehouseId; + this.isset_warehouseId = true; + } + + @JsonIgnore + public boolean isEmptyWarehouseId() { + return this.warehouseId == null; + } + + public String getWarehouseName() { + return this.warehouseName; + } + + public void setWarehouseName(String warehouseName) { + this.warehouseName = warehouseName; + this.isset_warehouseName = true; + } + + @JsonIgnore + public boolean isEmptyWarehouseName() { + return this.warehouseName == null || this.warehouseName.length() == 0; + } + + public Long getOperatorId() { + return this.operatorId; + } + + public void setOperatorId(Long operatorId) { + this.operatorId = operatorId; + this.isset_operatorId = true; + } + + @JsonIgnore + public boolean isEmptyOperatorId() { + return this.operatorId == null; + } + + public String getOperatorName() { + return this.operatorName; + } + + public void setOperatorName(String operatorName) { + this.operatorName = operatorName; + this.isset_operatorName = true; + } + + @JsonIgnore + public boolean isEmptyOperatorName() { + return this.operatorName == null || this.operatorName.length() == 0; + } + + public Integer getStates() { + return this.states; + } + + public void setStates(Integer states) { + this.states = states; + this.isset_states = true; + } + + @JsonIgnore + public boolean isEmptyStates() { + return this.states == null; + } + + public Long getOperatorId2() { + return this.operatorId2; + } + + public void setOperatorId2(Long operatorId2) { + this.operatorId2 = operatorId2; + this.isset_operatorId2 = true; + } + + @JsonIgnore + public boolean isEmptyOperatorId2() { + return this.operatorId2 == null; + } + + public String getOperatorName2() { + return this.operatorName2; + } + + public void setOperatorName2(String operatorName2) { + this.operatorName2 = operatorName2; + this.isset_operatorName2 = true; + } + + @JsonIgnore + public boolean isEmptyOperatorName2() { + return this.operatorName2 == null || this.operatorName2.length() == 0; + } + + public String getBeiz1() { + return this.beiz1; + } + + public void setBeiz1(String beiz1) { + this.beiz1 = beiz1; + this.isset_beiz1 = true; + } + + @JsonIgnore + public boolean isEmptyBeiz1() { + return this.beiz1 == null || this.beiz1.length() == 0; + } + + public Long getAgencyId() { + return this.agencyId; + } + + public void setAgencyId(Long agencyId) { + this.agencyId = agencyId; + this.isset_agencyId = true; + } + + @JsonIgnore + public boolean isEmptyAgencyId() { + return this.agencyId == null; + } + + public String getAgencyName() { + return this.agencyName; + } + + public void setAgencyName(String agencyName) { + this.agencyName = agencyName; + this.isset_agencyName = true; + } + + @JsonIgnore + public boolean isEmptyAgencyName() { + return this.agencyName == null || this.agencyName.length() == 0; + } + + public Long getCreatorId() { + return this.creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + this.isset_creatorId = true; + } + + @JsonIgnore + public boolean isEmptyCreatorId() { + return this.creatorId == null; + } + + public String getCreatorName() { + return this.creatorName; + } + + public void setCreatorName(String creatorName) { + this.creatorName = creatorName; + this.isset_creatorName = true; + } + + @JsonIgnore + public boolean isEmptyCreatorName() { + return this.creatorName == null || this.creatorName.length() == 0; + } + + public Long getInventoryDate() { + return this.inventoryDate; + } + + public void setInventoryDate(Long inventoryDate) { + this.inventoryDate = inventoryDate; + this.isset_inventoryDate = true; + } + + @JsonIgnore + public boolean isEmptyInventoryDate() { + return this.inventoryDate == null; + } + + public Long getCreateTime() { + return this.createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + this.isset_createTime = true; + } + + @JsonIgnore + public boolean isEmptyCreateTime() { + return this.createTime == null; + } + + public Long getStopTime() { + return this.stopTime; + } + + public void setStopTime(Long stopTime) { + this.stopTime = stopTime; + this.isset_stopTime = true; + } + + @JsonIgnore + public boolean isEmptyStopTime() { + return this.stopTime == null; + } + + /** + * 閲嶅啓 toString() 鏂规硶 + */ + @Override + public String toString() { + return new StringBuilder() + .append("id=").append(this.id) + .append("businessFormCode=").append(this.businessFormCode) + .append("businessFormName=").append(this.businessFormName) + .append("warehouseType=").append(this.warehouseType) + .append("warehouseId=").append(this.warehouseId) + .append("warehouseName=").append(this.warehouseName) + .append("operatorId=").append(this.operatorId) + .append("operatorName=").append(this.operatorName) + .append("states=").append(this.states) + .append("operatorId2=").append(this.operatorId2) + .append("operatorName2=").append(this.operatorName2) + .append("beiz1=").append(this.beiz1) + .append("agencyId=").append(this.agencyId) + .append("agencyName=").append(this.agencyName) + .append("creatorId=").append(this.creatorId) + .append("creatorName=").append(this.creatorName) + .append("inventoryDate=").append(this.inventoryDate) + .append("createTime=").append(this.createTime) + .append("stopTime=").append(this.stopTime) + .toString(); + } + + /** + * 鍏嬮殕 + */ + public LWhFormInventory $clone() { + LWhFormInventory l_wh_form_inventory = new LWhFormInventory(); + + // 鏁版嵁搴撳悕绉� + //l_wh_form_inventory.setDatabaseName_(this.getDatabaseName_()); + + // 涓婚敭 + if (this.isset_id) { + l_wh_form_inventory.setId(this.getId()); + } + // 鏅�氬睘鎬� + if (this.isset_businessFormCode) { + l_wh_form_inventory.setBusinessFormCode(this.getBusinessFormCode()); + } + if (this.isset_businessFormName) { + l_wh_form_inventory.setBusinessFormName(this.getBusinessFormName()); + } + if (this.isset_warehouseType) { + l_wh_form_inventory.setWarehouseType(this.getWarehouseType()); + } + if (this.isset_warehouseId) { + l_wh_form_inventory.setWarehouseId(this.getWarehouseId()); + } + if (this.isset_warehouseName) { + l_wh_form_inventory.setWarehouseName(this.getWarehouseName()); + } + if (this.isset_operatorId) { + l_wh_form_inventory.setOperatorId(this.getOperatorId()); + } + if (this.isset_operatorName) { + l_wh_form_inventory.setOperatorName(this.getOperatorName()); + } + if (this.isset_states) { + l_wh_form_inventory.setStates(this.getStates()); + } + if (this.isset_operatorId2) { + l_wh_form_inventory.setOperatorId2(this.getOperatorId2()); + } + if (this.isset_operatorName2) { + l_wh_form_inventory.setOperatorName2(this.getOperatorName2()); + } + if (this.isset_beiz1) { + l_wh_form_inventory.setBeiz1(this.getBeiz1()); + } + if (this.isset_agencyId) { + l_wh_form_inventory.setAgencyId(this.getAgencyId()); + } + if (this.isset_agencyName) { + l_wh_form_inventory.setAgencyName(this.getAgencyName()); + } + if (this.isset_creatorId) { + l_wh_form_inventory.setCreatorId(this.getCreatorId()); + } + if (this.isset_creatorName) { + l_wh_form_inventory.setCreatorName(this.getCreatorName()); + } + if (this.isset_inventoryDate) { + l_wh_form_inventory.setInventoryDate(this.getInventoryDate()); + } + if (this.isset_createTime) { + l_wh_form_inventory.setCreateTime(this.getCreateTime()); + } + if (this.isset_stopTime) { + l_wh_form_inventory.setStopTime(this.getStopTime()); + } + return l_wh_form_inventory; + } +} diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventoryGoods.java b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventoryGoods.java new file mode 100644 index 0000000..ce1c809 --- /dev/null +++ b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventoryGoods.java @@ -0,0 +1,326 @@ + +package com.consum.model.po; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.walker.jdbc.BasePo; + +/** + * 琛ㄥ悕:L_WH_FORM_INVENTORY_GOODS * + * @author genrator + */ +@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY) +public class LWhFormInventoryGoods extends BasePo<LWhFormInventoryGoods> { + // 搴忓垪鍖栫増鏈彿 + private static final long serialVersionUID = 1L; + + // 涓婚敭 + private Long id = null; + @JsonIgnore + protected boolean isset_id = false; + + // 灞炴�у垪琛� + private Long whFormInventoryId = null; + @JsonIgnore + protected boolean isset_whFormInventoryId = false; + + private Long baseGoodsTemplateId = null; + @JsonIgnore + protected boolean isset_baseGoodsTemplateId = false; + + private String goodsTemplateName = null; + @JsonIgnore + protected boolean isset_goodsTemplateName = false; + + private String unit = null; + @JsonIgnore + protected boolean isset_unit = false; + + private Long baseGoodsModelsId = null; + @JsonIgnore + protected boolean isset_baseGoodsModelsId = false; + + private String baseGoodsModelsName = null; + @JsonIgnore + protected boolean isset_baseGoodsModelsName = false; + + private Double price = null; + @JsonIgnore + protected boolean isset_price = false; + + private Integer initCounts = null; + @JsonIgnore + protected boolean isset_initCounts = false; + + private Integer inventoryCounts = null; + @JsonIgnore + protected boolean isset_inventoryCounts = false; + + private Integer errorCounts = null; + @JsonIgnore + protected boolean isset_errorCounts = false; + + private Integer inventoryResult = null; + @JsonIgnore + protected boolean isset_inventoryResult = false; + + /** + * 榛樿鏋勯�犲嚱鏁� + */ + public LWhFormInventoryGoods() { + } + + /** + * 鏍规嵁涓婚敭鏋勯�犲璞� + */ + public LWhFormInventoryGoods(Long id) { + this.setId(id); + } + + /** + * 璁剧疆涓婚敭鍊� + */ + @Override + public void setPkValue(Object value) { + this.setId((Long) value); + } + + public Long getId() { + return this.id; + } + + public void setId(Long id) { + this.id = id; + this.isset_id = true; + } + + @JsonIgnore + public boolean isEmptyId() { + return this.id == null; + } + + public Long getWhFormInventoryId() { + return this.whFormInventoryId; + } + + public void setWhFormInventoryId(Long whFormInventoryId) { + this.whFormInventoryId = whFormInventoryId; + this.isset_whFormInventoryId = true; + } + + @JsonIgnore + public boolean isEmptyWhFormInventoryId() { + return this.whFormInventoryId == null; + } + + public Long getBaseGoodsTemplateId() { + return this.baseGoodsTemplateId; + } + + public void setBaseGoodsTemplateId(Long baseGoodsTemplateId) { + this.baseGoodsTemplateId = baseGoodsTemplateId; + this.isset_baseGoodsTemplateId = true; + } + + @JsonIgnore + public boolean isEmptyBaseGoodsTemplateId() { + return this.baseGoodsTemplateId == null; + } + + public String getGoodsTemplateName() { + return this.goodsTemplateName; + } + + public void setGoodsTemplateName(String goodsTemplateName) { + this.goodsTemplateName = goodsTemplateName; + this.isset_goodsTemplateName = true; + } + + @JsonIgnore + public boolean isEmptyGoodsTemplateName() { + return this.goodsTemplateName == null || this.goodsTemplateName.length() == 0; + } + + public String getUnit() { + return this.unit; + } + + public void setUnit(String unit) { + this.unit = unit; + this.isset_unit = true; + } + + @JsonIgnore + public boolean isEmptyUnit() { + return this.unit == null || this.unit.length() == 0; + } + + public Long getBaseGoodsModelsId() { + return this.baseGoodsModelsId; + } + + public void setBaseGoodsModelsId(Long baseGoodsModelsId) { + this.baseGoodsModelsId = baseGoodsModelsId; + this.isset_baseGoodsModelsId = true; + } + + @JsonIgnore + public boolean isEmptyBaseGoodsModelsId() { + return this.baseGoodsModelsId == null; + } + + public String getBaseGoodsModelsName() { + return this.baseGoodsModelsName; + } + + public void setBaseGoodsModelsName(String baseGoodsModelsName) { + this.baseGoodsModelsName = baseGoodsModelsName; + this.isset_baseGoodsModelsName = true; + } + + @JsonIgnore + public boolean isEmptyBaseGoodsModelsName() { + return this.baseGoodsModelsName == null || this.baseGoodsModelsName.length() == 0; + } + + public Double getPrice() { + return this.price; + } + + public void setPrice(Double price) { + this.price = price; + this.isset_price = true; + } + + @JsonIgnore + public boolean isEmptyPrice() { + return this.price == null; + } + + public Integer getInitCounts() { + return this.initCounts; + } + + public void setInitCounts(Integer initCounts) { + this.initCounts = initCounts; + this.isset_initCounts = true; + } + + @JsonIgnore + public boolean isEmptyInitCounts() { + return this.initCounts == null; + } + + public Integer getInventoryCounts() { + return this.inventoryCounts; + } + + public void setInventoryCounts(Integer inventoryCounts) { + this.inventoryCounts = inventoryCounts; + this.isset_inventoryCounts = true; + } + + @JsonIgnore + public boolean isEmptyInventoryCounts() { + return this.inventoryCounts == null; + } + + public Integer getErrorCounts() { + return this.errorCounts; + } + + public void setErrorCounts(Integer errorCounts) { + this.errorCounts = errorCounts; + this.isset_errorCounts = true; + } + + @JsonIgnore + public boolean isEmptyErrorCounts() { + return this.errorCounts == null; + } + + public Integer getInventoryResult() { + return this.inventoryResult; + } + + public void setInventoryResult(Integer inventoryResult) { + this.inventoryResult = inventoryResult; + this.isset_inventoryResult = true; + } + + @JsonIgnore + public boolean isEmptyInventoryResult() { + return this.inventoryResult == null; + } + + /** + * 閲嶅啓 toString() 鏂规硶 + */ + @Override + public String toString() { + return new StringBuilder() + .append("id=").append(this.id) + .append("whFormInventoryId=").append(this.whFormInventoryId) + .append("baseGoodsTemplateId=").append(this.baseGoodsTemplateId) + .append("goodsTemplateName=").append(this.goodsTemplateName) + .append("unit=").append(this.unit) + .append("baseGoodsModelsId=").append(this.baseGoodsModelsId) + .append("baseGoodsModelsName=").append(this.baseGoodsModelsName) + .append("price=").append(this.price) + .append("initCounts=").append(this.initCounts) + .append("inventoryCounts=").append(this.inventoryCounts) + .append("errorCounts=").append(this.errorCounts) + .append("inventoryResult=").append(this.inventoryResult) + .toString(); + } + + /** + * 鍏嬮殕 + */ + public LWhFormInventoryGoods $clone() { + LWhFormInventoryGoods l_wh_form_inventory_goods = new LWhFormInventoryGoods(); + + // 鏁版嵁搴撳悕绉� + //l_wh_form_inventory_goods.setDatabaseName_(this.getDatabaseName_()); + + // 涓婚敭 + if (this.isset_id) { + l_wh_form_inventory_goods.setId(this.getId()); + } + // 鏅�氬睘鎬� + if (this.isset_whFormInventoryId) { + l_wh_form_inventory_goods.setWhFormInventoryId(this.getWhFormInventoryId()); + } + if (this.isset_baseGoodsTemplateId) { + l_wh_form_inventory_goods.setBaseGoodsTemplateId(this.getBaseGoodsTemplateId()); + } + if (this.isset_goodsTemplateName) { + l_wh_form_inventory_goods.setGoodsTemplateName(this.getGoodsTemplateName()); + } + if (this.isset_unit) { + l_wh_form_inventory_goods.setUnit(this.getUnit()); + } + if (this.isset_baseGoodsModelsId) { + l_wh_form_inventory_goods.setBaseGoodsModelsId(this.getBaseGoodsModelsId()); + } + if (this.isset_baseGoodsModelsName) { + l_wh_form_inventory_goods.setBaseGoodsModelsName(this.getBaseGoodsModelsName()); + } + if (this.isset_price) { + l_wh_form_inventory_goods.setPrice(this.getPrice()); + } + if (this.isset_initCounts) { + l_wh_form_inventory_goods.setInitCounts(this.getInitCounts()); + } + if (this.isset_inventoryCounts) { + l_wh_form_inventory_goods.setInventoryCounts(this.getInventoryCounts()); + } + if (this.isset_errorCounts) { + l_wh_form_inventory_goods.setErrorCounts(this.getErrorCounts()); + } + if (this.isset_inventoryResult) { + l_wh_form_inventory_goods.setInventoryResult(this.getInventoryResult()); + } + return l_wh_form_inventory_goods; + } +} diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventoryGoods_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventoryGoods_mapper.java new file mode 100644 index 0000000..70f5829 --- /dev/null +++ b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventoryGoods_mapper.java @@ -0,0 +1,373 @@ +package com.consum.model.po; + +import com.walker.jdbc.BaseMapper; +import com.walker.jdbc.ResultSetUtils; +import com.walker.jdbc.SqlAndParameters; +import com.walker.jdbc.sqlgen.DeleteBuilder; +import com.walker.jdbc.sqlgen.InsertBuilder; +import com.walker.jdbc.sqlgen.SelectBuilder; +import com.walker.jdbc.sqlgen.UpdateBuilder; +import com.walker.jdbc.util.StringUtils; + +import org.springframework.jdbc.core.RowMapper; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Map; + +/** + * 琛ㄥ悕:L_WH_FORM_INVENTORY_GOODS * + * @author genrator + */ +public class LWhFormInventoryGoods_mapper extends LWhFormInventoryGoods implements BaseMapper<LWhFormInventoryGoods> { + // 搴忓垪鍖栫増鏈彿 + private static final long serialVersionUID = 1L; + + public static final RowMapper<LWhFormInventoryGoods> ROW_MAPPER = new LWhFormInventoryGoodsRowMapper(); + + // 涓婚敭 + public static final String Id = "id"; + // 鏅�氬睘鎬� + public static final String WhFormInventoryId = "wh_form_inventory_id"; + public static final String BaseGoodsTemplateId = "base_goods_template_id"; + public static final String GoodsTemplateName = "goods_template_name"; + public static final String Unit = "unit"; + public static final String BaseGoodsModelsId = "base_goods_models_id"; + public static final String BaseGoodsModelsName = "base_goods_models_name"; + public static final String Price = "price"; + public static final String InitCounts = "init_counts"; + public static final String InventoryCounts = "inventory_counts"; + public static final String ErrorCounts = "error_counts"; + public static final String InventoryResult = "inventory_result"; + + /** + * 榛樿鏋勯�犲嚱鏁� + */ + public LWhFormInventoryGoods_mapper(LWhFormInventoryGoods lWhFormInventoryGoods) { + if (lWhFormInventoryGoods == null) { + throw new IllegalArgumentException("po鍙傛暟涓嶅厑璁镐负绌猴紒"); + } + //涓婚敭 + if (lWhFormInventoryGoods.isset_id) { + this.setId(lWhFormInventoryGoods.getId()); + } + //鏅�氬睘鎬� + if (lWhFormInventoryGoods.isset_whFormInventoryId) { + this.setWhFormInventoryId(lWhFormInventoryGoods.getWhFormInventoryId()); + } + if (lWhFormInventoryGoods.isset_baseGoodsTemplateId) { + this.setBaseGoodsTemplateId(lWhFormInventoryGoods.getBaseGoodsTemplateId()); + } + if (lWhFormInventoryGoods.isset_goodsTemplateName) { + this.setGoodsTemplateName(lWhFormInventoryGoods.getGoodsTemplateName()); + } + if (lWhFormInventoryGoods.isset_unit) { + this.setUnit(lWhFormInventoryGoods.getUnit()); + } + if (lWhFormInventoryGoods.isset_baseGoodsModelsId) { + this.setBaseGoodsModelsId(lWhFormInventoryGoods.getBaseGoodsModelsId()); + } + if (lWhFormInventoryGoods.isset_baseGoodsModelsName) { + this.setBaseGoodsModelsName(lWhFormInventoryGoods.getBaseGoodsModelsName()); + } + if (lWhFormInventoryGoods.isset_price) { + this.setPrice(lWhFormInventoryGoods.getPrice()); + } + if (lWhFormInventoryGoods.isset_initCounts) { + this.setInitCounts(lWhFormInventoryGoods.getInitCounts()); + } + if (lWhFormInventoryGoods.isset_inventoryCounts) { + this.setInventoryCounts(lWhFormInventoryGoods.getInventoryCounts()); + } + if (lWhFormInventoryGoods.isset_errorCounts) { + this.setErrorCounts(lWhFormInventoryGoods.getErrorCounts()); + } + if (lWhFormInventoryGoods.isset_inventoryResult) { + this.setInventoryResult(lWhFormInventoryGoods.getInventoryResult()); + } + // 鍘绘帀锛�2022-09-07 + // this.setDatabaseName_(l_wh_form_inventory_goods.getDatabaseName_()); + } + + /** + * 鑾峰彇琛ㄥ悕 + */ + @Override + public String getTableName_() { + String tableName = "l_wh_form_inventory_goods"; + /** + if (StringUtils.isNotEmpty(this.getDatabaseName_())) { + return this.getDatabaseName_() + "." + tableName; + } else { + return tableName; + } + */ + return tableName; + } + + /** + * 鑾峰彇涓婚敭鍚嶇О + */ + @Override + public String getPkName_() { + return Id; + } + + /** + * 鑾峰彇涓婚敭鍊� + */ + @Override + public Object getPkValue_() { + return this.getId(); + } + + /** + * 鑾峰彇鎻掑叆璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getInsertSql_() { + InsertBuilder ib = new InsertBuilder(this.getTableName_()); + ib.set(Id, this.getId()); + ib.set(WhFormInventoryId, this.getWhFormInventoryId(), this.isset_whFormInventoryId); + ib.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); + ib.set(GoodsTemplateName, this.getGoodsTemplateName(), this.isset_goodsTemplateName); + ib.set(Unit, this.getUnit(), this.isset_unit); + ib.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); + ib.set(BaseGoodsModelsName, this.getBaseGoodsModelsName(), this.isset_baseGoodsModelsName); + ib.set(Price, this.getPrice(), this.isset_price); + ib.set(InitCounts, this.getInitCounts(), this.isset_initCounts); + ib.set(InventoryCounts, this.getInventoryCounts(), this.isset_inventoryCounts); + ib.set(ErrorCounts, this.getErrorCounts(), this.isset_errorCounts); + ib.set(InventoryResult, this.getInventoryResult(), this.isset_inventoryResult); + return ib.genMapSql(); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getUpdateSql_() { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(WhFormInventoryId, this.getWhFormInventoryId(), this.isset_whFormInventoryId); + ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); + ub.set(GoodsTemplateName, this.getGoodsTemplateName(), this.isset_goodsTemplateName); + ub.set(Unit, this.getUnit(), this.isset_unit); + ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); + ub.set(BaseGoodsModelsName, this.getBaseGoodsModelsName(), this.isset_baseGoodsModelsName); + ub.set(Price, this.getPrice(), this.isset_price); + ub.set(InitCounts, this.getInitCounts(), this.isset_initCounts); + ub.set(InventoryCounts, this.getInventoryCounts(), this.isset_inventoryCounts); + ub.set(ErrorCounts, this.getErrorCounts(), this.isset_errorCounts); + ub.set(InventoryResult, this.getInventoryResult(), this.isset_inventoryResult); + ub.where(this.getPkName_(), this.getPkValue_()); + return ub.genMapSql(); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(WhFormInventoryId, this.getWhFormInventoryId(), this.isset_whFormInventoryId); + ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); + ub.set(GoodsTemplateName, this.getGoodsTemplateName(), this.isset_goodsTemplateName); + ub.set(Unit, this.getUnit(), this.isset_unit); + ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); + ub.set(BaseGoodsModelsName, this.getBaseGoodsModelsName(), this.isset_baseGoodsModelsName); + ub.set(Price, this.getPrice(), this.isset_price); + ub.set(InitCounts, this.getInitCounts(), this.isset_initCounts); + ub.set(InventoryCounts, this.getInventoryCounts(), this.isset_inventoryCounts); + ub.set(ErrorCounts, this.getErrorCounts(), this.isset_errorCounts); + ub.set(InventoryResult, this.getInventoryResult(), this.isset_inventoryResult); + return ub.genMapSql(where, parameters); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(WhFormInventoryId, this.getWhFormInventoryId(), this.isset_whFormInventoryId); + ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); + ub.set(GoodsTemplateName, this.getGoodsTemplateName(), this.isset_goodsTemplateName); + ub.set(Unit, this.getUnit(), this.isset_unit); + ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); + ub.set(BaseGoodsModelsName, this.getBaseGoodsModelsName(), this.isset_baseGoodsModelsName); + ub.set(Price, this.getPrice(), this.isset_price); + ub.set(InitCounts, this.getInitCounts(), this.isset_initCounts); + ub.set(InventoryCounts, this.getInventoryCounts(), this.isset_inventoryCounts); + ub.set(ErrorCounts, this.getErrorCounts(), this.isset_errorCounts); + ub.set(InventoryResult, this.getInventoryResult(), this.isset_inventoryResult); + return ub.genArraySql(where, parameters); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getDeleteSql_() { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + db.where(this.getPkName_(), this.getPkValue_()); + return db.genMapSql(); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getDeleteSql_(String where, Map<String, Object> parameters) { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + return db.genMapSql(where, parameters); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getDeleteSql_(String where, Object[] parameters) { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + return db.genArraySql(where, parameters); + } + + /** + * 鑾峰彇鍗曡鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getSingleSql_() { + SelectBuilder sb = new SelectBuilder(this.getTableName_()); + sb.where(this.getPkName_(), this.getPkValue_()); + return sb.genMapSql(); + } + + + /** + * 鑾峰彇鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { + return new SqlAndParameters<>("select id, wh_form_inventory_id, base_goods_template_id, goods_template_name, unit, base_goods_models_id, base_goods_models_name, price, init_counts, inventory_counts, error_counts, inventory_result from " + this.getTableName_() + " " + where, parameters); + } + + /** + * 鑾峰彇鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { + return new SqlAndParameters<>("select id, wh_form_inventory_id, base_goods_template_id, goods_template_name, unit, base_goods_models_id, base_goods_models_name, price, init_counts, inventory_counts, error_counts, inventory_result from " + this.getTableName_() + " " + where, parameters); + } + + /** + * 灏唕esultset鐨勪竴琛岃浆鍖栦负po + */ + @Override + public LWhFormInventoryGoods mapRow(ResultSet rs, int i) throws SQLException { + return ROW_MAPPER.mapRow(rs, i); + } + + /** + * 鍏嬮殕 + */ + public LWhFormInventoryGoods toLWhFormInventoryGoods() { + return super.$clone(); + } +} + +/** + * l_wh_form_inventory_goods RowMapper + * + * @author genrator + */ +class LWhFormInventoryGoodsRowMapper implements RowMapper<LWhFormInventoryGoods> { + + @Override + public LWhFormInventoryGoods mapRow(ResultSet rs, int i) throws SQLException { + ResultSetUtils resultSetUtils = new ResultSetUtils(); + LWhFormInventoryGoods l_wh_form_inventory_goods = new LWhFormInventoryGoods(); + Integer columnIndex; + //涓婚敭 + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.Id); + if (columnIndex > 0) { + l_wh_form_inventory_goods.setId(rs.getLong(columnIndex)); + } + //鏅�氬睘鎬� + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.WhFormInventoryId); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory_goods.setWhFormInventoryId(null); + } else { + l_wh_form_inventory_goods.setWhFormInventoryId(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.BaseGoodsTemplateId); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory_goods.setBaseGoodsTemplateId(null); + } else { + l_wh_form_inventory_goods.setBaseGoodsTemplateId(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.GoodsTemplateName); + if (columnIndex > 0) { + l_wh_form_inventory_goods.setGoodsTemplateName(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.Unit); + if (columnIndex > 0) { + l_wh_form_inventory_goods.setUnit(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.BaseGoodsModelsId); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory_goods.setBaseGoodsModelsId(null); + } else { + l_wh_form_inventory_goods.setBaseGoodsModelsId(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.BaseGoodsModelsName); + if (columnIndex > 0) { + l_wh_form_inventory_goods.setBaseGoodsModelsName(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.Price); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory_goods.setPrice(null); + } else { + l_wh_form_inventory_goods.setPrice(rs.getDouble(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.InitCounts); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory_goods.setInitCounts(null); + } else { + l_wh_form_inventory_goods.setInitCounts(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.InventoryCounts); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory_goods.setInventoryCounts(null); + } else { + l_wh_form_inventory_goods.setInventoryCounts(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.ErrorCounts); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory_goods.setErrorCounts(null); + } else { + l_wh_form_inventory_goods.setErrorCounts(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventoryGoods_mapper.InventoryResult); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory_goods.setInventoryResult(null); + } else { + l_wh_form_inventory_goods.setInventoryResult(rs.getInt(columnIndex)); + } + } + return l_wh_form_inventory_goods; + } +} diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventory_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventory_mapper.java new file mode 100644 index 0000000..97635a6 --- /dev/null +++ b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormInventory_mapper.java @@ -0,0 +1,465 @@ +package com.consum.model.po; + +import com.walker.jdbc.BaseMapper; +import com.walker.jdbc.ResultSetUtils; +import com.walker.jdbc.SqlAndParameters; +import com.walker.jdbc.sqlgen.DeleteBuilder; +import com.walker.jdbc.sqlgen.InsertBuilder; +import com.walker.jdbc.sqlgen.SelectBuilder; +import com.walker.jdbc.sqlgen.UpdateBuilder; +import com.walker.jdbc.util.StringUtils; + +import org.springframework.jdbc.core.RowMapper; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Map; + +/** + * 琛ㄥ悕:L_WH_FORM_INVENTORY * + * @author genrator + */ +public class LWhFormInventory_mapper extends LWhFormInventory implements BaseMapper<LWhFormInventory> { + // 搴忓垪鍖栫増鏈彿 + private static final long serialVersionUID = 1L; + + public static final RowMapper<LWhFormInventory> ROW_MAPPER = new LWhFormInventoryRowMapper(); + + // 涓婚敭 + public static final String Id = "id"; + // 鏅�氬睘鎬� + public static final String BusinessFormCode = "business_form_code"; + public static final String BusinessFormName = "business_form_name"; + public static final String WarehouseType = "warehouse_type"; + public static final String WarehouseId = "warehouse_id"; + public static final String WarehouseName = "warehouse_name"; + public static final String OperatorId = "operator_id"; + public static final String OperatorName = "operator_name"; + public static final String States = "states"; + public static final String OperatorId2 = "operator_id2"; + public static final String OperatorName2 = "operator_name2"; + public static final String Beiz1 = "beiz1"; + public static final String AgencyId = "agency_id"; + public static final String AgencyName = "agency_name"; + public static final String CreatorId = "creator_id"; + public static final String CreatorName = "creator_name"; + public static final String InventoryDate = "inventory_date"; + public static final String CreateTime = "create_time"; + public static final String StopTime = "stop_time"; + + /** + * 榛樿鏋勯�犲嚱鏁� + */ + public LWhFormInventory_mapper(LWhFormInventory lWhFormInventory) { + if (lWhFormInventory == null) { + throw new IllegalArgumentException("po鍙傛暟涓嶅厑璁镐负绌猴紒"); + } + //涓婚敭 + if (lWhFormInventory.isset_id) { + this.setId(lWhFormInventory.getId()); + } + //鏅�氬睘鎬� + if (lWhFormInventory.isset_businessFormCode) { + this.setBusinessFormCode(lWhFormInventory.getBusinessFormCode()); + } + if (lWhFormInventory.isset_businessFormName) { + this.setBusinessFormName(lWhFormInventory.getBusinessFormName()); + } + if (lWhFormInventory.isset_warehouseType) { + this.setWarehouseType(lWhFormInventory.getWarehouseType()); + } + if (lWhFormInventory.isset_warehouseId) { + this.setWarehouseId(lWhFormInventory.getWarehouseId()); + } + if (lWhFormInventory.isset_warehouseName) { + this.setWarehouseName(lWhFormInventory.getWarehouseName()); + } + if (lWhFormInventory.isset_operatorId) { + this.setOperatorId(lWhFormInventory.getOperatorId()); + } + if (lWhFormInventory.isset_operatorName) { + this.setOperatorName(lWhFormInventory.getOperatorName()); + } + if (lWhFormInventory.isset_states) { + this.setStates(lWhFormInventory.getStates()); + } + if (lWhFormInventory.isset_operatorId2) { + this.setOperatorId2(lWhFormInventory.getOperatorId2()); + } + if (lWhFormInventory.isset_operatorName2) { + this.setOperatorName2(lWhFormInventory.getOperatorName2()); + } + if (lWhFormInventory.isset_beiz1) { + this.setBeiz1(lWhFormInventory.getBeiz1()); + } + if (lWhFormInventory.isset_agencyId) { + this.setAgencyId(lWhFormInventory.getAgencyId()); + } + if (lWhFormInventory.isset_agencyName) { + this.setAgencyName(lWhFormInventory.getAgencyName()); + } + if (lWhFormInventory.isset_creatorId) { + this.setCreatorId(lWhFormInventory.getCreatorId()); + } + if (lWhFormInventory.isset_creatorName) { + this.setCreatorName(lWhFormInventory.getCreatorName()); + } + if (lWhFormInventory.isset_inventoryDate) { + this.setInventoryDate(lWhFormInventory.getInventoryDate()); + } + if (lWhFormInventory.isset_createTime) { + this.setCreateTime(lWhFormInventory.getCreateTime()); + } + if (lWhFormInventory.isset_stopTime) { + this.setStopTime(lWhFormInventory.getStopTime()); + } + // 鍘绘帀锛�2022-09-07 + // this.setDatabaseName_(l_wh_form_inventory.getDatabaseName_()); + } + + /** + * 鑾峰彇琛ㄥ悕 + */ + @Override + public String getTableName_() { + String tableName = "l_wh_form_inventory"; + /** + if (StringUtils.isNotEmpty(this.getDatabaseName_())) { + return this.getDatabaseName_() + "." + tableName; + } else { + return tableName; + } + */ + return tableName; + } + + /** + * 鑾峰彇涓婚敭鍚嶇О + */ + @Override + public String getPkName_() { + return Id; + } + + /** + * 鑾峰彇涓婚敭鍊� + */ + @Override + public Object getPkValue_() { + return this.getId(); + } + + /** + * 鑾峰彇鎻掑叆璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getInsertSql_() { + InsertBuilder ib = new InsertBuilder(this.getTableName_()); + ib.set(Id, this.getId()); + ib.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); + ib.set(BusinessFormName, this.getBusinessFormName(), this.isset_businessFormName); + ib.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType); + ib.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId); + ib.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName); + ib.set(OperatorId, this.getOperatorId(), this.isset_operatorId); + ib.set(OperatorName, this.getOperatorName(), this.isset_operatorName); + ib.set(States, this.getStates(), this.isset_states); + ib.set(OperatorId2, this.getOperatorId2(), this.isset_operatorId2); + ib.set(OperatorName2, this.getOperatorName2(), this.isset_operatorName2); + ib.set(Beiz1, this.getBeiz1(), this.isset_beiz1); + ib.set(AgencyId, this.getAgencyId(), this.isset_agencyId); + ib.set(AgencyName, this.getAgencyName(), this.isset_agencyName); + ib.set(CreatorId, this.getCreatorId(), this.isset_creatorId); + ib.set(CreatorName, this.getCreatorName(), this.isset_creatorName); + ib.set(InventoryDate, this.getInventoryDate(), this.isset_inventoryDate); + ib.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ib.set(StopTime, this.getStopTime(), this.isset_stopTime); + return ib.genMapSql(); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getUpdateSql_() { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); + ub.set(BusinessFormName, this.getBusinessFormName(), this.isset_businessFormName); + ub.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType); + ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId); + ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName); + ub.set(OperatorId, this.getOperatorId(), this.isset_operatorId); + ub.set(OperatorName, this.getOperatorName(), this.isset_operatorName); + ub.set(States, this.getStates(), this.isset_states); + ub.set(OperatorId2, this.getOperatorId2(), this.isset_operatorId2); + ub.set(OperatorName2, this.getOperatorName2(), this.isset_operatorName2); + ub.set(Beiz1, this.getBeiz1(), this.isset_beiz1); + ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId); + ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName); + ub.set(CreatorId, this.getCreatorId(), this.isset_creatorId); + ub.set(CreatorName, this.getCreatorName(), this.isset_creatorName); + ub.set(InventoryDate, this.getInventoryDate(), this.isset_inventoryDate); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ub.set(StopTime, this.getStopTime(), this.isset_stopTime); + ub.where(this.getPkName_(), this.getPkValue_()); + return ub.genMapSql(); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); + ub.set(BusinessFormName, this.getBusinessFormName(), this.isset_businessFormName); + ub.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType); + ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId); + ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName); + ub.set(OperatorId, this.getOperatorId(), this.isset_operatorId); + ub.set(OperatorName, this.getOperatorName(), this.isset_operatorName); + ub.set(States, this.getStates(), this.isset_states); + ub.set(OperatorId2, this.getOperatorId2(), this.isset_operatorId2); + ub.set(OperatorName2, this.getOperatorName2(), this.isset_operatorName2); + ub.set(Beiz1, this.getBeiz1(), this.isset_beiz1); + ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId); + ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName); + ub.set(CreatorId, this.getCreatorId(), this.isset_creatorId); + ub.set(CreatorName, this.getCreatorName(), this.isset_creatorName); + ub.set(InventoryDate, this.getInventoryDate(), this.isset_inventoryDate); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ub.set(StopTime, this.getStopTime(), this.isset_stopTime); + return ub.genMapSql(where, parameters); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); + ub.set(BusinessFormName, this.getBusinessFormName(), this.isset_businessFormName); + ub.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType); + ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId); + ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName); + ub.set(OperatorId, this.getOperatorId(), this.isset_operatorId); + ub.set(OperatorName, this.getOperatorName(), this.isset_operatorName); + ub.set(States, this.getStates(), this.isset_states); + ub.set(OperatorId2, this.getOperatorId2(), this.isset_operatorId2); + ub.set(OperatorName2, this.getOperatorName2(), this.isset_operatorName2); + ub.set(Beiz1, this.getBeiz1(), this.isset_beiz1); + ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId); + ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName); + ub.set(CreatorId, this.getCreatorId(), this.isset_creatorId); + ub.set(CreatorName, this.getCreatorName(), this.isset_creatorName); + ub.set(InventoryDate, this.getInventoryDate(), this.isset_inventoryDate); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ub.set(StopTime, this.getStopTime(), this.isset_stopTime); + return ub.genArraySql(where, parameters); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getDeleteSql_() { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + db.where(this.getPkName_(), this.getPkValue_()); + return db.genMapSql(); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getDeleteSql_(String where, Map<String, Object> parameters) { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + return db.genMapSql(where, parameters); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getDeleteSql_(String where, Object[] parameters) { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + return db.genArraySql(where, parameters); + } + + /** + * 鑾峰彇鍗曡鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getSingleSql_() { + SelectBuilder sb = new SelectBuilder(this.getTableName_()); + sb.where(this.getPkName_(), this.getPkValue_()); + return sb.genMapSql(); + } + + + /** + * 鑾峰彇鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { + return new SqlAndParameters<>("select id, business_form_code, business_form_name, warehouse_type, warehouse_id, warehouse_name, operator_id, operator_name, states, operator_id2, operator_name2, beiz1, agency_id, agency_name, creator_id, creator_name, inventory_date, create_time, stop_time from " + this.getTableName_() + " " + where, parameters); + } + + /** + * 鑾峰彇鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { + return new SqlAndParameters<>("select id, business_form_code, business_form_name, warehouse_type, warehouse_id, warehouse_name, operator_id, operator_name, states, operator_id2, operator_name2, beiz1, agency_id, agency_name, creator_id, creator_name, inventory_date, create_time, stop_time from " + this.getTableName_() + " " + where, parameters); + } + + /** + * 灏唕esultset鐨勪竴琛岃浆鍖栦负po + */ + @Override + public LWhFormInventory mapRow(ResultSet rs, int i) throws SQLException { + return ROW_MAPPER.mapRow(rs, i); + } + + /** + * 鍏嬮殕 + */ + public LWhFormInventory toLWhFormInventory() { + return super.$clone(); + } +} + +/** + * l_wh_form_inventory RowMapper + * + * @author genrator + */ +class LWhFormInventoryRowMapper implements RowMapper<LWhFormInventory> { + + @Override + public LWhFormInventory mapRow(ResultSet rs, int i) throws SQLException { + ResultSetUtils resultSetUtils = new ResultSetUtils(); + LWhFormInventory l_wh_form_inventory = new LWhFormInventory(); + Integer columnIndex; + //涓婚敭 + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.Id); + if (columnIndex > 0) { + l_wh_form_inventory.setId(rs.getLong(columnIndex)); + } + //鏅�氬睘鎬� + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.BusinessFormCode); + if (columnIndex > 0) { + l_wh_form_inventory.setBusinessFormCode(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.BusinessFormName); + if (columnIndex > 0) { + l_wh_form_inventory.setBusinessFormName(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.WarehouseType); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory.setWarehouseType(null); + } else { + l_wh_form_inventory.setWarehouseType(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.WarehouseId); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory.setWarehouseId(null); + } else { + l_wh_form_inventory.setWarehouseId(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.WarehouseName); + if (columnIndex > 0) { + l_wh_form_inventory.setWarehouseName(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.OperatorId); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory.setOperatorId(null); + } else { + l_wh_form_inventory.setOperatorId(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.OperatorName); + if (columnIndex > 0) { + l_wh_form_inventory.setOperatorName(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.States); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory.setStates(null); + } else { + l_wh_form_inventory.setStates(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.OperatorId2); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory.setOperatorId2(null); + } else { + l_wh_form_inventory.setOperatorId2(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.OperatorName2); + if (columnIndex > 0) { + l_wh_form_inventory.setOperatorName2(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.Beiz1); + if (columnIndex > 0) { + l_wh_form_inventory.setBeiz1(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.AgencyId); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory.setAgencyId(null); + } else { + l_wh_form_inventory.setAgencyId(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.AgencyName); + if (columnIndex > 0) { + l_wh_form_inventory.setAgencyName(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.CreatorId); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory.setCreatorId(null); + } else { + l_wh_form_inventory.setCreatorId(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.CreatorName); + if (columnIndex > 0) { + l_wh_form_inventory.setCreatorName(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.InventoryDate); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory.setInventoryDate(null); + } else { + l_wh_form_inventory.setInventoryDate(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.CreateTime); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory.setCreateTime(null); + } else { + l_wh_form_inventory.setCreateTime(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, LWhFormInventory_mapper.StopTime); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_inventory.setStopTime(null); + } else { + l_wh_form_inventory.setStopTime(rs.getLong(columnIndex)); + } + } + return l_wh_form_inventory; + } +} diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormOutput.java b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormOutput.java index df989bb..3874dec 100644 --- a/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormOutput.java +++ b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormOutput.java @@ -36,6 +36,10 @@ @JsonIgnore protected boolean isset_transBusinessId = false; + private Integer outWarehouseType = null; + @JsonIgnore + protected boolean isset_outWarehouseType = false; + private String outputCode = null; @JsonIgnore protected boolean isset_outputCode = false; @@ -51,6 +55,10 @@ private String warehouseName = null; @JsonIgnore protected boolean isset_warehouseName = false; + + private Integer inWarehouseType = null; + @JsonIgnore + protected boolean isset_inWarehouseType = false; private Long inWarehouseId = null; @JsonIgnore @@ -179,6 +187,20 @@ return this.transBusinessId == null; } + public Integer getOutWarehouseType() { + return this.outWarehouseType; + } + + public void setOutWarehouseType(Integer outWarehouseType) { + this.outWarehouseType = outWarehouseType; + this.isset_outWarehouseType = true; + } + + @JsonIgnore + public boolean isEmptyOutWarehouseType() { + return this.outWarehouseType == null; + } + public String getOutputCode() { return this.outputCode; } @@ -233,6 +255,20 @@ @JsonIgnore public boolean isEmptyWarehouseName() { return this.warehouseName == null || this.warehouseName.length() == 0; + } + + public Integer getInWarehouseType() { + return this.inWarehouseType; + } + + public void setInWarehouseType(Integer inWarehouseType) { + this.inWarehouseType = inWarehouseType; + this.isset_inWarehouseType = true; + } + + @JsonIgnore + public boolean isEmptyInWarehouseType() { + return this.inWarehouseType == null; } public Long getInWarehouseId() { @@ -372,10 +408,12 @@ .append("businessFormCode=").append(this.businessFormCode) .append("inWarehouseFlowId=").append(this.inWarehouseFlowId) .append("transBusinessId=").append(this.transBusinessId) + .append("outWarehouseType=").append(this.outWarehouseType) .append("outputCode=").append(this.outputCode) .append("outputName=").append(this.outputName) .append("warehouseId=").append(this.warehouseId) .append("warehouseName=").append(this.warehouseName) + .append("inWarehouseType=").append(this.inWarehouseType) .append("inWarehouseId=").append(this.inWarehouseId) .append("inWarehouseName=").append(this.inWarehouseName) .append("agencyId=").append(this.agencyId) @@ -414,6 +452,9 @@ if (this.isset_transBusinessId) { l_wh_form_output.setTransBusinessId(this.getTransBusinessId()); } + if (this.isset_outWarehouseType) { + l_wh_form_output.setOutWarehouseType(this.getOutWarehouseType()); + } if (this.isset_outputCode) { l_wh_form_output.setOutputCode(this.getOutputCode()); } @@ -426,6 +467,9 @@ if (this.isset_warehouseName) { l_wh_form_output.setWarehouseName(this.getWarehouseName()); } + if (this.isset_inWarehouseType) { + l_wh_form_output.setInWarehouseType(this.getInWarehouseType()); + } if (this.isset_inWarehouseId) { l_wh_form_output.setInWarehouseId(this.getInWarehouseId()); } diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormOutput_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormOutput_mapper.java index 6b7ab54..8c24516 100644 --- a/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormOutput_mapper.java +++ b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormOutput_mapper.java @@ -7,6 +7,8 @@ import com.walker.jdbc.sqlgen.InsertBuilder; import com.walker.jdbc.sqlgen.SelectBuilder; import com.walker.jdbc.sqlgen.UpdateBuilder; +import com.walker.jdbc.util.StringUtils; + import org.springframework.jdbc.core.RowMapper; import java.sql.ResultSet; @@ -30,10 +32,12 @@ public static final String BusinessFormCode = "business_form_code"; public static final String InWarehouseFlowId = "in_warehouse_flow_id"; public static final String TransBusinessId = "trans_business_id"; + public static final String OutWarehouseType = "out_warehouse_type"; public static final String OutputCode = "output_code"; public static final String OutputName = "output_name"; public static final String WarehouseId = "warehouse_id"; public static final String WarehouseName = "warehouse_name"; + public static final String InWarehouseType = "in_warehouse_type"; public static final String InWarehouseId = "in_warehouse_id"; public static final String InWarehouseName = "in_warehouse_name"; public static final String AgencyId = "agency_id"; @@ -68,6 +72,9 @@ if (lWhFormOutput.isset_transBusinessId) { this.setTransBusinessId(lWhFormOutput.getTransBusinessId()); } + if (lWhFormOutput.isset_outWarehouseType) { + this.setOutWarehouseType(lWhFormOutput.getOutWarehouseType()); + } if (lWhFormOutput.isset_outputCode) { this.setOutputCode(lWhFormOutput.getOutputCode()); } @@ -79,6 +86,9 @@ } if (lWhFormOutput.isset_warehouseName) { this.setWarehouseName(lWhFormOutput.getWarehouseName()); + } + if (lWhFormOutput.isset_inWarehouseType) { + this.setInWarehouseType(lWhFormOutput.getInWarehouseType()); } if (lWhFormOutput.isset_inWarehouseId) { this.setInWarehouseId(lWhFormOutput.getInWarehouseId()); @@ -154,10 +164,12 @@ ib.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); ib.set(InWarehouseFlowId, this.getInWarehouseFlowId(), this.isset_inWarehouseFlowId); ib.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); + ib.set(OutWarehouseType, this.getOutWarehouseType(), this.isset_outWarehouseType); ib.set(OutputCode, this.getOutputCode(), this.isset_outputCode); ib.set(OutputName, this.getOutputName(), this.isset_outputName); ib.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId); ib.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName); + ib.set(InWarehouseType, this.getInWarehouseType(), this.isset_inWarehouseType); ib.set(InWarehouseId, this.getInWarehouseId(), this.isset_inWarehouseId); ib.set(InWarehouseName, this.getInWarehouseName(), this.isset_inWarehouseName); ib.set(AgencyId, this.getAgencyId(), this.isset_agencyId); @@ -180,10 +192,12 @@ ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); ub.set(InWarehouseFlowId, this.getInWarehouseFlowId(), this.isset_inWarehouseFlowId); ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); + ub.set(OutWarehouseType, this.getOutWarehouseType(), this.isset_outWarehouseType); ub.set(OutputCode, this.getOutputCode(), this.isset_outputCode); ub.set(OutputName, this.getOutputName(), this.isset_outputName); ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId); ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName); + ub.set(InWarehouseType, this.getInWarehouseType(), this.isset_inWarehouseType); ub.set(InWarehouseId, this.getInWarehouseId(), this.isset_inWarehouseId); ub.set(InWarehouseName, this.getInWarehouseName(), this.isset_inWarehouseName); ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId); @@ -207,10 +221,12 @@ ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); ub.set(InWarehouseFlowId, this.getInWarehouseFlowId(), this.isset_inWarehouseFlowId); ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); + ub.set(OutWarehouseType, this.getOutWarehouseType(), this.isset_outWarehouseType); ub.set(OutputCode, this.getOutputCode(), this.isset_outputCode); ub.set(OutputName, this.getOutputName(), this.isset_outputName); ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId); ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName); + ub.set(InWarehouseType, this.getInWarehouseType(), this.isset_inWarehouseType); ub.set(InWarehouseId, this.getInWarehouseId(), this.isset_inWarehouseId); ub.set(InWarehouseName, this.getInWarehouseName(), this.isset_inWarehouseName); ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId); @@ -233,10 +249,12 @@ ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); ub.set(InWarehouseFlowId, this.getInWarehouseFlowId(), this.isset_inWarehouseFlowId); ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); + ub.set(OutWarehouseType, this.getOutWarehouseType(), this.isset_outWarehouseType); ub.set(OutputCode, this.getOutputCode(), this.isset_outputCode); ub.set(OutputName, this.getOutputName(), this.isset_outputName); ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId); ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName); + ub.set(InWarehouseType, this.getInWarehouseType(), this.isset_inWarehouseType); ub.set(InWarehouseId, this.getInWarehouseId(), this.isset_inWarehouseId); ub.set(InWarehouseName, this.getInWarehouseName(), this.isset_inWarehouseName); ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId); @@ -293,7 +311,7 @@ */ @Override public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { - return new SqlAndParameters<>("select id, warehouse_flow_id, business_form_code, in_warehouse_flow_id, trans_business_id, output_code, output_name, warehouse_id, warehouse_name, in_warehouse_id, in_warehouse_name, agency_id, agency_name, operator_id, operator_name, deal_time, states, beiz from " + this.getTableName_() + " " + where, parameters); + return new SqlAndParameters<>("select id, warehouse_flow_id, business_form_code, in_warehouse_flow_id, trans_business_id, out_warehouse_type, output_code, output_name, warehouse_id, warehouse_name, in_warehouse_type, in_warehouse_id, in_warehouse_name, agency_id, agency_name, operator_id, operator_name, deal_time, states, beiz from " + this.getTableName_() + " " + where, parameters); } /** @@ -301,7 +319,7 @@ */ @Override public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { - return new SqlAndParameters<>("select id, warehouse_flow_id, business_form_code, in_warehouse_flow_id, trans_business_id, output_code, output_name, warehouse_id, warehouse_name, in_warehouse_id, in_warehouse_name, agency_id, agency_name, operator_id, operator_name, deal_time, states, beiz from " + this.getTableName_() + " " + where, parameters); + return new SqlAndParameters<>("select id, warehouse_flow_id, business_form_code, in_warehouse_flow_id, trans_business_id, out_warehouse_type, output_code, output_name, warehouse_id, warehouse_name, in_warehouse_type, in_warehouse_id, in_warehouse_name, agency_id, agency_name, operator_id, operator_name, deal_time, states, beiz from " + this.getTableName_() + " " + where, parameters); } /** @@ -366,6 +384,14 @@ l_wh_form_output.setTransBusinessId(rs.getLong(columnIndex)); } } + columnIndex = resultSetUtils.findColumn(rs, LWhFormOutput_mapper.OutWarehouseType); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_output.setOutWarehouseType(null); + } else { + l_wh_form_output.setOutWarehouseType(rs.getInt(columnIndex)); + } + } columnIndex = resultSetUtils.findColumn(rs, LWhFormOutput_mapper.OutputCode); if (columnIndex > 0) { l_wh_form_output.setOutputCode(rs.getString(columnIndex)); @@ -386,6 +412,14 @@ if (columnIndex > 0) { l_wh_form_output.setWarehouseName(rs.getString(columnIndex)); } + columnIndex = resultSetUtils.findColumn(rs, LWhFormOutput_mapper.InWarehouseType); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_output.setInWarehouseType(null); + } else { + l_wh_form_output.setInWarehouseType(rs.getInt(columnIndex)); + } + } columnIndex = resultSetUtils.findColumn(rs, LWhFormOutput_mapper.InWarehouseId); if (columnIndex > 0) { if (rs.getBigDecimal(columnIndex) == null) { diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormTransfer.java b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormTransfer.java index 8b3f978..9ae1cc4 100644 --- a/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormTransfer.java +++ b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormTransfer.java @@ -36,6 +36,10 @@ @JsonIgnore protected boolean isset_businessFormCode = false; + private Integer inWarehouseType = null; + @JsonIgnore + protected boolean isset_inWarehouseType = false; + private Long inWarehouseId = null; @JsonIgnore protected boolean isset_inWarehouseId = false; @@ -43,6 +47,10 @@ private String inWarehouseName = null; @JsonIgnore protected boolean isset_inWarehouseName = false; + + private Integer outWarehouseType = null; + @JsonIgnore + protected boolean isset_outWarehouseType = false; private Long outWarehouseId = null; @JsonIgnore @@ -215,6 +223,20 @@ return this.businessFormCode == null || this.businessFormCode.length() == 0; } + public Integer getInWarehouseType() { + return this.inWarehouseType; + } + + public void setInWarehouseType(Integer inWarehouseType) { + this.inWarehouseType = inWarehouseType; + this.isset_inWarehouseType = true; + } + + @JsonIgnore + public boolean isEmptyInWarehouseType() { + return this.inWarehouseType == null; + } + public Long getInWarehouseId() { return this.inWarehouseId; } @@ -241,6 +263,20 @@ @JsonIgnore public boolean isEmptyInWarehouseName() { return this.inWarehouseName == null || this.inWarehouseName.length() == 0; + } + + public Integer getOutWarehouseType() { + return this.outWarehouseType; + } + + public void setOutWarehouseType(Integer outWarehouseType) { + this.outWarehouseType = outWarehouseType; + this.isset_outWarehouseType = true; + } + + @JsonIgnore + public boolean isEmptyOutWarehouseType() { + return this.outWarehouseType == null; } public Long getOutWarehouseId() { @@ -534,8 +570,10 @@ .append("outWarehouseFormId=").append(this.outWarehouseFormId) .append("businessType=").append(this.businessType) .append("businessFormCode=").append(this.businessFormCode) + .append("inWarehouseType=").append(this.inWarehouseType) .append("inWarehouseId=").append(this.inWarehouseId) .append("inWarehouseName=").append(this.inWarehouseName) + .append("outWarehouseType=").append(this.outWarehouseType) .append("outWarehouseId=").append(this.outWarehouseId) .append("outWarehouseName=").append(this.outWarehouseName) .append("inAgencyId=").append(this.inAgencyId) @@ -585,12 +623,18 @@ if (this.isset_businessFormCode) { l_wh_form_transfer.setBusinessFormCode(this.getBusinessFormCode()); } + if (this.isset_inWarehouseType) { + l_wh_form_transfer.setInWarehouseType(this.getInWarehouseType()); + } if (this.isset_inWarehouseId) { l_wh_form_transfer.setInWarehouseId(this.getInWarehouseId()); } if (this.isset_inWarehouseName) { l_wh_form_transfer.setInWarehouseName(this.getInWarehouseName()); } + if (this.isset_outWarehouseType) { + l_wh_form_transfer.setOutWarehouseType(this.getOutWarehouseType()); + } if (this.isset_outWarehouseId) { l_wh_form_transfer.setOutWarehouseId(this.getOutWarehouseId()); } diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormTransfer_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormTransfer_mapper.java index 90ac848..026243b 100644 --- a/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormTransfer_mapper.java +++ b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormTransfer_mapper.java @@ -7,6 +7,8 @@ import com.walker.jdbc.sqlgen.InsertBuilder; import com.walker.jdbc.sqlgen.SelectBuilder; import com.walker.jdbc.sqlgen.UpdateBuilder; +import com.walker.jdbc.util.StringUtils; + import org.springframework.jdbc.core.RowMapper; import java.sql.ResultSet; @@ -30,8 +32,10 @@ public static final String OutWarehouseFormId = "out_warehouse_form_id"; public static final String BusinessType = "business_type"; public static final String BusinessFormCode = "business_form_code"; + public static final String InWarehouseType = "in_warehouse_type"; public static final String InWarehouseId = "in_warehouse_id"; public static final String InWarehouseName = "in_warehouse_name"; + public static final String OutWarehouseType = "out_warehouse_type"; public static final String OutWarehouseId = "out_warehouse_id"; public static final String OutWarehouseName = "out_warehouse_name"; public static final String InAgencyId = "in_agency_id"; @@ -77,11 +81,17 @@ if (lWhFormTransfer.isset_businessFormCode) { this.setBusinessFormCode(lWhFormTransfer.getBusinessFormCode()); } + if (lWhFormTransfer.isset_inWarehouseType) { + this.setInWarehouseType(lWhFormTransfer.getInWarehouseType()); + } if (lWhFormTransfer.isset_inWarehouseId) { this.setInWarehouseId(lWhFormTransfer.getInWarehouseId()); } if (lWhFormTransfer.isset_inWarehouseName) { this.setInWarehouseName(lWhFormTransfer.getInWarehouseName()); + } + if (lWhFormTransfer.isset_outWarehouseType) { + this.setOutWarehouseType(lWhFormTransfer.getOutWarehouseType()); } if (lWhFormTransfer.isset_outWarehouseId) { this.setOutWarehouseId(lWhFormTransfer.getOutWarehouseId()); @@ -190,8 +200,10 @@ ib.set(OutWarehouseFormId, this.getOutWarehouseFormId(), this.isset_outWarehouseFormId); ib.set(BusinessType, this.getBusinessType(), this.isset_businessType); ib.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); + ib.set(InWarehouseType, this.getInWarehouseType(), this.isset_inWarehouseType); ib.set(InWarehouseId, this.getInWarehouseId(), this.isset_inWarehouseId); ib.set(InWarehouseName, this.getInWarehouseName(), this.isset_inWarehouseName); + ib.set(OutWarehouseType, this.getOutWarehouseType(), this.isset_outWarehouseType); ib.set(OutWarehouseId, this.getOutWarehouseId(), this.isset_outWarehouseId); ib.set(OutWarehouseName, this.getOutWarehouseName(), this.isset_outWarehouseName); ib.set(InAgencyId, this.getInAgencyId(), this.isset_inAgencyId); @@ -225,8 +237,10 @@ ub.set(OutWarehouseFormId, this.getOutWarehouseFormId(), this.isset_outWarehouseFormId); ub.set(BusinessType, this.getBusinessType(), this.isset_businessType); ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); + ub.set(InWarehouseType, this.getInWarehouseType(), this.isset_inWarehouseType); ub.set(InWarehouseId, this.getInWarehouseId(), this.isset_inWarehouseId); ub.set(InWarehouseName, this.getInWarehouseName(), this.isset_inWarehouseName); + ub.set(OutWarehouseType, this.getOutWarehouseType(), this.isset_outWarehouseType); ub.set(OutWarehouseId, this.getOutWarehouseId(), this.isset_outWarehouseId); ub.set(OutWarehouseName, this.getOutWarehouseName(), this.isset_outWarehouseName); ub.set(InAgencyId, this.getInAgencyId(), this.isset_inAgencyId); @@ -261,8 +275,10 @@ ub.set(OutWarehouseFormId, this.getOutWarehouseFormId(), this.isset_outWarehouseFormId); ub.set(BusinessType, this.getBusinessType(), this.isset_businessType); ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); + ub.set(InWarehouseType, this.getInWarehouseType(), this.isset_inWarehouseType); ub.set(InWarehouseId, this.getInWarehouseId(), this.isset_inWarehouseId); ub.set(InWarehouseName, this.getInWarehouseName(), this.isset_inWarehouseName); + ub.set(OutWarehouseType, this.getOutWarehouseType(), this.isset_outWarehouseType); ub.set(OutWarehouseId, this.getOutWarehouseId(), this.isset_outWarehouseId); ub.set(OutWarehouseName, this.getOutWarehouseName(), this.isset_outWarehouseName); ub.set(InAgencyId, this.getInAgencyId(), this.isset_inAgencyId); @@ -296,8 +312,10 @@ ub.set(OutWarehouseFormId, this.getOutWarehouseFormId(), this.isset_outWarehouseFormId); ub.set(BusinessType, this.getBusinessType(), this.isset_businessType); ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); + ub.set(InWarehouseType, this.getInWarehouseType(), this.isset_inWarehouseType); ub.set(InWarehouseId, this.getInWarehouseId(), this.isset_inWarehouseId); ub.set(InWarehouseName, this.getInWarehouseName(), this.isset_inWarehouseName); + ub.set(OutWarehouseType, this.getOutWarehouseType(), this.isset_outWarehouseType); ub.set(OutWarehouseId, this.getOutWarehouseId(), this.isset_outWarehouseId); ub.set(OutWarehouseName, this.getOutWarehouseName(), this.isset_outWarehouseName); ub.set(InAgencyId, this.getInAgencyId(), this.isset_inAgencyId); @@ -365,7 +383,7 @@ */ @Override public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { - return new SqlAndParameters<>("select id, in_warehouse_form_id, out_warehouse_form_id, business_type, business_form_code, in_warehouse_id, in_warehouse_name, out_warehouse_id, out_warehouse_name, in_agency_id, in_agency_name, out_agency_id, out_agency_name, operator_id, operator_name, create_time, states, in_operator_id, in_operator_name, in_time, out_operator_id, out_operator_name, output_time, beiz1, beiz2, beiz3, procure_doc from " + this.getTableName_() + " " + where, parameters); + return new SqlAndParameters<>("select id, in_warehouse_form_id, out_warehouse_form_id, business_type, business_form_code, in_warehouse_type, in_warehouse_id, in_warehouse_name, out_warehouse_type, out_warehouse_id, out_warehouse_name, in_agency_id, in_agency_name, out_agency_id, out_agency_name, operator_id, operator_name, create_time, states, in_operator_id, in_operator_name, in_time, out_operator_id, out_operator_name, output_time, beiz1, beiz2, beiz3, procure_doc from " + this.getTableName_() + " " + where, parameters); } /** @@ -373,7 +391,7 @@ */ @Override public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { - return new SqlAndParameters<>("select id, in_warehouse_form_id, out_warehouse_form_id, business_type, business_form_code, in_warehouse_id, in_warehouse_name, out_warehouse_id, out_warehouse_name, in_agency_id, in_agency_name, out_agency_id, out_agency_name, operator_id, operator_name, create_time, states, in_operator_id, in_operator_name, in_time, out_operator_id, out_operator_name, output_time, beiz1, beiz2, beiz3, procure_doc from " + this.getTableName_() + " " + where, parameters); + return new SqlAndParameters<>("select id, in_warehouse_form_id, out_warehouse_form_id, business_type, business_form_code, in_warehouse_type, in_warehouse_id, in_warehouse_name, out_warehouse_type, out_warehouse_id, out_warehouse_name, in_agency_id, in_agency_name, out_agency_id, out_agency_name, operator_id, operator_name, create_time, states, in_operator_id, in_operator_name, in_time, out_operator_id, out_operator_name, output_time, beiz1, beiz2, beiz3, procure_doc from " + this.getTableName_() + " " + where, parameters); } /** @@ -438,6 +456,14 @@ if (columnIndex > 0) { l_wh_form_transfer.setBusinessFormCode(rs.getString(columnIndex)); } + columnIndex = resultSetUtils.findColumn(rs, LWhFormTransfer_mapper.InWarehouseType); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_transfer.setInWarehouseType(null); + } else { + l_wh_form_transfer.setInWarehouseType(rs.getInt(columnIndex)); + } + } columnIndex = resultSetUtils.findColumn(rs, LWhFormTransfer_mapper.InWarehouseId); if (columnIndex > 0) { if (rs.getBigDecimal(columnIndex) == null) { @@ -450,6 +476,14 @@ if (columnIndex > 0) { l_wh_form_transfer.setInWarehouseName(rs.getString(columnIndex)); } + columnIndex = resultSetUtils.findColumn(rs, LWhFormTransfer_mapper.OutWarehouseType); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_transfer.setOutWarehouseType(null); + } else { + l_wh_form_transfer.setOutWarehouseType(rs.getInt(columnIndex)); + } + } columnIndex = resultSetUtils.findColumn(rs, LWhFormTransfer_mapper.OutWarehouseId); if (columnIndex > 0) { if (rs.getBigDecimal(columnIndex) == null) { -- Gitblit v1.9.1