From ef9286ba67f1f24f7d9211589051c40751d3489b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A3=AE=E5=B1=BF=E6=B5=B7=E5=B7=B7?= <15711450175@163.com> Date: Fri, 10 Sep 2021 14:11:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E5=AE=8C=E6=88=90=20=20=20?= =?UTF-8?q?=20=E5=BE=85=E5=85=A5=E5=BA=93=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/PrepareInstoreInfoController.java | 129 ++++++++++++ .../PrepareInstoreInfo.html | 138 ++++++++++++ .../system/PrepareInstoreInfo/add.html | 124 +++++++++++ .../system/PrepareInstoreInfo/edit.html | 125 +++++++++++ .../system/domain/PrepareInstoreInfo.java | 196 ++++++++++++++++++ .../mapper/PrepareInstoreInfoMapper.java | 61 ++++++ .../service/IPrepareInstoreInfoService.java | 61 ++++++ .../impl/PrepareInstoreInfoServiceImpl.java | 94 +++++++++ .../system/PrepareInstoreInfoMapper.xml | 102 +++++++++ 9 files changed, 1030 insertions(+) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/basic/PrepareInstoreInfoController.java create mode 100644 ruoyi-admin/src/main/resources/templates/system/PrepareInstoreInfo/PrepareInstoreInfo.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/PrepareInstoreInfo/add.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/PrepareInstoreInfo/edit.html create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/PrepareInstoreInfo.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/PrepareInstoreInfoMapper.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/IPrepareInstoreInfoService.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PrepareInstoreInfoServiceImpl.java create mode 100644 ruoyi-system/src/main/resources/mapper/system/PrepareInstoreInfoMapper.xml diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/basic/PrepareInstoreInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/basic/PrepareInstoreInfoController.java new file mode 100644 index 0000000..0e15f68 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/basic/PrepareInstoreInfoController.java @@ -0,0 +1,129 @@ +package com.ruoyi.web.controller.basic; + +import java.util.List; + +import com.ruoyi.web.controller.tool.UUIDTool; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.domain.PrepareInstoreInfo; +import com.ruoyi.system.service.IPrepareInstoreInfoService; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 待入库信息Controller + * + * @author Frank zhou + * @date 2021-09-10 + */ +@Controller +@RequestMapping("/system/PrepareInstoreInfo") +public class PrepareInstoreInfoController extends BaseController +{ + private String prefix = "system/PrepareInstoreInfo"; + + @Autowired + private IPrepareInstoreInfoService prepareInstoreInfoService; + + @RequiresPermissions("system:PrepareInstoreInfo:view") + @GetMapping() + public String PrepareInstoreInfo() + { + return prefix + "/PrepareInstoreInfo"; + } + + /** + * 查询待入库信息列表 + */ + @RequiresPermissions("system:PrepareInstoreInfo:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(PrepareInstoreInfo prepareInstoreInfo) + { + startPage(); + List list = prepareInstoreInfoService.selectPrepareInstoreInfoList(prepareInstoreInfo); + return getDataTable(list); + } + + /** + * 导出待入库信息列表 + */ + @RequiresPermissions("system:PrepareInstoreInfo:export") + @Log(title = "待入库信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(PrepareInstoreInfo prepareInstoreInfo) + { + List list = prepareInstoreInfoService.selectPrepareInstoreInfoList(prepareInstoreInfo); + ExcelUtil util = new ExcelUtil(PrepareInstoreInfo.class); + return util.exportExcel(list, "待入库信息数据"); + } + + /** + * 新增待入库信息 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存待入库信息 + */ + @RequiresPermissions("system:PrepareInstoreInfo:add") + @Log(title = "待入库信息", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(PrepareInstoreInfo prepareInstoreInfo) + { + prepareInstoreInfo.setObjid(UUIDTool.generate()); + return toAjax(prepareInstoreInfoService.insertPrepareInstoreInfo(prepareInstoreInfo)); + } + + /** + * 修改待入库信息 + */ + @GetMapping("/edit/{objid}") + public String edit(@PathVariable("objid") String objid, ModelMap mmap) + { + PrepareInstoreInfo prepareInstoreInfo = prepareInstoreInfoService.selectPrepareInstoreInfoByObjid(objid); + mmap.put("prepareInstoreInfo", prepareInstoreInfo); + return prefix + "/edit"; + } + + /** + * 修改保存待入库信息 + */ + @RequiresPermissions("system:PrepareInstoreInfo:edit") + @Log(title = "待入库信息", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(PrepareInstoreInfo prepareInstoreInfo) + { + return toAjax(prepareInstoreInfoService.updatePrepareInstoreInfo(prepareInstoreInfo)); + } + + /** + * 删除待入库信息 + */ + @RequiresPermissions("system:PrepareInstoreInfo:remove") + @Log(title = "待入库信息", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(prepareInstoreInfoService.deletePrepareInstoreInfoByObjids(ids)); + } +} diff --git a/ruoyi-admin/src/main/resources/templates/system/PrepareInstoreInfo/PrepareInstoreInfo.html b/ruoyi-admin/src/main/resources/templates/system/PrepareInstoreInfo/PrepareInstoreInfo.html new file mode 100644 index 0000000..b4aacca --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/PrepareInstoreInfo/PrepareInstoreInfo.html @@ -0,0 +1,138 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/PrepareInstoreInfo/add.html b/ruoyi-admin/src/main/resources/templates/system/PrepareInstoreInfo/add.html new file mode 100644 index 0000000..d4a8df0 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/PrepareInstoreInfo/add.html @@ -0,0 +1,124 @@ + + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/PrepareInstoreInfo/edit.html b/ruoyi-admin/src/main/resources/templates/system/PrepareInstoreInfo/edit.html new file mode 100644 index 0000000..f352e7f --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/PrepareInstoreInfo/edit.html @@ -0,0 +1,125 @@ + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/PrepareInstoreInfo.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/PrepareInstoreInfo.java new file mode 100644 index 0000000..34644fc --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/PrepareInstoreInfo.java @@ -0,0 +1,196 @@ +package com.ruoyi.system.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.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 待入库信息对象 prepare_instore_info + * + * @author Frank zhou + * @date 2021-09-10 + */ +public class PrepareInstoreInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private String objid; + + /** 任务编号 */ + @Excel(name = "任务编号") + private String taskCode; + + /** 堆垛机编号 */ + @Excel(name = "堆垛机编号") + private String pilerCode; + + /** 物料编码 */ + @Excel(name = "物料编码") + private String materialCode; + + /** 物料类别 */ + @Excel(name = "物料类别") + private String materialType; + + /** 目标仓库 */ + @Excel(name = "目标仓库") + private String storeCode; + + /** 目标库位 */ + @Excel(name = "目标库位") + private String locationCode; + + /** 入库类型 */ + @Excel(name = "入库类型") + private Long operationType; + + /** 入库状态 */ + @Excel(name = "入库状态") + private Long instoreStatus; + + /** 开始时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date beginTime; + + /** 结束时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date endTime; + + /** 记录时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date recordTime; + + public void setObjid(String objid) + { + this.objid = objid; + } + + public String getObjid() + { + return objid; + } + public void setTaskCode(String taskCode) + { + this.taskCode = taskCode; + } + + public String getTaskCode() + { + return taskCode; + } + public void setPilerCode(String pilerCode) + { + this.pilerCode = pilerCode; + } + + public String getPilerCode() + { + return pilerCode; + } + public void setMaterialCode(String materialCode) + { + this.materialCode = materialCode; + } + + public String getMaterialCode() + { + return materialCode; + } + public void setMaterialType(String materialType) + { + this.materialType = materialType; + } + + public String getMaterialType() + { + return materialType; + } + public void setStoreCode(String storeCode) + { + this.storeCode = storeCode; + } + + public String getStoreCode() + { + return storeCode; + } + public void setLocationCode(String locationCode) + { + this.locationCode = locationCode; + } + + public String getLocationCode() + { + return locationCode; + } + public void setOperationType(Long operationType) + { + this.operationType = operationType; + } + + public Long getOperationType() + { + return operationType; + } + public void setInstoreStatus(Long instoreStatus) + { + this.instoreStatus = instoreStatus; + } + + public Long getInstoreStatus() + { + return instoreStatus; + } + public void setBeginTime(Date beginTime) + { + this.beginTime = beginTime; + } + + public Date getBeginTime() + { + return beginTime; + } + public void setEndTime(Date endTime) + { + this.endTime = endTime; + } + + public Date getEndTime() + { + return endTime; + } + public void setRecordTime(Date recordTime) + { + this.recordTime = recordTime; + } + + public Date getRecordTime() + { + return recordTime; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("objid", getObjid()) + .append("taskCode", getTaskCode()) + .append("pilerCode", getPilerCode()) + .append("materialCode", getMaterialCode()) + .append("materialType", getMaterialType()) + .append("storeCode", getStoreCode()) + .append("locationCode", getLocationCode()) + .append("operationType", getOperationType()) + .append("instoreStatus", getInstoreStatus()) + .append("beginTime", getBeginTime()) + .append("endTime", getEndTime()) + .append("recordTime", getRecordTime()) + .toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/PrepareInstoreInfoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/PrepareInstoreInfoMapper.java new file mode 100644 index 0000000..902c984 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/PrepareInstoreInfoMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.PrepareInstoreInfo; + +/** + * 待入库信息Mapper接口 + * + * @author Frank zhou + * @date 2021-09-10 + */ +public interface PrepareInstoreInfoMapper +{ + /** + * 查询待入库信息 + * + * @param objid 待入库信息主键 + * @return 待入库信息 + */ + public PrepareInstoreInfo selectPrepareInstoreInfoByObjid(String objid); + + /** + * 查询待入库信息列表 + * + * @param prepareInstoreInfo 待入库信息 + * @return 待入库信息集合 + */ + public List selectPrepareInstoreInfoList(PrepareInstoreInfo prepareInstoreInfo); + + /** + * 新增待入库信息 + * + * @param prepareInstoreInfo 待入库信息 + * @return 结果 + */ + public int insertPrepareInstoreInfo(PrepareInstoreInfo prepareInstoreInfo); + + /** + * 修改待入库信息 + * + * @param prepareInstoreInfo 待入库信息 + * @return 结果 + */ + public int updatePrepareInstoreInfo(PrepareInstoreInfo prepareInstoreInfo); + + /** + * 删除待入库信息 + * + * @param objid 待入库信息主键 + * @return 结果 + */ + public int deletePrepareInstoreInfoByObjid(String objid); + + /** + * 批量删除待入库信息 + * + * @param objids 需要删除的数据主键集合 + * @return 结果 + */ + public int deletePrepareInstoreInfoByObjids(String[] objids); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IPrepareInstoreInfoService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IPrepareInstoreInfoService.java new file mode 100644 index 0000000..dfcdf4d --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IPrepareInstoreInfoService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.PrepareInstoreInfo; + +/** + * 待入库信息Service接口 + * + * @author Frank zhou + * @date 2021-09-10 + */ +public interface IPrepareInstoreInfoService +{ + /** + * 查询待入库信息 + * + * @param objid 待入库信息主键 + * @return 待入库信息 + */ + public PrepareInstoreInfo selectPrepareInstoreInfoByObjid(String objid); + + /** + * 查询待入库信息列表 + * + * @param prepareInstoreInfo 待入库信息 + * @return 待入库信息集合 + */ + public List selectPrepareInstoreInfoList(PrepareInstoreInfo prepareInstoreInfo); + + /** + * 新增待入库信息 + * + * @param prepareInstoreInfo 待入库信息 + * @return 结果 + */ + public int insertPrepareInstoreInfo(PrepareInstoreInfo prepareInstoreInfo); + + /** + * 修改待入库信息 + * + * @param prepareInstoreInfo 待入库信息 + * @return 结果 + */ + public int updatePrepareInstoreInfo(PrepareInstoreInfo prepareInstoreInfo); + + /** + * 批量删除待入库信息 + * + * @param objids 需要删除的待入库信息主键集合 + * @return 结果 + */ + public int deletePrepareInstoreInfoByObjids(String objids); + + /** + * 删除待入库信息信息 + * + * @param objid 待入库信息主键 + * @return 结果 + */ + public int deletePrepareInstoreInfoByObjid(String objid); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PrepareInstoreInfoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PrepareInstoreInfoServiceImpl.java new file mode 100644 index 0000000..b84cca3 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PrepareInstoreInfoServiceImpl.java @@ -0,0 +1,94 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.PrepareInstoreInfoMapper; +import com.ruoyi.system.domain.PrepareInstoreInfo; +import com.ruoyi.system.service.IPrepareInstoreInfoService; +import com.ruoyi.common.core.text.Convert; + +/** + * 待入库信息Service业务层处理 + * + * @author Frank zhou + * @date 2021-09-10 + */ +@Service +public class PrepareInstoreInfoServiceImpl implements IPrepareInstoreInfoService +{ + @Autowired + private PrepareInstoreInfoMapper prepareInstoreInfoMapper; + + /** + * 查询待入库信息 + * + * @param objid 待入库信息主键 + * @return 待入库信息 + */ + @Override + public PrepareInstoreInfo selectPrepareInstoreInfoByObjid(String objid) + { + return prepareInstoreInfoMapper.selectPrepareInstoreInfoByObjid(objid); + } + + /** + * 查询待入库信息列表 + * + * @param prepareInstoreInfo 待入库信息 + * @return 待入库信息 + */ + @Override + public List selectPrepareInstoreInfoList(PrepareInstoreInfo prepareInstoreInfo) + { + return prepareInstoreInfoMapper.selectPrepareInstoreInfoList(prepareInstoreInfo); + } + + /** + * 新增待入库信息 + * + * @param prepareInstoreInfo 待入库信息 + * @return 结果 + */ + @Override + public int insertPrepareInstoreInfo(PrepareInstoreInfo prepareInstoreInfo) + { + return prepareInstoreInfoMapper.insertPrepareInstoreInfo(prepareInstoreInfo); + } + + /** + * 修改待入库信息 + * + * @param prepareInstoreInfo 待入库信息 + * @return 结果 + */ + @Override + public int updatePrepareInstoreInfo(PrepareInstoreInfo prepareInstoreInfo) + { + return prepareInstoreInfoMapper.updatePrepareInstoreInfo(prepareInstoreInfo); + } + + /** + * 批量删除待入库信息 + * + * @param objids 需要删除的待入库信息主键 + * @return 结果 + */ + @Override + public int deletePrepareInstoreInfoByObjids(String objids) + { + return prepareInstoreInfoMapper.deletePrepareInstoreInfoByObjids(Convert.toStrArray(objids)); + } + + /** + * 删除待入库信息信息 + * + * @param objid 待入库信息主键 + * @return 结果 + */ + @Override + public int deletePrepareInstoreInfoByObjid(String objid) + { + return prepareInstoreInfoMapper.deletePrepareInstoreInfoByObjid(objid); + } +} diff --git a/ruoyi-system/src/main/resources/mapper/system/PrepareInstoreInfoMapper.xml b/ruoyi-system/src/main/resources/mapper/system/PrepareInstoreInfoMapper.xml new file mode 100644 index 0000000..71ca76b --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/PrepareInstoreInfoMapper.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + select objid, task_code, piler_code, material_code, material_type, store_code, location_code, operation_type, instore_status, begin_time, end_time, record_time from prepare_instore_info + + + + + + + + + insert into prepare_instore_info + + objid, + task_code, + piler_code, + material_code, + material_type, + store_code, + location_code, + operation_type, + instore_status, + begin_time, + end_time, + record_time, + + + #{objid}, + #{taskCode}, + #{pilerCode}, + #{materialCode}, + #{materialType}, + #{storeCode}, + #{locationCode}, + #{operationType}, + #{instoreStatus}, + #{beginTime}, + #{endTime}, + #{recordTime}, + + + + + update prepare_instore_info + + task_code = #{taskCode}, + piler_code = #{pilerCode}, + material_code = #{materialCode}, + material_type = #{materialType}, + store_code = #{storeCode}, + location_code = #{locationCode}, + operation_type = #{operationType}, + instore_status = #{instoreStatus}, + begin_time = #{beginTime}, + end_time = #{endTime}, + record_time = #{recordTime}, + + where objid = #{objid} + + + + delete from prepare_instore_info where objid = #{objid} + + + + delete from prepare_instore_info where objid in + + #{objid} + + + \ No newline at end of file