New file |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.pojo.request.UsingFormBackParam; |
| | | import com.consum.base.service.UsingFormBackService; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.walker.web.ResponseValue; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @author asus |
| | | * @version 1.0 |
| | | * @description: 部门物品退回单 |
| | | * @date 2023/12/1 11:36 |
| | | */ |
| | | @Api(value = "部门物品退回", tags = "部门物品退回") |
| | | @RestController |
| | | @RequestMapping("/pc/l/wh/using/form/back") |
| | | public class UsingFormBackController extends BaseController { |
| | | |
| | | @Autowired |
| | | private UsingFormBackService usingFormBackService; |
| | | |
| | | |
| | | @ApiOperation(value = "部门物品退回单新增接口", notes = "部门物品退回单新增接口") |
| | | @RequestMapping("/add") |
| | | public ResponseValue add(@RequestBody UsingFormBackParam usingFormBackParam) { |
| | | |
| | | FinSysTenantUser sysInfo = getSysInfo(); |
| | | String tenantId = sysInfo.getTenantId(); |
| | | String tenantName = sysInfo.getTenantName(); |
| | | usingFormBackService.add(usingFormBackParam, sysInfo); |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.consum.base.pojo.request; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author asus |
| | | * @version 1.0 |
| | | * @description: 使用人信息 |
| | | * @date 2023/12/1 13:27 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class UseInfo { |
| | | |
| | | @ApiModelProperty(value = "使用人姓名") |
| | | private String useName; |
| | | @ApiModelProperty(value = "分发数量") |
| | | private Integer num; |
| | | @ApiModelProperty(value = "可退数量") |
| | | private Integer backNum; |
| | | @ApiModelProperty(value = "退回数量") |
| | | private Integer returnNum; |
| | | |
| | | } |
New file |
| | |
| | | package com.consum.base.pojo.request; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import java.util.List; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author asus |
| | | * @version 1.0 |
| | | * @description: TODO |
| | | * @date 2023/12/1 13:16 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class UsingFormBackGoodsInfo { |
| | | |
| | | //分类编号 |
| | | private Long baseCategoryId; |
| | | //物品模版编号 |
| | | private Long baseGoodsTemplateId; |
| | | //物品模版名字 |
| | | private String goodsTemplateName; |
| | | //分发单id |
| | | private Long transBusinessId; |
| | | //分发单编号 |
| | | private String businessFormCode; |
| | | |
| | | private List<baseGoodModel> models; |
| | | |
| | | } |
New file |
| | |
| | | package com.consum.base.pojo.request; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import java.util.List; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | /** |
| | | * @author asus |
| | | * @version 1.0 |
| | | * @description: 物品退回 |
| | | * @date 2023/12/1 11:49 |
| | | */ |
| | | @NoArgsConstructor |
| | | @Data |
| | | @ApiModel |
| | | public class UsingFormBackParam { |
| | | |
| | | @ApiModelProperty(value = "物品退回部门id") |
| | | private Long departmentId; |
| | | |
| | | @ApiModelProperty(value = "物品退回部门名字") |
| | | private String departmentName; |
| | | |
| | | @ApiModelProperty(value = "退回人id") |
| | | private Long operatorId; |
| | | @ApiModelProperty(value = "退回人名字") |
| | | private String operatorName; |
| | | |
| | | @ApiModelProperty(value = "物品退回时间") |
| | | private Long dealTime; |
| | | |
| | | @ApiModelProperty(value = "手续") |
| | | private String procureDoc; |
| | | |
| | | @ApiModelProperty(value = "分发物品信息") |
| | | private List<UsingFormBackGoodsInfo> goods; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.consum.base.pojo.request; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import java.util.List; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author asus |
| | | * @version 1.0 |
| | | * @description: TODO |
| | | * @date 2023/12/1 13:21 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class baseGoodModel { |
| | | |
| | | @ApiModelProperty(value = "商品模型id") |
| | | private String baseGoodsModelsId; |
| | | @ApiModelProperty(value = "商品模型名称") |
| | | private String baseGoodsModelsName; |
| | | @ApiModelProperty(value = "单位") |
| | | private String unit; |
| | | @ApiModelProperty(value = "物品类型 A,B,C") |
| | | private String goodType; |
| | | |
| | | private Long goodsTemplatesId; |
| | | private String modelName; |
| | | |
| | | private Long modelUserId; |
| | | private Long nowUserPhone; |
| | | private String classification; |
| | | |
| | | private String nowUserName; |
| | | private Integer userUseCount; |
| | | private Integer goodsNum; |
| | | private Integer counts; |
| | | |
| | | |
| | | private List<UseInfo> useInfo; |
| | | } |
New file |
| | |
| | | package com.consum.base.service; |
| | | |
| | | import com.consum.base.pojo.BaseCategoryParam; |
| | | import com.consum.base.pojo.ProjectTreeResult; |
| | | import com.consum.model.po.BaseCategory; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.jdbc.service.BaseService; |
| | | import java.util.List; |
| | | |
| | | public interface BaseCategoryService extends BaseService { |
| | | |
| | | int add(BaseCategoryParam param, S_user_core currentUser); |
| | | |
| | | BaseCategory getByCategoryNameAndFatherCategoryId(String categoryName, Long fatherCategoryId); |
| | | |
| | | GenericPager<BaseCategory> queryBaseCategoryList(BaseCategoryParam param); |
| | | |
| | | int updateBaseCategory(BaseCategory baseCategory); |
| | | |
| | | int updateStatus(BaseCategory baseCategory); |
| | | |
| | | public int updateById(BaseCategory baseCategory, S_user_core currentUser); |
| | | |
| | | public BaseCategory getById(Long id); |
| | | |
| | | List<ProjectTreeResult> tree(); |
| | | |
| | | List<BaseCategory> queryForLv3Tree(); |
| | | } |
New file |
| | |
| | | package com.consum.base.service; |
| | | |
| | | import com.walker.jdbc.service.BaseService; |
| | | |
| | | /** |
| | | * @author asus |
| | | * @version 1.0 |
| | | * @description: 回收单物品 |
| | | * @date 2023/12/1 11:26 |
| | | */ |
| | | public interface UsingFormBackGoodsService extends BaseService { |
| | | |
| | | } |
New file |
| | |
| | | package com.consum.base.service; |
| | | |
| | | import com.walker.jdbc.service.BaseService; |
| | | |
| | | /** |
| | | * @author asus |
| | | * @version 1.0 |
| | | * @description: 回收单物品 |
| | | * @date 2023/12/1 11:26 |
| | | */ |
| | | public interface UsingFormBackModelService extends BaseService { |
| | | |
| | | } |
New file |
| | |
| | | package com.consum.base.service; |
| | | |
| | | import com.consum.base.pojo.request.UsingFormBackParam; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.walker.jdbc.service.BaseService; |
| | | |
| | | /** |
| | | * @author asus |
| | | * @version 1.0 |
| | | * @description: 物品回收单 |
| | | * @date 2023/12/1 11:26 |
| | | */ |
| | | public interface UsingFormBackService extends BaseService { |
| | | |
| | | void add(UsingFormBackParam usingFormBackParam, FinSysTenantUser sysInfo); |
| | | } |
New file |
| | |
| | | package com.consum.base.service.impl; |
| | | |
| | | import com.consum.base.service.UsingFormBackGoodsService; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author asus |
| | | * @version 1.0 |
| | | * @description: 物品回收单 |
| | | * @date 2023/12/1 11:27 |
| | | */ |
| | | @Service |
| | | public class UsingFormBackGoodsServiceImpl extends BaseServiceImpl implements UsingFormBackGoodsService { |
| | | |
| | | } |
New file |
| | |
| | | package com.consum.base.service.impl; |
| | | |
| | | import com.consum.base.service.UsingFormBackModelService; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author asus |
| | | * @version 1.0 |
| | | * @description: 物品回收单 |
| | | * @date 2023/12/1 11:27 |
| | | */ |
| | | @Service |
| | | public class UsingFormBackModelServiceImpl extends BaseServiceImpl implements UsingFormBackModelService { |
| | | |
| | | } |
New file |
| | |
| | | package com.consum.base.service.impl; |
| | | |
| | | import com.consum.base.core.CodeGeneratorEnum; |
| | | import com.consum.base.core.CodeGeneratorService; |
| | | import com.consum.base.core.utils.IdUtil; |
| | | import com.consum.base.pojo.request.UsingFormBackGoodsInfo; |
| | | import com.consum.base.pojo.request.UsingFormBackParam; |
| | | import com.consum.base.pojo.request.baseGoodModel; |
| | | import com.consum.base.service.BaseCategoryServiceImpl; |
| | | import com.consum.base.service.UsingFormBackService; |
| | | import com.consum.model.po.BaseCategory; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.UsingFormBack; |
| | | import com.consum.model.po.UsingFormBackGoods; |
| | | import com.walker.infrastructure.utils.DateUtils; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | /** |
| | | * @author asus |
| | | * @version 1.0 |
| | | * @description: 物品回收单 |
| | | * @date 2023/12/1 11:27 |
| | | */ |
| | | @Service |
| | | public class UsingFormBackServiceImpl extends BaseServiceImpl implements UsingFormBackService { |
| | | |
| | | @Autowired |
| | | private CodeGeneratorService codeGeneratorService; |
| | | @Autowired |
| | | private BaseCategoryServiceImpl baseCategoryService; |
| | | |
| | | @Override |
| | | public void add(UsingFormBackParam usingFormBackParam, FinSysTenantUser sysInfo) { |
| | | |
| | | Long departmentId = usingFormBackParam.getDepartmentId(); |
| | | String departmentName = usingFormBackParam.getDepartmentName(); |
| | | Long operatorId = usingFormBackParam.getOperatorId(); |
| | | String operatorName = usingFormBackParam.getOperatorName(); |
| | | Long backTime = usingFormBackParam.getDealTime(); |
| | | String procureDoc = usingFormBackParam.getProcureDoc(); |
| | | List<UsingFormBackGoodsInfo> usingFormBackGoodsInfo = usingFormBackParam.getGoods(); |
| | | |
| | | Long usingFormBackId = addUsingFormBack(sysInfo, departmentId, departmentName, operatorId, operatorName, backTime, procureDoc); |
| | | for (UsingFormBackGoodsInfo backingGoodsInfo : usingFormBackGoodsInfo) { |
| | | Long baseCategoryId = backingGoodsInfo.getBaseCategoryId(); |
| | | Long baseGoodsTemplateId = backingGoodsInfo.getBaseGoodsTemplateId(); |
| | | String goodsTemplateName = backingGoodsInfo.getGoodsTemplateName(); |
| | | Long transBusinessId = backingGoodsInfo.getTransBusinessId(); |
| | | String businessFormCode = backingGoodsInfo.getBusinessFormCode(); |
| | | |
| | | Map<String, List<baseGoodModel>> collect = backingGoodsInfo.getModels().stream() |
| | | .collect(Collectors.groupingBy(baseGoodModel::getBaseGoodsModelsId)); |
| | | |
| | | UsingFormBackGoods usingFormBackGoods = new UsingFormBackGoods(); |
| | | usingFormBackGoods.setId(IdUtil.generateId()); |
| | | usingFormBackGoods.setUsingFormBackId(usingFormBackId); |
| | | usingFormBackGoods.setBaseGoodsTemplateId(baseGoodsTemplateId); |
| | | usingFormBackGoods.setBaseGoodsTemplateName(goodsTemplateName); |
| | | |
| | | BaseCategory baseCategory = baseCategoryService.getById(baseCategoryId); |
| | | String categoryName = baseCategory.getCategoryName(); |
| | | String classification = baseCategory.getClassification(); |
| | | usingFormBackGoods.setCategoryName(categoryName); |
| | | usingFormBackGoods.setClassification(classification); |
| | | usingFormBackGoods.setTransBusinessId(transBusinessId); |
| | | usingFormBackGoods.setBusinessFormCode(businessFormCode); |
| | | |
| | | // usingFormBackGoods.setTransOutWarehouseType(); |
| | | // usingFormBackGoods.setTransOutWarehouseId(); |
| | | |
| | | } |
| | | } |
| | | |
| | | @Transactional |
| | | public Long addUsingFormBack(FinSysTenantUser sysInfo, Long departmentId, String departmentName, Long operatorId, String operatorName, Long backTime, |
| | | String procureDoc) { |
| | | UsingFormBack usingFormBack = new UsingFormBack(); |
| | | usingFormBack.setId(IdUtil.generateId()); |
| | | usingFormBack.setBusinessFormCode(codeGeneratorService.createBusinessFormCode(CodeGeneratorEnum.GOBACK)); |
| | | // usingFormBack.setOutWarehouseType(); |
| | | // usingFormBack.setOutWarehouseId(); |
| | | // usingFormBack.setOutWarehouseName(); |
| | | |
| | | String tenantId = sysInfo.getTenantId(); |
| | | String tenantName = sysInfo.getTenantName(); |
| | | usingFormBack.setAgencyId(Long.valueOf(tenantId)); |
| | | usingFormBack.setAgencyName(tenantName); |
| | | usingFormBack.setCreateTime(DateUtils.getDateTimeNumber(System.currentTimeMillis())); |
| | | usingFormBack.setStates(1); |
| | | |
| | | usingFormBack.setDepartmentId(departmentId); |
| | | usingFormBack.setDepartmentName(departmentName); |
| | | usingFormBack.setOperatorId(operatorId); |
| | | usingFormBack.setOperatorName(operatorName); |
| | | usingFormBack.setDealTime(backTime); |
| | | usingFormBack.setProcureDoc(procureDoc); |
| | | this.insert(usingFormBack); |
| | | return usingFormBack.getId(); |
| | | } |
| | | } |
New file |
| | |
| | | |
| | | package com.consum.model.po; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonAutoDetect; |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import com.walker.jdbc.BasePo; |
| | | |
| | | /** |
| | | * 表名:USING_FORM_BACK |
| | | * |
| | | * @author genrator |
| | | */ |
| | | @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY) |
| | | public class UsingFormBack extends BasePo<UsingFormBack> { |
| | | |
| | | // 序列化版本号 |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | // 主键 |
| | | private Long id = null; |
| | | @JsonIgnore |
| | | protected boolean isset_id = false; |
| | | |
| | | // 属性列表 |
| | | private String businessFormCode = null; |
| | | @JsonIgnore |
| | | protected boolean isset_businessFormCode = false; |
| | | |
| | | private String procureDoc = null; |
| | | @JsonIgnore |
| | | protected boolean isset_procureDoc = false; |
| | | |
| | | private Integer outWarehouseType = null; |
| | | @JsonIgnore |
| | | protected boolean isset_outWarehouseType = false; |
| | | |
| | | private Long outWarehouseId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_outWarehouseId = false; |
| | | |
| | | private String outWarehouseName = null; |
| | | @JsonIgnore |
| | | protected boolean isset_outWarehouseName = false; |
| | | |
| | | private Long operatorId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_operatorId = false; |
| | | |
| | | private String operatorName = null; |
| | | @JsonIgnore |
| | | protected boolean isset_operatorName = false; |
| | | |
| | | private Long dealTime = null; |
| | | @JsonIgnore |
| | | protected boolean isset_dealTime = false; |
| | | |
| | | private Long agencyId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_agencyId = false; |
| | | |
| | | private String agencyName = null; |
| | | @JsonIgnore |
| | | protected boolean isset_agencyName = false; |
| | | |
| | | private Long departmentId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_departmentId = false; |
| | | |
| | | private String departmentName = null; |
| | | @JsonIgnore |
| | | protected boolean isset_departmentName = false; |
| | | |
| | | private Long createTime = null; |
| | | @JsonIgnore |
| | | protected boolean isset_createTime = false; |
| | | |
| | | private Integer states = null; |
| | | @JsonIgnore |
| | | protected boolean isset_states = false; |
| | | |
| | | private String beiz = null; |
| | | @JsonIgnore |
| | | protected boolean isset_beiz = false; |
| | | |
| | | /** |
| | | * 默认构造函数 |
| | | */ |
| | | public UsingFormBack() { |
| | | } |
| | | |
| | | /** |
| | | * 根据主键构造对象 |
| | | */ |
| | | public UsingFormBack(Long id) { |
| | | this.setId(id); |
| | | } |
| | | |
| | | /** |
| | | * 设置主键值 |
| | | */ |
| | | @Override |
| | | public void setPkValue(Object value) { |
| | | this.setId((Long) value); |
| | | } |
| | | |
| | | public Long getId() { |
| | | return this.id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | this.isset_id = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyId() { |
| | | return this.id == null; |
| | | } |
| | | |
| | | public String getBusinessFormCode() { |
| | | return this.businessFormCode; |
| | | } |
| | | |
| | | public void setBusinessFormCode(String businessFormCode) { |
| | | this.businessFormCode = businessFormCode; |
| | | this.isset_businessFormCode = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyBusinessFormCode() { |
| | | return this.businessFormCode == null || this.businessFormCode.length() == 0; |
| | | } |
| | | |
| | | public String getProcureDoc() { |
| | | return this.procureDoc; |
| | | } |
| | | |
| | | public void setProcureDoc(String procureDoc) { |
| | | this.procureDoc = procureDoc; |
| | | this.isset_procureDoc = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyProcureDoc() { |
| | | return this.procureDoc == null || this.procureDoc.length() == 0; |
| | | } |
| | | |
| | | public Integer getOutWarehouseType() { |
| | | return this.outWarehouseType; |
| | | } |
| | | |
| | | public void setOutWarehouseType(Integer outWarehouseType) { |
| | | this.outWarehouseType = outWarehouseType; |
| | | this.isset_outWarehouseType = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyOutWarehouseType() { |
| | | return this.outWarehouseType == null; |
| | | } |
| | | |
| | | public Long getOutWarehouseId() { |
| | | return this.outWarehouseId; |
| | | } |
| | | |
| | | public void setOutWarehouseId(Long outWarehouseId) { |
| | | this.outWarehouseId = outWarehouseId; |
| | | this.isset_outWarehouseId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyOutWarehouseId() { |
| | | return this.outWarehouseId == null; |
| | | } |
| | | |
| | | public String getOutWarehouseName() { |
| | | return this.outWarehouseName; |
| | | } |
| | | |
| | | public void setOutWarehouseName(String outWarehouseName) { |
| | | this.outWarehouseName = outWarehouseName; |
| | | this.isset_outWarehouseName = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyOutWarehouseName() { |
| | | return this.outWarehouseName == null || this.outWarehouseName.length() == 0; |
| | | } |
| | | |
| | | public Long getOperatorId() { |
| | | return this.operatorId; |
| | | } |
| | | |
| | | public void setOperatorId(Long operatorId) { |
| | | this.operatorId = operatorId; |
| | | this.isset_operatorId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyOperatorId() { |
| | | return this.operatorId == null; |
| | | } |
| | | |
| | | public String getOperatorName() { |
| | | return this.operatorName; |
| | | } |
| | | |
| | | public void setOperatorName(String operatorName) { |
| | | this.operatorName = operatorName; |
| | | this.isset_operatorName = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyOperatorName() { |
| | | return this.operatorName == null || this.operatorName.length() == 0; |
| | | } |
| | | |
| | | public Long getDealTime() { |
| | | return this.dealTime; |
| | | } |
| | | |
| | | public void setDealTime(Long dealTime) { |
| | | this.dealTime = dealTime; |
| | | this.isset_dealTime = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyDealTime() { |
| | | return this.dealTime == null; |
| | | } |
| | | |
| | | public Long getAgencyId() { |
| | | return this.agencyId; |
| | | } |
| | | |
| | | public void setAgencyId(Long agencyId) { |
| | | this.agencyId = agencyId; |
| | | this.isset_agencyId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyAgencyId() { |
| | | return this.agencyId == null; |
| | | } |
| | | |
| | | public String getAgencyName() { |
| | | return this.agencyName; |
| | | } |
| | | |
| | | public void setAgencyName(String agencyName) { |
| | | this.agencyName = agencyName; |
| | | this.isset_agencyName = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyAgencyName() { |
| | | return this.agencyName == null || this.agencyName.length() == 0; |
| | | } |
| | | |
| | | public Long getDepartmentId() { |
| | | return this.departmentId; |
| | | } |
| | | |
| | | public void setDepartmentId(Long departmentId) { |
| | | this.departmentId = departmentId; |
| | | this.isset_departmentId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyDepartmentId() { |
| | | return this.departmentId == null; |
| | | } |
| | | |
| | | public String getDepartmentName() { |
| | | return this.departmentName; |
| | | } |
| | | |
| | | public void setDepartmentName(String departmentName) { |
| | | this.departmentName = departmentName; |
| | | this.isset_departmentName = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyDepartmentName() { |
| | | return this.departmentName == null || this.departmentName.length() == 0; |
| | | } |
| | | |
| | | public Long getCreateTime() { |
| | | return this.createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Long createTime) { |
| | | this.createTime = createTime; |
| | | this.isset_createTime = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyCreateTime() { |
| | | return this.createTime == null; |
| | | } |
| | | |
| | | public Integer getStates() { |
| | | return this.states; |
| | | } |
| | | |
| | | public void setStates(Integer states) { |
| | | this.states = states; |
| | | this.isset_states = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyStates() { |
| | | return this.states == null; |
| | | } |
| | | |
| | | public String getBeiz() { |
| | | return this.beiz; |
| | | } |
| | | |
| | | public void setBeiz(String beiz) { |
| | | this.beiz = beiz; |
| | | this.isset_beiz = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyBeiz() { |
| | | return this.beiz == null || this.beiz.length() == 0; |
| | | } |
| | | |
| | | /** |
| | | * 重写 toString() 方法 |
| | | */ |
| | | @Override |
| | | public String toString() { |
| | | return new StringBuilder() |
| | | .append("id=").append(this.id) |
| | | .append("businessFormCode=").append(this.businessFormCode) |
| | | .append("procureDoc=").append(this.procureDoc) |
| | | .append("outWarehouseType=").append(this.outWarehouseType) |
| | | .append("outWarehouseId=").append(this.outWarehouseId) |
| | | .append("outWarehouseName=").append(this.outWarehouseName) |
| | | .append("operatorId=").append(this.operatorId) |
| | | .append("operatorName=").append(this.operatorName) |
| | | .append("dealTime=").append(this.dealTime) |
| | | .append("agencyId=").append(this.agencyId) |
| | | .append("agencyName=").append(this.agencyName) |
| | | .append("departmentId=").append(this.departmentId) |
| | | .append("departmentName=").append(this.departmentName) |
| | | .append("createTime=").append(this.createTime) |
| | | .append("states=").append(this.states) |
| | | .append("beiz=").append(this.beiz) |
| | | .toString(); |
| | | } |
| | | |
| | | /** |
| | | * 克隆 |
| | | */ |
| | | public UsingFormBack $clone() { |
| | | UsingFormBack using_form_back = new UsingFormBack(); |
| | | |
| | | // 数据库名称 |
| | | //using_form_back.setDatabaseName_(this.getDatabaseName_()); |
| | | |
| | | // 主键 |
| | | if (this.isset_id) { |
| | | using_form_back.setId(this.getId()); |
| | | } |
| | | // 普通属性 |
| | | if (this.isset_businessFormCode) { |
| | | using_form_back.setBusinessFormCode(this.getBusinessFormCode()); |
| | | } |
| | | if (this.isset_procureDoc) { |
| | | using_form_back.setProcureDoc(this.getProcureDoc()); |
| | | } |
| | | if (this.isset_outWarehouseType) { |
| | | using_form_back.setOutWarehouseType(this.getOutWarehouseType()); |
| | | } |
| | | if (this.isset_outWarehouseId) { |
| | | using_form_back.setOutWarehouseId(this.getOutWarehouseId()); |
| | | } |
| | | if (this.isset_outWarehouseName) { |
| | | using_form_back.setOutWarehouseName(this.getOutWarehouseName()); |
| | | } |
| | | if (this.isset_operatorId) { |
| | | using_form_back.setOperatorId(this.getOperatorId()); |
| | | } |
| | | if (this.isset_operatorName) { |
| | | using_form_back.setOperatorName(this.getOperatorName()); |
| | | } |
| | | if (this.isset_dealTime) { |
| | | using_form_back.setDealTime(this.getDealTime()); |
| | | } |
| | | if (this.isset_agencyId) { |
| | | using_form_back.setAgencyId(this.getAgencyId()); |
| | | } |
| | | if (this.isset_agencyName) { |
| | | using_form_back.setAgencyName(this.getAgencyName()); |
| | | } |
| | | if (this.isset_departmentId) { |
| | | using_form_back.setDepartmentId(this.getDepartmentId()); |
| | | } |
| | | if (this.isset_departmentName) { |
| | | using_form_back.setDepartmentName(this.getDepartmentName()); |
| | | } |
| | | if (this.isset_createTime) { |
| | | using_form_back.setCreateTime(this.getCreateTime()); |
| | | } |
| | | if (this.isset_states) { |
| | | using_form_back.setStates(this.getStates()); |
| | | } |
| | | if (this.isset_beiz) { |
| | | using_form_back.setBeiz(this.getBeiz()); |
| | | } |
| | | return using_form_back; |
| | | } |
| | | } |
New file |
| | |
| | | |
| | | package com.consum.model.po; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonAutoDetect; |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import com.walker.jdbc.BasePo; |
| | | |
| | | /** |
| | | * 表名:USING_FORM_BACK_GOODS |
| | | * |
| | | * @author genrator |
| | | */ |
| | | @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY) |
| | | public class UsingFormBackGoods extends BasePo<UsingFormBackGoods> { |
| | | |
| | | // 序列化版本号 |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | // 主键 |
| | | private Long id = null; |
| | | @JsonIgnore |
| | | protected boolean isset_id = false; |
| | | |
| | | // 属性列表 |
| | | private Long usingFormBackId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_usingFormBackId = false; |
| | | |
| | | private Long baseGoodsTemplateId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_baseGoodsTemplateId = false; |
| | | |
| | | private String baseGoodsTemplateName = null; |
| | | @JsonIgnore |
| | | protected boolean isset_baseGoodsTemplateName = false; |
| | | |
| | | private String categoryName = null; |
| | | @JsonIgnore |
| | | protected boolean isset_categoryName = false; |
| | | |
| | | private String classification = null; |
| | | @JsonIgnore |
| | | protected boolean isset_classification = false; |
| | | |
| | | private Long transBusinessId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_transBusinessId = false; |
| | | |
| | | private String businessFormCode = null; |
| | | @JsonIgnore |
| | | protected boolean isset_businessFormCode = false; |
| | | |
| | | private Integer transOutWarehouseType = null; |
| | | @JsonIgnore |
| | | protected boolean isset_transOutWarehouseType = false; |
| | | |
| | | private Long transOutWarehouseId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_transOutWarehouseId = false; |
| | | |
| | | /** |
| | | * 默认构造函数 |
| | | */ |
| | | public UsingFormBackGoods() { |
| | | } |
| | | |
| | | /** |
| | | * 根据主键构造对象 |
| | | */ |
| | | public UsingFormBackGoods(Long id) { |
| | | this.setId(id); |
| | | } |
| | | |
| | | /** |
| | | * 设置主键值 |
| | | */ |
| | | @Override |
| | | public void setPkValue(Object value) { |
| | | this.setId((Long) value); |
| | | } |
| | | |
| | | public Long getId() { |
| | | return this.id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | this.isset_id = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyId() { |
| | | return this.id == null; |
| | | } |
| | | |
| | | public Long getUsingFormBackId() { |
| | | return this.usingFormBackId; |
| | | } |
| | | |
| | | public void setUsingFormBackId(Long usingFormBackId) { |
| | | this.usingFormBackId = usingFormBackId; |
| | | this.isset_usingFormBackId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyUsingFormBackId() { |
| | | return this.usingFormBackId == null; |
| | | } |
| | | |
| | | public Long getBaseGoodsTemplateId() { |
| | | return this.baseGoodsTemplateId; |
| | | } |
| | | |
| | | public void setBaseGoodsTemplateId(Long baseGoodsTemplateId) { |
| | | this.baseGoodsTemplateId = baseGoodsTemplateId; |
| | | this.isset_baseGoodsTemplateId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyBaseGoodsTemplateId() { |
| | | return this.baseGoodsTemplateId == null; |
| | | } |
| | | |
| | | public String getBaseGoodsTemplateName() { |
| | | return this.baseGoodsTemplateName; |
| | | } |
| | | |
| | | public void setBaseGoodsTemplateName(String baseGoodsTemplateName) { |
| | | this.baseGoodsTemplateName = baseGoodsTemplateName; |
| | | this.isset_baseGoodsTemplateName = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyBaseGoodsTemplateName() { |
| | | return this.baseGoodsTemplateName == null || this.baseGoodsTemplateName.length() == 0; |
| | | } |
| | | |
| | | 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 String getClassification() { |
| | | return this.classification; |
| | | } |
| | | |
| | | public void setClassification(String classification) { |
| | | this.classification = classification; |
| | | this.isset_classification = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyClassification() { |
| | | return this.classification == null || this.classification.length() == 0; |
| | | } |
| | | |
| | | public Long getTransBusinessId() { |
| | | return this.transBusinessId; |
| | | } |
| | | |
| | | public void setTransBusinessId(Long transBusinessId) { |
| | | this.transBusinessId = transBusinessId; |
| | | this.isset_transBusinessId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyTransBusinessId() { |
| | | return this.transBusinessId == null; |
| | | } |
| | | |
| | | public String getBusinessFormCode() { |
| | | return this.businessFormCode; |
| | | } |
| | | |
| | | public void setBusinessFormCode(String businessFormCode) { |
| | | this.businessFormCode = businessFormCode; |
| | | this.isset_businessFormCode = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyBusinessFormCode() { |
| | | return this.businessFormCode == null || this.businessFormCode.length() == 0; |
| | | } |
| | | |
| | | public Integer getTransOutWarehouseType() { |
| | | return this.transOutWarehouseType; |
| | | } |
| | | |
| | | public void setTransOutWarehouseType(Integer transOutWarehouseType) { |
| | | this.transOutWarehouseType = transOutWarehouseType; |
| | | this.isset_transOutWarehouseType = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyTransOutWarehouseType() { |
| | | return this.transOutWarehouseType == null; |
| | | } |
| | | |
| | | public Long getTransOutWarehouseId() { |
| | | return this.transOutWarehouseId; |
| | | } |
| | | |
| | | public void setTransOutWarehouseId(Long transOutWarehouseId) { |
| | | this.transOutWarehouseId = transOutWarehouseId; |
| | | this.isset_transOutWarehouseId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyTransOutWarehouseId() { |
| | | return this.transOutWarehouseId == null; |
| | | } |
| | | |
| | | /** |
| | | * 重写 toString() 方法 |
| | | */ |
| | | @Override |
| | | public String toString() { |
| | | return new StringBuilder() |
| | | .append("id=").append(this.id) |
| | | .append("usingFormBackId=").append(this.usingFormBackId) |
| | | .append("baseGoodsTemplateId=").append(this.baseGoodsTemplateId) |
| | | .append("baseGoodsTemplateName=").append(this.baseGoodsTemplateName) |
| | | .append("categoryName=").append(this.categoryName) |
| | | .append("classification=").append(this.classification) |
| | | .append("transBusinessId=").append(this.transBusinessId) |
| | | .append("businessFormCode=").append(this.businessFormCode) |
| | | .append("transOutWarehouseType=").append(this.transOutWarehouseType) |
| | | .append("transOutWarehouseId=").append(this.transOutWarehouseId) |
| | | .toString(); |
| | | } |
| | | |
| | | /** |
| | | * 克隆 |
| | | */ |
| | | public UsingFormBackGoods $clone() { |
| | | UsingFormBackGoods using_form_back_goods = new UsingFormBackGoods(); |
| | | |
| | | // 数据库名称 |
| | | //using_form_back_goods.setDatabaseName_(this.getDatabaseName_()); |
| | | |
| | | // 主键 |
| | | if (this.isset_id) { |
| | | using_form_back_goods.setId(this.getId()); |
| | | } |
| | | // 普通属性 |
| | | if (this.isset_usingFormBackId) { |
| | | using_form_back_goods.setUsingFormBackId(this.getUsingFormBackId()); |
| | | } |
| | | if (this.isset_baseGoodsTemplateId) { |
| | | using_form_back_goods.setBaseGoodsTemplateId(this.getBaseGoodsTemplateId()); |
| | | } |
| | | if (this.isset_baseGoodsTemplateName) { |
| | | using_form_back_goods.setBaseGoodsTemplateName(this.getBaseGoodsTemplateName()); |
| | | } |
| | | if (this.isset_categoryName) { |
| | | using_form_back_goods.setCategoryName(this.getCategoryName()); |
| | | } |
| | | if (this.isset_classification) { |
| | | using_form_back_goods.setClassification(this.getClassification()); |
| | | } |
| | | if (this.isset_transBusinessId) { |
| | | using_form_back_goods.setTransBusinessId(this.getTransBusinessId()); |
| | | } |
| | | if (this.isset_businessFormCode) { |
| | | using_form_back_goods.setBusinessFormCode(this.getBusinessFormCode()); |
| | | } |
| | | if (this.isset_transOutWarehouseType) { |
| | | using_form_back_goods.setTransOutWarehouseType(this.getTransOutWarehouseType()); |
| | | } |
| | | if (this.isset_transOutWarehouseId) { |
| | | using_form_back_goods.setTransOutWarehouseId(this.getTransOutWarehouseId()); |
| | | } |
| | | return using_form_back_goods; |
| | | } |
| | | } |
New file |
| | |
| | | package com.consum.model.po; |
| | | |
| | | import com.walker.jdbc.BaseMapper; |
| | | import com.walker.jdbc.ResultSetUtils; |
| | | import com.walker.jdbc.SqlAndParameters; |
| | | import com.walker.jdbc.sqlgen.DeleteBuilder; |
| | | import com.walker.jdbc.sqlgen.InsertBuilder; |
| | | import com.walker.jdbc.sqlgen.SelectBuilder; |
| | | import com.walker.jdbc.sqlgen.UpdateBuilder; |
| | | import java.sql.ResultSet; |
| | | import java.sql.SQLException; |
| | | import java.util.Map; |
| | | import org.springframework.jdbc.core.RowMapper; |
| | | |
| | | /** |
| | | * 表名:USING_FORM_BACK_GOODS |
| | | * |
| | | * @author genrator |
| | | */ |
| | | public class UsingFormBackGoods_mapper extends UsingFormBackGoods implements BaseMapper<UsingFormBackGoods> { |
| | | |
| | | // 序列化版本号 |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | public static final RowMapper<UsingFormBackGoods> ROW_MAPPER = new UsingFormBackGoodsRowMapper(); |
| | | |
| | | // 主键 |
| | | public static final String Id = "id"; |
| | | // 普通属性 |
| | | public static final String UsingFormBackId = "using_form_back_id"; |
| | | public static final String BaseGoodsTemplateId = "base_goods_template_id"; |
| | | public static final String BaseGoodsTemplateName = "base_goods_template_name"; |
| | | public static final String CategoryName = "category_name"; |
| | | public static final String Classification = "classification"; |
| | | public static final String TransBusinessId = "trans_business_id"; |
| | | public static final String BusinessFormCode = "business_form_code"; |
| | | public static final String TransOutWarehouseType = "trans_out_warehouse_type"; |
| | | public static final String TransOutWarehouseId = "trans_out_warehouse_id"; |
| | | |
| | | /** |
| | | * 默认构造函数 |
| | | */ |
| | | public UsingFormBackGoods_mapper(UsingFormBackGoods usingFormBackGoods) { |
| | | if (usingFormBackGoods == null) { |
| | | throw new IllegalArgumentException("po参数不允许为空!"); |
| | | } |
| | | //主键 |
| | | if (usingFormBackGoods.isset_id) { |
| | | this.setId(usingFormBackGoods.getId()); |
| | | } |
| | | //普通属性 |
| | | if (usingFormBackGoods.isset_usingFormBackId) { |
| | | this.setUsingFormBackId(usingFormBackGoods.getUsingFormBackId()); |
| | | } |
| | | if (usingFormBackGoods.isset_baseGoodsTemplateId) { |
| | | this.setBaseGoodsTemplateId(usingFormBackGoods.getBaseGoodsTemplateId()); |
| | | } |
| | | if (usingFormBackGoods.isset_baseGoodsTemplateName) { |
| | | this.setBaseGoodsTemplateName(usingFormBackGoods.getBaseGoodsTemplateName()); |
| | | } |
| | | if (usingFormBackGoods.isset_categoryName) { |
| | | this.setCategoryName(usingFormBackGoods.getCategoryName()); |
| | | } |
| | | if (usingFormBackGoods.isset_classification) { |
| | | this.setClassification(usingFormBackGoods.getClassification()); |
| | | } |
| | | if (usingFormBackGoods.isset_transBusinessId) { |
| | | this.setTransBusinessId(usingFormBackGoods.getTransBusinessId()); |
| | | } |
| | | if (usingFormBackGoods.isset_businessFormCode) { |
| | | this.setBusinessFormCode(usingFormBackGoods.getBusinessFormCode()); |
| | | } |
| | | if (usingFormBackGoods.isset_transOutWarehouseType) { |
| | | this.setTransOutWarehouseType(usingFormBackGoods.getTransOutWarehouseType()); |
| | | } |
| | | if (usingFormBackGoods.isset_transOutWarehouseId) { |
| | | this.setTransOutWarehouseId(usingFormBackGoods.getTransOutWarehouseId()); |
| | | } |
| | | // 去掉,2022-09-07 |
| | | // this.setDatabaseName_(using_form_back_goods.getDatabaseName_()); |
| | | } |
| | | |
| | | /** |
| | | * 获取表名 |
| | | */ |
| | | @Override |
| | | public String getTableName_() { |
| | | String tableName = "using_form_back_goods"; |
| | | /** |
| | | if (StringUtils.isNotEmpty(this.getDatabaseName_())) { |
| | | return this.getDatabaseName_() + "." + tableName; |
| | | } else { |
| | | return tableName; |
| | | } |
| | | */ |
| | | return tableName; |
| | | } |
| | | |
| | | /** |
| | | * 获取主键名称 |
| | | */ |
| | | @Override |
| | | public String getPkName_() { |
| | | return Id; |
| | | } |
| | | |
| | | /** |
| | | * 获取主键值 |
| | | */ |
| | | @Override |
| | | public Object getPkValue_() { |
| | | return this.getId(); |
| | | } |
| | | |
| | | /** |
| | | * 获取插入语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getInsertSql_() { |
| | | InsertBuilder ib = new InsertBuilder(this.getTableName_()); |
| | | ib.set(Id, this.getId()); |
| | | ib.set(UsingFormBackId, this.getUsingFormBackId(), this.isset_usingFormBackId); |
| | | ib.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); |
| | | ib.set(BaseGoodsTemplateName, this.getBaseGoodsTemplateName(), this.isset_baseGoodsTemplateName); |
| | | ib.set(CategoryName, this.getCategoryName(), this.isset_categoryName); |
| | | ib.set(Classification, this.getClassification(), this.isset_classification); |
| | | ib.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); |
| | | ib.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); |
| | | ib.set(TransOutWarehouseType, this.getTransOutWarehouseType(), this.isset_transOutWarehouseType); |
| | | ib.set(TransOutWarehouseId, this.getTransOutWarehouseId(), this.isset_transOutWarehouseId); |
| | | return ib.genMapSql(); |
| | | } |
| | | |
| | | /** |
| | | * 获取更新语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_() { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(UsingFormBackId, this.getUsingFormBackId(), this.isset_usingFormBackId); |
| | | ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); |
| | | ub.set(BaseGoodsTemplateName, this.getBaseGoodsTemplateName(), this.isset_baseGoodsTemplateName); |
| | | ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName); |
| | | ub.set(Classification, this.getClassification(), this.isset_classification); |
| | | ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); |
| | | ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); |
| | | ub.set(TransOutWarehouseType, this.getTransOutWarehouseType(), this.isset_transOutWarehouseType); |
| | | ub.set(TransOutWarehouseId, this.getTransOutWarehouseId(), this.isset_transOutWarehouseId); |
| | | 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(UsingFormBackId, this.getUsingFormBackId(), this.isset_usingFormBackId); |
| | | ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); |
| | | ub.set(BaseGoodsTemplateName, this.getBaseGoodsTemplateName(), this.isset_baseGoodsTemplateName); |
| | | ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName); |
| | | ub.set(Classification, this.getClassification(), this.isset_classification); |
| | | ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); |
| | | ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); |
| | | ub.set(TransOutWarehouseType, this.getTransOutWarehouseType(), this.isset_transOutWarehouseType); |
| | | ub.set(TransOutWarehouseId, this.getTransOutWarehouseId(), this.isset_transOutWarehouseId); |
| | | return ub.genMapSql(where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 获取更新语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(UsingFormBackId, this.getUsingFormBackId(), this.isset_usingFormBackId); |
| | | ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); |
| | | ub.set(BaseGoodsTemplateName, this.getBaseGoodsTemplateName(), this.isset_baseGoodsTemplateName); |
| | | ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName); |
| | | ub.set(Classification, this.getClassification(), this.isset_classification); |
| | | ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); |
| | | ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); |
| | | ub.set(TransOutWarehouseType, this.getTransOutWarehouseType(), this.isset_transOutWarehouseType); |
| | | ub.set(TransOutWarehouseId, this.getTransOutWarehouseId(), this.isset_transOutWarehouseId); |
| | | 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, using_form_back_id, base_goods_template_id, base_goods_template_name, category_name, classification, trans_business_id, business_form_code, trans_out_warehouse_type, trans_out_warehouse_id from " |
| | | + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 获取查询语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { |
| | | return new SqlAndParameters<>( |
| | | "select id, using_form_back_id, base_goods_template_id, base_goods_template_name, category_name, classification, trans_business_id, business_form_code, trans_out_warehouse_type, trans_out_warehouse_id from " |
| | | + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 将resultset的一行转化为po |
| | | */ |
| | | @Override |
| | | public UsingFormBackGoods mapRow(ResultSet rs, int i) throws SQLException { |
| | | return ROW_MAPPER.mapRow(rs, i); |
| | | } |
| | | |
| | | /** |
| | | * 克隆 |
| | | */ |
| | | public UsingFormBackGoods toUsingFormBackGoods() { |
| | | return super.$clone(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * using_form_back_goods RowMapper |
| | | * |
| | | * @author genrator |
| | | */ |
| | | class UsingFormBackGoodsRowMapper implements RowMapper<UsingFormBackGoods> { |
| | | |
| | | @Override |
| | | public UsingFormBackGoods mapRow(ResultSet rs, int i) throws SQLException { |
| | | ResultSetUtils resultSetUtils = new ResultSetUtils(); |
| | | UsingFormBackGoods using_form_back_goods = new UsingFormBackGoods(); |
| | | Integer columnIndex; |
| | | //主键 |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackGoods_mapper.Id); |
| | | if (columnIndex > 0) { |
| | | using_form_back_goods.setId(rs.getLong(columnIndex)); |
| | | } |
| | | //普通属性 |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackGoods_mapper.UsingFormBackId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back_goods.setUsingFormBackId(null); |
| | | } else { |
| | | using_form_back_goods.setUsingFormBackId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackGoods_mapper.BaseGoodsTemplateId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back_goods.setBaseGoodsTemplateId(null); |
| | | } else { |
| | | using_form_back_goods.setBaseGoodsTemplateId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackGoods_mapper.BaseGoodsTemplateName); |
| | | if (columnIndex > 0) { |
| | | using_form_back_goods.setBaseGoodsTemplateName(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackGoods_mapper.CategoryName); |
| | | if (columnIndex > 0) { |
| | | using_form_back_goods.setCategoryName(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackGoods_mapper.Classification); |
| | | if (columnIndex > 0) { |
| | | using_form_back_goods.setClassification(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackGoods_mapper.TransBusinessId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back_goods.setTransBusinessId(null); |
| | | } else { |
| | | using_form_back_goods.setTransBusinessId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackGoods_mapper.BusinessFormCode); |
| | | if (columnIndex > 0) { |
| | | using_form_back_goods.setBusinessFormCode(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackGoods_mapper.TransOutWarehouseType); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back_goods.setTransOutWarehouseType(null); |
| | | } else { |
| | | using_form_back_goods.setTransOutWarehouseType(rs.getInt(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackGoods_mapper.TransOutWarehouseId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back_goods.setTransOutWarehouseId(null); |
| | | } else { |
| | | using_form_back_goods.setTransOutWarehouseId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | return using_form_back_goods; |
| | | } |
| | | } |
New file |
| | |
| | | |
| | | package com.consum.model.po; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonAutoDetect; |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import com.walker.jdbc.BasePo; |
| | | |
| | | /** |
| | | * 表名:USING_FORM_BACK_MODEL |
| | | * |
| | | * @author genrator |
| | | */ |
| | | @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY) |
| | | public class UsingFormBackModel extends BasePo<UsingFormBackModel> { |
| | | |
| | | // 序列化版本号 |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | // 主键 |
| | | private Long id = null; |
| | | @JsonIgnore |
| | | protected boolean isset_id = false; |
| | | |
| | | // 属性列表 |
| | | private Long usingFormBackId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_usingFormBackId = false; |
| | | |
| | | private Long usingFormBackGoodsId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_usingFormBackGoodsId = false; |
| | | |
| | | private Long baseGoodsTemplateId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_baseGoodsTemplateId = false; |
| | | |
| | | private String baseGoodsTemplateName = null; |
| | | @JsonIgnore |
| | | protected boolean isset_baseGoodsTemplateName = false; |
| | | |
| | | private String classification = null; |
| | | @JsonIgnore |
| | | protected boolean isset_classification = false; |
| | | |
| | | private String unit = null; |
| | | @JsonIgnore |
| | | protected boolean isset_unit = false; |
| | | |
| | | private Long baseGoodsModelsId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_baseGoodsModelsId = false; |
| | | |
| | | private String baseGoodsModelsName = null; |
| | | @JsonIgnore |
| | | protected boolean isset_baseGoodsModelsName = false; |
| | | |
| | | private Long procureModelUserId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_procureModelUserId = false; |
| | | |
| | | private Integer initialCount = null; |
| | | @JsonIgnore |
| | | protected boolean isset_initialCount = false; |
| | | |
| | | private Integer useCount = null; |
| | | @JsonIgnore |
| | | protected boolean isset_useCount = false; |
| | | |
| | | private Integer counts = null; |
| | | @JsonIgnore |
| | | protected boolean isset_counts = false; |
| | | |
| | | private String goodsUserName = null; |
| | | @JsonIgnore |
| | | protected boolean isset_goodsUserName = false; |
| | | |
| | | private String beiz = null; |
| | | @JsonIgnore |
| | | protected boolean isset_beiz = false; |
| | | |
| | | /** |
| | | * 默认构造函数 |
| | | */ |
| | | public UsingFormBackModel() { |
| | | } |
| | | |
| | | /** |
| | | * 根据主键构造对象 |
| | | */ |
| | | public UsingFormBackModel(Long id) { |
| | | this.setId(id); |
| | | } |
| | | |
| | | /** |
| | | * 设置主键值 |
| | | */ |
| | | @Override |
| | | public void setPkValue(Object value) { |
| | | this.setId((Long) value); |
| | | } |
| | | |
| | | public Long getId() { |
| | | return this.id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | this.isset_id = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyId() { |
| | | return this.id == null; |
| | | } |
| | | |
| | | public Long getUsingFormBackId() { |
| | | return this.usingFormBackId; |
| | | } |
| | | |
| | | public void setUsingFormBackId(Long usingFormBackId) { |
| | | this.usingFormBackId = usingFormBackId; |
| | | this.isset_usingFormBackId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyUsingFormBackId() { |
| | | return this.usingFormBackId == null; |
| | | } |
| | | |
| | | public Long getUsingFormBackGoodsId() { |
| | | return this.usingFormBackGoodsId; |
| | | } |
| | | |
| | | public void setUsingFormBackGoodsId(Long usingFormBackGoodsId) { |
| | | this.usingFormBackGoodsId = usingFormBackGoodsId; |
| | | this.isset_usingFormBackGoodsId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyUsingFormBackGoodsId() { |
| | | return this.usingFormBackGoodsId == null; |
| | | } |
| | | |
| | | public Long getBaseGoodsTemplateId() { |
| | | return this.baseGoodsTemplateId; |
| | | } |
| | | |
| | | public void setBaseGoodsTemplateId(Long baseGoodsTemplateId) { |
| | | this.baseGoodsTemplateId = baseGoodsTemplateId; |
| | | this.isset_baseGoodsTemplateId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyBaseGoodsTemplateId() { |
| | | return this.baseGoodsTemplateId == null; |
| | | } |
| | | |
| | | public String getBaseGoodsTemplateName() { |
| | | return this.baseGoodsTemplateName; |
| | | } |
| | | |
| | | public void setBaseGoodsTemplateName(String baseGoodsTemplateName) { |
| | | this.baseGoodsTemplateName = baseGoodsTemplateName; |
| | | this.isset_baseGoodsTemplateName = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyBaseGoodsTemplateName() { |
| | | return this.baseGoodsTemplateName == null || this.baseGoodsTemplateName.length() == 0; |
| | | } |
| | | |
| | | public String getClassification() { |
| | | return this.classification; |
| | | } |
| | | |
| | | public void setClassification(String classification) { |
| | | this.classification = classification; |
| | | this.isset_classification = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyClassification() { |
| | | return this.classification == null || this.classification.length() == 0; |
| | | } |
| | | |
| | | public String getUnit() { |
| | | return this.unit; |
| | | } |
| | | |
| | | public void setUnit(String unit) { |
| | | this.unit = unit; |
| | | this.isset_unit = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyUnit() { |
| | | return this.unit == null || this.unit.length() == 0; |
| | | } |
| | | |
| | | public Long getBaseGoodsModelsId() { |
| | | return this.baseGoodsModelsId; |
| | | } |
| | | |
| | | public void setBaseGoodsModelsId(Long baseGoodsModelsId) { |
| | | this.baseGoodsModelsId = baseGoodsModelsId; |
| | | this.isset_baseGoodsModelsId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyBaseGoodsModelsId() { |
| | | return this.baseGoodsModelsId == null; |
| | | } |
| | | |
| | | public String getBaseGoodsModelsName() { |
| | | return this.baseGoodsModelsName; |
| | | } |
| | | |
| | | public void setBaseGoodsModelsName(String baseGoodsModelsName) { |
| | | this.baseGoodsModelsName = baseGoodsModelsName; |
| | | this.isset_baseGoodsModelsName = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyBaseGoodsModelsName() { |
| | | return this.baseGoodsModelsName == null || this.baseGoodsModelsName.length() == 0; |
| | | } |
| | | |
| | | public Long getProcureModelUserId() { |
| | | return this.procureModelUserId; |
| | | } |
| | | |
| | | public void setProcureModelUserId(Long procureModelUserId) { |
| | | this.procureModelUserId = procureModelUserId; |
| | | this.isset_procureModelUserId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyProcureModelUserId() { |
| | | return this.procureModelUserId == null; |
| | | } |
| | | |
| | | public Integer getInitialCount() { |
| | | return this.initialCount; |
| | | } |
| | | |
| | | public void setInitialCount(Integer initialCount) { |
| | | this.initialCount = initialCount; |
| | | this.isset_initialCount = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyInitialCount() { |
| | | return this.initialCount == null; |
| | | } |
| | | |
| | | public Integer getUseCount() { |
| | | return this.useCount; |
| | | } |
| | | |
| | | public void setUseCount(Integer useCount) { |
| | | this.useCount = useCount; |
| | | this.isset_useCount = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyUseCount() { |
| | | return this.useCount == null; |
| | | } |
| | | |
| | | public Integer getCounts() { |
| | | return this.counts; |
| | | } |
| | | |
| | | public void setCounts(Integer counts) { |
| | | this.counts = counts; |
| | | this.isset_counts = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyCounts() { |
| | | return this.counts == null; |
| | | } |
| | | |
| | | public String getGoodsUserName() { |
| | | return this.goodsUserName; |
| | | } |
| | | |
| | | public void setGoodsUserName(String goodsUserName) { |
| | | this.goodsUserName = goodsUserName; |
| | | this.isset_goodsUserName = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyGoodsUserName() { |
| | | return this.goodsUserName == null || this.goodsUserName.length() == 0; |
| | | } |
| | | |
| | | public String getBeiz() { |
| | | return this.beiz; |
| | | } |
| | | |
| | | public void setBeiz(String beiz) { |
| | | this.beiz = beiz; |
| | | this.isset_beiz = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyBeiz() { |
| | | return this.beiz == null || this.beiz.length() == 0; |
| | | } |
| | | |
| | | /** |
| | | * 重写 toString() 方法 |
| | | */ |
| | | @Override |
| | | public String toString() { |
| | | return new StringBuilder() |
| | | .append("id=").append(this.id) |
| | | .append("usingFormBackId=").append(this.usingFormBackId) |
| | | .append("usingFormBackGoodsId=").append(this.usingFormBackGoodsId) |
| | | .append("baseGoodsTemplateId=").append(this.baseGoodsTemplateId) |
| | | .append("baseGoodsTemplateName=").append(this.baseGoodsTemplateName) |
| | | .append("classification=").append(this.classification) |
| | | .append("unit=").append(this.unit) |
| | | .append("baseGoodsModelsId=").append(this.baseGoodsModelsId) |
| | | .append("baseGoodsModelsName=").append(this.baseGoodsModelsName) |
| | | .append("procureModelUserId=").append(this.procureModelUserId) |
| | | .append("initialCount=").append(this.initialCount) |
| | | .append("useCount=").append(this.useCount) |
| | | .append("counts=").append(this.counts) |
| | | .append("goodsUserName=").append(this.goodsUserName) |
| | | .append("beiz=").append(this.beiz) |
| | | .toString(); |
| | | } |
| | | |
| | | /** |
| | | * 克隆 |
| | | */ |
| | | public UsingFormBackModel $clone() { |
| | | UsingFormBackModel using_form_back_model = new UsingFormBackModel(); |
| | | |
| | | // 数据库名称 |
| | | //using_form_back_model.setDatabaseName_(this.getDatabaseName_()); |
| | | |
| | | // 主键 |
| | | if (this.isset_id) { |
| | | using_form_back_model.setId(this.getId()); |
| | | } |
| | | // 普通属性 |
| | | if (this.isset_usingFormBackId) { |
| | | using_form_back_model.setUsingFormBackId(this.getUsingFormBackId()); |
| | | } |
| | | if (this.isset_usingFormBackGoodsId) { |
| | | using_form_back_model.setUsingFormBackGoodsId(this.getUsingFormBackGoodsId()); |
| | | } |
| | | if (this.isset_baseGoodsTemplateId) { |
| | | using_form_back_model.setBaseGoodsTemplateId(this.getBaseGoodsTemplateId()); |
| | | } |
| | | if (this.isset_baseGoodsTemplateName) { |
| | | using_form_back_model.setBaseGoodsTemplateName(this.getBaseGoodsTemplateName()); |
| | | } |
| | | if (this.isset_classification) { |
| | | using_form_back_model.setClassification(this.getClassification()); |
| | | } |
| | | if (this.isset_unit) { |
| | | using_form_back_model.setUnit(this.getUnit()); |
| | | } |
| | | if (this.isset_baseGoodsModelsId) { |
| | | using_form_back_model.setBaseGoodsModelsId(this.getBaseGoodsModelsId()); |
| | | } |
| | | if (this.isset_baseGoodsModelsName) { |
| | | using_form_back_model.setBaseGoodsModelsName(this.getBaseGoodsModelsName()); |
| | | } |
| | | if (this.isset_procureModelUserId) { |
| | | using_form_back_model.setProcureModelUserId(this.getProcureModelUserId()); |
| | | } |
| | | if (this.isset_initialCount) { |
| | | using_form_back_model.setInitialCount(this.getInitialCount()); |
| | | } |
| | | if (this.isset_useCount) { |
| | | using_form_back_model.setUseCount(this.getUseCount()); |
| | | } |
| | | if (this.isset_counts) { |
| | | using_form_back_model.setCounts(this.getCounts()); |
| | | } |
| | | if (this.isset_goodsUserName) { |
| | | using_form_back_model.setGoodsUserName(this.getGoodsUserName()); |
| | | } |
| | | if (this.isset_beiz) { |
| | | using_form_back_model.setBeiz(this.getBeiz()); |
| | | } |
| | | return using_form_back_model; |
| | | } |
| | | } |
New file |
| | |
| | | package com.consum.model.po; |
| | | |
| | | import com.walker.jdbc.BaseMapper; |
| | | import com.walker.jdbc.ResultSetUtils; |
| | | import com.walker.jdbc.SqlAndParameters; |
| | | import com.walker.jdbc.sqlgen.DeleteBuilder; |
| | | import com.walker.jdbc.sqlgen.InsertBuilder; |
| | | import com.walker.jdbc.sqlgen.SelectBuilder; |
| | | import com.walker.jdbc.sqlgen.UpdateBuilder; |
| | | import java.sql.ResultSet; |
| | | import java.sql.SQLException; |
| | | import java.util.Map; |
| | | import org.springframework.jdbc.core.RowMapper; |
| | | |
| | | /** |
| | | * 表名:USING_FORM_BACK_MODEL |
| | | * |
| | | * @author genrator |
| | | */ |
| | | public class UsingFormBackModel_mapper extends UsingFormBackModel implements BaseMapper<UsingFormBackModel> { |
| | | |
| | | // 序列化版本号 |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | public static final RowMapper<UsingFormBackModel> ROW_MAPPER = new UsingFormBackModelRowMapper(); |
| | | |
| | | // 主键 |
| | | public static final String Id = "id"; |
| | | // 普通属性 |
| | | public static final String UsingFormBackId = "using_form_back_id"; |
| | | public static final String UsingFormBackGoodsId = "using_form_back_goods_id"; |
| | | public static final String BaseGoodsTemplateId = "base_goods_template_id"; |
| | | public static final String BaseGoodsTemplateName = "base_goods_template_name"; |
| | | public static final String Classification = "classification"; |
| | | public static final String Unit = "unit"; |
| | | public static final String BaseGoodsModelsId = "base_goods_models_id"; |
| | | public static final String BaseGoodsModelsName = "base_goods_models_name"; |
| | | public static final String ProcureModelUserId = "procure_model_user_id"; |
| | | public static final String InitialCount = "initial_count"; |
| | | public static final String UseCount = "use_count"; |
| | | public static final String Counts = "counts"; |
| | | public static final String GoodsUserName = "goods_user_name"; |
| | | public static final String Beiz = "beiz"; |
| | | |
| | | /** |
| | | * 默认构造函数 |
| | | */ |
| | | public UsingFormBackModel_mapper(UsingFormBackModel usingFormBackModel) { |
| | | if (usingFormBackModel == null) { |
| | | throw new IllegalArgumentException("po参数不允许为空!"); |
| | | } |
| | | //主键 |
| | | if (usingFormBackModel.isset_id) { |
| | | this.setId(usingFormBackModel.getId()); |
| | | } |
| | | //普通属性 |
| | | if (usingFormBackModel.isset_usingFormBackId) { |
| | | this.setUsingFormBackId(usingFormBackModel.getUsingFormBackId()); |
| | | } |
| | | if (usingFormBackModel.isset_usingFormBackGoodsId) { |
| | | this.setUsingFormBackGoodsId(usingFormBackModel.getUsingFormBackGoodsId()); |
| | | } |
| | | if (usingFormBackModel.isset_baseGoodsTemplateId) { |
| | | this.setBaseGoodsTemplateId(usingFormBackModel.getBaseGoodsTemplateId()); |
| | | } |
| | | if (usingFormBackModel.isset_baseGoodsTemplateName) { |
| | | this.setBaseGoodsTemplateName(usingFormBackModel.getBaseGoodsTemplateName()); |
| | | } |
| | | if (usingFormBackModel.isset_classification) { |
| | | this.setClassification(usingFormBackModel.getClassification()); |
| | | } |
| | | if (usingFormBackModel.isset_unit) { |
| | | this.setUnit(usingFormBackModel.getUnit()); |
| | | } |
| | | if (usingFormBackModel.isset_baseGoodsModelsId) { |
| | | this.setBaseGoodsModelsId(usingFormBackModel.getBaseGoodsModelsId()); |
| | | } |
| | | if (usingFormBackModel.isset_baseGoodsModelsName) { |
| | | this.setBaseGoodsModelsName(usingFormBackModel.getBaseGoodsModelsName()); |
| | | } |
| | | if (usingFormBackModel.isset_procureModelUserId) { |
| | | this.setProcureModelUserId(usingFormBackModel.getProcureModelUserId()); |
| | | } |
| | | if (usingFormBackModel.isset_initialCount) { |
| | | this.setInitialCount(usingFormBackModel.getInitialCount()); |
| | | } |
| | | if (usingFormBackModel.isset_useCount) { |
| | | this.setUseCount(usingFormBackModel.getUseCount()); |
| | | } |
| | | if (usingFormBackModel.isset_counts) { |
| | | this.setCounts(usingFormBackModel.getCounts()); |
| | | } |
| | | if (usingFormBackModel.isset_goodsUserName) { |
| | | this.setGoodsUserName(usingFormBackModel.getGoodsUserName()); |
| | | } |
| | | if (usingFormBackModel.isset_beiz) { |
| | | this.setBeiz(usingFormBackModel.getBeiz()); |
| | | } |
| | | // 去掉,2022-09-07 |
| | | // this.setDatabaseName_(using_form_back_model.getDatabaseName_()); |
| | | } |
| | | |
| | | /** |
| | | * 获取表名 |
| | | */ |
| | | @Override |
| | | public String getTableName_() { |
| | | String tableName = "using_form_back_model"; |
| | | /** |
| | | 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(UsingFormBackId, this.getUsingFormBackId(), this.isset_usingFormBackId); |
| | | ib.set(UsingFormBackGoodsId, this.getUsingFormBackGoodsId(), this.isset_usingFormBackGoodsId); |
| | | ib.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); |
| | | ib.set(BaseGoodsTemplateName, this.getBaseGoodsTemplateName(), this.isset_baseGoodsTemplateName); |
| | | ib.set(Classification, this.getClassification(), this.isset_classification); |
| | | ib.set(Unit, this.getUnit(), this.isset_unit); |
| | | ib.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); |
| | | ib.set(BaseGoodsModelsName, this.getBaseGoodsModelsName(), this.isset_baseGoodsModelsName); |
| | | ib.set(ProcureModelUserId, this.getProcureModelUserId(), this.isset_procureModelUserId); |
| | | ib.set(InitialCount, this.getInitialCount(), this.isset_initialCount); |
| | | ib.set(UseCount, this.getUseCount(), this.isset_useCount); |
| | | ib.set(Counts, this.getCounts(), this.isset_counts); |
| | | ib.set(GoodsUserName, this.getGoodsUserName(), this.isset_goodsUserName); |
| | | ib.set(Beiz, this.getBeiz(), this.isset_beiz); |
| | | return ib.genMapSql(); |
| | | } |
| | | |
| | | /** |
| | | * 获取更新语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_() { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(UsingFormBackId, this.getUsingFormBackId(), this.isset_usingFormBackId); |
| | | ub.set(UsingFormBackGoodsId, this.getUsingFormBackGoodsId(), this.isset_usingFormBackGoodsId); |
| | | ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); |
| | | ub.set(BaseGoodsTemplateName, this.getBaseGoodsTemplateName(), this.isset_baseGoodsTemplateName); |
| | | ub.set(Classification, this.getClassification(), this.isset_classification); |
| | | ub.set(Unit, this.getUnit(), this.isset_unit); |
| | | ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); |
| | | ub.set(BaseGoodsModelsName, this.getBaseGoodsModelsName(), this.isset_baseGoodsModelsName); |
| | | ub.set(ProcureModelUserId, this.getProcureModelUserId(), this.isset_procureModelUserId); |
| | | ub.set(InitialCount, this.getInitialCount(), this.isset_initialCount); |
| | | ub.set(UseCount, this.getUseCount(), this.isset_useCount); |
| | | ub.set(Counts, this.getCounts(), this.isset_counts); |
| | | ub.set(GoodsUserName, this.getGoodsUserName(), this.isset_goodsUserName); |
| | | ub.set(Beiz, this.getBeiz(), this.isset_beiz); |
| | | 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(UsingFormBackId, this.getUsingFormBackId(), this.isset_usingFormBackId); |
| | | ub.set(UsingFormBackGoodsId, this.getUsingFormBackGoodsId(), this.isset_usingFormBackGoodsId); |
| | | ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); |
| | | ub.set(BaseGoodsTemplateName, this.getBaseGoodsTemplateName(), this.isset_baseGoodsTemplateName); |
| | | ub.set(Classification, this.getClassification(), this.isset_classification); |
| | | ub.set(Unit, this.getUnit(), this.isset_unit); |
| | | ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); |
| | | ub.set(BaseGoodsModelsName, this.getBaseGoodsModelsName(), this.isset_baseGoodsModelsName); |
| | | ub.set(ProcureModelUserId, this.getProcureModelUserId(), this.isset_procureModelUserId); |
| | | ub.set(InitialCount, this.getInitialCount(), this.isset_initialCount); |
| | | ub.set(UseCount, this.getUseCount(), this.isset_useCount); |
| | | ub.set(Counts, this.getCounts(), this.isset_counts); |
| | | ub.set(GoodsUserName, this.getGoodsUserName(), this.isset_goodsUserName); |
| | | ub.set(Beiz, this.getBeiz(), this.isset_beiz); |
| | | return ub.genMapSql(where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 获取更新语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(UsingFormBackId, this.getUsingFormBackId(), this.isset_usingFormBackId); |
| | | ub.set(UsingFormBackGoodsId, this.getUsingFormBackGoodsId(), this.isset_usingFormBackGoodsId); |
| | | ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId); |
| | | ub.set(BaseGoodsTemplateName, this.getBaseGoodsTemplateName(), this.isset_baseGoodsTemplateName); |
| | | ub.set(Classification, this.getClassification(), this.isset_classification); |
| | | ub.set(Unit, this.getUnit(), this.isset_unit); |
| | | ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId); |
| | | ub.set(BaseGoodsModelsName, this.getBaseGoodsModelsName(), this.isset_baseGoodsModelsName); |
| | | ub.set(ProcureModelUserId, this.getProcureModelUserId(), this.isset_procureModelUserId); |
| | | ub.set(InitialCount, this.getInitialCount(), this.isset_initialCount); |
| | | ub.set(UseCount, this.getUseCount(), this.isset_useCount); |
| | | ub.set(Counts, this.getCounts(), this.isset_counts); |
| | | ub.set(GoodsUserName, this.getGoodsUserName(), this.isset_goodsUserName); |
| | | ub.set(Beiz, this.getBeiz(), this.isset_beiz); |
| | | 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, using_form_back_id, using_form_back_goods_id, base_goods_template_id, base_goods_template_name, classification, unit, base_goods_models_id, base_goods_models_name, procure_model_user_id, initial_count, use_count, counts, goods_user_name, beiz from " |
| | | + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 获取查询语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { |
| | | return new SqlAndParameters<>( |
| | | "select id, using_form_back_id, using_form_back_goods_id, base_goods_template_id, base_goods_template_name, classification, unit, base_goods_models_id, base_goods_models_name, procure_model_user_id, initial_count, use_count, counts, goods_user_name, beiz from " |
| | | + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 将resultset的一行转化为po |
| | | */ |
| | | @Override |
| | | public UsingFormBackModel mapRow(ResultSet rs, int i) throws SQLException { |
| | | return ROW_MAPPER.mapRow(rs, i); |
| | | } |
| | | |
| | | /** |
| | | * 克隆 |
| | | */ |
| | | public UsingFormBackModel toUsingFormBackModel() { |
| | | return super.$clone(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * using_form_back_model RowMapper |
| | | * |
| | | * @author genrator |
| | | */ |
| | | class UsingFormBackModelRowMapper implements RowMapper<UsingFormBackModel> { |
| | | |
| | | @Override |
| | | public UsingFormBackModel mapRow(ResultSet rs, int i) throws SQLException { |
| | | ResultSetUtils resultSetUtils = new ResultSetUtils(); |
| | | UsingFormBackModel using_form_back_model = new UsingFormBackModel(); |
| | | Integer columnIndex; |
| | | //主键 |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackModel_mapper.Id); |
| | | if (columnIndex > 0) { |
| | | using_form_back_model.setId(rs.getLong(columnIndex)); |
| | | } |
| | | //普通属性 |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackModel_mapper.UsingFormBackId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back_model.setUsingFormBackId(null); |
| | | } else { |
| | | using_form_back_model.setUsingFormBackId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackModel_mapper.UsingFormBackGoodsId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back_model.setUsingFormBackGoodsId(null); |
| | | } else { |
| | | using_form_back_model.setUsingFormBackGoodsId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackModel_mapper.BaseGoodsTemplateId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back_model.setBaseGoodsTemplateId(null); |
| | | } else { |
| | | using_form_back_model.setBaseGoodsTemplateId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackModel_mapper.BaseGoodsTemplateName); |
| | | if (columnIndex > 0) { |
| | | using_form_back_model.setBaseGoodsTemplateName(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackModel_mapper.Classification); |
| | | if (columnIndex > 0) { |
| | | using_form_back_model.setClassification(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackModel_mapper.Unit); |
| | | if (columnIndex > 0) { |
| | | using_form_back_model.setUnit(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackModel_mapper.BaseGoodsModelsId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back_model.setBaseGoodsModelsId(null); |
| | | } else { |
| | | using_form_back_model.setBaseGoodsModelsId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackModel_mapper.BaseGoodsModelsName); |
| | | if (columnIndex > 0) { |
| | | using_form_back_model.setBaseGoodsModelsName(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackModel_mapper.ProcureModelUserId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back_model.setProcureModelUserId(null); |
| | | } else { |
| | | using_form_back_model.setProcureModelUserId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackModel_mapper.InitialCount); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back_model.setInitialCount(null); |
| | | } else { |
| | | using_form_back_model.setInitialCount(rs.getInt(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackModel_mapper.UseCount); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back_model.setUseCount(null); |
| | | } else { |
| | | using_form_back_model.setUseCount(rs.getInt(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackModel_mapper.Counts); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back_model.setCounts(null); |
| | | } else { |
| | | using_form_back_model.setCounts(rs.getInt(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackModel_mapper.GoodsUserName); |
| | | if (columnIndex > 0) { |
| | | using_form_back_model.setGoodsUserName(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBackModel_mapper.Beiz); |
| | | if (columnIndex > 0) { |
| | | using_form_back_model.setBeiz(rs.getString(columnIndex)); |
| | | } |
| | | return using_form_back_model; |
| | | } |
| | | } |
New file |
| | |
| | | package com.consum.model.po; |
| | | |
| | | import com.walker.jdbc.BaseMapper; |
| | | import com.walker.jdbc.ResultSetUtils; |
| | | import com.walker.jdbc.SqlAndParameters; |
| | | import com.walker.jdbc.sqlgen.DeleteBuilder; |
| | | import com.walker.jdbc.sqlgen.InsertBuilder; |
| | | import com.walker.jdbc.sqlgen.SelectBuilder; |
| | | import com.walker.jdbc.sqlgen.UpdateBuilder; |
| | | import java.sql.ResultSet; |
| | | import java.sql.SQLException; |
| | | import java.util.Map; |
| | | import org.springframework.jdbc.core.RowMapper; |
| | | |
| | | /** |
| | | * 表名:USING_FORM_BACK |
| | | * |
| | | * @author genrator |
| | | */ |
| | | public class UsingFormBack_mapper extends UsingFormBack implements BaseMapper<UsingFormBack> { |
| | | |
| | | // 序列化版本号 |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | public static final RowMapper<UsingFormBack> ROW_MAPPER = new UsingFormBackRowMapper(); |
| | | |
| | | // 主键 |
| | | public static final String Id = "id"; |
| | | // 普通属性 |
| | | public static final String BusinessFormCode = "business_form_code"; |
| | | public static final String ProcureDoc = "procure_doc"; |
| | | public static final String OutWarehouseType = "out_warehouse_type"; |
| | | public static final String OutWarehouseId = "out_warehouse_id"; |
| | | public static final String OutWarehouseName = "out_warehouse_name"; |
| | | public static final String OperatorId = "operator_id"; |
| | | public static final String OperatorName = "operator_name"; |
| | | public static final String DealTime = "deal_time"; |
| | | public static final String AgencyId = "agency_id"; |
| | | public static final String AgencyName = "agency_name"; |
| | | public static final String DepartmentId = "department_id"; |
| | | public static final String DepartmentName = "department_name"; |
| | | public static final String CreateTime = "create_time"; |
| | | public static final String States = "states"; |
| | | public static final String Beiz = "beiz"; |
| | | |
| | | /** |
| | | * 默认构造函数 |
| | | */ |
| | | public UsingFormBack_mapper(UsingFormBack usingFormBack) { |
| | | if (usingFormBack == null) { |
| | | throw new IllegalArgumentException("po参数不允许为空!"); |
| | | } |
| | | //主键 |
| | | if (usingFormBack.isset_id) { |
| | | this.setId(usingFormBack.getId()); |
| | | } |
| | | //普通属性 |
| | | if (usingFormBack.isset_businessFormCode) { |
| | | this.setBusinessFormCode(usingFormBack.getBusinessFormCode()); |
| | | } |
| | | if (usingFormBack.isset_procureDoc) { |
| | | this.setProcureDoc(usingFormBack.getProcureDoc()); |
| | | } |
| | | if (usingFormBack.isset_outWarehouseType) { |
| | | this.setOutWarehouseType(usingFormBack.getOutWarehouseType()); |
| | | } |
| | | if (usingFormBack.isset_outWarehouseId) { |
| | | this.setOutWarehouseId(usingFormBack.getOutWarehouseId()); |
| | | } |
| | | if (usingFormBack.isset_outWarehouseName) { |
| | | this.setOutWarehouseName(usingFormBack.getOutWarehouseName()); |
| | | } |
| | | if (usingFormBack.isset_operatorId) { |
| | | this.setOperatorId(usingFormBack.getOperatorId()); |
| | | } |
| | | if (usingFormBack.isset_operatorName) { |
| | | this.setOperatorName(usingFormBack.getOperatorName()); |
| | | } |
| | | if (usingFormBack.isset_dealTime) { |
| | | this.setDealTime(usingFormBack.getDealTime()); |
| | | } |
| | | if (usingFormBack.isset_agencyId) { |
| | | this.setAgencyId(usingFormBack.getAgencyId()); |
| | | } |
| | | if (usingFormBack.isset_agencyName) { |
| | | this.setAgencyName(usingFormBack.getAgencyName()); |
| | | } |
| | | if (usingFormBack.isset_departmentId) { |
| | | this.setDepartmentId(usingFormBack.getDepartmentId()); |
| | | } |
| | | if (usingFormBack.isset_departmentName) { |
| | | this.setDepartmentName(usingFormBack.getDepartmentName()); |
| | | } |
| | | if (usingFormBack.isset_createTime) { |
| | | this.setCreateTime(usingFormBack.getCreateTime()); |
| | | } |
| | | if (usingFormBack.isset_states) { |
| | | this.setStates(usingFormBack.getStates()); |
| | | } |
| | | if (usingFormBack.isset_beiz) { |
| | | this.setBeiz(usingFormBack.getBeiz()); |
| | | } |
| | | // 去掉,2022-09-07 |
| | | // this.setDatabaseName_(using_form_back.getDatabaseName_()); |
| | | } |
| | | |
| | | /** |
| | | * 获取表名 |
| | | */ |
| | | @Override |
| | | public String getTableName_() { |
| | | String tableName = "using_form_back"; |
| | | /** |
| | | if (StringUtils.isNotEmpty(this.getDatabaseName_())) { |
| | | return this.getDatabaseName_() + "." + tableName; |
| | | } else { |
| | | return tableName; |
| | | } |
| | | */ |
| | | return tableName; |
| | | } |
| | | |
| | | /** |
| | | * 获取主键名称 |
| | | */ |
| | | @Override |
| | | public String getPkName_() { |
| | | return Id; |
| | | } |
| | | |
| | | /** |
| | | * 获取主键值 |
| | | */ |
| | | @Override |
| | | public Object getPkValue_() { |
| | | return this.getId(); |
| | | } |
| | | |
| | | /** |
| | | * 获取插入语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getInsertSql_() { |
| | | InsertBuilder ib = new InsertBuilder(this.getTableName_()); |
| | | ib.set(Id, this.getId()); |
| | | ib.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); |
| | | ib.set(ProcureDoc, this.getProcureDoc(), this.isset_procureDoc); |
| | | ib.set(OutWarehouseType, this.getOutWarehouseType(), this.isset_outWarehouseType); |
| | | ib.set(OutWarehouseId, this.getOutWarehouseId(), this.isset_outWarehouseId); |
| | | ib.set(OutWarehouseName, this.getOutWarehouseName(), this.isset_outWarehouseName); |
| | | ib.set(OperatorId, this.getOperatorId(), this.isset_operatorId); |
| | | ib.set(OperatorName, this.getOperatorName(), this.isset_operatorName); |
| | | ib.set(DealTime, this.getDealTime(), this.isset_dealTime); |
| | | ib.set(AgencyId, this.getAgencyId(), this.isset_agencyId); |
| | | ib.set(AgencyName, this.getAgencyName(), this.isset_agencyName); |
| | | ib.set(DepartmentId, this.getDepartmentId(), this.isset_departmentId); |
| | | ib.set(DepartmentName, this.getDepartmentName(), this.isset_departmentName); |
| | | ib.set(CreateTime, this.getCreateTime(), this.isset_createTime); |
| | | ib.set(States, this.getStates(), this.isset_states); |
| | | ib.set(Beiz, this.getBeiz(), this.isset_beiz); |
| | | return ib.genMapSql(); |
| | | } |
| | | |
| | | /** |
| | | * 获取更新语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_() { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); |
| | | ub.set(ProcureDoc, this.getProcureDoc(), this.isset_procureDoc); |
| | | ub.set(OutWarehouseType, this.getOutWarehouseType(), this.isset_outWarehouseType); |
| | | ub.set(OutWarehouseId, this.getOutWarehouseId(), this.isset_outWarehouseId); |
| | | ub.set(OutWarehouseName, this.getOutWarehouseName(), this.isset_outWarehouseName); |
| | | ub.set(OperatorId, this.getOperatorId(), this.isset_operatorId); |
| | | ub.set(OperatorName, this.getOperatorName(), this.isset_operatorName); |
| | | ub.set(DealTime, this.getDealTime(), this.isset_dealTime); |
| | | ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId); |
| | | ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName); |
| | | ub.set(DepartmentId, this.getDepartmentId(), this.isset_departmentId); |
| | | ub.set(DepartmentName, this.getDepartmentName(), this.isset_departmentName); |
| | | ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); |
| | | ub.set(States, this.getStates(), this.isset_states); |
| | | ub.set(Beiz, this.getBeiz(), this.isset_beiz); |
| | | ub.where(this.getPkName_(), this.getPkValue_()); |
| | | return ub.genMapSql(); |
| | | } |
| | | |
| | | /** |
| | | * 获取更新语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); |
| | | ub.set(ProcureDoc, this.getProcureDoc(), this.isset_procureDoc); |
| | | ub.set(OutWarehouseType, this.getOutWarehouseType(), this.isset_outWarehouseType); |
| | | ub.set(OutWarehouseId, this.getOutWarehouseId(), this.isset_outWarehouseId); |
| | | ub.set(OutWarehouseName, this.getOutWarehouseName(), this.isset_outWarehouseName); |
| | | ub.set(OperatorId, this.getOperatorId(), this.isset_operatorId); |
| | | ub.set(OperatorName, this.getOperatorName(), this.isset_operatorName); |
| | | ub.set(DealTime, this.getDealTime(), this.isset_dealTime); |
| | | ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId); |
| | | ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName); |
| | | ub.set(DepartmentId, this.getDepartmentId(), this.isset_departmentId); |
| | | ub.set(DepartmentName, this.getDepartmentName(), this.isset_departmentName); |
| | | ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); |
| | | ub.set(States, this.getStates(), this.isset_states); |
| | | ub.set(Beiz, this.getBeiz(), this.isset_beiz); |
| | | return ub.genMapSql(where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 获取更新语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); |
| | | ub.set(ProcureDoc, this.getProcureDoc(), this.isset_procureDoc); |
| | | ub.set(OutWarehouseType, this.getOutWarehouseType(), this.isset_outWarehouseType); |
| | | ub.set(OutWarehouseId, this.getOutWarehouseId(), this.isset_outWarehouseId); |
| | | ub.set(OutWarehouseName, this.getOutWarehouseName(), this.isset_outWarehouseName); |
| | | ub.set(OperatorId, this.getOperatorId(), this.isset_operatorId); |
| | | ub.set(OperatorName, this.getOperatorName(), this.isset_operatorName); |
| | | ub.set(DealTime, this.getDealTime(), this.isset_dealTime); |
| | | ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId); |
| | | ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName); |
| | | ub.set(DepartmentId, this.getDepartmentId(), this.isset_departmentId); |
| | | ub.set(DepartmentName, this.getDepartmentName(), this.isset_departmentName); |
| | | ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); |
| | | ub.set(States, this.getStates(), this.isset_states); |
| | | ub.set(Beiz, this.getBeiz(), this.isset_beiz); |
| | | return ub.genArraySql(where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 获取删除语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getDeleteSql_() { |
| | | DeleteBuilder db = new DeleteBuilder(this.getTableName_()); |
| | | db.where(this.getPkName_(), this.getPkValue_()); |
| | | return db.genMapSql(); |
| | | } |
| | | |
| | | /** |
| | | * 获取删除语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getDeleteSql_(String where, Map<String, Object> parameters) { |
| | | DeleteBuilder db = new DeleteBuilder(this.getTableName_()); |
| | | return db.genMapSql(where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 获取删除语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getDeleteSql_(String where, Object[] parameters) { |
| | | DeleteBuilder db = new DeleteBuilder(this.getTableName_()); |
| | | return db.genArraySql(where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 获取单行查询语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getSingleSql_() { |
| | | SelectBuilder sb = new SelectBuilder(this.getTableName_()); |
| | | sb.where(this.getPkName_(), this.getPkValue_()); |
| | | return sb.genMapSql(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取查询语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { |
| | | return new SqlAndParameters<>( |
| | | "select id, business_form_code, procure_doc, out_warehouse_type, out_warehouse_id, out_warehouse_name, operator_id, operator_name, deal_time, agency_id, agency_name, department_id, department_name, create_time, states, beiz from " |
| | | + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 获取查询语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { |
| | | return new SqlAndParameters<>( |
| | | "select id, business_form_code, procure_doc, out_warehouse_type, out_warehouse_id, out_warehouse_name, operator_id, operator_name, deal_time, agency_id, agency_name, department_id, department_name, create_time, states, beiz from " |
| | | + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 将resultset的一行转化为po |
| | | */ |
| | | @Override |
| | | public UsingFormBack mapRow(ResultSet rs, int i) throws SQLException { |
| | | return ROW_MAPPER.mapRow(rs, i); |
| | | } |
| | | |
| | | /** |
| | | * 克隆 |
| | | */ |
| | | public UsingFormBack toUsingFormBack() { |
| | | return super.$clone(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * using_form_back RowMapper |
| | | * |
| | | * @author genrator |
| | | */ |
| | | class UsingFormBackRowMapper implements RowMapper<UsingFormBack> { |
| | | |
| | | @Override |
| | | public UsingFormBack mapRow(ResultSet rs, int i) throws SQLException { |
| | | ResultSetUtils resultSetUtils = new ResultSetUtils(); |
| | | UsingFormBack using_form_back = new UsingFormBack(); |
| | | Integer columnIndex; |
| | | //主键 |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBack_mapper.Id); |
| | | if (columnIndex > 0) { |
| | | using_form_back.setId(rs.getLong(columnIndex)); |
| | | } |
| | | //普通属性 |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBack_mapper.BusinessFormCode); |
| | | if (columnIndex > 0) { |
| | | using_form_back.setBusinessFormCode(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBack_mapper.ProcureDoc); |
| | | if (columnIndex > 0) { |
| | | using_form_back.setProcureDoc(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBack_mapper.OutWarehouseType); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back.setOutWarehouseType(null); |
| | | } else { |
| | | using_form_back.setOutWarehouseType(rs.getInt(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBack_mapper.OutWarehouseId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back.setOutWarehouseId(null); |
| | | } else { |
| | | using_form_back.setOutWarehouseId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBack_mapper.OutWarehouseName); |
| | | if (columnIndex > 0) { |
| | | using_form_back.setOutWarehouseName(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBack_mapper.OperatorId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back.setOperatorId(null); |
| | | } else { |
| | | using_form_back.setOperatorId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBack_mapper.OperatorName); |
| | | if (columnIndex > 0) { |
| | | using_form_back.setOperatorName(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBack_mapper.DealTime); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back.setDealTime(null); |
| | | } else { |
| | | using_form_back.setDealTime(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBack_mapper.AgencyId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back.setAgencyId(null); |
| | | } else { |
| | | using_form_back.setAgencyId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBack_mapper.AgencyName); |
| | | if (columnIndex > 0) { |
| | | using_form_back.setAgencyName(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBack_mapper.DepartmentId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back.setDepartmentId(null); |
| | | } else { |
| | | using_form_back.setDepartmentId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBack_mapper.DepartmentName); |
| | | if (columnIndex > 0) { |
| | | using_form_back.setDepartmentName(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBack_mapper.CreateTime); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back.setCreateTime(null); |
| | | } else { |
| | | using_form_back.setCreateTime(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBack_mapper.States); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | using_form_back.setStates(null); |
| | | } else { |
| | | using_form_back.setStates(rs.getInt(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, UsingFormBack_mapper.Beiz); |
| | | if (columnIndex > 0) { |
| | | using_form_back.setBeiz(rs.getString(columnIndex)); |
| | | } |
| | | return using_form_back; |
| | | } |
| | | } |