luqingyang
2023-10-30 b82ed8cbcc9e262f2bce2a662f8ce0d8c59b5d70
调拨管理、物品管理、物品分类 相关代码
8个文件已添加
7个文件已修改
1475 ■■■■■ 已修改文件
consum-base/src/main/java/com/consum/base/controller/BaseCategoryController.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/BaseGoodsTemplateController.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/LWhFormTransferController.java 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/pojo/LWhFormTransferParam.java 205 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/pojo/ProjectTreeResult.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/BaseCategoryServiceImpl.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/BaseGoodsTemplateServiceImpl.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/BaseWarehouseServiceImpl.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/LWhFormTransferServiceImpl.java 192 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/service/SDictDataServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate_mapper.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/S_dict_data.java 336 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/po/S_dict_data_mapper.java 371 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-model-pojo/src/main/java/com/consum/model/vo/LWhFormTransferVo.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
consum-base/src/main/java/com/consum/base/controller/BaseCategoryController.java
@@ -2,18 +2,23 @@
import com.consum.base.BaseController;
import com.consum.base.pojo.BaseCategoryParam;
import com.consum.base.pojo.ProjectTreeResult;
import com.consum.base.service.BaseCategoryServiceImpl;
import com.consum.base.service.BaseGoodsTemplateServiceImpl;
import com.consum.base.util.FinSysTenantUtils;
import com.consum.model.po.BaseCategory;
import com.consum.model.po.FinSysTenant;
import com.consum.model.po.FinSysTenantUser;
import com.iplatform.model.po.S_user_core;
import com.walker.db.page.GenericPager;
import com.walker.infrastructure.tree.TreeNode;
import com.walker.infrastructure.utils.StringUtils;
import com.walker.web.ResponseValue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.*;
/**
 * @Description 物品分类
@@ -29,6 +34,23 @@
    @Autowired
    private BaseGoodsTemplateServiceImpl baseGoodsTemplateService;
    private boolean multiRoot = true;
    private TreeNode dummyRoot = null;
    private Map<Long, TreeNode> rootMap = new TreeMap();
    private Map<Long, TreeNode> childMap = new TreeMap();
    private long defaultParentId = 0L;
    /**
     * @Description  获取分类树
     * @Author 卢庆阳
     * @Date 2023/10/30
     */
    @GetMapping("/select/tree")
    public ResponseValue tree(String categoryName) {
        List<ProjectTreeResult> tree = this.baseCategoryService.tree(categoryName);
        return ResponseValue.success(tree);
    }
    /**
     * @Description 新增分类
@@ -145,5 +167,22 @@
        if (baseCategory == null) return ResponseValue.error("查询失败!");
        return ResponseValue.success("查询成功!", baseCategory);
    }
    /**
     * @Description 三级分类列表查询
     * @Author 卢庆阳
     * @Date 2023/10/24
     */
    @GetMapping("/select/lv3_tree")
    public ResponseValue tree() {
        S_user_core currentUser = this.getCurrentUser();
        if (currentUser == null) {
            return ResponseValue.error("登录用户信息不存在");
        }
        List<BaseCategory> baseCategories = this.baseCategoryService.queryForLv3Tree();
        return ResponseValue.success(baseCategories);
    }
}
consum-base/src/main/java/com/consum/base/controller/BaseGoodsTemplateController.java
@@ -3,14 +3,19 @@
import com.consum.base.BaseController;
import com.consum.base.pojo.BaseGoodsTemplateParam;
import com.consum.base.service.BaseGoodsTemplateServiceImpl;
import com.consum.model.po.BaseGoodsModels;
import com.consum.model.po.BaseGoodsTemplate;
import com.consum.model.po.S_dict_data;
import com.consum.model.vo.BaseGoodsTemplateVo;
import com.iplatform.model.po.S_user_core;
import com.walker.db.page.GenericPager;
import com.walker.infrastructure.utils.StringUtils;
import com.walker.web.ResponseValue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * @Description 物品模板
@@ -88,6 +93,10 @@
        if (StringUtils.isEmpty(param.getGoodsName())) {
            return ResponseValue.error("物品名称为空");
        }
        List<BaseGoodsModels> models = param.getModels();
        if (CollectionUtils.isEmpty(models)) {
            return ResponseValue.error("物品型号为空");
        }
        int num = this.baseGoodsTemplateService.updateBaseGoodsTemplate(param);
        return num > 0 ? ResponseValue.success(1) : ResponseValue.error("编辑失败!");
@@ -125,5 +134,18 @@
        return num > 0 ? ResponseValue.success(1) : ResponseValue.error("删除失败!");
    }
    /**
     * @Description  查询仓库类型(数据字典)
     * @Author 卢庆阳
     * @Date 2023/10/30
     */
    @GetMapping("/select/classificationCode")
    public ResponseValue queryClassificationCode() {
        List<S_dict_data> list = this.baseGoodsTemplateService.queryClassificationCode();
        return ResponseValue.success(list);
    }
}
consum-base/src/main/java/com/consum/base/controller/LWhFormTransferController.java
New file
@@ -0,0 +1,121 @@
package com.consum.base.controller;
import com.consum.base.BaseController;
import com.consum.base.core.CodeGeneratorEnum;
import com.consum.base.core.CodeGeneratorService;
import com.consum.base.core.WhBusinessEnum;
import com.consum.base.pojo.*;
import com.consum.base.service.*;
import com.consum.model.po.*;
import com.consum.model.vo.LWhFormTransferVo;
import com.iplatform.model.po.S_user_core;
import com.walker.db.page.GenericPager;
import com.walker.infrastructure.utils.CollectionUtils;
import com.walker.infrastructure.utils.DateUtils;
import com.walker.infrastructure.utils.NumberGenerator;
import com.walker.web.ResponseValue;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
 * @Description  调拨管理
 * @Author 卢庆阳
 * @Date 2023/10/30
 */
@RestController
@RequestMapping("/pc/l/wh/form/transfer")
public class LWhFormTransferController extends BaseController {
    @Autowired
    private LWhFormTransferServiceImpl lWhFormTransferService;
    @Autowired
    private BaseWarehouseServiceImpl baseWarehouseService;
    @Autowired
    private LWhProcureModelService lWhProcureModelService;
    /**
     * @Description 新增
     */
    @PostMapping("/add")
    public ResponseValue add(@RequestBody LWhFormTransferParam param) {
        S_user_core currentUser = this.getCurrentUser();
        if (currentUser == null) {
            return ResponseValue.error("登录用户信息不存在");
        }
        List<LWhProcureModelParams> transferGoods = param.getModels();
        if (CollectionUtils.isEmpty(transferGoods)) {
            return ResponseValue.error("调拨单不能为空");
        }
        int result = this.lWhFormTransferService.add(param, currentUser,this.getSysInfo());
        if (result > 0) return ResponseValue.success(1);
        return ResponseValue.error("新增失败!");
    }
    /**
     * @Description  列表查询
     * @Author 卢庆阳
     * @Date 2023/10/30
     */
//    1.查询调拨单
//    2.查询物品型号
    @GetMapping("/list")
    public ResponseValue queryFormTransferList(LWhFormTransferParam param) {
        S_user_core currentUser = this.getCurrentUser();
        if (currentUser == null) {
            return ResponseValue.error("登录用户信息不存在");
        }
        FinSysTenantUser sysInfo = getSysInfo();
        //只能查询本级 及以下机构的进货单
        //??????
        GenericPager genericPager = lWhFormTransferService.queryFormTransferList(param);
        List<LWhFormTransfer> datas = genericPager.getDatas();
        ArrayList<LWhFormProcureExtend> newDatas = new ArrayList<>();
        if (!CollectionUtils.isEmpty(datas)) {
            datas.forEach(item -> {
                // 查询型号数量
                LWhProcureModel lWhProcureModel = new LWhProcureModel();
                lWhProcureModel.setBusinessType(2);
                lWhProcureModel.setBusinessId(item.getId());
                List<LWhProcureModel> models = lWhProcureModelService.select(lWhProcureModel);
                LWhFormProcureExtend formProcureExtend = new LWhFormProcureExtend();
                BeanUtils.copyProperties(item, formProcureExtend);
                formProcureExtend.setModels(models);
                newDatas.add(formProcureExtend);
            });
        }
        try {
            Field fieldDatas = GenericPager.class.getDeclaredField("datas");
            fieldDatas.setAccessible(true);
            fieldDatas.set(genericPager, newDatas);
        } catch (Exception e) {
            e.printStackTrace();
        }
//        genericPager.setDatas(newDatas);
        return ResponseValue.success(genericPager);
    }
    /**
     * @Description  根据id查询详情
     * @Author 卢庆阳
     * @Date 2023/10/30
     */
    @GetMapping("/detail")
    public ResponseValue getById(Long id) throws IllegalAccessException {
        if (id == null) {
            return ResponseValue.error("调拨单id为空");
        }
        LWhFormTransferVo vo = this.lWhFormTransferService.getById(id);
        return ResponseValue.success(vo);
    }
}
consum-base/src/main/java/com/consum/base/pojo/LWhFormTransferParam.java
New file
@@ -0,0 +1,205 @@
package com.consum.base.pojo;
import com.consum.model.po.LWhGoodsRecord;
import com.walker.web.param.ParamRequest;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDate;
import java.util.List;
/**
 * @Description
 * @Author 卢庆阳
 * @Date 2023/10/30
 */
public class LWhFormTransferParam extends ParamRequest {
    private Long id;
    /**
     * 入库仓库编号
     */
   private Long inWarehouseId;
    /**
     * 出库仓库机构编号(调拨机构)
     */
    private Long outAgencyId;
    /**
     * 调拨时间
     */
    private Long createTime;
    /**
     * 调拨手续
     */
    private String procureDoc;
    /**
     * 调拨单型号
     */
    private List<LWhProcureModelParams> models;
    /**
     * 物品id
     */
    private Long baseGoodsTemplateId;
    /**
     * 物品模版名称
     */
    private String goodsTemplateName;
    /**
     * 调拨单号
     */
    private String businessFormCode;
    /**
     * 接收机构
     */
    private Long inAgencyId;
    /**
     * 状态 0=待出库;1=待接收;2=已入库
     */
    private Short states;
    /**
     * 创建人
     */
    private String operatorName;
    /**
     * 申请时间 开始
     */
    private Long createTimeStart;
    /**
     * 申请时间 结束
     */
    private Long createTimeEnd;
    /**
     * 接收时间 开始
     */
    private Long inTimeStart;
    /**
     * 接收时间 结束
     */
    private Long inTimeEnd;
    public Long getInWarehouseId() {
        return inWarehouseId;
    }
    public void setInWarehouseId(Long inWarehouseId) {
        this.inWarehouseId = inWarehouseId;
    }
    public Long getOutAgencyId() {
        return outAgencyId;
    }
    public void setOutAgencyId(Long outAgencyId) {
        this.outAgencyId = outAgencyId;
    }
    public Long getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }
    public List<LWhProcureModelParams> getModels() {
        return models;
    }
    public void setModels(List<LWhProcureModelParams> models) {
        this.models = models;
    }
    public Long getBaseGoodsTemplateId() {
        return baseGoodsTemplateId;
    }
    public void setBaseGoodsTemplateId(Long baseGoodsTemplateId) {
        this.baseGoodsTemplateId = baseGoodsTemplateId;
    }
    public String getGoodsTemplateName() {
        return goodsTemplateName;
    }
    public void setGoodsTemplateName(String goodsTemplateName) {
        this.goodsTemplateName = goodsTemplateName;
    }
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getProcureDoc() {
        return procureDoc;
    }
    public void setProcureDoc(String procureDoc) {
        this.procureDoc = procureDoc;
    }
    public String getBusinessFormCode() {
        return businessFormCode;
    }
    public void setBusinessFormCode(String businessFormCode) {
        this.businessFormCode = businessFormCode;
    }
    public Long getInAgencyId() {
        return inAgencyId;
    }
    public void setInAgencyId(Long inAgencyId) {
        this.inAgencyId = inAgencyId;
    }
    public Short getStates() {
        return states;
    }
    public void setStates(Short states) {
        this.states = states;
    }
    public String getOperatorName() {
        return operatorName;
    }
    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }
    public Long getCreateTimeStart() {
        return createTimeStart;
    }
    public void setCreateTimeStart(Long createTimeStart) {
        this.createTimeStart = createTimeStart;
    }
    public Long getCreateTimeEnd() {
        return createTimeEnd;
    }
    public void setCreateTimeEnd(Long createTimeEnd) {
        this.createTimeEnd = createTimeEnd;
    }
    public Long getInTimeStart() {
        return inTimeStart;
    }
    public void setInTimeStart(Long inTimeStart) {
        this.inTimeStart = inTimeStart;
    }
    public Long getInTimeEnd() {
        return inTimeEnd;
    }
    public void setInTimeEnd(Long inTimeEnd) {
        this.inTimeEnd = inTimeEnd;
    }
}
consum-base/src/main/java/com/consum/base/pojo/ProjectTreeResult.java
New file
@@ -0,0 +1,46 @@
package com.consum.base.pojo;
import com.consum.model.po.BaseCategory;
import com.walker.web.param.ParamRequest;
import java.util.List;
public class ProjectTreeResult extends ParamRequest {
    List<ProjectTreeResult> children;
    private Long id;
    private String label;
    public List<ProjectTreeResult> getChildren() {
        return children;
    }
    public void setChildren(List<ProjectTreeResult> children) {
        this.children = children;
    }
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getLabel() {
        return label;
    }
    public void setLabel(String label) {
        this.label = label;
    }
    public ProjectTreeResult() {
    }
    public ProjectTreeResult(BaseCategory baseCategory) {
        this.id = baseCategory.getId();
        this.label = baseCategory.getCategoryName();
    }
}
consum-base/src/main/java/com/consum/base/service/BaseCategoryServiceImpl.java
@@ -2,6 +2,7 @@
import com.consum.base.Constants;
import com.consum.base.pojo.BaseCategoryParam;
import com.consum.base.pojo.ProjectTreeResult;
import com.consum.base.util.IdUtil;
import com.consum.model.po.BaseCategory;
import com.iplatform.model.po.S_user_core;
@@ -12,7 +13,10 @@
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;
/**
 * @Description 物品分类
@@ -21,6 +25,8 @@
 */
@Service
public class BaseCategoryServiceImpl extends BaseServiceImpl {
    private static final String QUERY_TREE_ALL = "select * from base_category where states = 1  order by FATHER_CATEGORY_ID, LEVELS ASC";
    /**
     * @Description 新增分类
@@ -144,4 +150,37 @@
    public BaseCategory getById(Long id) {
        return this.get(new BaseCategory(id));
    }
    /**
     * @Description
     * @Author 卢庆阳
     * @Date 2023/10/30
     */
    public List<BaseCategory> queryForTree() {
        // 展示全部节点
        return this.select(QUERY_TREE_ALL, new Object[]{}, new BaseCategory());
    }
    public List<ProjectTreeResult> tree(String categoryName) {
        BaseCategory categoryParam = new BaseCategory();
        categoryParam.setStates(1);
        List<BaseCategory> categories = select(categoryParam);
        return categories.stream()
                .filter(category -> Integer.valueOf(1).equals(category.getLevels()))
                .sorted(Comparator.comparing(BaseCategory::getOrderNumber))
                .map(ProjectTreeResult::new)
                .peek(lv1TreeResult -> lv1TreeResult.setChildren(categories.stream().filter(categorie -> lv1TreeResult.getId().equals(categorie.getFatherCategoryId())).sorted(Comparator.comparing(BaseCategory::getOrderNumber)).map(ProjectTreeResult::new).collect(Collectors.toList())))
                .collect(Collectors.toList());
    }
    /**
     * @Description  三级分类列表查询
     * @Author 卢庆阳
     * @Date 2023/10/30
     * @return
     */
    public List<BaseCategory> queryForLv3Tree() {
        StringBuilder sql = new StringBuilder("SELECT * FROM base_category WHERE states = 1 and levels = 3 order by ORDER_NUMBER,CREATE_TIME desc");
        return this.select(sql.toString(), new Object[]{}, new BaseCategory());
    }
}
consum-base/src/main/java/com/consum/base/service/BaseGoodsTemplateServiceImpl.java
@@ -7,6 +7,7 @@
import com.consum.model.po.BaseCategory;
import com.consum.model.po.BaseGoodsModels;
import com.consum.model.po.BaseGoodsTemplate;
import com.consum.model.po.S_dict_data;
import com.consum.model.vo.BaseGoodsTemplateVo;
import com.iplatform.model.po.S_user_core;
import com.walker.db.page.GenericPager;
@@ -72,6 +73,7 @@
        //根据分类id查询分类
        BaseCategory baseCategory = this.baseCategoryService.get(new BaseCategory(param.getCategoryId()));
        if (baseCategory != null) {
            baseGoodsTemplate.setCategoryName(baseCategory.getCategoryName());
            String classification = baseCategory.getClassification();
            //物品编码
            String goodsCode = codeGeneratorService.createGoodsTemplateCode(classification);
@@ -190,6 +192,10 @@
        //1.修改物品模板
        BaseGoodsTemplate baseGoodsTemplate = new BaseGoodsTemplate();
        BeanUtils.copyProperties(param, baseGoodsTemplate);
        BaseCategory baseCategory = this.baseCategoryService.get(new BaseCategory(param.getCategoryId()));
        if (baseCategory != null) {
            baseGoodsTemplate.setCategoryName(baseCategory.getCategoryName());
        }
        int flag1 = this.update(baseGoodsTemplate);
        //2.修改规格型号的单位
        List<BaseGoodsModels> modelsList = param.getModels();
@@ -266,4 +272,15 @@
        goodsTemplate.setDUserName(currentUser.getUser_name());
        return this.update(goodsTemplate);
    }
    /**
     * @Description  查询仓库类型(数据字典)
     * @Author 卢庆阳
     * @Date 2023/10/30
     * @return
     */
    public List<S_dict_data> queryClassificationCode() {
        StringBuilder sql = new StringBuilder("SELECT * FROM s_dict_data WHERE dict_type = 'CLASSIFICATION_CODE' order by dict_sort");
        return this.select(sql.toString(), new Object[]{}, new S_dict_data());
    }
}
consum-base/src/main/java/com/consum/base/service/BaseWarehouseServiceImpl.java
@@ -4,10 +4,7 @@
import com.consum.base.core.CodeGeneratorService;
import com.consum.base.pojo.BaseWarehouseParam;
import com.consum.base.util.IdUtil;
import com.consum.model.po.BaseWarehouse;
import com.consum.model.po.FinSysTenant;
import com.consum.model.po.FinSysTenantDepartment;
import com.consum.model.po.FinSysTenantUser;
import com.consum.model.po.*;
import com.walker.db.page.GenericPager;
import com.walker.infrastructure.utils.StringUtils;
import com.walker.jdbc.service.BaseServiceImpl;
@@ -36,6 +33,8 @@
    private FinSysTenantDepartmentServiceImpl departmentService;
    @Autowired
    private FinSysTenantUserServiceImpl userService;
    @Autowired
    private SDictDataServiceImpl sDictDataService;
    /**
     * @Description 新增
@@ -54,6 +53,11 @@
//            baseWarehouse.setParentAgencyId(finSysTenant.getParentId());
//            baseWarehouse.setAgencyName(finSysTenant.getName());
//        }
        //根据CLASSIFICATION_CODE查询CLASSIFICATION_NAME
        S_dict_data s_dict_data = this.sDictDataService.get(new S_dict_data(Long.valueOf(param.getClassificationCode())));
        if (s_dict_data != null) {
            baseWarehouse.setClassificationName(s_dict_data.getDict_label());
        }
        baseWarehouse.setIsDefault(Constants.IS_DEFAULT_YES);
        return this.insert(baseWarehouse);
@@ -104,6 +108,10 @@
     * @Date 2023/10/26
     */
    public int updateBaseWarehouse(BaseWarehouse baseWarehouse) {
        S_dict_data s_dict_data = this.sDictDataService.get(new S_dict_data(Long.valueOf(baseWarehouse.getClassificationCode())));
        if (s_dict_data != null) {
            baseWarehouse.setClassificationName(s_dict_data.getDict_label());
        }
        return this.update(baseWarehouse);
    }
consum-base/src/main/java/com/consum/base/service/LWhFormTransferServiceImpl.java
New file
@@ -0,0 +1,192 @@
package com.consum.base.service;
import com.consum.base.Constants;
import com.consum.base.core.CodeGeneratorEnum;
import com.consum.base.core.CodeGeneratorService;
import com.consum.base.core.param.BaseWarehouseParam1;
import com.consum.base.pojo.*;
import com.consum.base.util.IdUtil;
import com.consum.model.po.*;
import com.consum.model.vo.LWhFormTransferVo;
import com.iplatform.model.po.S_user_core;
import com.walker.db.page.GenericPager;
import com.walker.infrastructure.utils.DateUtils;
import com.walker.infrastructure.utils.StringUtils;
import com.walker.jdbc.service.BaseServiceImpl;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
 * @Description 调拨管理
 * @Author 卢庆阳
 * @Date 2023/10/30
 */
@Service
public class LWhFormTransferServiceImpl extends BaseServiceImpl {
    @Autowired
    private BaseWarehouseServiceImpl baseWarehouseService;
    @Autowired
    private CodeGeneratorService codeGeneratorService;
    @Autowired
    private FinSysTenantServiceImpl finSysTenantService;
    @Autowired
    private LWhGoodsService lWhGoodsService;
    @Autowired
    private LWhProcureModelService lWhProcureModelService;
    private static String QUERY_FORM_TRANSFER_LIST = "SELECT * FROM l_wh_form_transfer WHERE 1 = 1";
    /**
     * @Description
     * @Author 卢庆阳
     * @Date 2023/10/30
     */
    public int add(LWhFormTransferParam param, S_user_core currentUser, FinSysTenantUser sysInfo) {
        //1.新增调拨单记录
        LWhFormTransfer lWhFormTransfer = new LWhFormTransfer();
        //调拨单id
        long lWhFormTransferId = IdUtil.generateId();
        lWhFormTransfer.setId(lWhFormTransferId);
        lWhFormTransfer.setBusinessType(0);
        lWhFormTransfer.setBusinessFormCode(codeGeneratorService.createBusinessFormCode(CodeGeneratorEnum.Transfer));
        Long warehouseId = param.getInWarehouseId();
        lWhFormTransfer.setInWarehouseId(warehouseId);
        //根据仓库id查询仓库
        BaseWarehouse warehouse = this.baseWarehouseService.getById(warehouseId);
        if (warehouse == null) {
            log.error("仓库不存在");
            return 0;
        }
        lWhFormTransfer.setInWarehouseName(warehouse.getWarehouseName());
        lWhFormTransfer.setInAgencyId(Long.valueOf(sysInfo.getTenantId()));
        lWhFormTransfer.setInAgencyName(sysInfo.getTenantName());
        //根据机构id查询调拨机构
        FinSysTenant finSysTenant = finSysTenantService.get(new FinSysTenant(param.getOutAgencyId()));
        if (finSysTenant == null) {
            log.error("调拨机构不存在");
            return 0;
        }
        lWhFormTransfer.setOutAgencyId(finSysTenant.getId());
        lWhFormTransfer.setOutAgencyName(finSysTenant.getName());
        lWhFormTransfer.setOperatorId(sysInfo.getId());
        lWhFormTransfer.setOperatorName(sysInfo.getUserName());
        lWhFormTransfer.setCreateTime(param.getCreateTime());
        lWhFormTransfer.setStates(0);
        lWhFormTransfer.setProcureDoc(param.getProcureDoc());
        int flag1 = this.insert(lWhFormTransfer);
        if (flag1 == 0) {
            log.error("新增调拨单失败");
            return 0;
        }
        //2.新增物品型号记录
        List<LWhProcureModelParams> models = param.getModels();
        List<LWhProcureModel> modelList = new ArrayList<>();
        for (LWhProcureModelParams model : models) {
            LWhProcureModel lWhProcureModel = new LWhProcureModel();
            lWhProcureModel.setId(IdUtil.generateId());
            lWhProcureModel.setBusinessType(2);
            lWhProcureModel.setBusinessId(lWhFormTransferId);
            lWhProcureModel.setBaseGoodsModelsId(model.getBaseGoodsModelsId());
            lWhProcureModel.setCounts(model.getCounts());
            //根据物品型号查询物品库存
            int goodsNum = this.lWhGoodsService.queryGoodsModelNum(warehouseId, model.getBaseGoodsModelsId(), (short) 1, null);
            lWhProcureModel.setWorehouseCount(goodsNum);
            modelList.add(lWhProcureModel);
        }
        int flag2 = this.lWhProcureModelService.insert(modelList);
        if (flag2 != modelList.size()) {
            log.error("新增物品型号失败");
            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
            return 0;
        }
        return 1;
    }
    /**
     * @Description  列表查询
     * @Author 卢庆阳
     * @Date 2023/10/30
     */
    public GenericPager<LWhFormTransfer> queryFormTransferList(LWhFormTransferParam param) {
        HashMap<String, Object> paramts = new HashMap<>();
        StringBuilder sql = new StringBuilder(QUERY_FORM_TRANSFER_LIST);
        //调拨单号
        if (!StringUtils.isEmpty(param.getBusinessFormCode())) {
            sql.append(" and BUSINESS_FORM_CODE like :businessFormCode ");
            paramts.put("businessFormCode", StringUtils.CHAR_PERCENT + param.getBusinessFormCode() + StringUtils.CHAR_PERCENT);
        }
        //物品名称
        if (!StringUtils.isEmpty(param.getGoodsTemplateName())) {
            sql.append(" AND id IN (SELECT BUSINESS_ID FROM L_WH_PROCURE_MODEL procureModel LEFT JOIN BASE_GOODS_MODELS baseModel ON procureModel.BASE_GOODS_MODELS_ID=baseModel.ID LEFT JOIN BASE_GOODS_TEMPLATE baseTemp ON baseModel.GOODS_TEMPLATES_ID=baseTemp.id WHERE procureModel.BUSINESS_TYPE=1 AND baseTemp.GOODS_NAME LIKE :goodsTemplateName)");
            paramts.put("goodsTemplateName", StringUtils.CHAR_PERCENT + param.getGoodsTemplateName() + StringUtils.CHAR_PERCENT);
        }
        //调拨机构
        if (param.getOutAgencyId() != null){
            sql.append(" and OUT_AGENCY_ID = :OUT_AGENCY_ID ");
            paramts.put("OUT_AGENCY_ID", param.getOutAgencyId());
        }
        //接收机构
        if (param.getInAgencyId() != null){
            sql.append(" and OUT_AGENCY_ID = :OUT_AGENCY_ID ");
            paramts.put("OUT_AGENCY_ID",   param.getOutAgencyId() );
        }
        //状态
        if (param.getStates() != null) {
            sql.append(" and states =:states ");
            paramts.put("states", param.getStates());
        }
        //创建人
        if (!StringUtils.isEmpty(param.getOperatorName())) {
            sql.append(" and OPERATOR_NAME =:OPERATOR_NAME ");
            paramts.put("OPERATOR_NAME", param.getOperatorName());
        }
        //申请时间
        if (param.getCreateTimeStart() != null) {
            sql.append(" and CREATE_TIME >=:createTimeStart ");
            paramts.put("createTimeStart", param.getCreateTimeStart() * 1000000);
        }
        if (param.getCreateTimeEnd() != null) {
            sql.append(" and CREATE_TIME <:createTimeEnd ");
            paramts.put("createTimeEnd", param.getCreateTimeEnd() * 1000000 + 240000);
        }
        //接收时间
        if (param.getInTimeStart() != null) {
            sql.append(" and IN_TIME >=:inTimeStart ");
            paramts.put("inTimeStart", param.getInTimeStart() * 1000000);
        }
        if (param.getInTimeEnd() != null) {
            sql.append(" and IN_TIME <:inTimeEnd ");
            paramts.put("inTimeEnd", param.getInTimeEnd() * 1000000 + 240000);
        }
        sql.append(" ORDER BY CREATE_TIME DESC");
        GenericPager genericPager = selectSplit(sql.toString(), paramts, new LWhFormTransfer());
        return genericPager;
    }
    /**
     * @Description  根据id查询详情
     * @Author 卢庆阳
     * @Date 2023/10/30
     */
    public LWhFormTransferVo getById(Long id) {
        LWhFormTransferVo vo = new LWhFormTransferVo();
        //1.查询调拨单
        LWhFormTransfer lWhFormTransfer = this.get(new LWhFormTransfer(id));
        if (lWhFormTransfer != null) {
            BeanUtils.copyProperties(lWhFormTransfer,vo);
        }
        //2.查询物品型号
//        this.lWhProcureModelService.getModelByForm(id)
        return null;
    }
}
consum-base/src/main/java/com/consum/base/service/SDictDataServiceImpl.java
New file
@@ -0,0 +1,9 @@
package com.consum.base.service;
import com.walker.jdbc.service.BaseServiceImpl;
import org.springframework.stereotype.Service;
@Service
public class SDictDataServiceImpl extends BaseServiceImpl {
}
consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate.java
@@ -40,6 +40,10 @@
    @JsonIgnore
    protected boolean isset_categoryId = false;
    private String categoryName = null;
    @JsonIgnore
    protected boolean isset_categoryName = false;
    private Long fAgencyId = null;
    @JsonIgnore
    protected boolean isset_fAgencyId = false;
@@ -187,6 +191,20 @@
    @JsonIgnore
    public boolean isEmptyCategoryId() {
        return this.categoryId == null;
    }
    public String getCategoryName() {
        return this.categoryName;
    }
    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
        this.isset_categoryName = true;
    }
    @JsonIgnore
    public boolean isEmptyCategoryName() {
        return this.categoryName == null || this.categoryName.length() == 0;
    }
    public Long getFAgencyId() {
@@ -355,6 +373,7 @@
                .append("classification=").append(this.classification)
                .append("states=").append(this.states)
                .append("categoryId=").append(this.categoryId)
                .append("categoryName=").append(this.categoryName)
                .append("fAgencyId=").append(this.fAgencyId)
                .append("sAgencyId=").append(this.sAgencyId)
                .append("tAgencyId=").append(this.tAgencyId)
@@ -398,6 +417,9 @@
        if (this.isset_categoryId) {
            base_goods_template.setCategoryId(this.getCategoryId());
        }
        if (this.isset_categoryName) {
            base_goods_template.setCategoryName(this.getCategoryName());
        }
        if (this.isset_fAgencyId) {
            base_goods_template.setFAgencyId(this.getFAgencyId());
        }
consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate_mapper.java
@@ -33,6 +33,7 @@
    public static final String Classification = "classification";
    public static final String States = "states";
    public static final String CategoryId = "category_id";
    public static final String CategoryName = "category_name";
    public static final String FAgencyId = "f_agency_id";
    public static final String SAgencyId = "s_agency_id";
    public static final String TAgencyId = "t_agency_id";
@@ -71,6 +72,9 @@
        }
        if (baseGoodsTemplate.isset_categoryId) {
            this.setCategoryId(baseGoodsTemplate.getCategoryId());
        }
        if (baseGoodsTemplate.isset_categoryName) {
            this.setCategoryName(baseGoodsTemplate.getCategoryName());
        }
        if (baseGoodsTemplate.isset_fAgencyId) {
            this.setFAgencyId(baseGoodsTemplate.getFAgencyId());
@@ -153,6 +157,7 @@
        ib.set(Classification, this.getClassification(), this.isset_classification);
        ib.set(States, this.getStates(), this.isset_states);
        ib.set(CategoryId, this.getCategoryId(), this.isset_categoryId);
        ib.set(CategoryName, this.getCategoryName(), this.isset_categoryName);
        ib.set(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId);
        ib.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId);
        ib.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId);
@@ -178,6 +183,7 @@
        ub.set(Classification, this.getClassification(), this.isset_classification);
        ub.set(States, this.getStates(), this.isset_states);
        ub.set(CategoryId, this.getCategoryId(), this.isset_categoryId);
        ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName);
        ub.set(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId);
        ub.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId);
        ub.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId);
@@ -204,6 +210,7 @@
        ub.set(Classification, this.getClassification(), this.isset_classification);
        ub.set(States, this.getStates(), this.isset_states);
        ub.set(CategoryId, this.getCategoryId(), this.isset_categoryId);
        ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName);
        ub.set(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId);
        ub.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId);
        ub.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId);
@@ -229,6 +236,7 @@
        ub.set(Classification, this.getClassification(), this.isset_classification);
        ub.set(States, this.getStates(), this.isset_states);
        ub.set(CategoryId, this.getCategoryId(), this.isset_categoryId);
        ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName);
        ub.set(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId);
        ub.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId);
        ub.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId);
@@ -287,7 +295,7 @@
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) {
        return new SqlAndParameters<>("select id, goods_code, goods_name, classification, states, category_id, f_agency_id, s_agency_id, t_agency_id, parent_agency_id, agency_level, agency_id, agency_name, create_date, d_time, d_user_id, d_user_name from " + this.getTableName_() + " " + where, parameters);
        return new SqlAndParameters<>("select id, goods_code, goods_name, classification, states, category_id, category_name, f_agency_id, s_agency_id, t_agency_id, parent_agency_id, agency_level, agency_id, agency_name, create_date, d_time, d_user_id, d_user_name from " + this.getTableName_() + " " + where, parameters);
    }
    /**
@@ -295,7 +303,7 @@
     */
    @Override
    public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) {
        return new SqlAndParameters<>("select id, goods_code, goods_name, classification, states, category_id, f_agency_id, s_agency_id, t_agency_id, parent_agency_id, agency_level, agency_id, agency_name, create_date, d_time, d_user_id, d_user_name from " + this.getTableName_() + " " + where, parameters);
        return new SqlAndParameters<>("select id, goods_code, goods_name, classification, states, category_id, category_name, f_agency_id, s_agency_id, t_agency_id, parent_agency_id, agency_level, agency_id, agency_name, create_date, d_time, d_user_id, d_user_name from " + this.getTableName_() + " " + where, parameters);
    }
    /**
@@ -360,6 +368,10 @@
                base_goods_template.setCategoryId(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.CategoryName);
        if (columnIndex > 0) {
            base_goods_template.setCategoryName(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.FAgencyId);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
consum-model-pojo/src/main/java/com/consum/model/po/S_dict_data.java
New file
@@ -0,0 +1,336 @@
package com.consum.model.po;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.walker.jdbc.BasePo;
/**
 * 表名:S_DICT_DATA *
 * @author genrator
 */
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
public class S_dict_data extends BasePo<S_dict_data> {
    // 序列化版本号
    private static final long serialVersionUID = 1L;
    // 主键
    private Long dict_code = null;
    @JsonIgnore
    protected boolean isset_dict_code = false;
    // 属性列表
    private Long parent_id = null;
    @JsonIgnore
    protected boolean isset_parent_id = false;
    private Integer dict_sort = null;
    @JsonIgnore
    protected boolean isset_dict_sort = false;
    private String dict_label = null;
    @JsonIgnore
    protected boolean isset_dict_label = false;
    private String dict_value = null;
    @JsonIgnore
    protected boolean isset_dict_value = false;
    private String dict_type = null;
    @JsonIgnore
    protected boolean isset_dict_type = false;
    private String css_class = null;
    @JsonIgnore
    protected boolean isset_css_class = false;
    private String list_class = null;
    @JsonIgnore
    protected boolean isset_list_class = false;
    private String is_default = null;
    @JsonIgnore
    protected boolean isset_is_default = false;
    private Integer status = null;
    @JsonIgnore
    protected boolean isset_status = false;
    private String create_by = null;
    @JsonIgnore
    protected boolean isset_create_by = false;
    private Long create_time = null;
    @JsonIgnore
    protected boolean isset_create_time = false;
    private String remark = null;
    @JsonIgnore
    protected boolean isset_remark = false;
    /**
     * 默认构造函数
     */
    public S_dict_data() {
    }
    /**
     * 根据主键构造对象
     */
    public S_dict_data(Long dict_code) {
        this.setDict_code(dict_code);
    }
    /**
     * 设置主键值
     */
    @Override
    public void setPkValue(Object value) {
        this.setDict_code((Long) value);
    }
            public Long getDict_code() {
        return this.dict_code;
    }
    public void setDict_code(Long dict_code) {
        this.dict_code = dict_code;
        this.isset_dict_code = true;
    }
    @JsonIgnore
    public boolean isEmptyDict_code() {
        return this.dict_code == null;
    }
    public Long getParent_id() {
        return this.parent_id;
    }
    public void setParent_id(Long parent_id) {
        this.parent_id = parent_id;
        this.isset_parent_id = true;
            }
    @JsonIgnore
    public boolean isEmptyParent_id() {
        return this.parent_id == null;
    }
    public Integer getDict_sort() {
        return this.dict_sort;
    }
    public void setDict_sort(Integer dict_sort) {
        this.dict_sort = dict_sort;
        this.isset_dict_sort = true;
            }
    @JsonIgnore
    public boolean isEmptyDict_sort() {
        return this.dict_sort == null;
    }
    public String getDict_label() {
        return this.dict_label;
    }
    public void setDict_label(String dict_label) {
        this.dict_label = dict_label;
        this.isset_dict_label = true;
            }
    @JsonIgnore
    public boolean isEmptyDict_label() {
        return this.dict_label == null || this.dict_label.length() == 0;
    }
    public String getDict_value() {
        return this.dict_value;
    }
    public void setDict_value(String dict_value) {
        this.dict_value = dict_value;
        this.isset_dict_value = true;
            }
    @JsonIgnore
    public boolean isEmptyDict_value() {
        return this.dict_value == null || this.dict_value.length() == 0;
    }
    public String getDict_type() {
        return this.dict_type;
    }
    public void setDict_type(String dict_type) {
        this.dict_type = dict_type;
        this.isset_dict_type = true;
            }
    @JsonIgnore
    public boolean isEmptyDict_type() {
        return this.dict_type == null || this.dict_type.length() == 0;
    }
    public String getCss_class() {
        return this.css_class;
    }
    public void setCss_class(String css_class) {
        this.css_class = css_class;
        this.isset_css_class = true;
            }
    @JsonIgnore
    public boolean isEmptyCss_class() {
        return this.css_class == null || this.css_class.length() == 0;
    }
    public String getList_class() {
        return this.list_class;
    }
    public void setList_class(String list_class) {
        this.list_class = list_class;
        this.isset_list_class = true;
            }
    @JsonIgnore
    public boolean isEmptyList_class() {
        return this.list_class == null || this.list_class.length() == 0;
    }
    public String getIs_default() {
        return this.is_default;
    }
    public void setIs_default(String is_default) {
        this.is_default = is_default;
        this.isset_is_default = true;
            }
    @JsonIgnore
    public boolean isEmptyIs_default() {
        return this.is_default == null || this.is_default.length() == 0;
    }
    public Integer getStatus() {
        return this.status;
    }
    public void setStatus(Integer status) {
        this.status = status;
        this.isset_status = true;
            }
    @JsonIgnore
    public boolean isEmptyStatus() {
        return this.status == null;
    }
    public String getCreate_by() {
        return this.create_by;
    }
    public void setCreate_by(String create_by) {
        this.create_by = create_by;
        this.isset_create_by = true;
            }
    @JsonIgnore
    public boolean isEmptyCreate_by() {
        return this.create_by == null || this.create_by.length() == 0;
    }
    public Long getCreate_time() {
        return this.create_time;
    }
    public void setCreate_time(Long create_time) {
        this.create_time = create_time;
        this.isset_create_time = true;
            }
    @JsonIgnore
    public boolean isEmptyCreate_time() {
        return this.create_time == null;
    }
    public String getRemark() {
        return this.remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
        this.isset_remark = true;
            }
    @JsonIgnore
    public boolean isEmptyRemark() {
        return this.remark == null || this.remark.length() == 0;
    }
    /**
     * 重写 toString() 方法
     */
    @Override
    public String toString() {
        return new StringBuilder()
                .append("dict_code=").append(this.dict_code)
                .append("parent_id=").append(this.parent_id)
                .append("dict_sort=").append(this.dict_sort)
                .append("dict_label=").append(this.dict_label)
                .append("dict_value=").append(this.dict_value)
                .append("dict_type=").append(this.dict_type)
                .append("css_class=").append(this.css_class)
                .append("list_class=").append(this.list_class)
                .append("is_default=").append(this.is_default)
                .append("status=").append(this.status)
                .append("create_by=").append(this.create_by)
                .append("create_time=").append(this.create_time)
                .append("remark=").append(this.remark)
                .toString();
    }
    /**
     * 克隆
     */
    public S_dict_data $clone() {
        S_dict_data s_dict_data = new S_dict_data();
        // 数据库名称
        //s_dict_data.setDatabaseName_(this.getDatabaseName_());
        // 主键
        if (this.isset_dict_code) {
            s_dict_data.setDict_code(this.getDict_code());
        }
        // 普通属性
        if (this.isset_parent_id) {
            s_dict_data.setParent_id(this.getParent_id());
        }
        if (this.isset_dict_sort) {
            s_dict_data.setDict_sort(this.getDict_sort());
        }
        if (this.isset_dict_label) {
            s_dict_data.setDict_label(this.getDict_label());
        }
        if (this.isset_dict_value) {
            s_dict_data.setDict_value(this.getDict_value());
        }
        if (this.isset_dict_type) {
            s_dict_data.setDict_type(this.getDict_type());
        }
        if (this.isset_css_class) {
            s_dict_data.setCss_class(this.getCss_class());
        }
        if (this.isset_list_class) {
            s_dict_data.setList_class(this.getList_class());
        }
        if (this.isset_is_default) {
            s_dict_data.setIs_default(this.getIs_default());
        }
        if (this.isset_status) {
            s_dict_data.setStatus(this.getStatus());
        }
        if (this.isset_create_by) {
            s_dict_data.setCreate_by(this.getCreate_by());
        }
        if (this.isset_create_time) {
            s_dict_data.setCreate_time(this.getCreate_time());
        }
        if (this.isset_remark) {
            s_dict_data.setRemark(this.getRemark());
        }
        return s_dict_data;
    }
}
consum-model-pojo/src/main/java/com/consum/model/po/S_dict_data_mapper.java
New file
@@ -0,0 +1,371 @@
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;
/**
 * 表名:S_DICT_DATA *
 * @author genrator
 */
public class S_dict_data_mapper extends S_dict_data implements BaseMapper<S_dict_data> {
    // 序列化版本号
    private static final long serialVersionUID = 1L;
    public static final RowMapper<S_dict_data> ROW_MAPPER = new S_dict_dataRowMapper();
    // 主键
    public static final String DICT_CODE = "dict_code";
    // 普通属性
    public static final String PARENT_ID = "parent_id";
    public static final String DICT_SORT = "dict_sort";
    public static final String DICT_LABEL = "dict_label";
    public static final String DICT_VALUE = "dict_value";
    public static final String DICT_TYPE = "dict_type";
    public static final String CSS_CLASS = "css_class";
    public static final String LIST_CLASS = "list_class";
    public static final String IS_DEFAULT = "is_default";
    public static final String STATUS = "status";
    public static final String CREATE_BY = "create_by";
    public static final String CREATE_TIME = "create_time";
    public static final String REMARK = "remark";
    /**
     * 默认构造函数
     */
    public S_dict_data_mapper(S_dict_data s_dict_data) {
        if (s_dict_data == null) {
            throw new IllegalArgumentException("po参数不允许为空!");
        }
        //主键
        if (s_dict_data.isset_dict_code) {
            this.setDict_code(s_dict_data.getDict_code());
        }
        //普通属性
        if (s_dict_data.isset_parent_id) {
            this.setParent_id(s_dict_data.getParent_id());
        }
        if (s_dict_data.isset_dict_sort) {
            this.setDict_sort(s_dict_data.getDict_sort());
        }
        if (s_dict_data.isset_dict_label) {
            this.setDict_label(s_dict_data.getDict_label());
        }
        if (s_dict_data.isset_dict_value) {
            this.setDict_value(s_dict_data.getDict_value());
        }
        if (s_dict_data.isset_dict_type) {
            this.setDict_type(s_dict_data.getDict_type());
        }
        if (s_dict_data.isset_css_class) {
            this.setCss_class(s_dict_data.getCss_class());
        }
        if (s_dict_data.isset_list_class) {
            this.setList_class(s_dict_data.getList_class());
        }
        if (s_dict_data.isset_is_default) {
            this.setIs_default(s_dict_data.getIs_default());
        }
        if (s_dict_data.isset_status) {
            this.setStatus(s_dict_data.getStatus());
        }
        if (s_dict_data.isset_create_by) {
            this.setCreate_by(s_dict_data.getCreate_by());
        }
        if (s_dict_data.isset_create_time) {
            this.setCreate_time(s_dict_data.getCreate_time());
        }
        if (s_dict_data.isset_remark) {
            this.setRemark(s_dict_data.getRemark());
        }
        // 去掉,2022-09-07
        // this.setDatabaseName_(s_dict_data.getDatabaseName_());
    }
    /**
     * 获取表名
     */
    @Override
    public String getTableName_() {
        String tableName = "s_dict_data";
        /**
        if (StringUtils.isNotEmpty(this.getDatabaseName_())) {
            return this.getDatabaseName_() + "." + tableName;
        } else {
            return tableName;
        }
        */
        return tableName;
    }
    /**
     * 获取主键名称
     */
    @Override
    public String getPkName_() {
        return DICT_CODE;
    }
    /**
     * 获取主键值
     */
    @Override
    public Object getPkValue_() {
        return this.getDict_code();
    }
    /**
     * 获取插入语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getInsertSql_() {
        InsertBuilder ib = new InsertBuilder(this.getTableName_());
        ib.set(DICT_CODE, this.getDict_code());
        ib.set(PARENT_ID, this.getParent_id(), this.isset_parent_id);
        ib.set(DICT_SORT, this.getDict_sort(), this.isset_dict_sort);
        ib.set(DICT_LABEL, this.getDict_label(), this.isset_dict_label);
        ib.set(DICT_VALUE, this.getDict_value(), this.isset_dict_value);
        ib.set(DICT_TYPE, this.getDict_type(), this.isset_dict_type);
        ib.set(CSS_CLASS, this.getCss_class(), this.isset_css_class);
        ib.set(LIST_CLASS, this.getList_class(), this.isset_list_class);
        ib.set(IS_DEFAULT, this.getIs_default(), this.isset_is_default);
        ib.set(STATUS, this.getStatus(), this.isset_status);
        ib.set(CREATE_BY, this.getCreate_by(), this.isset_create_by);
        ib.set(CREATE_TIME, this.getCreate_time(), this.isset_create_time);
        ib.set(REMARK, this.getRemark(), this.isset_remark);
        return ib.genMapSql();
    }
    /**
     * 获取更新语句和参数
     */
    @Override
    public SqlAndParameters<Map<String, Object>> getUpdateSql_() {
        UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
        ub.set(PARENT_ID, this.getParent_id(), this.isset_parent_id);
        ub.set(DICT_SORT, this.getDict_sort(), this.isset_dict_sort);
        ub.set(DICT_LABEL, this.getDict_label(), this.isset_dict_label);
        ub.set(DICT_VALUE, this.getDict_value(), this.isset_dict_value);
        ub.set(DICT_TYPE, this.getDict_type(), this.isset_dict_type);
        ub.set(CSS_CLASS, this.getCss_class(), this.isset_css_class);
        ub.set(LIST_CLASS, this.getList_class(), this.isset_list_class);
        ub.set(IS_DEFAULT, this.getIs_default(), this.isset_is_default);
        ub.set(STATUS, this.getStatus(), this.isset_status);
        ub.set(CREATE_BY, this.getCreate_by(), this.isset_create_by);
        ub.set(CREATE_TIME, this.getCreate_time(), this.isset_create_time);
        ub.set(REMARK, this.getRemark(), this.isset_remark);
        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(PARENT_ID, this.getParent_id(), this.isset_parent_id);
        ub.set(DICT_SORT, this.getDict_sort(), this.isset_dict_sort);
        ub.set(DICT_LABEL, this.getDict_label(), this.isset_dict_label);
        ub.set(DICT_VALUE, this.getDict_value(), this.isset_dict_value);
        ub.set(DICT_TYPE, this.getDict_type(), this.isset_dict_type);
        ub.set(CSS_CLASS, this.getCss_class(), this.isset_css_class);
        ub.set(LIST_CLASS, this.getList_class(), this.isset_list_class);
        ub.set(IS_DEFAULT, this.getIs_default(), this.isset_is_default);
        ub.set(STATUS, this.getStatus(), this.isset_status);
        ub.set(CREATE_BY, this.getCreate_by(), this.isset_create_by);
        ub.set(CREATE_TIME, this.getCreate_time(), this.isset_create_time);
        ub.set(REMARK, this.getRemark(), this.isset_remark);
        return ub.genMapSql(where, parameters);
    }
    /**
     * 获取更新语句和参数
     */
    @Override
    public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) {
        UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
        ub.set(PARENT_ID, this.getParent_id(), this.isset_parent_id);
        ub.set(DICT_SORT, this.getDict_sort(), this.isset_dict_sort);
        ub.set(DICT_LABEL, this.getDict_label(), this.isset_dict_label);
        ub.set(DICT_VALUE, this.getDict_value(), this.isset_dict_value);
        ub.set(DICT_TYPE, this.getDict_type(), this.isset_dict_type);
        ub.set(CSS_CLASS, this.getCss_class(), this.isset_css_class);
        ub.set(LIST_CLASS, this.getList_class(), this.isset_list_class);
        ub.set(IS_DEFAULT, this.getIs_default(), this.isset_is_default);
        ub.set(STATUS, this.getStatus(), this.isset_status);
        ub.set(CREATE_BY, this.getCreate_by(), this.isset_create_by);
        ub.set(CREATE_TIME, this.getCreate_time(), this.isset_create_time);
        ub.set(REMARK, this.getRemark(), this.isset_remark);
        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 dict_code, parent_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from " + this.getTableName_() + " " + where, parameters);
    }
    /**
     * 获取查询语句和参数
     */
    @Override
    public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) {
        return new SqlAndParameters<>("select dict_code, parent_id, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from " + this.getTableName_() + " " + where, parameters);
    }
    /**
     * 将resultset的一行转化为po
     */
    @Override
    public S_dict_data mapRow(ResultSet rs, int i) throws SQLException {
        return ROW_MAPPER.mapRow(rs, i);
    }
    /**
     * 克隆
     */
    public S_dict_data toS_dict_data() {
        return super.$clone();
    }
}
/**
 * s_dict_data RowMapper
 *
 * @author genrator
 */
class S_dict_dataRowMapper implements RowMapper<S_dict_data> {
    @Override
    public S_dict_data mapRow(ResultSet rs, int i) throws SQLException {
        ResultSetUtils resultSetUtils = new ResultSetUtils();
        S_dict_data s_dict_data = new S_dict_data();
        Integer columnIndex;
        //主键
        columnIndex = resultSetUtils.findColumn(rs, S_dict_data_mapper.DICT_CODE);
        if (columnIndex > 0) {
            s_dict_data.setDict_code(rs.getLong(columnIndex));
        }
        //普通属性
        columnIndex = resultSetUtils.findColumn(rs, S_dict_data_mapper.PARENT_ID);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                s_dict_data.setParent_id(null);
            } else {
                s_dict_data.setParent_id(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, S_dict_data_mapper.DICT_SORT);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                s_dict_data.setDict_sort(null);
            } else {
                s_dict_data.setDict_sort(rs.getInt(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, S_dict_data_mapper.DICT_LABEL);
        if (columnIndex > 0) {
            s_dict_data.setDict_label(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, S_dict_data_mapper.DICT_VALUE);
        if (columnIndex > 0) {
            s_dict_data.setDict_value(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, S_dict_data_mapper.DICT_TYPE);
        if (columnIndex > 0) {
            s_dict_data.setDict_type(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, S_dict_data_mapper.CSS_CLASS);
        if (columnIndex > 0) {
            s_dict_data.setCss_class(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, S_dict_data_mapper.LIST_CLASS);
        if (columnIndex > 0) {
            s_dict_data.setList_class(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, S_dict_data_mapper.IS_DEFAULT);
        if (columnIndex > 0) {
            s_dict_data.setIs_default(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, S_dict_data_mapper.STATUS);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                s_dict_data.setStatus(null);
            } else {
                s_dict_data.setStatus(rs.getInt(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, S_dict_data_mapper.CREATE_BY);
        if (columnIndex > 0) {
            s_dict_data.setCreate_by(rs.getString(columnIndex));
        }
        columnIndex = resultSetUtils.findColumn(rs, S_dict_data_mapper.CREATE_TIME);
        if (columnIndex > 0) {
            if (rs.getBigDecimal(columnIndex) == null) {
                s_dict_data.setCreate_time(null);
            } else {
                s_dict_data.setCreate_time(rs.getLong(columnIndex));
            }
        }
        columnIndex = resultSetUtils.findColumn(rs, S_dict_data_mapper.REMARK);
        if (columnIndex > 0) {
            s_dict_data.setRemark(rs.getString(columnIndex));
        }
        return s_dict_data;
    }
}
consum-model-pojo/src/main/java/com/consum/model/vo/LWhFormTransferVo.java
New file
@@ -0,0 +1,22 @@
package com.consum.model.vo;
import com.consum.model.po.LWhFormTransfer;
import com.consum.model.po.LWhProcureModel;
import java.util.List;
public class LWhFormTransferVo extends LWhFormTransfer {
    /**
     * 规格型号
     */
    private List<LWhProcureModel> models;
    public List<LWhProcureModel> getModels() {
        return models;
    }
    public void setModels(List<LWhProcureModel> models) {
        this.models = models;
    }
}