cy
2023-11-02 396ebb5642636d6667212939fa6ef195eeebc05e
feat: 供应商
4个文件已添加
2个文件已删除
9个文件已修改
653 ■■■■■ 已修改文件
consum-base/src/main/java/com/consum/base/controller/LOrgSupplierController.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/LWhFormProcureController.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LOrgSupplierServiceImpl.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWarehouseFlowCoreService.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWhFormOutputCoreService.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWhFormScrappedCoreService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWhFormScrappedService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWhFormTransferCoreService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWhFormTransferService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/LOrgSupplier.java 150 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/LOrgSupplier_mapper.java 243 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/WhWarning.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/WhWarningConfig.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/WhWarningConfig_mapper.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/WhWarning_mapper.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/LOrgSupplierController.java
New file
@@ -0,0 +1,36 @@
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));
    }
}
consum-base/src/main/java/com/consum/base/controller/LWhFormProcureController.java
@@ -21,9 +21,7 @@
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
@@ -53,6 +51,8 @@
    private BaseGoodsTemplateServiceImpl baseGoodsTemplateService;
    @Resource
    private LWhProcureModelService lWhProcureModelService;
    @Resource
    private LOrgSupplierServiceImpl lOrgSupplierService;
    /**
     * @Description 新增
@@ -64,6 +64,9 @@
            return ResponseValue.error("仓库ID不能为空");
        }
        BaseWarehouse baseWarehouse = baseWarehouseService.getById(warehouseId);
        FinSysTenantUser sysTenantUser = this.getSysInfo();
        String tenantId = sysTenantUser.getTenantId();
        String tenantName = sysTenantUser.getTenantName();
        // 只能添加本机构仓库的进货单
        //??????
        //
@@ -81,6 +84,8 @@
        }
        long procureTime = DateUtils.getDateTimeNumber(System.currentTimeMillis());
        Set<String> supplierList = new HashSet<>();
        ArrayList<LWhFormProcureGoods> procureGoodList = new ArrayList<>();
        ArrayList<LWhProcureModel> whProcureModeLlist = new ArrayList<>();
@@ -89,6 +94,12 @@
            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("采购单不能为空");
@@ -120,6 +131,7 @@
                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();
@@ -128,6 +140,7 @@
                model.setBusinessType(WhBusinessEnum.CAIGOU.getValue() + 0);
                model.setBusinessId(whFormProcureId);
                model.setBaseGoodsModelsId(baseGoodsModelsId);
                model.setBaseGoodsModelsName(modelName);
                model.setPrice(price);
                model.setCounts(counts);
                model.setWorehouseCount(goodsModelNum);
@@ -154,7 +167,18 @@
        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("新增失败!");
    }
consum-base/src/main/java/com/consum/base/service/LOrgSupplierServiceImpl.java
New file
@@ -0,0 +1,51 @@
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);
    }
}
consum-base/src/main/java/com/consum/base/service/LWarehouseFlowCoreService.java
@@ -32,12 +32,12 @@
    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;
@@ -122,7 +122,7 @@
            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);
@@ -136,7 +136,7 @@
                    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);
                });
@@ -167,13 +167,14 @@
     * @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)
consum-base/src/main/java/com/consum/base/service/LWhFormOutputCoreService.java
@@ -33,7 +33,7 @@
    private LWhGoodsService lWhGoodsService;
    private CodeGeneratorService codeGeneratorService;
    private LWhProcureModelService lWhProcureModelService;
    private LWhFormTransferService lWhFormTransferService;
//    private LWhFormTransferServiceImpl lWhFormTransferService;
    private LWhFormOutputService lWhFormOutputService;
    private LWarehouseFlowService lWarehouseFlowService;
    private LWhGoodsRecordDetailsService lWhGoodsRecordDetailsService;
@@ -44,7 +44,7 @@
                                    LWhGoodsService lWhGoodsService,
                                    CodeGeneratorService codeGeneratorService,
                                    LWhProcureModelService lWhProcureModelService,
                                    LWhFormTransferService lWhFormTransferService,
//                                    LWhFormTransferServiceImpl lWhFormTransferService,
                                    LWhFormOutputService lWhFormOutputService,
                                    LWarehouseFlowService lWarehouseFlowService,
                                    LWhGoodsRecordDetailsService lWhGoodsRecordDetailsService,
@@ -53,7 +53,7 @@
        this.lWhGoodsService = lWhGoodsService;
        this.codeGeneratorService = codeGeneratorService;
        this.lWhProcureModelService = lWhProcureModelService;
        this.lWhFormTransferService = lWhFormTransferService;
//        this.lWhFormTransferService = lWhFormTransferService;
        this.lWhFormOutputService = lWhFormOutputService;
        this.lWarehouseFlowService = lWarehouseFlowService;
        this.lWhGoodsRecordDetailsService = lWhGoodsRecordDetailsService;
@@ -73,7 +73,7 @@
            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;
consum-base/src/main/java/com/consum/base/service/LWhFormScrappedCoreService.java
@@ -26,7 +26,7 @@
@Service
@Slf4j
public class LWhFormScrappedCoreService {
    private LWhFormScrappedService lWhFormScrappedService;
    private LWhFormScrappedServiceImpl lWhFormScrappedService;
    private LWhFormScrappedGoodsService lWhFormScrappedGoodsService;
    private BaseGoodsTemplateServiceImpl baseGoodsTemplateService;
    private LWhGoodsService lWhGoodsService;
@@ -35,7 +35,7 @@
    private LWarehouseFlowService lWarehouseFlowService;
    @Autowired
    public LWhFormScrappedCoreService(LWhFormScrappedService lWhFormScrappedService,
    public LWhFormScrappedCoreService(LWhFormScrappedServiceImpl lWhFormScrappedService,
                                      LWhFormScrappedGoodsService lWhFormScrappedGoodsService,
                                      BaseGoodsTemplateServiceImpl baseGoodsTemplateService,
                                      LWhGoodsService lWhGoodsService,
consum-base/src/main/java/com/consum/base/service/LWhFormScrappedService.java
File was deleted
consum-base/src/main/java/com/consum/base/service/LWhFormTransferCoreService.java
@@ -19,7 +19,7 @@
@Slf4j
public class LWhFormTransferCoreService {
    @Resource
    private LWhFormTransferService lWhFormTransferService;
    private LWhFormTransferServiceImpl lWhFormTransferService;
    @Resource
    private LWhFormOutputCoreService lWhFormOutputCoreService;
consum-base/src/main/java/com/consum/base/service/LWhFormTransferService.java
File was deleted
consum-model-pojo/src/main/java/com/consum/model/po/LOrgSupplier.java
New file
@@ -0,0 +1,150 @@
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;
    }
}
consum-model-pojo/src/main/java/com/consum/model/po/LOrgSupplier_mapper.java
New file
@@ -0,0 +1,243 @@
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;
    }
}
consum-model-pojo/src/main/java/com/consum/model/po/WhWarning.java
@@ -20,6 +20,10 @@
    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;
@@ -125,6 +129,20 @@
    @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() {
@@ -386,6 +404,7 @@
    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)
@@ -421,6 +440,9 @@
            wh_warning.setId(this.getId());
        }
        // 普通属性
        if (this.isset_warehouseType) {
            wh_warning.setWarehouseType(this.getWarehouseType());
        }
        if (this.isset_baseWarehouseId) {
            wh_warning.setBaseWarehouseId(this.getBaseWarehouseId());
        }
consum-model-pojo/src/main/java/com/consum/model/po/WhWarningConfig.java
@@ -20,6 +20,10 @@
    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;
@@ -77,6 +81,20 @@
    @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() {
@@ -170,6 +188,7 @@
    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)
@@ -193,6 +212,9 @@
            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());
        }
consum-model-pojo/src/main/java/com/consum/model/po/WhWarningConfig_mapper.java
@@ -28,6 +28,7 @@
    // 主键
    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";
@@ -47,6 +48,9 @@
            this.setId(whWarningConfig.getId());
        }
        //普通属性
        if (whWarningConfig.isset_warehouseType) {
            this.setWarehouseType(whWarningConfig.getWarehouseType());
        }
        if (whWarningConfig.isset_baseWarehouseId) {
            this.setBaseWarehouseId(whWarningConfig.getBaseWarehouseId());
        }
@@ -108,6 +112,7 @@
    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);
@@ -123,6 +128,7 @@
    @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);
@@ -139,6 +145,7 @@
    @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);
@@ -154,6 +161,7 @@
    @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);
@@ -207,7 +215,7 @@
     */
    @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);
    }
    /**
@@ -215,7 +223,7 @@
     */
    @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);
    }
    /**
@@ -252,6 +260,14 @@
            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) {
consum-model-pojo/src/main/java/com/consum/model/po/WhWarning_mapper.java
@@ -28,6 +28,7 @@
    // 主键
    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";
@@ -59,6 +60,9 @@
            this.setId(whWarning.getId());
        }
        //普通属性
        if (whWarning.isset_warehouseType) {
            this.setWarehouseType(whWarning.getWarehouseType());
        }
        if (whWarning.isset_baseWarehouseId) {
            this.setBaseWarehouseId(whWarning.getBaseWarehouseId());
        }
@@ -156,6 +160,7 @@
    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);
@@ -183,6 +188,7 @@
    @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);
@@ -211,6 +217,7 @@
    @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);
@@ -238,6 +245,7 @@
    @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);
@@ -303,7 +311,7 @@
     */
    @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);
    }
    /**
@@ -311,7 +319,7 @@
     */
    @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);
    }
    /**
@@ -348,6 +356,14 @@
            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) {