From 50fdeebd4b4cf53660ee7f5e81cbac11cbf3af18 Mon Sep 17 00:00:00 2001 From: chj <16637853242@163.com> Date: Wed, 30 Aug 2023 17:46:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E5=93=81=E7=94=9F=E4=BA=A7=E5=85=A5?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- op-auth/src/main/resources/bootstrap.yml | 6 +- .../controller/WmsProductPutController.java | 97 +++++ .../java/com/op/wms/domain/WmsProductPut.java | 365 ++++++++++++++++++ .../op/wms/mapper/WmsProductPutMapper.java | 61 +++ .../op/wms/service/IWmsProductPutService.java | 60 +++ .../impl/WmsProductPutServiceImpl.java | 99 +++++ .../mapper/wms/WmsProductPutMapper.xml | 204 ++++++++++ 7 files changed, 889 insertions(+), 3 deletions(-) create mode 100644 op-modules/op-wms/src/main/java/com/op/wms/controller/WmsProductPutController.java create mode 100644 op-modules/op-wms/src/main/java/com/op/wms/domain/WmsProductPut.java create mode 100644 op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsProductPutMapper.java create mode 100644 op-modules/op-wms/src/main/java/com/op/wms/service/IWmsProductPutService.java create mode 100644 op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java create mode 100644 op-modules/op-wms/src/main/resources/mapper/wms/WmsProductPutMapper.xml diff --git a/op-auth/src/main/resources/bootstrap.yml b/op-auth/src/main/resources/bootstrap.yml index b2c96afa..759df4ad 100644 --- a/op-auth/src/main/resources/bootstrap.yml +++ b/op-auth/src/main/resources/bootstrap.yml @@ -15,14 +15,14 @@ spring: # username: nacos # password: sfnacos2023 # 服务注册地址 - #--spring.cloud.nacos.discovery.namespace=zxl --spring.cloud.nacos.config.namespace=zxl + #--spring.cloud.nacos.discovery.namespace=chj --spring.cloud.nacos.config.namespace=chj namespace: lanju-op - group: zxl + group: chj server-addr: 140.249.53.142:8848 config: #命名空间 namespace: lanju-op - group: zxl + group: chj # 配置中心地址 server-addr: 140.249.53.142:8848 # 配置文件格式 diff --git a/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsProductPutController.java b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsProductPutController.java new file mode 100644 index 00000000..ee78aa0a --- /dev/null +++ b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsProductPutController.java @@ -0,0 +1,97 @@ +package com.op.wms.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.op.common.log.annotation.Log; +import com.op.common.log.enums.BusinessType; +import com.op.common.security.annotation.RequiresPermissions; +import com.op.wms.domain.WmsProductPut; +import com.op.wms.service.IWmsProductPutService; +import com.op.common.core.web.controller.BaseController; +import com.op.common.core.web.domain.AjaxResult; +import com.op.common.core.utils.poi.ExcelUtil; +import com.op.common.core.web.page.TableDataInfo; + +/** + * 成品生产入库Controller + * + * @author Open Platform + * @date 2023-08-29 + */ +@RestController +@RequestMapping("/put") +public class WmsProductPutController extends BaseController { + @Autowired + private IWmsProductPutService wmsProductPutService; + + /** + * 查询成品生产入库列表 + */ + @RequiresPermissions("wms:put:list") + @GetMapping("/list") + public TableDataInfo list(WmsProductPut wmsProductPut) { + startPage(); + List list = wmsProductPutService.selectWmsProductPutList(wmsProductPut); + return getDataTable(list); + } + + /** + * 导出成品生产入库列表 + */ + @RequiresPermissions("wms:put:export") + @Log(title = "成品生产入库", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, WmsProductPut wmsProductPut) { + List list = wmsProductPutService.selectWmsProductPutList(wmsProductPut); + ExcelUtil util = new ExcelUtil(WmsProductPut.class); + util.exportExcel(response, list, "成品生产入库数据"); + } + + /** + * 获取成品生产入库详细信息 + */ + @RequiresPermissions("wms:put:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) { + return success(wmsProductPutService.selectWmsProductPutById(id)); + } + + /** + * 新增成品生产入库 + */ + @RequiresPermissions("wms:put:add") + @Log(title = "成品生产入库", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody WmsProductPut wmsProductPut) { + return toAjax(wmsProductPutService.insertWmsProductPut(wmsProductPut)); + } + + /** + * 修改成品生产入库 + */ + @RequiresPermissions("wms:put:edit") + @Log(title = "成品生产入库", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody WmsProductPut wmsProductPut) { + return toAjax(wmsProductPutService.updateWmsProductPut(wmsProductPut)); + } + + /** + * 删除成品生产入库 + */ + @RequiresPermissions("wms:put:remove") + @Log(title = "成品生产入库", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) { + return toAjax(wmsProductPutService.deleteWmsProductPutByIds(ids)); + } +} diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsProductPut.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsProductPut.java new file mode 100644 index 00000000..6d7051ce --- /dev/null +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsProductPut.java @@ -0,0 +1,365 @@ +package com.op.wms.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.op.common.core.annotation.Excel; +import com.op.common.core.web.domain.BaseEntity; + +/** + * 成品生产入库对象 wms_product_put + * + * @author Open Platform + * @date 2023-08-29 + */ +public class WmsProductPut extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** ID */ + private String id; + + /** 工厂编码 */ + @Excel(name = "工厂编码") + private String factoryCode; + + /** 退货单号 */ + @Excel(name = "退货单号") + private String productOrder; + + /** 仓库编码 */ + @Excel(name = "仓库编码") + private String whCode; + + /** 库区编码 */ + @Excel(name = "库区编码") + private String waCode; + + /** 库位编码 */ + @Excel(name = "库位编码") + private String wlCode; + + /** 产品名称 */ + @Excel(name = "产品名称") + private String productName; + + /** 产品编码 */ + @Excel(name = "产品编码") + private String productCode; + + /** 产品分类 */ + @Excel(name = "产品分类") + private String productSort; + + /** 规格型号 */ + @Excel(name = "规格型号") + private String specification; + + /** 单位 */ + @Excel(name = "单位") + private String unitOfMeasure; + + /** 计划入库数量 */ + @Excel(name = "计划入库数量") + private Long planQuantity; + + /** 入库数量 */ + @Excel(name = "入库数量") + private Long putQuantity; + + /** 入库状态 */ + @Excel(name = "入库状态") + private String status; + + /** 过账SAP状态 */ + @Excel(name = "过账SAP状态") + private String sapStatus; + + /** 过账SAP凭证 */ + @Excel(name = "过账SAP凭证") + private String sapProof; + + /** 过账SAP返回信息 */ + @Excel(name = "过账SAP返回信息") + private String sapMessage; + + /** 入库时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date putDate; + + /** 预留字段1 */ + @Excel(name = "预留字段1") + private String attr1; + + /** 预留字段2 */ + @Excel(name = "预留字段2") + private String attr2; + + /** 预留字段3 */ + @Excel(name = "预留字段3") + private String attr3; + + /** 预留字段4 */ + @Excel(name = "预留字段4") + private String attr4; + + /** 预留字段5 */ + @Excel(name = "预留字段5") + private String attr5; + + /** 预留字段6 */ + @Excel(name = "预留字段6") + private String attr6; + + /** 预留字段7 */ + @Excel(name = "预留字段7") + private String attr7; + + /** 预留字段8 */ + @Excel(name = "预留字段8") + private String attr8; + + /** 预留字段9 */ + @Excel(name = "预留字段9") + private String attr9; + + /** 预留字段10 */ + @Excel(name = "预留字段10") + private String attr10; + + public void setId(String id) { + this.id = id; + } + + public String getId() { + return id; + } + public void setFactoryCode(String factoryCode) { + this.factoryCode = factoryCode; + } + + public String getFactoryCode() { + return factoryCode; + } + public void setProductOrder(String productOrder) { + this.productOrder = productOrder; + } + + public String getProductOrder() { + return productOrder; + } + public void setWhCode(String whCode) { + this.whCode = whCode; + } + + public String getWhCode() { + return whCode; + } + public void setWaCode(String waCode) { + this.waCode = waCode; + } + + public String getWaCode() { + return waCode; + } + public void setWlCode(String wlCode) { + this.wlCode = wlCode; + } + + public String getWlCode() { + return wlCode; + } + public void setProductName(String productName) { + this.productName = productName; + } + + public String getProductName() { + return productName; + } + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + public String getProductCode() { + return productCode; + } + public void setProductSort(String productSort) { + this.productSort = productSort; + } + + public String getProductSort() { + return productSort; + } + public void setSpecification(String specification) { + this.specification = specification; + } + + public String getSpecification() { + return specification; + } + public void setUnitOfMeasure(String unitOfMeasure) { + this.unitOfMeasure = unitOfMeasure; + } + + public String getUnitOfMeasure() { + return unitOfMeasure; + } + public void setPlanQuantity(Long planQuantity) { + this.planQuantity = planQuantity; + } + + public Long getPlanQuantity() { + return planQuantity; + } + public void setPutQuantity(Long putQuantity) { + this.putQuantity = putQuantity; + } + + public Long getPutQuantity() { + return putQuantity; + } + public void setStatus(String status) { + this.status = status; + } + + public String getStatus() { + return status; + } + public void setSapStatus(String sapStatus) { + this.sapStatus = sapStatus; + } + + public String getSapStatus() { + return sapStatus; + } + public void setSapProof(String sapProof) { + this.sapProof = sapProof; + } + + public String getSapProof() { + return sapProof; + } + public void setSapMessage(String sapMessage) { + this.sapMessage = sapMessage; + } + + public String getSapMessage() { + return sapMessage; + } + public void setPutDate(Date putDate) { + this.putDate = putDate; + } + + public Date getPutDate() { + return putDate; + } + public void setAttr1(String attr1) { + this.attr1 = attr1; + } + + public String getAttr1() { + return attr1; + } + public void setAttr2(String attr2) { + this.attr2 = attr2; + } + + public String getAttr2() { + return attr2; + } + public void setAttr3(String attr3) { + this.attr3 = attr3; + } + + public String getAttr3() { + return attr3; + } + public void setAttr4(String attr4) { + this.attr4 = attr4; + } + + public String getAttr4() { + return attr4; + } + public void setAttr5(String attr5) { + this.attr5 = attr5; + } + + public String getAttr5() { + return attr5; + } + public void setAttr6(String attr6) { + this.attr6 = attr6; + } + + public String getAttr6() { + return attr6; + } + public void setAttr7(String attr7) { + this.attr7 = attr7; + } + + public String getAttr7() { + return attr7; + } + public void setAttr8(String attr8) { + this.attr8 = attr8; + } + + public String getAttr8() { + return attr8; + } + public void setAttr9(String attr9) { + this.attr9 = attr9; + } + + public String getAttr9() { + return attr9; + } + public void setAttr10(String attr10) { + this.attr10 = attr10; + } + + public String getAttr10() { + return attr10; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("factoryCode", getFactoryCode()) + .append("productOrder", getProductOrder()) + .append("whCode", getWhCode()) + .append("waCode", getWaCode()) + .append("wlCode", getWlCode()) + .append("productName", getProductName()) + .append("productCode", getProductCode()) + .append("productSort", getProductSort()) + .append("specification", getSpecification()) + .append("unitOfMeasure", getUnitOfMeasure()) + .append("planQuantity", getPlanQuantity()) + .append("putQuantity", getPutQuantity()) + .append("status", getStatus()) + .append("sapStatus", getSapStatus()) + .append("sapProof", getSapProof()) + .append("sapMessage", getSapMessage()) + .append("putDate", getPutDate()) + .append("attr1", getAttr1()) + .append("attr2", getAttr2()) + .append("attr3", getAttr3()) + .append("attr4", getAttr4()) + .append("attr5", getAttr5()) + .append("attr6", getAttr6()) + .append("attr7", getAttr7()) + .append("attr8", getAttr8()) + .append("attr9", getAttr9()) + .append("attr10", getAttr10()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsProductPutMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsProductPutMapper.java new file mode 100644 index 00000000..808d193c --- /dev/null +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsProductPutMapper.java @@ -0,0 +1,61 @@ +package com.op.wms.mapper; + +import java.util.List; + +import com.op.wms.domain.WmsProductPut; + +/** + * 成品生产入库Mapper接口 + * + * @author Open Platform + * @date 2023-08-29 + */ +public interface WmsProductPutMapper { + /** + * 查询成品生产入库 + * + * @param id 成品生产入库主键 + * @return 成品生产入库 + */ + public WmsProductPut selectWmsProductPutById(String id); + + /** + * 查询成品生产入库列表 + * + * @param wmsProductPut 成品生产入库 + * @return 成品生产入库集合 + */ + public List selectWmsProductPutList(WmsProductPut wmsProductPut); + + /** + * 新增成品生产入库 + * + * @param wmsProductPut 成品生产入库 + * @return 结果 + */ + public int insertWmsProductPut(WmsProductPut wmsProductPut); + + /** + * 修改成品生产入库 + * + * @param wmsProductPut 成品生产入库 + * @return 结果 + */ + public int updateWmsProductPut(WmsProductPut wmsProductPut); + + /** + * 删除成品生产入库 + * + * @param id 成品生产入库主键 + * @return 结果 + */ + public int deleteWmsProductPutById(String id); + + /** + * 批量删除成品生产入库 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteWmsProductPutByIds(String[] ids); +} diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsProductPutService.java b/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsProductPutService.java new file mode 100644 index 00000000..63be118c --- /dev/null +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsProductPutService.java @@ -0,0 +1,60 @@ +package com.op.wms.service; + +import java.util.List; +import com.op.wms.domain.WmsProductPut; + +/** + * 成品生产入库Service接口 + * + * @author Open Platform + * @date 2023-08-29 + */ +public interface IWmsProductPutService { + /** + * 查询成品生产入库 + * + * @param id 成品生产入库主键 + * @return 成品生产入库 + */ + public WmsProductPut selectWmsProductPutById(String id); + + /** + * 查询成品生产入库列表 + * + * @param wmsProductPut 成品生产入库 + * @return 成品生产入库集合 + */ + public List selectWmsProductPutList(WmsProductPut wmsProductPut); + + /** + * 新增成品生产入库 + * + * @param wmsProductPut 成品生产入库 + * @return 结果 + */ + public int insertWmsProductPut(WmsProductPut wmsProductPut); + + /** + * 修改成品生产入库 + * + * @param wmsProductPut 成品生产入库 + * @return 结果 + */ + public int updateWmsProductPut(WmsProductPut wmsProductPut); + + /** + * 批量删除成品生产入库 + * + * @param ids 需要删除的成品生产入库主键集合 + * @return 结果 + */ + public int deleteWmsProductPutByIds(String[] ids); + + /** + * 删除成品生产入库信息 + * + * @param id 成品生产入库主键 + * @return 结果 + */ + public int deleteWmsProductPutById(String id); +} diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java new file mode 100644 index 00000000..95b417af --- /dev/null +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java @@ -0,0 +1,99 @@ +package com.op.wms.service.impl; + +import java.util.List; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.op.common.core.utils.DateUtils; +import com.op.common.core.utils.uuid.IdUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.op.wms.mapper.WmsProductPutMapper; +import com.op.wms.domain.WmsProductPut; +import com.op.wms.service.IWmsProductPutService; + +/** + * 成品生产入库Service业务层处理 + * + * @author Open Platform + * @date 2023-08-29 + */ +@Service +public class WmsProductPutServiceImpl implements IWmsProductPutService { + @Autowired + + private WmsProductPutMapper wmsProductPutMapper; + + /** + * 查询成品生产入库 + * + * @param id 成品生产入库主键 + * @return 成品生产入库 + */ + @Override + public WmsProductPut selectWmsProductPutById(String id) { + return wmsProductPutMapper.selectWmsProductPutById(id); + } + + /** + * 查询成品生产入库列表 + * + * @param wmsProductPut 成品生产入库 + * @return 成品生产入库 + */ + @Override + @DS("#header.poolName") + public List selectWmsProductPutList(WmsProductPut wmsProductPut) { + return wmsProductPutMapper.selectWmsProductPutList(wmsProductPut); + } + + /** + * 新增成品生产入库 + * + * @param wmsProductPut 成品生产入库 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int insertWmsProductPut(WmsProductPut wmsProductPut) { + wmsProductPut.setId(IdUtils.fastSimpleUUID()); + wmsProductPut.setCreateTime(DateUtils.getNowDate()); + return wmsProductPutMapper.insertWmsProductPut(wmsProductPut); + } + + /** + * 修改成品生产入库 + * + * @param wmsProductPut 成品生产入库 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int updateWmsProductPut(WmsProductPut wmsProductPut) { + wmsProductPut.setUpdateTime(DateUtils.getNowDate()); + return wmsProductPutMapper.updateWmsProductPut(wmsProductPut); + } + + /** + * 批量删除成品生产入库 + * + * @param ids 需要删除的成品生产入库主键 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int deleteWmsProductPutByIds(String[] ids) { + return wmsProductPutMapper.deleteWmsProductPutByIds(ids); + } + + /** + * 删除成品生产入库信息 + * + * @param id 成品生产入库主键 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int deleteWmsProductPutById(String id) { + return wmsProductPutMapper.deleteWmsProductPutById(id); + } +} diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/WmsProductPutMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/WmsProductPutMapper.xml new file mode 100644 index 00000000..9ed37044 --- /dev/null +++ b/op-modules/op-wms/src/main/resources/mapper/wms/WmsProductPutMapper.xml @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, factory_code, product_order, wh_code, wa_code, wl_code, product_name, product_code, product_sort, specification, unit_of_measure, plan_quantity, put_quantity, status, SAP_status, SAP_proof, SAP_message, put_date, attr1, attr2, attr3, attr4, attr5, attr6, attr7, attr8, attr9, attr10, create_by, create_time, update_by, update_time from wms_product_put + + + + + + + + insert into wms_product_put + + id, + factory_code, + product_order, + wh_code, + wa_code, + wl_code, + product_name, + product_code, + product_sort, + specification, + unit_of_measure, + plan_quantity, + put_quantity, + status, + SAP_status, + SAP_proof, + SAP_message, + put_date, + attr1, + attr2, + attr3, + attr4, + attr5, + attr6, + attr7, + attr8, + attr9, + attr10, + create_by, + create_time, + update_by, + update_time, + + + #{id}, + #{factoryCode}, + #{productOrder}, + #{whCode}, + #{waCode}, + #{wlCode}, + #{productName}, + #{productCode}, + #{productSort}, + #{specification}, + #{unitOfMeasure}, + #{planQuantity}, + #{putQuantity}, + #{status}, + #{sapStatus}, + #{sapProof}, + #{sapMessage}, + #{putDate}, + #{attr1}, + #{attr2}, + #{attr3}, + #{attr4}, + #{attr5}, + #{attr6}, + #{attr7}, + #{attr8}, + #{attr9}, + #{attr10}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update wms_product_put + + factory_code = #{factoryCode}, + product_order = #{productOrder}, + wh_code = #{whCode}, + wa_code = #{waCode}, + wl_code = #{wlCode}, + product_name = #{productName}, + product_code = #{productCode}, + product_sort = #{productSort}, + specification = #{specification}, + unit_of_measure = #{unitOfMeasure}, + plan_quantity = #{planQuantity}, + put_quantity = #{putQuantity}, + status = #{status}, + SAP_status = #{sapStatus}, + SAP_proof = #{sapProof}, + SAP_message = #{sapMessage}, + put_date = #{putDate}, + attr1 = #{attr1}, + attr2 = #{attr2}, + attr3 = #{attr3}, + attr4 = #{attr4}, + attr5 = #{attr5}, + attr6 = #{attr6}, + attr7 = #{attr7}, + attr8 = #{attr8}, + attr9 = #{attr9}, + attr10 = #{attr10}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from wms_product_put where id = #{id} + + + + delete from wms_product_put where id in + + #{id} + + + \ No newline at end of file