admin-web/src/api/stock/deptScrap.js
New file @@ -0,0 +1,11 @@ import request from '@/utils/request'; // 物品报废 // 新增 export function scrappedAdd(data) { return request({ url: '/pc/l/wh/form/scrapped/deptAdd', method: 'post', data, }); } admin-web/src/views/departmentitem/itemscr/scrapping/edit.vue
@@ -229,7 +229,7 @@ <script> import {departmentListAll} from '@/api/system/deptment'; import {goodsTemplate} from '@/api/baseSetting/finsystenant'; import {outputAdd} from '@/api/stock/accessStock'; import {scrappedAdd} from '@/api/stock/deptScrap'; import {getTree} from '@/api/foudation/classification'; import MyButton from '@/components/myButton/myButton'; import winMd from '@/components/win/win-md'; @@ -521,9 +521,9 @@ }) g.models = arr }) console.log('params', params); return outputAdd(this.formData) // console.log('params', params); // return scrappedAdd(params) .then((res) => { this.$message.success('保存成功!'); this.close(); consum-base/src/main/java/com/consum/base/controller/DepFormScrappedController.java
New file @@ -0,0 +1,70 @@ package com.consum.base.controller; import com.consum.base.BaseController; import com.consum.base.core.utils.CommonUtil; import com.consum.base.pojo.LDeptFormScrappedParam; import com.consum.base.pojo.query.LDeptFormScrappedQry; import com.consum.base.service.DepFormScrappedServiceImpl; import com.consum.model.po.FinSysTenantUser; import com.walker.web.ResponseValue; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; /** * @ClassName DepFormScrappedController * @Author cy * @Date 2023/11/30 * @Description * @Version 1.0 **/ @Api(value = "库管员", tags = "库管员") @RestController @RequestMapping("/pc/l/wh/form/scrapped") public class DepFormScrappedController extends BaseController { @Resource private DepFormScrappedServiceImpl depFormScrappedService; @ApiOperation(value = "新增报废单", notes = "新增报废单") @PostMapping("/deptAdd") public ResponseValue deptAdd() { LDeptFormScrappedParam param = CommonUtil.getObjFromReqBody(LDeptFormScrappedParam.class); LDeptFormScrappedParam query = new LDeptFormScrappedParam(); CommonUtil.copyProperties(param, query); param = query; FinSysTenantUser sysInfo = this.getSysInfo(); return depFormScrappedService.add(param, this.getCurrentUser(), sysInfo); } /** * @Description 列表查询 * 1.查询报废单 2.查询报废单物品 * @Date */ @ApiOperation(value = "列表查询", notes = "列表查询") @ApiImplicitParams({ @ApiImplicitParam(name = "param", value = "查询条件", dataType = "LWhFormScrappedQry", paramType = "query") }) @GetMapping("/deptList") public ResponseValue queryList() { LDeptFormScrappedQry param = CommonUtil.getObjFromReq(LDeptFormScrappedQry.class); LDeptFormScrappedQry query = new LDeptFormScrappedQry(); CommonUtil.copyProperties(param, query); param = query; FinSysTenantUser sysInfo = getSysInfo(); if (sysInfo == null) { return ResponseValue.error("登录用户信息不存在"); } param.setAgencyId(sysInfo.getTenantId()); return ResponseValue.success(depFormScrappedService.queryList(param)); } } consum-base/src/main/java/com/consum/base/core/WarehouseBusinessService.java
@@ -794,15 +794,15 @@ his.setEndCount(result.getEnd_count()); his.setWarehouseId(scrapped.getOutWarehouseId()); his.setWarehouseName(scrapped.getOutWarehouseName()); his.setDepartmentId(scrapped.getDepartmentId()); his.setDepartmentName(scrapped.getDepartmentName()); // his.setDepartmentId(scrapped.getDepartmentId()); // his.setDepartmentName(scrapped.getDepartmentName()); insert(his); DepFormScrappedModel model = new DepFormScrappedModel(); model.setId(NumberGenerator.getLongSequenceNumber()); model.setDepFormScrappedGoodsId(map.getLong("DEP_FORM_SCRAPPED_GOODS_ID")); model.setScrappedCode(map.getString("SCRAPPED_CODE")); model.setScrappedCode(map.getLong("SCRAPPED_CODE")); model.setScrappedName(map.getString("SCRAPPED_NAME")); // model.setUsingGoodsHisId(his.getId()); // model.setDepFormScrappedId(scrapped.getId()); consum-base/src/main/java/com/consum/base/pojo/DepFormScrappedGoodsParam.java
New file @@ -0,0 +1,35 @@ package com.consum.base.pojo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; /** * @ClassName DepFormScrappedGoodsParam * @Author cy * @Date 2023/12/1 * @Description * @Version 1.0 **/ @Data public class DepFormScrappedGoodsParam { @ApiModelProperty("分类id") private Long baseCategoryId; @ApiModelProperty("物品模版编号") private Long baseGoodsTemplateId; private String goodsTemplateName; // @ApiModelProperty("调拨单编码") // private String businessFormCode; @ApiModelProperty("调拨单Id") private Long transBusinessId; /** * 型号 */ private List<DepFormScrappedModelParam> models; } consum-base/src/main/java/com/consum/base/pojo/DepFormScrappedModelParam.java
New file @@ -0,0 +1,51 @@ package com.consum.base.pojo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @ClassName DepFormScrappedModelParam * @Author cy * @Date 2023/12/1 * @Description * @Version 1.0 **/ @Data public class DepFormScrappedModelParam { @ApiModelProperty("物品型号id") private Long baseGoodsModelsId; @ApiModelProperty("价值类型") private String classification;//"B类" @ApiModelProperty("报废数量") private Integer counts; @ApiModelProperty("分发数量") private Integer goodsNum; @ApiModelProperty("在用数量") private Integer userUseCount; @ApiModelProperty("物品id") private Long goodsTemplatesId; @ApiModelProperty("物品型号") private String modelName; @ApiModelProperty("调拨使用人表中ID(A类物品填)") private Long modelUserId; @ApiModelProperty("使用人员名称(可不填)") private String nowUserName; // @ApiModelProperty("使用人员名称(可不填)") // private String nowUserPhone; @ApiModelProperty("报废原因CODE") private Long scrappedCode; @ApiModelProperty("计量单位") private String unit; } consum-base/src/main/java/com/consum/base/pojo/LDeptFormScrappedParam.java
@@ -13,9 +13,6 @@ @ApiModelProperty(value = "部门id") private Long departmentId; @ApiModelProperty(value = "部门ID") private Long outWarehouseId; /** * 报废时间 */ @@ -27,29 +24,14 @@ @ApiModelProperty(value = "手续") private String procureDoc; /** * 机构id */ @ApiModelProperty(value = "机构id") private Long agencyId; /** * 仓库编号 */ @ApiModelProperty(value = "仓库编号") private Long warehouseId; /** * 操作人 */ @ApiModelProperty(value = "操作人") private Long operatorId; // @ApiModelProperty(value = "操作人") // private String operatorName; @ApiModelProperty(value = "报废商品信息") private List<LWhFormScrappedGoodsInfoParam> scrappedGoodsInfo; private List<DepFormScrappedGoodsParam> goods; } consum-base/src/main/java/com/consum/base/pojo/query/LDeptFormScrappedQry.java
New file @@ -0,0 +1,43 @@ package com.consum.base.pojo.query; import lombok.Data; /** * @ClassName LDeptFormScrappedQry * @Author cy * @Date 2023/12/1 * @Description * @Version 1.0 **/ @Data public class LDeptFormScrappedQry { /** * 报废单号 */ private String businessFormCode; /** * 物品模版名称 */ private String goodsTemplateName; /** * 报废时间 开始 */ private Long startTime; /** * 报废时间 结束 */ private Long endTime; /** * 创建人 */ private String operatorName; /** * 机构 */ private String agencyId; private Integer pageSize = 10; private Integer pageNum = 1; } consum-base/src/main/java/com/consum/base/service/DepFormScrappedServiceImpl.java
New file @@ -0,0 +1,228 @@ package com.consum.base.service; import cn.hutool.core.convert.Convert; import com.consum.base.core.CodeGeneratorEnum; import com.consum.base.core.CodeGeneratorService; import com.consum.base.core.utils.MapperUtil; import com.consum.base.pojo.DepFormScrappedGoodsParam; import com.consum.base.pojo.DepFormScrappedModelParam; import com.consum.base.pojo.LDeptFormScrappedParam; import com.consum.base.pojo.query.LDeptFormScrappedQry; import com.consum.model.po.*; import com.iplatform.model.po.S_user_core; import com.walker.db.page.GenericPager; import com.walker.infrastructure.utils.CollectionUtils; import com.walker.infrastructure.utils.DateUtils; import com.walker.infrastructure.utils.NumberGenerator; import com.walker.infrastructure.utils.StringUtils; import com.walker.jdbc.service.BaseServiceImpl; import com.walker.web.ResponseValue; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; /** * @ClassName DepFormScrappedServiceImpl * @Author cy * @Date 2023/11/30 * @Description * @Version 1.0 **/ @Service public class DepFormScrappedServiceImpl extends BaseServiceImpl { @Resource private CodeGeneratorService codeGeneratorService; @Resource private FinSysTenantDepartmentServiceImpl departmentService; @Resource private LWhFormTransferServiceImpl lWhFormTransferService; @Resource private BaseCategoryServiceImpl baseCategoryService; @Resource private SDictDataServiceImpl sDictDataService; @Resource private BaseGoodsModelsServiceImpl baseGoodsModelsService; @Transactional public ResponseValue add(LDeptFormScrappedParam param, S_user_core currentUser, FinSysTenantUser sysInfo) { long dealTime = DateUtils.getDateTimeNumber(System.currentTimeMillis()); //1.新增报废单记录 DepFormScrapped lDeptFormScrapped = new DepFormScrapped(); //报废单id long lWhFormScrappedId = NumberGenerator.getLongSequenceNumber(); lDeptFormScrapped.setId(lWhFormScrappedId); lDeptFormScrapped.setBusinessFormCode(codeGeneratorService.createBusinessFormCode(CodeGeneratorEnum.Scrapped)); lDeptFormScrapped.setProcureDoc(param.getProcureDoc()); lDeptFormScrapped.setOutWarehouseType(1); lDeptFormScrapped.setOutWarehouseId(param.getDepartmentId()); // 查询部门名称 FinSysTenantDepartment sysTenantDepartment = departmentService.getById(param.getDepartmentId()); if (sysTenantDepartment == null) { log.error("部门不存在"); return ResponseValue.error("部门不存在"); } lDeptFormScrapped.setOutWarehouseName(sysTenantDepartment.getName()); lDeptFormScrapped.setOperatorId(sysInfo.getSysUserId()); lDeptFormScrapped.setOperatorName(sysInfo.getUserName()); lDeptFormScrapped.setDealTime(param.getDealTime()); lDeptFormScrapped.setAgencyId(Long.valueOf(sysInfo.getTenantId())); lDeptFormScrapped.setAgencyName(sysInfo.getTenantName()); //根据部门id查询部门 FinSysTenantDepartment department = this.departmentService.getById(sysInfo.getSysDeptId()); if (department != null) { lDeptFormScrapped.setDepartmentId(sysInfo.getSysDeptId()); lDeptFormScrapped.setDepartmentName(department.getName()); } lDeptFormScrapped.setCreateTime(dealTime); lDeptFormScrapped.setStates(1); //2.报废单物品【DEP_FORM_SCRAPPED_GOODS】 List<DepFormScrappedGoodsParam> scrappedGoodsInfo = param.getGoods(); if (CollectionUtils.isEmpty(scrappedGoodsInfo)) { return ResponseValue.error("报废单物品不能为空"); } ArrayList<DepFormScrappedGoods> scrappedGoodsArrayList = new ArrayList<>(); ArrayList<DepFormScrappedModel> modelArrayList = new ArrayList<>(); for (DepFormScrappedGoodsParam depFormScrappedGoodsParam : scrappedGoodsInfo) { DepFormScrappedGoods depFormScrappedGoods = new DepFormScrappedGoods(); depFormScrappedGoods.setId(NumberGenerator.getLongSequenceNumber()); depFormScrappedGoods.setDepFormScrappedId(lWhFormScrappedId); depFormScrappedGoods.setBaseGoodsTemplateId(depFormScrappedGoodsParam.getBaseGoodsTemplateId()); depFormScrappedGoods.setBaseGoodsTemplateName(depFormScrappedGoodsParam.getGoodsTemplateName()); // 分类信息 Long baseCategoryId = depFormScrappedGoodsParam.getBaseCategoryId(); BaseCategory baseCategory = baseCategoryService.get(new BaseCategory(baseCategoryId)); if (baseCategory != null) { depFormScrappedGoods.setCategoryName(baseCategory.getCategoryName()); depFormScrappedGoods.setClassification(baseCategory.getClassification()); } // 查询分发单信息 Long transBusinessId = depFormScrappedGoodsParam.getTransBusinessId(); LWhFormTransfer lWhFormTransfer = lWhFormTransferService.get(new LWhFormTransfer(transBusinessId)); if (lWhFormTransfer == null) { return ResponseValue.error("报废单物品不能为空"); } depFormScrappedGoods.setTransBusinessId(transBusinessId); depFormScrappedGoods.setBusinessFormCode(lWhFormTransfer.getBusinessFormCode()); depFormScrappedGoods.setTransOutWarehouseId(lWhFormTransfer.getOutWarehouseId()); depFormScrappedGoods.setTransOutWarehouseType(lWhFormTransfer.getOutWarehouseType()); // 型号信息 List<DepFormScrappedModelParam> modelList = depFormScrappedGoodsParam.getModels(); if (CollectionUtils.isEmpty(modelList)) { return ResponseValue.error("报废单物品型号不能为空"); } //获取报废原因code List<Long> scrappedCodeList = modelList.stream().map(params -> params.getScrappedCode()).collect(Collectors.toList()); //根据报废原因code查询数据字典 List<SDictData> SDictDataList = sDictDataService.selectByScrappedCodeList(scrappedCodeList); Map<Long, String> scrappedNameMap = SDictDataList.stream().collect(Collectors.toMap(s -> s.getDict_code(), s -> s.getDict_label())); for (DepFormScrappedModelParam depFormScrappedModelParam : modelList) { DepFormScrappedModel depFormScrappedModel = new DepFormScrappedModel(); depFormScrappedModel.setId(NumberGenerator.getLongSequenceNumber()); depFormScrappedModel.setDepFormScrappedId(lWhFormScrappedId); depFormScrappedModel.setDepFormScrappedGoodsId(depFormScrappedGoods.getId()); //报废原因 depFormScrappedModel.setScrappedCode(depFormScrappedModelParam.getScrappedCode()); depFormScrappedModel.setScrappedName(scrappedNameMap.get(depFormScrappedModel.getScrappedCode())); // 物品 及 型号 信息 Long baseGoodsModelsId = depFormScrappedModelParam.getBaseGoodsModelsId(); if (baseGoodsModelsId == null) { return ResponseValue.error("报废单物品型号不能为空"); } List<Map<String, Object>> modelInfoList = baseGoodsModelsService.queryGoodsModelInfo(baseGoodsModelsId); if (CollectionUtils.isEmpty(modelInfoList)) { return ResponseValue.error("未查询到报废单物品型号"); } Map<String, Object> modelInfo = modelInfoList.get(0); depFormScrappedModel.setBaseGoodsTemplateId(Convert.toLong(modelInfo.get("goodsId"))); depFormScrappedModel.setBaseGoodsTemplateName(Convert.toStr(modelInfo.get("goodsName"))); depFormScrappedModel.setClassification(Convert.toStr(modelInfo.get("type"))); depFormScrappedModel.setUnit(Convert.toStr(modelInfo.get("unit"))); depFormScrappedModel.setBaseGoodsModelsId(baseGoodsModelsId); depFormScrappedModel.setBaseGoodsModelsName(Convert.toStr(modelInfo.get("modelName"))); //调拨单信息 depFormScrappedModel.setProcureModelUserId(depFormScrappedModelParam.getModelUserId()); depFormScrappedModel.setGoodsUserName(depFormScrappedModelParam.getNowUserName()); depFormScrappedModel.setInitialCount(depFormScrappedModelParam.getGoodsNum()); depFormScrappedModel.setUseCount(depFormScrappedModelParam.getUserUseCount()); depFormScrappedModel.setCounts(depFormScrappedModelParam.getCounts()); //增加到批量插入list modelArrayList.add(depFormScrappedModel); } //增加到批量插入list scrappedGoodsArrayList.add(depFormScrappedGoods); } int flag1 = this.insert(lDeptFormScrapped); if (flag1 == 0) { log.error("新增报废单失败"); return ResponseValue.error("新增报废单失败"); } int i = insertBatch(scrappedGoodsArrayList); int i2 = insertBatch(modelArrayList); return ResponseValue.success(); } /** * @Description 列表查询 */ private static String QUERY_LIST = "SELECT scrap.id,scrap.BUSINESS_FORM_CODE,scrap.DEPARTMENT_NAME,scrap.OPERATOR_NAME,scrap.DEAL_TIME,model.BASE_GOODS_TEMPLATE_ID,model.BASE_GOODS_TEMPLATE_NAME,SUM(model.COUNTS) total_Count FROM DEP_FORM_SCRAPPED scrap LEFT JOIN DEP_FORM_SCRAPPED_MODEL model ON scrap.id=model.DEP_FORM_SCRAPPED_ID where 1=1"; private static String QUERY_LIST_END = " GROUP BY scrap.id,scrap.BUSINESS_FORM_CODE,scrap.DEPARTMENT_NAME,scrap.OPERATOR_NAME,scrap.DEAL_TIME,model.BASE_GOODS_TEMPLATE_ID,model.BASE_GOODS_TEMPLATE_NAME ORDER BY scrap.DEAL_TIME DESC"; public GenericPager<Map<String, Object>> queryList(LDeptFormScrappedQry param) { HashMap<String, Object> paramts = new HashMap<>(); StringBuilder sql = new StringBuilder(QUERY_LIST); //报废单号 if (!StringUtils.isEmpty(param.getBusinessFormCode())) { sql.append(" and scrap.BUSINESS_FORM_CODE = :businessFormCode "); paramts.put("businessFormCode", param.getBusinessFormCode()); } //机构 sql.append(" and scrap.AGENCY_ID = :agencyId "); if (param.getAgencyId() != null) { paramts.put("agencyId", param.getAgencyId()); } //物品名称 if (!StringUtils.isEmpty(param.getGoodsTemplateName())) { sql.append(" and model.BASE_GOODS_TEMPLATE_NAME LIKE :goodsTemplateName "); paramts.put("goodsTemplateName", StringUtils.CHAR_PERCENT + param.getGoodsTemplateName() + StringUtils.CHAR_PERCENT); } //创建人 if (!StringUtils.isEmpty(param.getOperatorName())) { sql.append(" and scrap.OPERATOR_NAME LIKE :operatorName "); paramts.put("operatorName", StringUtils.CHAR_PERCENT + param.getOperatorName() + StringUtils.CHAR_PERCENT); } //报废时间 if (param.getStartTime() != null) { sql.append(" and scrap.DEAL_TIME >=:dealTimeStart "); paramts.put("dealTimeStart", param.getStartTime() * 1000000); } if (param.getEndTime() != null) { sql.append(" and scrap.DEAL_TIME <:dealTimeEnd "); paramts.put("dealTimeEnd", param.getEndTime() * 1000000 + 240000); } sql.append(QUERY_LIST_END); return selectSplit(sql.toString(), paramts, param.getPageNum(), param.getPageSize(), new MapperUtil()); } } consum-base/src/main/java/com/consum/base/service/LWhProcureModelService.java
@@ -49,7 +49,7 @@ * @return */ private static String GET_FF_ORDER_BY_GOODS_ID_AND_DEPT = "SELECT trans.ID TRANS_BUSINESS_ID,trans.BUSINESS_FORM_CODE,baseTemp.ID BASE_GOODS_TEMPLATE_ID,baseTemp.GOODS_NAME BASE_GOODS_TEMPLATE_NAME,sum(proModel.COUNTS) total_count,sum(proModel.USE_COUNT) use_count,trans.IN_TIME FROM L_WH_FORM_TRANSFER trans LEFT JOIN L_WH_PROCURE_MODEL proModel ON proModel.BUSINESS_ID=trans.id LEFT JOIN BASE_GOODS_MODELS baseModel ON proModel.BASE_GOODS_MODELS_ID=baseModel.id LEFT JOIN BASE_GOODS_TEMPLATE baseTemp ON baseTemp.id=baseModel.GOODS_TEMPLATES_ID WHERE proModel.BUSINESS_TYPE=4 AND proModel.USE_COUNT> 0 "; private static String GET_FF_ORDER_BY_GOODS_ID_AND_DEPT_END = " GROUP BY trans.ID,trans.BUSINESS_FORM_CODE,baseTemp.ID,baseTemp.GOODS_NAME,trans.IN_TIME"; private static String GET_FF_ORDER_BY_GOODS_ID_AND_DEPT_END = " GROUP BY trans.ID,trans.BUSINESS_FORM_CODE,baseTemp.ID,baseTemp.GOODS_NAME,trans.IN_TIME order by trans.BUSINESS_FORM_CODE desc"; public List<Map<String, Object>> getFfOrderByGoodsIdAndDept(Long goodsTemplateId, Long departmentId) { StringBuilder sql = new StringBuilder(GET_FF_ORDER_BY_GOODS_ID_AND_DEPT); consum-base/src/main/java/com/consum/base/service/SDictDataServiceImpl.java
@@ -2,6 +2,7 @@ import com.consum.model.po.SDictData; import com.walker.jdbc.service.BaseServiceImpl; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; @@ -16,7 +17,7 @@ * @Author 卢庆阳 * @Date 2023/11/2 */ public List<SDictData> selectByScrappedCodeList(List<String> scrappedCodeList) { public List<SDictData> selectByScrappedCodeList(List scrappedCodeList) { if (CollectionUtils.isEmpty(scrappedCodeList)) { log.error("参数错误"); return null; @@ -24,14 +25,16 @@ StringBuilder sql = new StringBuilder("SELECT * FROM s_dict_data WHERE 1 = 1 "); HashMap<String, Object> paramts = new HashMap<>(); sql.append(" and dict_code in ( "); for (int i = 0; i < scrappedCodeList.size(); i++) { sql.append(scrappedCodeList.get(i)); if (i < scrappedCodeList.size() - 1) { sql.append(","); } } sql.append(" ) "); sql.append(" and dict_code in ( ").append( StringUtils.join(scrappedCodeList, ",")).append(")"); // for (int i = 0; i < scrappedCodeList.size(); i++) { // sql.append(scrappedCodeList.get(i)); // if (i < scrappedCodeList.size() - 1) { // sql.append(","); // } // } // sql.append(" ) "); return this.select(sql.toString(), paramts, new SDictData()); } consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrapped.java
@@ -53,11 +53,19 @@ @JsonIgnore protected boolean isset_dealTime = false; private String departmentId = null; 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 Long departmentName = null; private String departmentName = null; @JsonIgnore protected boolean isset_departmentName = false; @@ -220,32 +228,60 @@ return this.dealTime == null; } public String getDepartmentId() { 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(String departmentId) { public void setDepartmentId(Long departmentId) { this.departmentId = departmentId; this.isset_departmentId = true; } @JsonIgnore public boolean isEmptyDepartmentId() { return this.departmentId == null || this.departmentId.length() == 0; return this.departmentId == null; } public Long getDepartmentName() { public String getDepartmentName() { return this.departmentName; } public void setDepartmentName(Long departmentName) { public void setDepartmentName(String departmentName) { this.departmentName = departmentName; this.isset_departmentName = true; } @JsonIgnore public boolean isEmptyDepartmentName() { return this.departmentName == null; return this.departmentName == null || this.departmentName.length() == 0; } public Long getCreateTime() { @@ -305,6 +341,8 @@ .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) @@ -351,6 +389,12 @@ if (this.isset_dealTime) { dep_form_scrapped.setDealTime(this.getDealTime()); } if (this.isset_agencyId) { dep_form_scrapped.setAgencyId(this.getAgencyId()); } if (this.isset_agencyName) { dep_form_scrapped.setAgencyName(this.getAgencyName()); } if (this.isset_departmentId) { dep_form_scrapped.setDepartmentId(this.getDepartmentId()); } consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedModel.java
@@ -29,7 +29,7 @@ @JsonIgnore protected boolean isset_depFormScrappedGoodsId = false; private String scrappedCode = null; private Long scrappedCode = null; @JsonIgnore protected boolean isset_scrappedCode = false; @@ -148,18 +148,18 @@ return this.depFormScrappedGoodsId == null; } public String getScrappedCode() { public Long getScrappedCode() { return this.scrappedCode; } public void setScrappedCode(String scrappedCode) { public void setScrappedCode(Long scrappedCode) { this.scrappedCode = scrappedCode; this.isset_scrappedCode = true; } @JsonIgnore public boolean isEmptyScrappedCode() { return this.scrappedCode == null || this.scrappedCode.length() == 0; return this.scrappedCode == null; } public String getScrappedName() { consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedModel_mapper.java
@@ -7,6 +7,8 @@ import com.walker.jdbc.sqlgen.InsertBuilder; import com.walker.jdbc.sqlgen.SelectBuilder; import com.walker.jdbc.sqlgen.UpdateBuilder; import com.walker.jdbc.util.StringUtils; import org.springframework.jdbc.core.RowMapper; import java.sql.ResultSet; @@ -349,7 +351,11 @@ } columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.ScrappedCode); if (columnIndex > 0) { dep_form_scrapped_model.setScrappedCode(rs.getString(columnIndex)); if (rs.getBigDecimal(columnIndex) == null) { dep_form_scrapped_model.setScrappedCode(null); } else { dep_form_scrapped_model.setScrappedCode(rs.getLong(columnIndex)); } } columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.ScrappedName); if (columnIndex > 0) { consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrapped_mapper.java
@@ -7,6 +7,8 @@ import com.walker.jdbc.sqlgen.InsertBuilder; import com.walker.jdbc.sqlgen.SelectBuilder; import com.walker.jdbc.sqlgen.UpdateBuilder; import com.walker.jdbc.util.StringUtils; import org.springframework.jdbc.core.RowMapper; import java.sql.ResultSet; @@ -35,6 +37,8 @@ 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"; @@ -76,6 +80,12 @@ } if (depFormScrapped.isset_dealTime) { this.setDealTime(depFormScrapped.getDealTime()); } if (depFormScrapped.isset_agencyId) { this.setAgencyId(depFormScrapped.getAgencyId()); } if (depFormScrapped.isset_agencyName) { this.setAgencyName(depFormScrapped.getAgencyName()); } if (depFormScrapped.isset_departmentId) { this.setDepartmentId(depFormScrapped.getDepartmentId()); @@ -143,6 +153,8 @@ 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); @@ -165,6 +177,8 @@ 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); @@ -188,6 +202,8 @@ 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); @@ -210,6 +226,8 @@ 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); @@ -262,7 +280,7 @@ */ @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, department_id, department_name, create_time, states, beiz from " + this.getTableName_() + " " + where, 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); } /** @@ -270,7 +288,7 @@ */ @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, department_id, department_name, create_time, states, beiz from " + this.getTableName_() + " " + where, 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); } /** @@ -355,17 +373,29 @@ dep_form_scrapped.setDealTime(rs.getLong(columnIndex)); } } columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.AgencyId); if (columnIndex > 0) { if (rs.getBigDecimal(columnIndex) == null) { dep_form_scrapped.setAgencyId(null); } else { dep_form_scrapped.setAgencyId(rs.getLong(columnIndex)); } } columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.AgencyName); if (columnIndex > 0) { dep_form_scrapped.setAgencyName(rs.getString(columnIndex)); } columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.DepartmentId); if (columnIndex > 0) { dep_form_scrapped.setDepartmentId(rs.getString(columnIndex)); if (rs.getBigDecimal(columnIndex) == null) { dep_form_scrapped.setDepartmentId(null); } else { dep_form_scrapped.setDepartmentId(rs.getLong(columnIndex)); } } columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.DepartmentName); if (columnIndex > 0) { if (rs.getBigDecimal(columnIndex) == null) { dep_form_scrapped.setDepartmentName(null); } else { dep_form_scrapped.setDepartmentName(rs.getLong(columnIndex)); } dep_form_scrapped.setDepartmentName(rs.getString(columnIndex)); } columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.CreateTime); if (columnIndex > 0) {