From bc02b7352e85bb6e9500b610b09bc932e0b1a40b Mon Sep 17 00:00:00 2001 From: yinq <1345442242@qq.com> Date: Thu, 2 Nov 2023 15:42:50 +0800 Subject: [PATCH] =?UTF-8?q?add=20-=20=E4=BB=BB=E5=8A=A1=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/RealTaskInfoController.java | 103 ++++++ .../com/aucma/report/domain/RealTaskInfo.java | 329 ++++++++++++++++++ .../report/mapper/RealTaskInfoMapper.java | 61 ++++ .../report/service/IRealTaskInfoService.java | 61 ++++ .../service/impl/RealTaskInfoServiceImpl.java | 93 +++++ .../mapper/report/RealTaskInfoMapper.xml | 151 ++++++++ 6 files changed, 798 insertions(+) create mode 100644 aucma-report/src/main/java/com/aucma/report/controller/RealTaskInfoController.java create mode 100644 aucma-report/src/main/java/com/aucma/report/domain/RealTaskInfo.java create mode 100644 aucma-report/src/main/java/com/aucma/report/mapper/RealTaskInfoMapper.java create mode 100644 aucma-report/src/main/java/com/aucma/report/service/IRealTaskInfoService.java create mode 100644 aucma-report/src/main/java/com/aucma/report/service/impl/RealTaskInfoServiceImpl.java create mode 100644 aucma-report/src/main/resources/mapper/report/RealTaskInfoMapper.xml diff --git a/aucma-report/src/main/java/com/aucma/report/controller/RealTaskInfoController.java b/aucma-report/src/main/java/com/aucma/report/controller/RealTaskInfoController.java new file mode 100644 index 0000000..50d3fb6 --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/controller/RealTaskInfoController.java @@ -0,0 +1,103 @@ +package com.aucma.report.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.aucma.common.utils.DateUtils; +import org.springframework.security.access.prepost.PreAuthorize; +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.aucma.common.annotation.Log; +import com.aucma.common.core.controller.BaseController; +import com.aucma.common.core.domain.AjaxResult; +import com.aucma.common.enums.BusinessType; +import com.aucma.report.domain.RealTaskInfo; +import com.aucma.report.service.IRealTaskInfoService; +import com.aucma.common.utils.poi.ExcelUtil; +import com.aucma.common.core.page.TableDataInfo; + +/** + * 任务信息Controller + * + * @author Yinq + * @date 2023-11-02 + */ +@RestController +@RequestMapping("/report/RealTaskInfo" ) +public class RealTaskInfoController extends BaseController { + @Autowired + private IRealTaskInfoService realTaskInfoService; + + /** + * 查询任务信息列表 + */ + @PreAuthorize("@ss.hasPermi('report:RealTaskInfo:list')" ) + @GetMapping("/list" ) + public TableDataInfo list(RealTaskInfo realTaskInfo) { + startPage(); + List list = realTaskInfoService.selectRealTaskInfoList(realTaskInfo); + return getDataTable(list); + } + + /** + * 导出任务信息列表 + */ + @PreAuthorize("@ss.hasPermi('report:RealTaskInfo:export')" ) + @Log(title = "任务信息" , businessType = BusinessType.EXPORT) + @PostMapping("/export" ) + public void export(HttpServletResponse response, RealTaskInfo realTaskInfo) { + List list = realTaskInfoService.selectRealTaskInfoList(realTaskInfo); + ExcelUtil util = new ExcelUtil(RealTaskInfo. class); + util.exportExcel(response, list, "任务信息数据" ); + } + + /** + * 获取任务信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('report:RealTaskInfo:query')" ) + @GetMapping(value = "/{objid}" ) + public AjaxResult getInfo(@PathVariable("objid" ) Long objid) { + return success(realTaskInfoService.selectRealTaskInfoByObjid(objid)); + } + + /** + * 新增任务信息 + */ + @PreAuthorize("@ss.hasPermi('report:RealTaskInfo:add')" ) + @Log(title = "任务信息" , businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody RealTaskInfo realTaskInfo) { + realTaskInfo.setCreatedBy(getUsername()); + realTaskInfo.setCreatedTime(DateUtils.getNowDate()); + return toAjax(realTaskInfoService.insertRealTaskInfo(realTaskInfo)); + } + + /** + * 修改任务信息 + */ + @PreAuthorize("@ss.hasPermi('report:RealTaskInfo:edit')" ) + @Log(title = "任务信息" , businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody RealTaskInfo realTaskInfo) { + realTaskInfo.setUpdatedBy(getUsername()); + realTaskInfo.setUpdatedTime(DateUtils.getNowDate()); + return toAjax(realTaskInfoService.updateRealTaskInfo(realTaskInfo)); + } + + /** + * 删除任务信息 + */ + @PreAuthorize("@ss.hasPermi('report:RealTaskInfo:remove')" ) + @Log(title = "任务信息" , businessType = BusinessType.DELETE) + @DeleteMapping("/{objids}" ) + public AjaxResult remove(@PathVariable Long[] objids) { + return toAjax(realTaskInfoService.deleteRealTaskInfoByObjids(objids)); + } +} diff --git a/aucma-report/src/main/java/com/aucma/report/domain/RealTaskInfo.java b/aucma-report/src/main/java/com/aucma/report/domain/RealTaskInfo.java new file mode 100644 index 0000000..7fc1709 --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/domain/RealTaskInfo.java @@ -0,0 +1,329 @@ +package com.aucma.report.domain; + +import java.math.BigDecimal; +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.aucma.common.annotation.Excel; +import com.aucma.common.core.domain.BaseEntity; + +/** + * 任务信息对象 real_taskinfo + * + * @author Yinq + * @date 2023-11-02 + */ +public class RealTaskInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键标识 + */ + private Long objid; + + /** + * 任务编号 + */ + @Excel(name = "任务编号") + private String taskCode; + + /** + * 任务类型(1-入库;2-出库) + */ + @Excel(name = "任务类型", readConverterExp = "1=-入库;2-出库") + private Long taskType; + + /** + * 任务状态(1-待执行;2-执行中;3-完成) + */ + @Excel(name = "任务状态", readConverterExp = "1=-待执行;2-执行中;3-完成") + private Long taskStatus; + + /** + * 计划编号 + */ + @Excel(name = "计划编号") + private String planCode; + + /** + * 物料编号 + */ + @Excel(name = "物料编号") + private String materialCode; + + /** + * 物料类型 + */ + @Excel(name = "物料类型") + private String materialType; + + /** + * 货道编号 + */ + @Excel(name = "货道编号") + private String spaceCode; + + /** + * 计划数量 + */ + @Excel(name = "计划数量") + private BigDecimal planAmount; + + /** + * 完成数量 + */ + @Excel(name = "完成数量") + private BigDecimal completeAmount; + + /** + * 开始时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date beginTime; + + /** + * 结束时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date endTime; + + /** + * 是否标识 + */ +// @Excel(name = "是否标识") + private Long isFlag; + + /** + * 创建人 + */ + @Excel(name = "创建人") + private String createdBy; + + /** + * 创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date createdTime; + + /** + * 更新人 + */ + @Excel(name = "更新人") + private String updatedBy; + + /** + * 更新时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date updatedTime; + + /** + * 仓库编号 + */ + @Excel(name = "仓库编号") + private String storeCode; + + /** + * 货道名称 + */ + @Excel(name = "货道名称") + private String spaceName; + + /** + * 任务形式(0-自动;1-手动) + */ + @Excel(name = "任务形式", readConverterExp = "0=-自动;1-手动") + private Long taskModel; + + public void setObjid(Long objid) { + this.objid = objid; + } + + public Long getObjid() { + return objid; + } + + public void setTaskCode(String taskCode) { + this.taskCode = taskCode; + } + + public String getTaskCode() { + return taskCode; + } + + public void setTaskType(Long taskType) { + this.taskType = taskType; + } + + public Long getTaskType() { + return taskType; + } + + public void setTaskStatus(Long taskStatus) { + this.taskStatus = taskStatus; + } + + public Long getTaskStatus() { + return taskStatus; + } + + public void setPlanCode(String planCode) { + this.planCode = planCode; + } + + public String getPlanCode() { + return planCode; + } + + 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 setSpaceCode(String spaceCode) { + this.spaceCode = spaceCode; + } + + public String getSpaceCode() { + return spaceCode; + } + + public void setPlanAmount(BigDecimal planAmount) { + this.planAmount = planAmount; + } + + public BigDecimal getPlanAmount() { + return planAmount; + } + + public void setCompleteAmount(BigDecimal completeAmount) { + this.completeAmount = completeAmount; + } + + public BigDecimal getCompleteAmount() { + return completeAmount; + } + + 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 setIsFlag(Long isFlag) { + this.isFlag = isFlag; + } + + public Long getIsFlag() { + return isFlag; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedTime(Date createdTime) { + this.createdTime = createdTime; + } + + public Date getCreatedTime() { + return createdTime; + } + + public void setUpdatedBy(String updatedBy) { + this.updatedBy = updatedBy; + } + + public String getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedTime(Date updatedTime) { + this.updatedTime = updatedTime; + } + + public Date getUpdatedTime() { + return updatedTime; + } + + public void setStoreCode(String storeCode) { + this.storeCode = storeCode; + } + + public String getStoreCode() { + return storeCode; + } + + public void setSpaceName(String spaceName) { + this.spaceName = spaceName; + } + + public String getSpaceName() { + return spaceName; + } + + public void setTaskModel(Long taskModel) { + this.taskModel = taskModel; + } + + public Long getTaskModel() { + return taskModel; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("objid", getObjid()) + .append("taskCode", getTaskCode()) + .append("taskType", getTaskType()) + .append("taskStatus", getTaskStatus()) + .append("planCode", getPlanCode()) + .append("materialCode", getMaterialCode()) + .append("materialType", getMaterialType()) + .append("spaceCode", getSpaceCode()) + .append("planAmount", getPlanAmount()) + .append("completeAmount", getCompleteAmount()) + .append("beginTime", getBeginTime()) + .append("endTime", getEndTime()) + .append("isFlag", getIsFlag()) + .append("createdBy", getCreatedBy()) + .append("createdTime", getCreatedTime()) + .append("updatedBy", getUpdatedBy()) + .append("updatedTime", getUpdatedTime()) + .append("storeCode", getStoreCode()) + .append("spaceName", getSpaceName()) + .append("taskModel", getTaskModel()) + .toString(); + } +} diff --git a/aucma-report/src/main/java/com/aucma/report/mapper/RealTaskInfoMapper.java b/aucma-report/src/main/java/com/aucma/report/mapper/RealTaskInfoMapper.java new file mode 100644 index 0000000..53b4256 --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/mapper/RealTaskInfoMapper.java @@ -0,0 +1,61 @@ +package com.aucma.report.mapper; + +import java.util.List; +import com.aucma.report.domain.RealTaskInfo; + +/** + * 任务信息Mapper接口 + * + * @author Yinq + * @date 2023-11-02 + */ +public interface RealTaskInfoMapper +{ + /** + * 查询任务信息 + * + * @param objid 任务信息主键 + * @return 任务信息 + */ + public RealTaskInfo selectRealTaskInfoByObjid(Long objid); + + /** + * 查询任务信息列表 + * + * @param realTaskInfo 任务信息 + * @return 任务信息集合 + */ + public List selectRealTaskInfoList(RealTaskInfo realTaskInfo); + + /** + * 新增任务信息 + * + * @param realTaskInfo 任务信息 + * @return 结果 + */ + public int insertRealTaskInfo(RealTaskInfo realTaskInfo); + + /** + * 修改任务信息 + * + * @param realTaskInfo 任务信息 + * @return 结果 + */ + public int updateRealTaskInfo(RealTaskInfo realTaskInfo); + + /** + * 删除任务信息 + * + * @param objid 任务信息主键 + * @return 结果 + */ + public int deleteRealTaskInfoByObjid(Long objid); + + /** + * 批量删除任务信息 + * + * @param objids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteRealTaskInfoByObjids(Long[] objids); +} diff --git a/aucma-report/src/main/java/com/aucma/report/service/IRealTaskInfoService.java b/aucma-report/src/main/java/com/aucma/report/service/IRealTaskInfoService.java new file mode 100644 index 0000000..a3d3575 --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/service/IRealTaskInfoService.java @@ -0,0 +1,61 @@ +package com.aucma.report.service; + +import java.util.List; +import com.aucma.report.domain.RealTaskInfo; + +/** + * 任务信息Service接口 + * + * @author Yinq + * @date 2023-11-02 + */ +public interface IRealTaskInfoService +{ + /** + * 查询任务信息 + * + * @param objid 任务信息主键 + * @return 任务信息 + */ + public RealTaskInfo selectRealTaskInfoByObjid(Long objid); + + /** + * 查询任务信息列表 + * + * @param realTaskInfo 任务信息 + * @return 任务信息集合 + */ + public List selectRealTaskInfoList(RealTaskInfo realTaskInfo); + + /** + * 新增任务信息 + * + * @param realTaskInfo 任务信息 + * @return 结果 + */ + public int insertRealTaskInfo(RealTaskInfo realTaskInfo); + + /** + * 修改任务信息 + * + * @param realTaskInfo 任务信息 + * @return 结果 + */ + public int updateRealTaskInfo(RealTaskInfo realTaskInfo); + + /** + * 批量删除任务信息 + * + * @param objids 需要删除的任务信息主键集合 + * @return 结果 + */ + public int deleteRealTaskInfoByObjids(Long[] objids); + + /** + * 删除任务信息信息 + * + * @param objid 任务信息主键 + * @return 结果 + */ + public int deleteRealTaskInfoByObjid(Long objid); +} diff --git a/aucma-report/src/main/java/com/aucma/report/service/impl/RealTaskInfoServiceImpl.java b/aucma-report/src/main/java/com/aucma/report/service/impl/RealTaskInfoServiceImpl.java new file mode 100644 index 0000000..6ab82af --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/service/impl/RealTaskInfoServiceImpl.java @@ -0,0 +1,93 @@ +package com.aucma.report.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.aucma.report.mapper.RealTaskInfoMapper; +import com.aucma.report.domain.RealTaskInfo; +import com.aucma.report.service.IRealTaskInfoService; + +/** + * 任务信息Service业务层处理 + * + * @author Yinq + * @date 2023-11-02 + */ +@Service +public class RealTaskInfoServiceImpl implements IRealTaskInfoService +{ + @Autowired + private RealTaskInfoMapper realTaskInfoMapper; + + /** + * 查询任务信息 + * + * @param objid 任务信息主键 + * @return 任务信息 + */ + @Override + public RealTaskInfo selectRealTaskInfoByObjid(Long objid) + { + return realTaskInfoMapper.selectRealTaskInfoByObjid(objid); + } + + /** + * 查询任务信息列表 + * + * @param realTaskInfo 任务信息 + * @return 任务信息 + */ + @Override + public List selectRealTaskInfoList(RealTaskInfo realTaskInfo) + { + return realTaskInfoMapper.selectRealTaskInfoList(realTaskInfo); + } + + /** + * 新增任务信息 + * + * @param realTaskInfo 任务信息 + * @return 结果 + */ + @Override + public int insertRealTaskInfo(RealTaskInfo realTaskInfo) + { + return realTaskInfoMapper.insertRealTaskInfo(realTaskInfo); + } + + /** + * 修改任务信息 + * + * @param realTaskInfo 任务信息 + * @return 结果 + */ + @Override + public int updateRealTaskInfo(RealTaskInfo realTaskInfo) + { + return realTaskInfoMapper.updateRealTaskInfo(realTaskInfo); + } + + /** + * 批量删除任务信息 + * + * @param objids 需要删除的任务信息主键 + * @return 结果 + */ + @Override + public int deleteRealTaskInfoByObjids(Long[] objids) + { + return realTaskInfoMapper.deleteRealTaskInfoByObjids(objids); + } + + /** + * 删除任务信息信息 + * + * @param objid 任务信息主键 + * @return 结果 + */ + @Override + public int deleteRealTaskInfoByObjid(Long objid) + { + return realTaskInfoMapper.deleteRealTaskInfoByObjid(objid); + } +} diff --git a/aucma-report/src/main/resources/mapper/report/RealTaskInfoMapper.xml b/aucma-report/src/main/resources/mapper/report/RealTaskInfoMapper.xml new file mode 100644 index 0000000..c3ec219 --- /dev/null +++ b/aucma-report/src/main/resources/mapper/report/RealTaskInfoMapper.xml @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select objid, task_code, task_type, task_status, plan_code, material_code, material_type, space_code, plan_amount, complete_amount, begin_time, end_time, is_flag, created_by, created_time, updated_by, updated_time, store_code, space_name, task_model from real_taskinfo + + + + + + + + + SELECT SEQ_REAL_TASK_INFO.NEXTVAL as objid FROM DUAL + + insert into real_taskinfo + + objid, + task_code, + task_type, + task_status, + plan_code, + material_code, + material_type, + space_code, + plan_amount, + complete_amount, + begin_time, + end_time, + is_flag, + created_by, + created_time, + updated_by, + updated_time, + store_code, + space_name, + task_model, + + + #{objid}, + #{taskCode}, + #{taskType}, + #{taskStatus}, + #{planCode}, + #{materialCode}, + #{materialType}, + #{spaceCode}, + #{planAmount}, + #{completeAmount}, + #{beginTime}, + #{endTime}, + #{isFlag}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{storeCode}, + #{spaceName}, + #{taskModel}, + + + + + update real_taskinfo + + task_code = #{taskCode}, + task_type = #{taskType}, + task_status = #{taskStatus}, + plan_code = #{planCode}, + material_code = #{materialCode}, + material_type = #{materialType}, + space_code = #{spaceCode}, + plan_amount = #{planAmount}, + complete_amount = #{completeAmount}, + begin_time = #{beginTime}, + end_time = #{endTime}, + is_flag = #{isFlag}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + store_code = #{storeCode}, + space_name = #{spaceName}, + task_model = #{taskModel}, + + where objid = #{objid} + + + + delete from real_taskinfo where objid = #{objid} + + + + delete from real_taskinfo where objid in + + #{objid} + + + \ No newline at end of file