Merge remote-tracking branch 'origin/master'
| | |
| | | -- å建åå¨è¿ç¨å¼å§----------- |
| | | DELIMITER // |
| | | CREATE PROCEDURE `InsertL_WH_GOODS` (IN p_WAREHOUSE_FLOW_ID BIGINT,IN p_WAREHOUSE_ID BIGINT,IN p_WH_GOODS_RECORD_ID BIGINT,IN p_RECORD_TYPE SMALLINT,IN p_WAREHOUSE_NAME VARCHAR (100),IN p_COST_TYPE SMALLINT,IN p_BASE_GOODS_TEMPLATE_ID BIGINT,IN p_GOODS_TEMPLATE_NAME VARCHAR (200),IN p_BASE_GOODS_MODELS_ID BIGINT,IN p_BASE_GOODS_MODELS_NAME VARCHAR (200),IN p_SUPPLIER VARCHAR (200),IN p_BUY_TYPE SMALLINT,IN p_UNIT VARCHAR (10),IN p_PRICE BIGINT,IN p_PROCURE_DATE BIGINT,IN p_STATES INT,IN p_DEAL_TIME BIGINT,IN p_times INT) BEGIN DECLARE i INT DEFAULT 1; DECLARE v_WH_GOODS_ID BIGINT; DECLARE CONTINUE |
| | | HANDLER FOR SQLEXCEPTION BEGIN-- An error occurred, rollback the transaction |
| | | ROLLBACK; END;-- Start the transaction |
| | | CREATE PROCEDURE `InsertL_WH_GOODS` (IN p_WAREHOUSE_FLOW_ID BIGINT,IN p_WAREHOUSE_TYPE SMALLINT,IN p_WAREHOUSE_ID BIGINT,IN p_WH_GOODS_RECORD_ID BIGINT,IN p_RECORD_TYPE SMALLINT,IN p_WAREHOUSE_NAME VARCHAR (100),IN p_COST_TYPE SMALLINT,IN p_BASE_GOODS_TEMPLATE_ID BIGINT,IN p_GOODS_TEMPLATE_NAME VARCHAR (200),IN p_BASE_GOODS_MODELS_ID BIGINT,IN p_BASE_GOODS_MODELS_NAME VARCHAR (200),IN p_SUPPLIER VARCHAR (200),IN p_BUY_TYPE SMALLINT,IN p_UNIT VARCHAR (10),IN p_PRICE BIGINT,IN p_PROCURE_DATE BIGINT,IN p_STATES INT,IN p_DEAL_TIME BIGINT,IN p_times INT) BEGIN DECLARE i INT DEFAULT 1; DECLARE v_WH_GOODS_ID BIGINT; DECLARE CONTINUE |
| | | HANDLER FOR SQLEXCEPTION BEGIN-- An error occurred, rollback the transaction |
| | | ROLLBACK; END;-- Start the transaction |
| | | START TRANSACTION; WHILE i<=p_times |
| | | DO |
| | | INSERT INTO L_WH_GOODS (WAREHOUSE_ID,WAREHOUSE_NAME,COST_TYPE,BASE_GOODS_TEMPLATE_ID,GOODS_TEMPLATE_NAME,BASE_GOODS_MODELS_ID,BASE_GOODS_MODELS_NAME,SUPPLIER,BUY_TYPE,UNIT,PRICE,PROCURE_DATE,STATES) VALUES (p_WAREHOUSE_ID,p_WAREHOUSE_NAME,p_COST_TYPE,p_BASE_GOODS_TEMPLATE_ID,p_GOODS_TEMPLATE_NAME,p_BASE_GOODS_MODELS_ID,p_BASE_GOODS_MODELS_NAME,p_SUPPLIER,p_BUY_TYPE,p_UNIT,p_PRICE,p_PROCURE_DATE,p_STATES); |
| | | SET v_WH_GOODS_ID=LAST_INSERT_ID();-- æå
¥åè·åIDå¹¶åå
¥L_WH_GOODS_RECORD_DETAILS表 |
| | | INSERT INTO L_WH_GOODS_RECORD_DETAILS (WH_GOODS_RECORD_ID,WH_GOODS_ID,THIS_TYPE) VALUES (p_WH_GOODS_RECORD_ID,v_WH_GOODS_ID,p_RECORD_TYPE);-- æå
¥å°L_GOODS_WH_RECORD表 |
| | | INSERT INTO L_GOODS_WH_RECORD (WAREHOUSE_FLOW_ID,WH_GOODS_ID,WAREHOUSE_ID,DEAL_TIME) VALUES (p_WAREHOUSE_FLOW_ID,v_WH_GOODS_ID,p_WAREHOUSE_ID,p_DEAL_TIME); |
| | | SET i=i+1; END WHILE;-- If no errors, commit the transaction |
| | | DO |
| | | INSERT INTO L_WH_GOODS (WAREHOUSE_TYPE,WAREHOUSE_ID,WAREHOUSE_NAME,COST_TYPE,BASE_GOODS_TEMPLATE_ID,GOODS_TEMPLATE_NAME,BASE_GOODS_MODELS_ID,BASE_GOODS_MODELS_NAME,SUPPLIER,BUY_TYPE,UNIT,PRICE,PROCURE_DATE,STATES) VALUES (p_WAREHOUSE_TYPE,p_WAREHOUSE_ID,p_WAREHOUSE_NAME,p_COST_TYPE,p_BASE_GOODS_TEMPLATE_ID,p_GOODS_TEMPLATE_NAME,p_BASE_GOODS_MODELS_ID,p_BASE_GOODS_MODELS_NAME,p_SUPPLIER,p_BUY_TYPE,p_UNIT,p_PRICE,p_PROCURE_DATE,p_STATES); |
| | | SET v_WH_GOODS_ID=LAST_INSERT_ID();-- æå
¥åè·åIDå¹¶åå
¥L_WH_GOODS_RECORD_DETAILS表 |
| | | INSERT INTO L_WH_GOODS_RECORD_DETAILS (WH_GOODS_RECORD_ID,WH_GOODS_ID,THIS_TYPE) VALUES (p_WH_GOODS_RECORD_ID,v_WH_GOODS_ID,p_RECORD_TYPE);-- æå
¥å°L_GOODS_WH_RECORD表 |
| | | UPDATE L_GOODS_WH_RECORD SET LAST_RECORD=0 WHERE WH_GOODS_ID=v_WH_GOODS_ID AND WAREHOUSE_ID=p_WAREHOUSE_ID AND WAREHOUSE_TYPE=p_WAREHOUSE_TYPE AND LAST_RECORD=1; |
| | | INSERT INTO L_GOODS_WH_RECORD (WAREHOUSE_FLOW_ID,WH_GOODS_ID,WAREHOUSE_TYPE,WAREHOUSE_ID,DEAL_TIME,LAST_RECORD) VALUES (p_WAREHOUSE_FLOW_ID,v_WH_GOODS_ID,p_WAREHOUSE_TYPE,p_WAREHOUSE_ID,p_DEAL_TIME,1); |
| | | SET i=i+1; END WHILE;-- If no errors, commit the transaction |
| | | COMMIT; END |
| | | -- å建åå¨è¿ç¨ç»æ ----------- |
| | | |
New file |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.service.LOrgSupplierServiceImpl; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.web.ResponseValue; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @ClassName LOrgSupplierController |
| | | * @Author cy |
| | | * @Date 2023/11/2 |
| | | * @Description |
| | | * @Version 1.0 |
| | | **/ |
| | | @RestController |
| | | @RequestMapping("/pc/orgSupplier") |
| | | public class LOrgSupplierController extends BaseController { |
| | | |
| | | @Resource |
| | | private LOrgSupplierServiceImpl lOrgSupplierService; |
| | | |
| | | @GetMapping("/getSupplier") |
| | | public ResponseValue queryFormProcureList(String supplier) { |
| | | S_user_core currentUser = this.getCurrentUser(); |
| | | if (currentUser == null) { |
| | | return ResponseValue.error("ç»å½ç¨æ·ä¿¡æ¯ä¸åå¨"); |
| | | } |
| | | return ResponseValue.success(lOrgSupplierService.selectSupplier(this.getSysInfo().getTenantId(), supplier)); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.lang.reflect.Field; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @ClassName LWhFormProcureController |
| | |
| | | private BaseGoodsTemplateServiceImpl baseGoodsTemplateService; |
| | | @Resource |
| | | private LWhProcureModelService lWhProcureModelService; |
| | | @Resource |
| | | private LOrgSupplierServiceImpl lOrgSupplierService; |
| | | |
| | | /** |
| | | * @Description æ°å¢ |
| | |
| | | return ResponseValue.error("ä»åºIDä¸è½ä¸ºç©º"); |
| | | } |
| | | BaseWarehouse baseWarehouse = baseWarehouseService.getById(warehouseId); |
| | | FinSysTenantUser sysTenantUser = this.getSysInfo(); |
| | | String tenantId = sysTenantUser.getTenantId(); |
| | | String tenantName = sysTenantUser.getTenantName(); |
| | | // åªè½æ·»å æ¬æºæä»åºçè¿è´§å |
| | | //?????? |
| | | // |
| | |
| | | } |
| | | long procureTime = DateUtils.getDateTimeNumber(System.currentTimeMillis()); |
| | | |
| | | Set<String> supplierList = new HashSet<>(); |
| | | |
| | | ArrayList<LWhFormProcureGoods> procureGoodList = new ArrayList<>(); |
| | | ArrayList<LWhProcureModel> whProcureModeLlist = new ArrayList<>(); |
| | | |
| | |
| | | Long baseCategoryId = procureGoodT.getBaseCategoryId(); |
| | | Long baseGoodsTemplateId = procureGoodT.getBaseGoodsTemplateId(); |
| | | String supplier = procureGoodT.getSupplier(); |
| | | // 夿å½åä¾åºåæ¯å¦å·²åå¨ |
| | | if (!supplierList.contains(supplier) && !lOrgSupplierService.supplierIsContain(tenantId, supplier)) { |
| | | supplierList.add(supplier); |
| | | } |
| | | |
| | | |
| | | List<LWhProcureModelParams> models = procureGoodT.getModels(); |
| | | if (CollectionUtils.isEmpty(models)) { |
| | | return ResponseValue.error("éè´åä¸è½ä¸ºç©º"); |
| | |
| | | if (tempGoodsInfo == null) { |
| | | return ResponseValue.error("éè´çä»·åå·æªæ¾å°"); |
| | | } |
| | | String modelName = (String) tempGoodsInfo.get("modelname"); |
| | | // æ¥è¯¢åå·åºå |
| | | int goodsModelNum = lWhGoodsService.queryGoodsModelNum(0, warehouseId, baseGoodsModelsId, (short) 1, null); |
| | | LWhProcureModel model = new LWhProcureModel(); |
| | |
| | | model.setBusinessType(WhBusinessEnum.CAIGOU.getValue() + 0); |
| | | model.setBusinessId(whFormProcureId); |
| | | model.setBaseGoodsModelsId(baseGoodsModelsId); |
| | | model.setBaseGoodsModelsName(modelName); |
| | | model.setPrice(price); |
| | | model.setCounts(counts); |
| | | model.setWorehouseCount(goodsModelNum); |
| | |
| | | lWhFormProcure.setAgencyId(baseWarehouse.getAgencyId()); |
| | | lWhFormProcure.setAgencyName(baseWarehouse.getAgencyName()); |
| | | int result = lWhFormProcureService.insert(lWhFormProcure); |
| | | if (result > 0) return ResponseValue.success(1); |
| | | |
| | | supplierList.forEach(supplier -> { |
| | | LOrgSupplier lOrgSupplier = new LOrgSupplier(); |
| | | lOrgSupplier.setId(NumberGenerator.getLongSequenceNumber()); |
| | | lOrgSupplier.setAgencyId(tenantId); |
| | | lOrgSupplier.setAgencyName(tenantName); |
| | | lOrgSupplier.setSupplier(supplier); |
| | | lOrgSupplierService.insert(lOrgSupplier); |
| | | }); |
| | | if (result > 0) { |
| | | return ResponseValue.success(1); |
| | | } |
| | | return ResponseValue.error("æ°å¢å¤±è´¥ï¼"); |
| | | } |
| | | |
New file |
| | |
| | | package com.consum.base.service; |
| | | |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @ClassName LOrgSupplierServiceImpl |
| | | * @Author cy |
| | | * @Date 2023/11/1 |
| | | * @Description |
| | | * @Version 1.0 |
| | | **/ |
| | | @Service |
| | | @Slf4j |
| | | public class LOrgSupplierServiceImpl extends BaseServiceImpl { |
| | | private static String SUPPLIER_IS_CONTAIN = "SELECT*FROM L_ORG_SUPPLIER WHERE 1=1"; |
| | | |
| | | /** |
| | | * 夿ä¾åºåæ¯å¦åå¨ |
| | | * |
| | | * @param agencyId |
| | | * @param supplier |
| | | * @return |
| | | */ |
| | | |
| | | public List<Map<String, Object>> selectSupplier(String agencyId, String supplier) { |
| | | StringBuilder sql = new StringBuilder(SUPPLIER_IS_CONTAIN); |
| | | Map<String, Object> paramts = new HashMap<>(); |
| | | if (agencyId != null) { |
| | | sql.append(" and AGENCY_ID=:agencyId"); |
| | | paramts.put("agencyId", agencyId); |
| | | } |
| | | if (StringUtils.isNotEmpty(supplier)) { |
| | | sql.append(" and supplier=:supplier"); |
| | | paramts.put("supplier", supplier); |
| | | } |
| | | return select(sql.append(" limit 1").toString(), paramts); |
| | | } |
| | | |
| | | public boolean supplierIsContain(String agencyId, String supplier) { |
| | | List<Map<String, Object>> selectSupplier = selectSupplier(agencyId, supplier); |
| | | return !CollectionUtils.isEmpty(selectSupplier); |
| | | } |
| | | } |
| | |
| | | private LWarehouseFlowService lWarehouseFlowService; |
| | | private LWhGoodsService lWhGoodsService; |
| | | private LWhGoodsRecordService lWhGoodsRecordService; |
| | | private LWhFormTransferService lWhFormTransferService; |
| | | private LWhFormTransferServiceImpl lWhFormTransferService; |
| | | private LWhFormOutputCoreService lWhFormOutputCoreService; |
| | | private BaseGoodsTemplateServiceImpl baseGoodsTemplateService; |
| | | |
| | | @Autowired |
| | | public LWarehouseFlowCoreService(JdbcTemplate jdbcTemplate, LWarehouseFlowService lWarehouseFlowService, LWhGoodsService lWhGoodsService, LWhFormTransferService lWhFormTransferService, LWhFormOutputCoreService lWhFormOutputCoreService, BaseGoodsTemplateServiceImpl baseGoodsTemplateService, LWhGoodsRecordService lWhGoodsRecordService) { |
| | | public LWarehouseFlowCoreService(JdbcTemplate jdbcTemplate, LWarehouseFlowService lWarehouseFlowService, LWhGoodsService lWhGoodsService, LWhFormTransferServiceImpl lWhFormTransferService, LWhFormOutputCoreService lWhFormOutputCoreService, BaseGoodsTemplateServiceImpl baseGoodsTemplateService, LWhGoodsRecordService lWhGoodsRecordService) { |
| | | this.jdbcTemplate = jdbcTemplate; |
| | | this.lWarehouseFlowService = lWarehouseFlowService; |
| | | this.baseGoodsTemplateService = baseGoodsTemplateService; |
| | |
| | | Object warehouseModelLockObj = LockManage.acquireLock(warehouseType, warehouseId, baseGoodsModelsId); |
| | | synchronized (warehouseModelLockObj) { |
| | | // è·å¾éåæ¥è¯¢è¯¥åå·çæåæ°é |
| | | int goodsModelNum = lWhGoodsService.queryGoodsModelNum(warehouseType,warehouseId, baseGoodsModelsId, (short) 1, null); |
| | | int goodsModelNum = lWhGoodsService.queryGoodsModelNum(warehouseType, warehouseId, baseGoodsModelsId, (short) 1, null); |
| | | whGoodsRecord.setInitialCount(goodsModelNum); |
| | | whGoodsRecord.setThisCount(modelCount); |
| | | whGoodsRecord.setEndCount(goodsModelNum + modelCount); |
| | |
| | | Long price = item.getPrice(); |
| | | //ç©åä¸ªæ° |
| | | Integer counts = item.getCounts(); |
| | | sameGoodsInsertMore(warehouseFlowId, warehouseId, whGoodsRecordId, (short) 1, warehouseName, |
| | | sameGoodsInsertMore(warehouseFlowId, warehouseType, warehouseId, whGoodsRecordId, (short) 1, warehouseName, |
| | | classification, tempGoodsId, goodsName, baseGoodsModelsId, modelName, |
| | | supplier, buyType, goodsUnit, price, procureTime, 1, dealTime, counts); |
| | | }); |
| | |
| | | * @param pStates ç¶æ |
| | | * @param pTimes æå
¥æ¡æ° |
| | | */ |
| | | public void sameGoodsInsertMore(long pWarehouseFlowId, long pWarehouseId, long pWhGoodsRecordId, short pRecordType, String pWarehouseName, short pCostType, |
| | | public void sameGoodsInsertMore(long pWarehouseFlowId, Integer warehouseType , long pWarehouseId, long pWhGoodsRecordId, short pRecordType, String pWarehouseName, short pCostType, |
| | | long pBaseGoodsTemplateId, String pGoodsTemplateName, long pBaseGoodsModelsId, |
| | | String pBaseGoodsModelsName, String pSupplier, short pBuyType, |
| | | String pUnit, long pPrice, long pProcureDate, |
| | | int pStates, long pDealTime, int pTimes) { |
| | | SqlParameterSource in = new MapSqlParameterSource() |
| | | .addValue("p_WAREHOUSE_FLOW_ID", pWarehouseFlowId) |
| | | .addValue("p_WAREHOUSE_TYPE", warehouseType) |
| | | .addValue("p_WAREHOUSE_ID", pWarehouseId) |
| | | .addValue("p_WH_GOODS_RECORD_ID", pWhGoodsRecordId) |
| | | .addValue("p_RECORD_TYPE", pRecordType) |
| | |
| | | private LWhGoodsService lWhGoodsService; |
| | | private CodeGeneratorService codeGeneratorService; |
| | | private LWhProcureModelService lWhProcureModelService; |
| | | private LWhFormTransferService lWhFormTransferService; |
| | | // private LWhFormTransferServiceImpl lWhFormTransferService; |
| | | private LWhFormOutputService lWhFormOutputService; |
| | | private LWarehouseFlowService lWarehouseFlowService; |
| | | private LWhGoodsRecordDetailsService lWhGoodsRecordDetailsService; |
| | |
| | | LWhGoodsService lWhGoodsService, |
| | | CodeGeneratorService codeGeneratorService, |
| | | LWhProcureModelService lWhProcureModelService, |
| | | LWhFormTransferService lWhFormTransferService, |
| | | // LWhFormTransferServiceImpl lWhFormTransferService, |
| | | LWhFormOutputService lWhFormOutputService, |
| | | LWarehouseFlowService lWarehouseFlowService, |
| | | LWhGoodsRecordDetailsService lWhGoodsRecordDetailsService, |
| | |
| | | this.lWhGoodsService = lWhGoodsService; |
| | | this.codeGeneratorService = codeGeneratorService; |
| | | this.lWhProcureModelService = lWhProcureModelService; |
| | | this.lWhFormTransferService = lWhFormTransferService; |
| | | // this.lWhFormTransferService = lWhFormTransferService; |
| | | this.lWhFormOutputService = lWhFormOutputService; |
| | | this.lWarehouseFlowService = lWarehouseFlowService; |
| | | this.lWhGoodsRecordDetailsService = lWhGoodsRecordDetailsService; |
| | |
| | | return null; |
| | | } |
| | | LWhFormTransfer lWhFormTransfer = new LWhFormTransfer(whFormTransferId); |
| | | lWhFormTransfer = lWhFormTransferService.get(lWhFormTransfer); |
| | | lWhFormTransfer = lWhFormOutputService.get(lWhFormTransfer); |
| | | if (lWhFormTransfer == null || lWhFormTransfer.getStates() != 0) { |
| | | log.error("è°æ¨å¤±è´¥ï¼è¯·æ£æ¥è°æ¨åç¶æ"); |
| | | return null; |
| | |
| | | @Service |
| | | @Slf4j |
| | | public class LWhFormScrappedCoreService { |
| | | private LWhFormScrappedService lWhFormScrappedService; |
| | | private LWhFormScrappedServiceImpl lWhFormScrappedService; |
| | | private LWhFormScrappedGoodsService lWhFormScrappedGoodsService; |
| | | private BaseGoodsTemplateServiceImpl baseGoodsTemplateService; |
| | | private LWhGoodsService lWhGoodsService; |
| | |
| | | private LWarehouseFlowService lWarehouseFlowService; |
| | | |
| | | @Autowired |
| | | public LWhFormScrappedCoreService(LWhFormScrappedService lWhFormScrappedService, |
| | | public LWhFormScrappedCoreService(LWhFormScrappedServiceImpl lWhFormScrappedService, |
| | | LWhFormScrappedGoodsService lWhFormScrappedGoodsService, |
| | | BaseGoodsTemplateServiceImpl baseGoodsTemplateService, |
| | | LWhGoodsService lWhGoodsService, |
| | |
| | | @Slf4j |
| | | public class LWhFormTransferCoreService { |
| | | @Resource |
| | | private LWhFormTransferService lWhFormTransferService; |
| | | private LWhFormTransferServiceImpl lWhFormTransferService; |
| | | @Resource |
| | | private LWhFormOutputCoreService lWhFormOutputCoreService; |
| | | |
| | |
| | | @JsonIgnore |
| | | protected boolean isset_transBusinessId = false; |
| | | |
| | | private Long procureModelUserRecordId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_procureModelUserRecordId = false; |
| | | |
| | | private Long nowUserPhone = null; |
| | | @JsonIgnore |
| | | protected boolean isset_nowUserPhone = false; |
| | |
| | | return this.transBusinessId == null; |
| | | } |
| | | |
| | | public Long getProcureModelUserRecordId() { |
| | | return this.procureModelUserRecordId; |
| | | } |
| | | |
| | | public void setProcureModelUserRecordId(Long procureModelUserRecordId) { |
| | | this.procureModelUserRecordId = procureModelUserRecordId; |
| | | this.isset_procureModelUserRecordId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyProcureModelUserRecordId() { |
| | | return this.procureModelUserRecordId == null; |
| | | } |
| | | |
| | | public Long getNowUserPhone() { |
| | | return this.nowUserPhone; |
| | | } |
| | |
| | | .append("whGoodsId=").append(this.whGoodsId) |
| | | .append("recordType=").append(this.recordType) |
| | | .append("transBusinessId=").append(this.transBusinessId) |
| | | .append("procureModelUserRecordId=").append(this.procureModelUserRecordId) |
| | | .append("nowUserPhone=").append(this.nowUserPhone) |
| | | .append("nowUserName=").append(this.nowUserName) |
| | | .append("operatorId=").append(this.operatorId) |
| | |
| | | if (this.isset_transBusinessId) { |
| | | l_goods_user_record.setTransBusinessId(this.getTransBusinessId()); |
| | | } |
| | | if (this.isset_procureModelUserRecordId) { |
| | | l_goods_user_record.setProcureModelUserRecordId(this.getProcureModelUserRecordId()); |
| | | } |
| | | if (this.isset_nowUserPhone) { |
| | | l_goods_user_record.setNowUserPhone(this.getNowUserPhone()); |
| | | } |
| | |
| | | public static final String WhGoodsId = "wh_goods_id"; |
| | | public static final String RecordType = "record_type"; |
| | | public static final String TransBusinessId = "trans_business_id"; |
| | | public static final String ProcureModelUserRecordId = "procure_model_user_record_id"; |
| | | public static final String NowUserPhone = "now_user_phone"; |
| | | public static final String NowUserName = "now_user_name"; |
| | | public static final String OperatorId = "operator_id"; |
| | |
| | | } |
| | | if (lGoodsUserRecord.isset_transBusinessId) { |
| | | this.setTransBusinessId(lGoodsUserRecord.getTransBusinessId()); |
| | | } |
| | | if (lGoodsUserRecord.isset_procureModelUserRecordId) { |
| | | this.setProcureModelUserRecordId(lGoodsUserRecord.getProcureModelUserRecordId()); |
| | | } |
| | | if (lGoodsUserRecord.isset_nowUserPhone) { |
| | | this.setNowUserPhone(lGoodsUserRecord.getNowUserPhone()); |
| | |
| | | ib.set(WhGoodsId, this.getWhGoodsId(), this.isset_whGoodsId); |
| | | ib.set(RecordType, this.getRecordType(), this.isset_recordType); |
| | | ib.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); |
| | | ib.set(ProcureModelUserRecordId, this.getProcureModelUserRecordId(), this.isset_procureModelUserRecordId); |
| | | ib.set(NowUserPhone, this.getNowUserPhone(), this.isset_nowUserPhone); |
| | | ib.set(NowUserName, this.getNowUserName(), this.isset_nowUserName); |
| | | ib.set(OperatorId, this.getOperatorId(), this.isset_operatorId); |
| | |
| | | ub.set(WhGoodsId, this.getWhGoodsId(), this.isset_whGoodsId); |
| | | ub.set(RecordType, this.getRecordType(), this.isset_recordType); |
| | | ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); |
| | | ub.set(ProcureModelUserRecordId, this.getProcureModelUserRecordId(), this.isset_procureModelUserRecordId); |
| | | ub.set(NowUserPhone, this.getNowUserPhone(), this.isset_nowUserPhone); |
| | | ub.set(NowUserName, this.getNowUserName(), this.isset_nowUserName); |
| | | ub.set(OperatorId, this.getOperatorId(), this.isset_operatorId); |
| | |
| | | ub.set(WhGoodsId, this.getWhGoodsId(), this.isset_whGoodsId); |
| | | ub.set(RecordType, this.getRecordType(), this.isset_recordType); |
| | | ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); |
| | | ub.set(ProcureModelUserRecordId, this.getProcureModelUserRecordId(), this.isset_procureModelUserRecordId); |
| | | ub.set(NowUserPhone, this.getNowUserPhone(), this.isset_nowUserPhone); |
| | | ub.set(NowUserName, this.getNowUserName(), this.isset_nowUserName); |
| | | ub.set(OperatorId, this.getOperatorId(), this.isset_operatorId); |
| | |
| | | ub.set(WhGoodsId, this.getWhGoodsId(), this.isset_whGoodsId); |
| | | ub.set(RecordType, this.getRecordType(), this.isset_recordType); |
| | | ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); |
| | | ub.set(ProcureModelUserRecordId, this.getProcureModelUserRecordId(), this.isset_procureModelUserRecordId); |
| | | ub.set(NowUserPhone, this.getNowUserPhone(), this.isset_nowUserPhone); |
| | | ub.set(NowUserName, this.getNowUserName(), this.isset_nowUserName); |
| | | ub.set(OperatorId, this.getOperatorId(), this.isset_operatorId); |
| | |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { |
| | | return new SqlAndParameters<>("select id, wh_goods_id, record_type, trans_business_id, now_user_phone, now_user_name, operator_id, operator_name, deal_time, last_record from " + this.getTableName_() + " " + where, parameters); |
| | | return new SqlAndParameters<>("select id, wh_goods_id, record_type, trans_business_id, procure_model_user_record_id, now_user_phone, now_user_name, operator_id, operator_name, deal_time, last_record from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { |
| | | return new SqlAndParameters<>("select id, wh_goods_id, record_type, trans_business_id, now_user_phone, now_user_name, operator_id, operator_name, deal_time, last_record from " + this.getTableName_() + " " + where, parameters); |
| | | return new SqlAndParameters<>("select id, wh_goods_id, record_type, trans_business_id, procure_model_user_record_id, now_user_phone, now_user_name, operator_id, operator_name, deal_time, last_record from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | |
| | | l_goods_user_record.setTransBusinessId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, LGoodsUserRecord_mapper.ProcureModelUserRecordId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | l_goods_user_record.setProcureModelUserRecordId(null); |
| | | } else { |
| | | l_goods_user_record.setProcureModelUserRecordId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, LGoodsUserRecord_mapper.NowUserPhone); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
New file |
| | |
| | | |
| | | package com.consum.model.po; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonAutoDetect; |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import com.walker.jdbc.BasePo; |
| | | |
| | | /** |
| | | * 表å:L_ORG_SUPPLIER * |
| | | * @author genrator |
| | | */ |
| | | @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY) |
| | | public class LOrgSupplier extends BasePo<LOrgSupplier> { |
| | | // åºååçæ¬å· |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | // ä¸»é® |
| | | private Long id = null; |
| | | @JsonIgnore |
| | | protected boolean isset_id = false; |
| | | |
| | | // 屿§å表 |
| | | private String agencyId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_agencyId = false; |
| | | |
| | | private String agencyName = null; |
| | | @JsonIgnore |
| | | protected boolean isset_agencyName = false; |
| | | |
| | | private String supplier = null; |
| | | @JsonIgnore |
| | | protected boolean isset_supplier = false; |
| | | |
| | | /** |
| | | * é»è®¤æé 彿° |
| | | */ |
| | | public LOrgSupplier() { |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸»é®æé 对象 |
| | | */ |
| | | public LOrgSupplier(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 getAgencyId() { |
| | | return this.agencyId; |
| | | } |
| | | |
| | | public void setAgencyId(String agencyId) { |
| | | this.agencyId = agencyId; |
| | | this.isset_agencyId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyAgencyId() { |
| | | return this.agencyId == null || this.agencyId.length() == 0; |
| | | } |
| | | |
| | | 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 String getSupplier() { |
| | | return this.supplier; |
| | | } |
| | | |
| | | public void setSupplier(String supplier) { |
| | | this.supplier = supplier; |
| | | this.isset_supplier = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptySupplier() { |
| | | return this.supplier == null || this.supplier.length() == 0; |
| | | } |
| | | |
| | | /** |
| | | * éå toString() æ¹æ³ |
| | | */ |
| | | @Override |
| | | public String toString() { |
| | | return new StringBuilder() |
| | | .append("id=").append(this.id) |
| | | .append("agencyId=").append(this.agencyId) |
| | | .append("agencyName=").append(this.agencyName) |
| | | .append("supplier=").append(this.supplier) |
| | | .toString(); |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | */ |
| | | public LOrgSupplier $clone() { |
| | | LOrgSupplier l_org_supplier = new LOrgSupplier(); |
| | | |
| | | // æ°æ®åºåç§° |
| | | //l_org_supplier.setDatabaseName_(this.getDatabaseName_()); |
| | | |
| | | // ä¸»é® |
| | | if (this.isset_id) { |
| | | l_org_supplier.setId(this.getId()); |
| | | } |
| | | // æ®é屿§ |
| | | if (this.isset_agencyId) { |
| | | l_org_supplier.setAgencyId(this.getAgencyId()); |
| | | } |
| | | if (this.isset_agencyName) { |
| | | l_org_supplier.setAgencyName(this.getAgencyName()); |
| | | } |
| | | if (this.isset_supplier) { |
| | | l_org_supplier.setSupplier(this.getSupplier()); |
| | | } |
| | | return l_org_supplier; |
| | | } |
| | | } |
New file |
| | |
| | | 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 org.springframework.jdbc.core.RowMapper; |
| | | |
| | | import java.sql.ResultSet; |
| | | import java.sql.SQLException; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 表å:L_ORG_SUPPLIER * |
| | | * @author genrator |
| | | */ |
| | | public class LOrgSupplier_mapper extends LOrgSupplier implements BaseMapper<LOrgSupplier> { |
| | | // åºååçæ¬å· |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | public static final RowMapper<LOrgSupplier> ROW_MAPPER = new LOrgSupplierRowMapper(); |
| | | |
| | | // ä¸»é® |
| | | public static final String Id = "id"; |
| | | // æ®é屿§ |
| | | public static final String AgencyId = "agency_id"; |
| | | public static final String AgencyName = "agency_name"; |
| | | public static final String Supplier = "supplier"; |
| | | |
| | | /** |
| | | * é»è®¤æé 彿° |
| | | */ |
| | | public LOrgSupplier_mapper(LOrgSupplier lOrgSupplier) { |
| | | if (lOrgSupplier == null) { |
| | | throw new IllegalArgumentException("poåæ°ä¸å
许为空ï¼"); |
| | | } |
| | | //ä¸»é® |
| | | if (lOrgSupplier.isset_id) { |
| | | this.setId(lOrgSupplier.getId()); |
| | | } |
| | | //æ®é屿§ |
| | | if (lOrgSupplier.isset_agencyId) { |
| | | this.setAgencyId(lOrgSupplier.getAgencyId()); |
| | | } |
| | | if (lOrgSupplier.isset_agencyName) { |
| | | this.setAgencyName(lOrgSupplier.getAgencyName()); |
| | | } |
| | | if (lOrgSupplier.isset_supplier) { |
| | | this.setSupplier(lOrgSupplier.getSupplier()); |
| | | } |
| | | // 廿ï¼2022-09-07 |
| | | // this.setDatabaseName_(l_org_supplier.getDatabaseName_()); |
| | | } |
| | | |
| | | /** |
| | | * è·å表å |
| | | */ |
| | | @Override |
| | | public String getTableName_() { |
| | | String tableName = "l_org_supplier"; |
| | | /** |
| | | 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(AgencyId, this.getAgencyId(), this.isset_agencyId); |
| | | ib.set(AgencyName, this.getAgencyName(), this.isset_agencyName); |
| | | ib.set(Supplier, this.getSupplier(), this.isset_supplier); |
| | | return ib.genMapSql(); |
| | | } |
| | | |
| | | /** |
| | | * è·åæ´æ°è¯å¥ååæ° |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_() { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId); |
| | | ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName); |
| | | ub.set(Supplier, this.getSupplier(), this.isset_supplier); |
| | | 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(AgencyId, this.getAgencyId(), this.isset_agencyId); |
| | | ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName); |
| | | ub.set(Supplier, this.getSupplier(), this.isset_supplier); |
| | | return ub.genMapSql(where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * è·åæ´æ°è¯å¥ååæ° |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId); |
| | | ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName); |
| | | ub.set(Supplier, this.getSupplier(), this.isset_supplier); |
| | | 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, agency_id, agency_name, supplier from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * è·åæ¥è¯¢è¯å¥ååæ° |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { |
| | | return new SqlAndParameters<>("select id, agency_id, agency_name, supplier from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * å°resultsetçä¸è¡è½¬å为po |
| | | */ |
| | | @Override |
| | | public LOrgSupplier mapRow(ResultSet rs, int i) throws SQLException { |
| | | return ROW_MAPPER.mapRow(rs, i); |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | */ |
| | | public LOrgSupplier toLOrgSupplier() { |
| | | return super.$clone(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * l_org_supplier RowMapper |
| | | * |
| | | * @author genrator |
| | | */ |
| | | class LOrgSupplierRowMapper implements RowMapper<LOrgSupplier> { |
| | | |
| | | @Override |
| | | public LOrgSupplier mapRow(ResultSet rs, int i) throws SQLException { |
| | | ResultSetUtils resultSetUtils = new ResultSetUtils(); |
| | | LOrgSupplier l_org_supplier = new LOrgSupplier(); |
| | | Integer columnIndex; |
| | | //ä¸»é® |
| | | columnIndex = resultSetUtils.findColumn(rs, LOrgSupplier_mapper.Id); |
| | | if (columnIndex > 0) { |
| | | l_org_supplier.setId(rs.getLong(columnIndex)); |
| | | } |
| | | //æ®é屿§ |
| | | columnIndex = resultSetUtils.findColumn(rs, LOrgSupplier_mapper.AgencyId); |
| | | if (columnIndex > 0) { |
| | | l_org_supplier.setAgencyId(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, LOrgSupplier_mapper.AgencyName); |
| | | if (columnIndex > 0) { |
| | | l_org_supplier.setAgencyName(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, LOrgSupplier_mapper.Supplier); |
| | | if (columnIndex > 0) { |
| | | l_org_supplier.setSupplier(rs.getString(columnIndex)); |
| | | } |
| | | return l_org_supplier; |
| | | } |
| | | } |
New file |
| | |
| | | |
| | | package com.consum.model.po; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonAutoDetect; |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import com.walker.jdbc.BasePo; |
| | | |
| | | /** |
| | | * 表å:L_WH_PROCURE_MODEL_USER * |
| | | * @author genrator |
| | | */ |
| | | @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY) |
| | | public class LWhProcureModelUser extends BasePo<LWhProcureModelUser> { |
| | | // åºååçæ¬å· |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | // ä¸»é® |
| | | private Long id = null; |
| | | @JsonIgnore |
| | | protected boolean isset_id = false; |
| | | |
| | | // 屿§å表 |
| | | private Long transBusinessId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_transBusinessId = false; |
| | | |
| | | private Long procureModelUserRecordId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_procureModelUserRecordId = false; |
| | | |
| | | private Long whProcureModelId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_whProcureModelId = false; |
| | | |
| | | private Long baseGoodsModelsId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_baseGoodsModelsId = false; |
| | | |
| | | private Long nowUserPhone = null; |
| | | @JsonIgnore |
| | | protected boolean isset_nowUserPhone = false; |
| | | |
| | | private String nowUserName = null; |
| | | @JsonIgnore |
| | | protected boolean isset_nowUserName = false; |
| | | |
| | | private Integer goodsNum = null; |
| | | @JsonIgnore |
| | | protected boolean isset_goodsNum = false; |
| | | |
| | | /** |
| | | * é»è®¤æé 彿° |
| | | */ |
| | | public LWhProcureModelUser() { |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸»é®æé 对象 |
| | | */ |
| | | public LWhProcureModelUser(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 getTransBusinessId() { |
| | | return this.transBusinessId; |
| | | } |
| | | |
| | | public void setTransBusinessId(Long transBusinessId) { |
| | | this.transBusinessId = transBusinessId; |
| | | this.isset_transBusinessId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyTransBusinessId() { |
| | | return this.transBusinessId == null; |
| | | } |
| | | |
| | | public Long getProcureModelUserRecordId() { |
| | | return this.procureModelUserRecordId; |
| | | } |
| | | |
| | | public void setProcureModelUserRecordId(Long procureModelUserRecordId) { |
| | | this.procureModelUserRecordId = procureModelUserRecordId; |
| | | this.isset_procureModelUserRecordId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyProcureModelUserRecordId() { |
| | | return this.procureModelUserRecordId == null; |
| | | } |
| | | |
| | | public Long getWhProcureModelId() { |
| | | return this.whProcureModelId; |
| | | } |
| | | |
| | | public void setWhProcureModelId(Long whProcureModelId) { |
| | | this.whProcureModelId = whProcureModelId; |
| | | this.isset_whProcureModelId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyWhProcureModelId() { |
| | | return this.whProcureModelId == null; |
| | | } |
| | | |
| | | 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 Long getNowUserPhone() { |
| | | return this.nowUserPhone; |
| | | } |
| | | |
| | | public void setNowUserPhone(Long nowUserPhone) { |
| | | this.nowUserPhone = nowUserPhone; |
| | | this.isset_nowUserPhone = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyNowUserPhone() { |
| | | return this.nowUserPhone == null; |
| | | } |
| | | |
| | | public String getNowUserName() { |
| | | return this.nowUserName; |
| | | } |
| | | |
| | | public void setNowUserName(String nowUserName) { |
| | | this.nowUserName = nowUserName; |
| | | this.isset_nowUserName = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyNowUserName() { |
| | | return this.nowUserName == null || this.nowUserName.length() == 0; |
| | | } |
| | | |
| | | public Integer getGoodsNum() { |
| | | return this.goodsNum; |
| | | } |
| | | |
| | | public void setGoodsNum(Integer goodsNum) { |
| | | this.goodsNum = goodsNum; |
| | | this.isset_goodsNum = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyGoodsNum() { |
| | | return this.goodsNum == null; |
| | | } |
| | | |
| | | /** |
| | | * éå toString() æ¹æ³ |
| | | */ |
| | | @Override |
| | | public String toString() { |
| | | return new StringBuilder() |
| | | .append("id=").append(this.id) |
| | | .append("transBusinessId=").append(this.transBusinessId) |
| | | .append("procureModelUserRecordId=").append(this.procureModelUserRecordId) |
| | | .append("whProcureModelId=").append(this.whProcureModelId) |
| | | .append("baseGoodsModelsId=").append(this.baseGoodsModelsId) |
| | | .append("nowUserPhone=").append(this.nowUserPhone) |
| | | .append("nowUserName=").append(this.nowUserName) |
| | | .append("goodsNum=").append(this.goodsNum) |
| | | .toString(); |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | */ |
| | | public LWhProcureModelUser $clone() { |
| | | LWhProcureModelUser l_wh_procure_model_user = new LWhProcureModelUser(); |
| | | |
| | | // æ°æ®åºåç§° |
| | | //l_wh_procure_model_user.setDatabaseName_(this.getDatabaseName_()); |
| | | |
| | | // ä¸»é® |
| | | if (this.isset_id) { |
| | | l_wh_procure_model_user.setId(this.getId()); |
| | | } |
| | | // æ®é屿§ |
| | | if (this.isset_transBusinessId) { |
| | | l_wh_procure_model_user.setTransBusinessId(this.getTransBusinessId()); |
| | | } |
| | | if (this.isset_procureModelUserRecordId) { |
| | | l_wh_procure_model_user.setProcureModelUserRecordId(this.getProcureModelUserRecordId()); |
| | | } |
| | | if (this.isset_whProcureModelId) { |
| | | l_wh_procure_model_user.setWhProcureModelId(this.getWhProcureModelId()); |
| | | } |
| | | if (this.isset_baseGoodsModelsId) { |
| | | l_wh_procure_model_user.setBaseGoodsModelsId(this.getBaseGoodsModelsId()); |
| | | } |
| | | if (this.isset_nowUserPhone) { |
| | | l_wh_procure_model_user.setNowUserPhone(this.getNowUserPhone()); |
| | | } |
| | | if (this.isset_nowUserName) { |
| | | l_wh_procure_model_user.setNowUserName(this.getNowUserName()); |
| | | } |
| | | if (this.isset_goodsNum) { |
| | | l_wh_procure_model_user.setGoodsNum(this.getGoodsNum()); |
| | | } |
| | | return l_wh_procure_model_user; |
| | | } |
| | | } |
New file |
| | |
| | | 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_PROCURE_MODEL_USER * |
| | | * @author genrator |
| | | */ |
| | | public class LWhProcureModelUser_mapper extends LWhProcureModelUser implements BaseMapper<LWhProcureModelUser> { |
| | | // åºååçæ¬å· |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | public static final RowMapper<LWhProcureModelUser> ROW_MAPPER = new LWhProcureModelUserRowMapper(); |
| | | |
| | | // ä¸»é® |
| | | public static final String Id = "id"; |
| | | // æ®é屿§ |
| | | public static final String TransBusinessId = "trans_business_id"; |
| | | public static final String ProcureModelUserRecordId = "procure_model_user_record_id"; |
| | | public static final String WhProcureModelId = "wh_procure_model_id"; |
| | | public static final String BaseGoodsModelsId = "base_goods_models_id"; |
| | | public static final String NowUserPhone = "now_user_phone"; |
| | | public static final String NowUserName = "now_user_name"; |
| | | public static final String GoodsNum = "goods_num"; |
| | | |
| | | /** |
| | | * é»è®¤æé 彿° |
| | | */ |
| | | public LWhProcureModelUser_mapper(LWhProcureModelUser lWhProcureModelUser) { |
| | | if (lWhProcureModelUser == null) { |
| | | throw new IllegalArgumentException("poåæ°ä¸å
许为空ï¼"); |
| | | } |
| | | //ä¸»é® |
| | | if (lWhProcureModelUser.isset_id) { |
| | | this.setId(lWhProcureModelUser.getId()); |
| | | } |
| | | //æ®é屿§ |
| | | if (lWhProcureModelUser.isset_transBusinessId) { |
| | | this.setTransBusinessId(lWhProcureModelUser.getTransBusinessId()); |
| | | } |
| | | if (lWhProcureModelUser.isset_procureModelUserRecordId) { |
| | | this.setProcureModelUserRecordId(lWhProcureModelUser.getProcureModelUserRecordId()); |
| | | } |
| | | if (lWhProcureModelUser.isset_whProcureModelId) { |
| | | this.setWhProcureModelId(lWhProcureModelUser.getWhProcureModelId()); |
| | | } |
| | | if (lWhProcureModelUser.isset_baseGoodsModelsId) { |
| | | this.setBaseGoodsModelsId(lWhProcureModelUser.getBaseGoodsModelsId()); |
| | | } |
| | | if (lWhProcureModelUser.isset_nowUserPhone) { |
| | | this.setNowUserPhone(lWhProcureModelUser.getNowUserPhone()); |
| | | } |
| | | if (lWhProcureModelUser.isset_nowUserName) { |
| | | this.setNowUserName(lWhProcureModelUser.getNowUserName()); |
| | | } |
| | | if (lWhProcureModelUser.isset_goodsNum) { |
| | | this.setGoodsNum(lWhProcureModelUser.getGoodsNum()); |
| | | } |
| | | // 廿ï¼2022-09-07 |
| | | // this.setDatabaseName_(l_wh_procure_model_user.getDatabaseName_()); |
| | | } |
| | | |
| | | /** |
| | | * è·å表å |
| | | */ |
| | | @Override |
| | | public String getTableName_() { |
| | | String tableName = "l_wh_procure_model_user"; |
| | | /** |
| | | 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(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); |
| | | ib.set(ProcureModelUserRecordId, this.getProcureModelUserRecordId(), this.isset_procureModelUserRecordId); |
| | | ib.set(WhProcureModelId, this.getWhProcureModelId(), this.isset_whProcureModelId); |
| | | ib.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); |
| | | ib.set(NowUserPhone, this.getNowUserPhone(), this.isset_nowUserPhone); |
| | | ib.set(NowUserName, this.getNowUserName(), this.isset_nowUserName); |
| | | ib.set(GoodsNum, this.getGoodsNum(), this.isset_goodsNum); |
| | | return ib.genMapSql(); |
| | | } |
| | | |
| | | /** |
| | | * è·åæ´æ°è¯å¥ååæ° |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_() { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); |
| | | ub.set(ProcureModelUserRecordId, this.getProcureModelUserRecordId(), this.isset_procureModelUserRecordId); |
| | | ub.set(WhProcureModelId, this.getWhProcureModelId(), this.isset_whProcureModelId); |
| | | ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); |
| | | ub.set(NowUserPhone, this.getNowUserPhone(), this.isset_nowUserPhone); |
| | | ub.set(NowUserName, this.getNowUserName(), this.isset_nowUserName); |
| | | ub.set(GoodsNum, this.getGoodsNum(), this.isset_goodsNum); |
| | | 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(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); |
| | | ub.set(ProcureModelUserRecordId, this.getProcureModelUserRecordId(), this.isset_procureModelUserRecordId); |
| | | ub.set(WhProcureModelId, this.getWhProcureModelId(), this.isset_whProcureModelId); |
| | | ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); |
| | | ub.set(NowUserPhone, this.getNowUserPhone(), this.isset_nowUserPhone); |
| | | ub.set(NowUserName, this.getNowUserName(), this.isset_nowUserName); |
| | | ub.set(GoodsNum, this.getGoodsNum(), this.isset_goodsNum); |
| | | return ub.genMapSql(where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * è·åæ´æ°è¯å¥ååæ° |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); |
| | | ub.set(ProcureModelUserRecordId, this.getProcureModelUserRecordId(), this.isset_procureModelUserRecordId); |
| | | ub.set(WhProcureModelId, this.getWhProcureModelId(), this.isset_whProcureModelId); |
| | | ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); |
| | | ub.set(NowUserPhone, this.getNowUserPhone(), this.isset_nowUserPhone); |
| | | ub.set(NowUserName, this.getNowUserName(), this.isset_nowUserName); |
| | | ub.set(GoodsNum, this.getGoodsNum(), this.isset_goodsNum); |
| | | 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, trans_business_id, procure_model_user_record_id, wh_procure_model_id, base_goods_models_id, now_user_phone, now_user_name, goods_num from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * è·åæ¥è¯¢è¯å¥ååæ° |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { |
| | | return new SqlAndParameters<>("select id, trans_business_id, procure_model_user_record_id, wh_procure_model_id, base_goods_models_id, now_user_phone, now_user_name, goods_num from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * å°resultsetçä¸è¡è½¬å为po |
| | | */ |
| | | @Override |
| | | public LWhProcureModelUser mapRow(ResultSet rs, int i) throws SQLException { |
| | | return ROW_MAPPER.mapRow(rs, i); |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | */ |
| | | public LWhProcureModelUser toLWhProcureModelUser() { |
| | | return super.$clone(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * l_wh_procure_model_user RowMapper |
| | | * |
| | | * @author genrator |
| | | */ |
| | | class LWhProcureModelUserRowMapper implements RowMapper<LWhProcureModelUser> { |
| | | |
| | | @Override |
| | | public LWhProcureModelUser mapRow(ResultSet rs, int i) throws SQLException { |
| | | ResultSetUtils resultSetUtils = new ResultSetUtils(); |
| | | LWhProcureModelUser l_wh_procure_model_user = new LWhProcureModelUser(); |
| | | Integer columnIndex; |
| | | //ä¸»é® |
| | | columnIndex = resultSetUtils.findColumn(rs, LWhProcureModelUser_mapper.Id); |
| | | if (columnIndex > 0) { |
| | | l_wh_procure_model_user.setId(rs.getLong(columnIndex)); |
| | | } |
| | | //æ®é屿§ |
| | | columnIndex = resultSetUtils.findColumn(rs, LWhProcureModelUser_mapper.TransBusinessId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | l_wh_procure_model_user.setTransBusinessId(null); |
| | | } else { |
| | | l_wh_procure_model_user.setTransBusinessId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, LWhProcureModelUser_mapper.ProcureModelUserRecordId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | l_wh_procure_model_user.setProcureModelUserRecordId(null); |
| | | } else { |
| | | l_wh_procure_model_user.setProcureModelUserRecordId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, LWhProcureModelUser_mapper.WhProcureModelId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | l_wh_procure_model_user.setWhProcureModelId(null); |
| | | } else { |
| | | l_wh_procure_model_user.setWhProcureModelId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, LWhProcureModelUser_mapper.BaseGoodsModelsId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | l_wh_procure_model_user.setBaseGoodsModelsId(null); |
| | | } else { |
| | | l_wh_procure_model_user.setBaseGoodsModelsId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, LWhProcureModelUser_mapper.NowUserPhone); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | l_wh_procure_model_user.setNowUserPhone(null); |
| | | } else { |
| | | l_wh_procure_model_user.setNowUserPhone(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, LWhProcureModelUser_mapper.NowUserName); |
| | | if (columnIndex > 0) { |
| | | l_wh_procure_model_user.setNowUserName(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, LWhProcureModelUser_mapper.GoodsNum); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | l_wh_procure_model_user.setGoodsNum(null); |
| | | } else { |
| | | l_wh_procure_model_user.setGoodsNum(rs.getInt(columnIndex)); |
| | | } |
| | | } |
| | | return l_wh_procure_model_user; |
| | | } |
| | | } |
| | |
| | | protected boolean isset_id = false; |
| | | |
| | | // 屿§å表 |
| | | private Integer warehouseType = null; |
| | | @JsonIgnore |
| | | protected boolean isset_warehouseType = false; |
| | | |
| | | private Long baseWarehouseId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_baseWarehouseId = false; |
| | |
| | | @JsonIgnore |
| | | public boolean isEmptyId() { |
| | | return this.id == null; |
| | | } |
| | | |
| | | 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 getBaseWarehouseId() { |
| | |
| | | public String toString() { |
| | | return new StringBuilder() |
| | | .append("id=").append(this.id) |
| | | .append("warehouseType=").append(this.warehouseType) |
| | | .append("baseWarehouseId=").append(this.baseWarehouseId) |
| | | .append("baseWarehouseName=").append(this.baseWarehouseName) |
| | | .append("baseGoodsTemplateId=").append(this.baseGoodsTemplateId) |
| | |
| | | wh_warning.setId(this.getId()); |
| | | } |
| | | // æ®é屿§ |
| | | if (this.isset_warehouseType) { |
| | | wh_warning.setWarehouseType(this.getWarehouseType()); |
| | | } |
| | | if (this.isset_baseWarehouseId) { |
| | | wh_warning.setBaseWarehouseId(this.getBaseWarehouseId()); |
| | | } |
| | |
| | | protected boolean isset_id = false; |
| | | |
| | | // 屿§å表 |
| | | private Integer warehouseType = null; |
| | | @JsonIgnore |
| | | protected boolean isset_warehouseType = false; |
| | | |
| | | private Long baseWarehouseId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_baseWarehouseId = false; |
| | |
| | | @JsonIgnore |
| | | public boolean isEmptyId() { |
| | | return this.id == null; |
| | | } |
| | | |
| | | 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 getBaseWarehouseId() { |
| | |
| | | public String toString() { |
| | | return new StringBuilder() |
| | | .append("id=").append(this.id) |
| | | .append("warehouseType=").append(this.warehouseType) |
| | | .append("baseWarehouseId=").append(this.baseWarehouseId) |
| | | .append("baseGoodsTemplateId=").append(this.baseGoodsTemplateId) |
| | | .append("baseGoodsModelsId=").append(this.baseGoodsModelsId) |
| | |
| | | wh_warning_config.setId(this.getId()); |
| | | } |
| | | // æ®é屿§ |
| | | if (this.isset_warehouseType) { |
| | | wh_warning_config.setWarehouseType(this.getWarehouseType()); |
| | | } |
| | | if (this.isset_baseWarehouseId) { |
| | | wh_warning_config.setBaseWarehouseId(this.getBaseWarehouseId()); |
| | | } |
| | |
| | | // ä¸»é® |
| | | public static final String Id = "id"; |
| | | // æ®é屿§ |
| | | public static final String WarehouseType = "warehouse_type"; |
| | | public static final String BaseWarehouseId = "base_warehouse_id"; |
| | | public static final String BaseGoodsTemplateId = "base_goods_template_id"; |
| | | public static final String BaseGoodsModelsId = "base_goods_models_id"; |
| | |
| | | this.setId(whWarningConfig.getId()); |
| | | } |
| | | //æ®é屿§ |
| | | if (whWarningConfig.isset_warehouseType) { |
| | | this.setWarehouseType(whWarningConfig.getWarehouseType()); |
| | | } |
| | | if (whWarningConfig.isset_baseWarehouseId) { |
| | | this.setBaseWarehouseId(whWarningConfig.getBaseWarehouseId()); |
| | | } |
| | |
| | | public SqlAndParameters<Map<String, Object>> getInsertSql_() { |
| | | InsertBuilder ib = new InsertBuilder(this.getTableName_()); |
| | | ib.set(Id, this.getId()); |
| | | ib.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType); |
| | | ib.set(BaseWarehouseId, this.getBaseWarehouseId(), this.isset_baseWarehouseId); |
| | | ib.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); |
| | | ib.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); |
| | |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_() { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType); |
| | | ub.set(BaseWarehouseId, this.getBaseWarehouseId(), this.isset_baseWarehouseId); |
| | | ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); |
| | | ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); |
| | |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType); |
| | | ub.set(BaseWarehouseId, this.getBaseWarehouseId(), this.isset_baseWarehouseId); |
| | | ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); |
| | | ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); |
| | |
| | | @Override |
| | | public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType); |
| | | ub.set(BaseWarehouseId, this.getBaseWarehouseId(), this.isset_baseWarehouseId); |
| | | ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); |
| | | ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); |
| | |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { |
| | | return new SqlAndParameters<>("select id, base_warehouse_id, base_goods_template_id, base_goods_models_id, goods_type, upper_limit, lower_limit from " + this.getTableName_() + " " + where, parameters); |
| | | return new SqlAndParameters<>("select id, warehouse_type, base_warehouse_id, base_goods_template_id, base_goods_models_id, goods_type, upper_limit, lower_limit from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { |
| | | return new SqlAndParameters<>("select id, base_warehouse_id, base_goods_template_id, base_goods_models_id, goods_type, upper_limit, lower_limit from " + this.getTableName_() + " " + where, parameters); |
| | | return new SqlAndParameters<>("select id, warehouse_type, base_warehouse_id, base_goods_template_id, base_goods_models_id, goods_type, upper_limit, lower_limit from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | |
| | | wh_warning_config.setId(rs.getLong(columnIndex)); |
| | | } |
| | | //æ®é屿§ |
| | | columnIndex = resultSetUtils.findColumn(rs, WhWarningConfig_mapper.WarehouseType); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | wh_warning_config.setWarehouseType(null); |
| | | } else { |
| | | wh_warning_config.setWarehouseType(rs.getInt(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, WhWarningConfig_mapper.BaseWarehouseId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | |
| | | // ä¸»é® |
| | | public static final String Id = "id"; |
| | | // æ®é屿§ |
| | | public static final String WarehouseType = "warehouse_type"; |
| | | public static final String BaseWarehouseId = "base_warehouse_id"; |
| | | public static final String BaseWarehouseName = "base_warehouse_name"; |
| | | public static final String BaseGoodsTemplateId = "base_goods_template_id"; |
| | |
| | | this.setId(whWarning.getId()); |
| | | } |
| | | //æ®é屿§ |
| | | if (whWarning.isset_warehouseType) { |
| | | this.setWarehouseType(whWarning.getWarehouseType()); |
| | | } |
| | | if (whWarning.isset_baseWarehouseId) { |
| | | this.setBaseWarehouseId(whWarning.getBaseWarehouseId()); |
| | | } |
| | |
| | | public SqlAndParameters<Map<String, Object>> getInsertSql_() { |
| | | InsertBuilder ib = new InsertBuilder(this.getTableName_()); |
| | | ib.set(Id, this.getId()); |
| | | ib.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType); |
| | | ib.set(BaseWarehouseId, this.getBaseWarehouseId(), this.isset_baseWarehouseId); |
| | | ib.set(BaseWarehouseName, this.getBaseWarehouseName(), this.isset_baseWarehouseName); |
| | | ib.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); |
| | |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_() { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType); |
| | | ub.set(BaseWarehouseId, this.getBaseWarehouseId(), this.isset_baseWarehouseId); |
| | | ub.set(BaseWarehouseName, this.getBaseWarehouseName(), this.isset_baseWarehouseName); |
| | | ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); |
| | |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType); |
| | | ub.set(BaseWarehouseId, this.getBaseWarehouseId(), this.isset_baseWarehouseId); |
| | | ub.set(BaseWarehouseName, this.getBaseWarehouseName(), this.isset_baseWarehouseName); |
| | | ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); |
| | |
| | | @Override |
| | | public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType); |
| | | ub.set(BaseWarehouseId, this.getBaseWarehouseId(), this.isset_baseWarehouseId); |
| | | ub.set(BaseWarehouseName, this.getBaseWarehouseName(), this.isset_baseWarehouseName); |
| | | ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); |
| | |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { |
| | | return new SqlAndParameters<>("select id, base_warehouse_id, base_warehouse_name, base_goods_template_id, base_goods_template_name, base_goods_models_id, base_goods_models_name, goods_type, warning_type, upper_limit, lower_limit, warehouse_count, warning_time, states, operator_id, operator_name, deal_time, agency_id, agency_name from " + this.getTableName_() + " " + where, parameters); |
| | | return new SqlAndParameters<>("select id, warehouse_type, base_warehouse_id, base_warehouse_name, base_goods_template_id, base_goods_template_name, base_goods_models_id, base_goods_models_name, goods_type, warning_type, upper_limit, lower_limit, warehouse_count, warning_time, states, operator_id, operator_name, deal_time, agency_id, agency_name from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { |
| | | return new SqlAndParameters<>("select id, base_warehouse_id, base_warehouse_name, base_goods_template_id, base_goods_template_name, base_goods_models_id, base_goods_models_name, goods_type, warning_type, upper_limit, lower_limit, warehouse_count, warning_time, states, operator_id, operator_name, deal_time, agency_id, agency_name from " + this.getTableName_() + " " + where, parameters); |
| | | return new SqlAndParameters<>("select id, warehouse_type, base_warehouse_id, base_warehouse_name, base_goods_template_id, base_goods_template_name, base_goods_models_id, base_goods_models_name, goods_type, warning_type, upper_limit, lower_limit, warehouse_count, warning_time, states, operator_id, operator_name, deal_time, agency_id, agency_name from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | |
| | | wh_warning.setId(rs.getLong(columnIndex)); |
| | | } |
| | | //æ®é屿§ |
| | | columnIndex = resultSetUtils.findColumn(rs, WhWarning_mapper.WarehouseType); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | wh_warning.setWarehouseType(null); |
| | | } else { |
| | | wh_warning.setWarehouseType(rs.getInt(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, WhWarning_mapper.BaseWarehouseId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |