项目初始化
This commit is contained in:
@@ -0,0 +1,129 @@
|
||||
package com.ruoyi.job.mydojob.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
import com.ruoyi.job.mydojob.service.IMydoJobService;
|
||||
import com.ruoyi.job.mydojobfinish.service.IMydoJobFinishService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 任务表Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/job/inmydoJob")
|
||||
public class InMydoJobController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMydoJobService mydoJobService;
|
||||
@Autowired
|
||||
private IMydoJobFinishService mydoJobFinishService;
|
||||
|
||||
/**
|
||||
* 查询任务表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJob:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MydoJob mydoJob)
|
||||
{
|
||||
startPage();
|
||||
List<MydoJob> list = null;
|
||||
//mydoJob.setInOut("1");
|
||||
if(Integer.parseInt(mydoJob.getStatus())<4) {
|
||||
list = mydoJobService.selectMydoJobList(mydoJob);
|
||||
}else{
|
||||
list= mydoJobFinishService.selectMydoJobFinishListByMydoJob(mydoJob);
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出任务表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJob:export')")
|
||||
@Log(title = "任务表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MydoJob mydoJob)
|
||||
{
|
||||
List<MydoJob> list = mydoJobService.selectMydoJobList(mydoJob);
|
||||
ExcelUtil<MydoJob> util = new ExcelUtil<MydoJob>(MydoJob.class);
|
||||
util.exportExcel(response, list, "任务表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取任务表详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJob:query')")
|
||||
@GetMapping(value = "/{jobId}")
|
||||
public AjaxResult getInfo(@PathVariable("jobId") String jobId)
|
||||
{
|
||||
return success(mydoJobService.selectMydoJobByJobId(jobId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增任务表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJob:add')")
|
||||
@Log(title = "任务表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MydoJob mydoJob)
|
||||
{
|
||||
return toAjax(mydoJobService.insertMydoJob(mydoJob));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改任务表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJob:edit')")
|
||||
@Log(title = "任务表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MydoJob mydoJob)
|
||||
{
|
||||
return toAjax(mydoJobService.updateMydoJob(mydoJob));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除任务表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJob:remove')")
|
||||
@Log(title = "任务表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{jobIds}")
|
||||
public AjaxResult remove(@PathVariable String[] jobIds)
|
||||
{
|
||||
return toAjax(mydoJobService.deleteMydoJobByJobIds(jobIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动作废任务表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasAnyPermi('job:mydoJob:manualInvalidation,job:checkMydoJob:manualInvalidation')")
|
||||
@Log(title = "任务表", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/manualInvalidation")
|
||||
public AjaxResult manualInvalidation(@RequestBody MydoJob mydoJob)
|
||||
{
|
||||
return mydoJobService.manualInvalidation(mydoJob);
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动完成任务表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasAnyPermi('job:mydoJob:manualCompleted,job:checkMydoJob:manualCompleted')")
|
||||
@Log(title = "任务表", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/manualCompleted")
|
||||
public AjaxResult manualCompleted(@RequestBody MydoJob mydoJob)
|
||||
{
|
||||
return mydoJobService.manualCompleted(mydoJob,0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.ruoyi.job.mydojob.controller;
|
||||
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
import com.ruoyi.job.mydojob.service.IMydoJobService;
|
||||
import com.ruoyi.job.mydojobfinish.service.IMydoJobFinishService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/job/outmydoJob")
|
||||
public class OutMydoJobController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IMydoJobService mydoJobService;
|
||||
@Autowired
|
||||
private IMydoJobFinishService mydoJobFinishService;
|
||||
|
||||
/**
|
||||
* 查询任务表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:outmydoJob:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MydoJob mydoJob)
|
||||
{
|
||||
startPage();
|
||||
List<MydoJob> list;
|
||||
if(Integer.parseInt(mydoJob.getStatus())<4) {
|
||||
list = mydoJobService.selectMydoJobList(mydoJob);
|
||||
}else{
|
||||
list=mydoJobFinishService.selectMydoJobFinishListByMydoJob(mydoJob);
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动完成
|
||||
*/
|
||||
@PreAuthorize("@ss.hasAnyPermi('job:outmydoJob:OuthandFinish,job:checkMydoJob:OuthandFinish,')")
|
||||
@Log(title = "出库手动完成", businessType = BusinessType.OTHER)
|
||||
@RequestMapping("/OuthandFinish")
|
||||
public AjaxResult manualCompleted(@RequestParam("jobIds")String[] jobIds)
|
||||
{
|
||||
return mydoJobService.OuthandFinish(jobIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动作废
|
||||
*/
|
||||
@PreAuthorize("@ss.hasAnyPermi('job:outmydoJob:OuthandInvalidation,job:checkMydoJob:OuthandInvalidation')")
|
||||
@Log(title = "出库手动作废", businessType = BusinessType.OTHER)
|
||||
@RequestMapping("/OuthandInvalidation")
|
||||
public AjaxResult OuthandInvalidation(@RequestParam("jobIds")String[] jobIds)
|
||||
{
|
||||
return mydoJobService.OuthandInvalidation(jobIds);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('job:outmydoJob:pointOut')")
|
||||
@Log(title = "指定货位出库", businessType = BusinessType.INSERT)
|
||||
@RequestMapping("/pointOut")
|
||||
public AjaxResult pointOut(@RequestParam("stockIds")String[] stockIds,@RequestParam("exitId")String exitId)
|
||||
{
|
||||
return mydoJobService.pointOut(stockIds,exitId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,494 @@
|
||||
package com.ruoyi.job.mydojob.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 任务表对象 mydo_job
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public class MydoJob extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 任务ID */
|
||||
@Excel(name = "任务ID")
|
||||
private String jobId;
|
||||
|
||||
/** 任务状态 */
|
||||
@Excel(name = "任务状态",dictType = "mydo_job_status")
|
||||
private String status;
|
||||
|
||||
/** 上线类型 */
|
||||
@Excel(name = "上线类型",dictType = "on_line_type")
|
||||
private String onLineType;
|
||||
|
||||
/** 任务号 */
|
||||
@Excel(name = "任务号")
|
||||
private String taskNo;
|
||||
|
||||
/** 供应商ID */
|
||||
@Excel(name = "供应商ID")
|
||||
private String supplierId;
|
||||
@Excel(name = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
/** 客户ID */
|
||||
@Excel(name = "客户ID")
|
||||
private String customerId;
|
||||
@Excel(name = "客户名称")
|
||||
private String customerName;
|
||||
|
||||
/** 部门ID */
|
||||
@Excel(name = "部门ID")
|
||||
private String departmentId;
|
||||
@Excel(name = "部门")
|
||||
private String departmentName;
|
||||
|
||||
/** 托盘码 */
|
||||
@Excel(name = "托盘码")
|
||||
private String trayCode;
|
||||
|
||||
/** 巷道ID */
|
||||
@Excel(name = "巷道ID")
|
||||
private String roadwayId;
|
||||
|
||||
/** 货位ID */
|
||||
@Excel(name = "货位ID")
|
||||
private String cargoSpaceId;
|
||||
@Excel(name = "货位名称")
|
||||
private String cargoSpaceName;
|
||||
|
||||
/** 目标巷道ID */
|
||||
@Excel(name = "目标巷道ID")
|
||||
private String targetRoadwayId;
|
||||
|
||||
/** 目标货位ID */
|
||||
@Excel(name = "目标货位ID")
|
||||
private String targetCargoSpaceId;
|
||||
@Excel(name = "目标货位名称")
|
||||
private String targetCargoSpaceName;
|
||||
|
||||
/** 产线ID */
|
||||
@Excel(name = "产线ID")
|
||||
private String lineId;
|
||||
|
||||
/** 车间ID */
|
||||
@Excel(name = "车间ID")
|
||||
private String workshopId;
|
||||
|
||||
/** 优先级 */
|
||||
@Excel(name = "优先级")
|
||||
private Long priority;
|
||||
|
||||
/** 执行阶段 */
|
||||
@Excel(name = "执行阶段",dictType = "execution_phase_type")
|
||||
private String executionPhase;
|
||||
|
||||
/** 任务类型 */
|
||||
@Excel(name = "任务类型",dictType = "in_or_out_type")
|
||||
private String inOrOut;
|
||||
|
||||
|
||||
|
||||
/** 开始时间 */
|
||||
@Excel(name = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
@Excel(name = "结束时间")
|
||||
private String finishTime;
|
||||
|
||||
/** 入口ID */
|
||||
@Excel(name = "入口ID")
|
||||
private String entranceId;
|
||||
|
||||
/** 出口ID */
|
||||
@Excel(name = "出口ID")
|
||||
private String exitId;
|
||||
|
||||
/** 班组ID */
|
||||
@Excel(name = "班组ID")
|
||||
private String classId;
|
||||
|
||||
/** 仓库ID */
|
||||
@Excel(name = "仓库ID")
|
||||
private String warehouseId;
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
/** 重分标记 */
|
||||
@Excel(name = "重分标记")
|
||||
private String faultFlag;
|
||||
|
||||
private String inOut;
|
||||
|
||||
private List<String> inOutIds;
|
||||
|
||||
private String createLeftTime;
|
||||
private String createRightTime;
|
||||
|
||||
|
||||
public String getCreateLeftTime() {
|
||||
return createLeftTime;
|
||||
}
|
||||
|
||||
public void setCreateLeftTime(String createLeftTime) {
|
||||
this.createLeftTime = createLeftTime;
|
||||
}
|
||||
|
||||
public String getCreateRightTime() {
|
||||
return createRightTime;
|
||||
}
|
||||
|
||||
public void setCreateRightTime(String createRightTime) {
|
||||
this.createRightTime = createRightTime;
|
||||
}
|
||||
|
||||
public List<String> getInOutIds() {
|
||||
return inOutIds;
|
||||
}
|
||||
|
||||
public void setInOutIds(List<String> inOutIds) {
|
||||
this.inOutIds = inOutIds;
|
||||
}
|
||||
|
||||
public String getDepartmentName() {
|
||||
return departmentName;
|
||||
}
|
||||
|
||||
public void setDepartmentName(String departmentName) {
|
||||
this.departmentName = departmentName;
|
||||
}
|
||||
|
||||
public String getWarehouseName() {
|
||||
return warehouseName;
|
||||
}
|
||||
|
||||
public void setWarehouseName(String warehouseName) {
|
||||
this.warehouseName = warehouseName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String getInOut() {
|
||||
return inOut;
|
||||
}
|
||||
|
||||
public void setInOut(String inOut) {
|
||||
this.inOut = inOut;
|
||||
}
|
||||
|
||||
public void setJobId(String jobId)
|
||||
{
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
public String getJobId()
|
||||
{
|
||||
return jobId;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setOnLineType(String onLineType)
|
||||
{
|
||||
this.onLineType = onLineType;
|
||||
}
|
||||
|
||||
public String getOnLineType()
|
||||
{
|
||||
return onLineType;
|
||||
}
|
||||
|
||||
public void setTaskNo(String taskNo)
|
||||
{
|
||||
this.taskNo = taskNo;
|
||||
}
|
||||
|
||||
public String getTaskNo()
|
||||
{
|
||||
return taskNo;
|
||||
}
|
||||
|
||||
public void setSupplierId(String supplierId)
|
||||
{
|
||||
this.supplierId = supplierId;
|
||||
}
|
||||
|
||||
public String getSupplierId()
|
||||
{
|
||||
return supplierId;
|
||||
}
|
||||
|
||||
public void setCustomerId(String customerId)
|
||||
{
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public String getCustomerId()
|
||||
{
|
||||
return customerId;
|
||||
}
|
||||
|
||||
public void setDepartmentId(String departmentId)
|
||||
{
|
||||
this.departmentId = departmentId;
|
||||
}
|
||||
|
||||
public String getDepartmentId()
|
||||
{
|
||||
return departmentId;
|
||||
}
|
||||
|
||||
public void setTrayCode(String trayCode)
|
||||
{
|
||||
this.trayCode = trayCode;
|
||||
}
|
||||
|
||||
public String getTrayCode()
|
||||
{
|
||||
return trayCode;
|
||||
}
|
||||
|
||||
public void setRoadwayId(String roadwayId)
|
||||
{
|
||||
this.roadwayId = roadwayId;
|
||||
}
|
||||
|
||||
public String getRoadwayId()
|
||||
{
|
||||
return roadwayId;
|
||||
}
|
||||
|
||||
public void setCargoSpaceId(String cargoSpaceId)
|
||||
{
|
||||
this.cargoSpaceId = cargoSpaceId;
|
||||
}
|
||||
|
||||
public String getCargoSpaceId()
|
||||
{
|
||||
return cargoSpaceId;
|
||||
}
|
||||
|
||||
public void setTargetRoadwayId(String targetRoadwayId)
|
||||
{
|
||||
this.targetRoadwayId = targetRoadwayId;
|
||||
}
|
||||
|
||||
public String getTargetRoadwayId()
|
||||
{
|
||||
return targetRoadwayId;
|
||||
}
|
||||
|
||||
public void setTargetCargoSpaceId(String targetCargoSpaceId)
|
||||
{
|
||||
this.targetCargoSpaceId = targetCargoSpaceId;
|
||||
}
|
||||
|
||||
public String getTargetCargoSpaceId()
|
||||
{
|
||||
return targetCargoSpaceId;
|
||||
}
|
||||
|
||||
public void setLineId(String lineId)
|
||||
{
|
||||
this.lineId = lineId;
|
||||
}
|
||||
|
||||
public String getLineId()
|
||||
{
|
||||
return lineId;
|
||||
}
|
||||
|
||||
public void setWorkshopId(String workshopId)
|
||||
{
|
||||
this.workshopId = workshopId;
|
||||
}
|
||||
|
||||
public String getWorkshopId()
|
||||
{
|
||||
return workshopId;
|
||||
}
|
||||
|
||||
public void setPriority(Long priority)
|
||||
{
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
public Long getPriority()
|
||||
{
|
||||
return priority;
|
||||
}
|
||||
|
||||
public void setExecutionPhase(String executionPhase)
|
||||
{
|
||||
this.executionPhase = executionPhase;
|
||||
}
|
||||
|
||||
public String getExecutionPhase()
|
||||
{
|
||||
return executionPhase;
|
||||
}
|
||||
|
||||
public void setInOrOut(String inOrOut)
|
||||
{
|
||||
this.inOrOut = inOrOut;
|
||||
}
|
||||
|
||||
public String getInOrOut()
|
||||
{
|
||||
return inOrOut;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime)
|
||||
{
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getStartTime()
|
||||
{
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setFinishTime(String finishTime)
|
||||
{
|
||||
this.finishTime = finishTime;
|
||||
}
|
||||
|
||||
public String getFinishTime()
|
||||
{
|
||||
return finishTime;
|
||||
}
|
||||
|
||||
public void setEntranceId(String entranceId)
|
||||
{
|
||||
this.entranceId = entranceId;
|
||||
}
|
||||
|
||||
public String getEntranceId()
|
||||
{
|
||||
return entranceId;
|
||||
}
|
||||
|
||||
public void setExitId(String exitId)
|
||||
{
|
||||
this.exitId = exitId;
|
||||
}
|
||||
|
||||
public String getExitId()
|
||||
{
|
||||
return exitId;
|
||||
}
|
||||
|
||||
public void setClassId(String classId)
|
||||
{
|
||||
this.classId = classId;
|
||||
}
|
||||
|
||||
public String getClassId()
|
||||
{
|
||||
return classId;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setFaultFlag(String faultFlag)
|
||||
{
|
||||
this.faultFlag = faultFlag;
|
||||
}
|
||||
|
||||
public String getFaultFlag()
|
||||
{
|
||||
return faultFlag;
|
||||
}
|
||||
|
||||
public String getSupplierName() {
|
||||
return supplierName;
|
||||
}
|
||||
|
||||
public void setSupplierName(String supplierName) {
|
||||
this.supplierName = supplierName;
|
||||
}
|
||||
|
||||
public String getCustomerName() {
|
||||
return customerName;
|
||||
}
|
||||
|
||||
public void setCustomerName(String customerName) {
|
||||
this.customerName = customerName;
|
||||
}
|
||||
|
||||
public String getCargoSpaceName() {
|
||||
return cargoSpaceName;
|
||||
}
|
||||
|
||||
public void setCargoSpaceName(String cargoSpaceName) {
|
||||
this.cargoSpaceName = cargoSpaceName;
|
||||
}
|
||||
|
||||
public String getTargetCargoSpaceName() {
|
||||
return targetCargoSpaceName;
|
||||
}
|
||||
|
||||
public void setTargetCargoSpaceName(String targetCargoSpaceName) {
|
||||
this.targetCargoSpaceName = targetCargoSpaceName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("jobId", getJobId())
|
||||
.append("status", getStatus())
|
||||
.append("onLineType", getOnLineType())
|
||||
.append("taskNo", getTaskNo())
|
||||
.append("supplierId", getSupplierId())
|
||||
.append("customerId", getCustomerId())
|
||||
.append("departmentId", getDepartmentId())
|
||||
.append("trayCode", getTrayCode())
|
||||
.append("roadwayId", getRoadwayId())
|
||||
.append("cargoSpaceId", getCargoSpaceId())
|
||||
.append("targetRoadwayId", getTargetRoadwayId())
|
||||
.append("targetCargoSpaceId", getTargetCargoSpaceId())
|
||||
.append("lineId", getLineId())
|
||||
.append("workshopId", getWorkshopId())
|
||||
.append("priority", getPriority())
|
||||
.append("executionPhase", getExecutionPhase())
|
||||
.append("inOrOut", getInOrOut())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("startTime", getStartTime())
|
||||
.append("finishTime", getFinishTime())
|
||||
.append("entranceId", getEntranceId())
|
||||
.append("exitId", getExitId())
|
||||
.append("classId", getClassId())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("faultFlag", getFaultFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.ruoyi.job.mydojob.mapper;
|
||||
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 任务表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public interface MydoJobMapper
|
||||
{
|
||||
/**
|
||||
* 查询当前任务列表
|
||||
*
|
||||
* @return 当前任务列表
|
||||
*/
|
||||
public List<MydoJob> selectCurrentTasks();
|
||||
/**
|
||||
* 查询任务表
|
||||
*
|
||||
* @param jobId 任务表主键
|
||||
* @return 任务表
|
||||
*/
|
||||
public MydoJob selectMydoJobByJobId(String jobId);
|
||||
|
||||
/**
|
||||
* 查询任务表列表
|
||||
*
|
||||
* @param mydoJob 任务表
|
||||
* @return 任务表集合
|
||||
*/
|
||||
public List<MydoJob> selectMydoJobList(MydoJob mydoJob);
|
||||
|
||||
/**
|
||||
* 新增任务表
|
||||
*
|
||||
* @param mydoJob 任务表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMydoJob(MydoJob mydoJob);
|
||||
|
||||
/**
|
||||
* 修改任务表
|
||||
*
|
||||
* @param mydoJob 任务表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMydoJob(MydoJob mydoJob);
|
||||
|
||||
/**
|
||||
* 删除任务表
|
||||
*
|
||||
* @param jobId 任务表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobByJobId(String jobId);
|
||||
|
||||
/**
|
||||
* 批量删除任务表
|
||||
*
|
||||
* @param jobIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobByJobIds(String[] jobIds);
|
||||
|
||||
void insertHistory(String jobId);
|
||||
|
||||
void pointOut(HashMap<String, Object> map);
|
||||
|
||||
MydoJob selectByTrayCode(String trayCode);
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.ruoyi.job.mydojob.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 任务表Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public interface IMydoJobService
|
||||
{
|
||||
/**
|
||||
* 查询任务表
|
||||
*
|
||||
* @param jobId 任务表主键
|
||||
* @return 任务表
|
||||
*/
|
||||
public MydoJob selectMydoJobByJobId(String jobId);
|
||||
|
||||
/**
|
||||
* 查询任务表列表 带数据权限
|
||||
*
|
||||
* @param mydoJob 任务表
|
||||
* @return 任务表集合
|
||||
*/
|
||||
public List<MydoJob> selectMydoJobList(MydoJob mydoJob);
|
||||
|
||||
/**
|
||||
* 查询任务表列表
|
||||
* @param mydoJob
|
||||
* @return
|
||||
*/
|
||||
public List<MydoJob> selectMydoJobListApi(MydoJob mydoJob);
|
||||
|
||||
/**
|
||||
* 新增任务表
|
||||
*
|
||||
* @param mydoJob 任务表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMydoJob(MydoJob mydoJob);
|
||||
|
||||
/**
|
||||
* 修改任务表
|
||||
*
|
||||
* @param mydoJob 任务表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMydoJob(MydoJob mydoJob);
|
||||
|
||||
/**
|
||||
* 批量删除任务表
|
||||
*
|
||||
* @param jobIds 需要删除的任务表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobByJobIds(String[] jobIds);
|
||||
|
||||
/**
|
||||
* 删除任务表信息
|
||||
*
|
||||
* @param jobId 任务表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobByJobId(String jobId);
|
||||
|
||||
/**
|
||||
* 手动作废任务
|
||||
* @param mydoJob
|
||||
* @return
|
||||
*/
|
||||
AjaxResult manualInvalidation(MydoJob mydoJob);
|
||||
|
||||
/**
|
||||
* 手动完成任务
|
||||
* @param mydoJob
|
||||
* @return
|
||||
*/
|
||||
AjaxResult manualCompleted(MydoJob mydoJob,int type);
|
||||
|
||||
/**
|
||||
* 出库手动完成
|
||||
*/
|
||||
AjaxResult OuthandFinish(String [] jobIds);
|
||||
/**
|
||||
* 出库手动作废
|
||||
*/
|
||||
AjaxResult OuthandInvalidation(String [] jobIds);
|
||||
|
||||
/**
|
||||
* 指定出库
|
||||
* @param stockIds
|
||||
* @param exitId
|
||||
* @return
|
||||
*/
|
||||
AjaxResult pointOut(String [] stockIds,String exitId);
|
||||
|
||||
/**
|
||||
* 通过托盘码查询
|
||||
* @param trayCode
|
||||
* @return
|
||||
*/
|
||||
MydoJob selectMydoJobByTrayCode(String trayCode);
|
||||
}
|
||||
@@ -0,0 +1,531 @@
|
||||
package com.ruoyi.job.mydojob.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.ruoyi.api.service.IToWcsService;
|
||||
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
||||
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
||||
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
|
||||
import com.ruoyi.bas.taskNo.service.IBasTaskNoService;
|
||||
import com.ruoyi.bas.warehouse.domain.BasWarehouse;
|
||||
import com.ruoyi.bas.warehouse.service.IBasWarehouseService;
|
||||
import com.ruoyi.check.difference.domain.CheckDifferenceRecord;
|
||||
import com.ruoyi.check.difference.service.ICheckDifferenceRecordService;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
import com.ruoyi.job.mydojob.mapper.MydoJobMapper;
|
||||
import com.ruoyi.job.mydojob.service.IMydoJobService;
|
||||
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
||||
import com.ruoyi.job.mydojobdetail.service.IMydoJobDetailService;
|
||||
import com.ruoyi.out.exception.domain.OutExceptionRecord;
|
||||
import com.ruoyi.out.exception.service.IOutExceptionRecordService;
|
||||
import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
|
||||
import com.ruoyi.out.outStockoutDetail.service.IOutStockoutDetailService;
|
||||
import com.ruoyi.pda.domain.TrayCodeMakeSure;
|
||||
import com.ruoyi.pda.service.PdaService;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
import com.ruoyi.stock.stock.service.IBasStockService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 任务表Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class MydoJobServiceImpl implements IMydoJobService {
|
||||
@Autowired
|
||||
private MydoJobMapper mydoJobMapper;
|
||||
@Autowired
|
||||
private IBasJobIdService basJobIdService;
|
||||
@Autowired
|
||||
private IBasTaskNoService basTaskNoService;
|
||||
@Autowired
|
||||
private IMydoJobDetailService mydoJobDetailService;
|
||||
@Autowired
|
||||
private IInStockinDetailService inStockinDetailService;
|
||||
@Autowired
|
||||
private IBasStockService basStockService;
|
||||
@Autowired
|
||||
private IOutStockoutDetailService outStockoutDetailService;
|
||||
@Autowired
|
||||
private IBasCargoSpaceService basCargoSpaceService;
|
||||
@Autowired
|
||||
private ICheckDifferenceRecordService checkDifferenceRecordService;
|
||||
@Autowired
|
||||
private IOutExceptionRecordService outExceptionRecordService;
|
||||
@Autowired
|
||||
private PdaService pdaService;
|
||||
@Autowired
|
||||
private IBasWarehouseService basWarehouseService;
|
||||
@Autowired
|
||||
private IToWcsService iToWcsService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询任务表
|
||||
*
|
||||
* @param jobId 任务表主键
|
||||
* @return 任务表
|
||||
*/
|
||||
@Override
|
||||
public MydoJob selectMydoJobByJobId(String jobId) {
|
||||
return mydoJobMapper.selectMydoJobByJobId(jobId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询任务表列表
|
||||
*
|
||||
* @param mydoJob 任务表
|
||||
* @return 任务表
|
||||
*/
|
||||
@Override
|
||||
@DataScope(warehouseAlias = "bw")
|
||||
public List<MydoJob> selectMydoJobList(MydoJob mydoJob) {
|
||||
return mydoJobMapper.selectMydoJobList(mydoJob);
|
||||
}
|
||||
|
||||
/**
|
||||
* 对外接口查询任务表列表
|
||||
*
|
||||
* @param mydoJob
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<MydoJob> selectMydoJobListApi(MydoJob mydoJob) {
|
||||
return mydoJobMapper.selectMydoJobList(mydoJob);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增任务表
|
||||
*
|
||||
* @param mydoJob 任务表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMydoJob(MydoJob mydoJob) {
|
||||
mydoJob.setCreateTime(new Date());
|
||||
mydoJob.setJobId(basJobIdService.getJobId("RK"));
|
||||
mydoJob.setTaskNo(Convert.toStr(basTaskNoService.getTaskNo("1")));
|
||||
return mydoJobMapper.insertMydoJob(mydoJob);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改任务表
|
||||
*
|
||||
* @param mydoJob 任务表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMydoJob(MydoJob mydoJob) {
|
||||
return mydoJobMapper.updateMydoJob(mydoJob);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除任务表
|
||||
*
|
||||
* @param jobIds 需要删除的任务表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMydoJobByJobIds(String[] jobIds) {
|
||||
return mydoJobMapper.deleteMydoJobByJobIds(jobIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除任务表信息
|
||||
*
|
||||
* @param jobId 任务表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMydoJobByJobId(String jobId) {
|
||||
return mydoJobMapper.deleteMydoJobByJobId(jobId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动作废任务表
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult manualInvalidation(MydoJob mydoJob) {
|
||||
String jobId = mydoJob.getJobId();
|
||||
MydoJob job = selectMydoJobByJobId(jobId);
|
||||
if (job == null) {
|
||||
return AjaxResult.warn(MessageUtils.message("warn.message"));
|
||||
}
|
||||
if (!"1".equals(job.getStatus())) {
|
||||
return AjaxResult.warn(MessageUtils.message("warn.message1"));
|
||||
}
|
||||
if ("1".equals(job.getInOrOut()) || "4".equals(job.getInOrOut())) {
|
||||
mydoJob.setStatus("5");
|
||||
updateMydoJob(mydoJob);
|
||||
//插入历史表
|
||||
insertHistory(mydoJob.getJobId());
|
||||
|
||||
|
||||
} else {
|
||||
MydoJobDetail param = new MydoJobDetail();
|
||||
param.setJobId(jobId);
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||
|
||||
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||
String inOrOutDId = mydoJobDetail.getInOrOutDId();
|
||||
InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(inOrOutDId);
|
||||
BigDecimal stockInNum = Convert.toBigDecimal(inStockinDetail.getScanNum());
|
||||
BigDecimal jobInNum = Convert.toBigDecimal(mydoJobDetail.getInQuantity());
|
||||
BigDecimal subtract = stockInNum.subtract(jobInNum);
|
||||
inStockinDetail.setScanNum(Convert.toStr(subtract));
|
||||
inStockinDetailService.updateInStockinDetail(inStockinDetail);
|
||||
}
|
||||
//修改货位状态
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(job.getCargoSpaceId());
|
||||
basCargoSpace.setStatus("1");
|
||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||
|
||||
mydoJob.setStatus("5");
|
||||
updateMydoJob(mydoJob);
|
||||
//插入历史表
|
||||
insertHistory(mydoJob.getJobId());
|
||||
}
|
||||
//通知wcs
|
||||
AjaxResult ajaxResult = iToWcsService.cancelTaskByTaskNo(job.getTaskNo());
|
||||
if (ajaxResult.isSuccess()){
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
throw new RuntimeException(Convert.toStr(ajaxResult.get("msg")));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入历史表
|
||||
*
|
||||
* @param jobId
|
||||
*/
|
||||
private void insertHistory(String jobId) {
|
||||
mydoJobMapper.insertHistory(jobId);
|
||||
mydoJobDetailService.insertHistory(jobId);
|
||||
mydoJobMapper.deleteMydoJobByJobId(jobId);
|
||||
mydoJobDetailService.deleteMydoJobDetailByJobId(jobId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动完成任务表
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult manualCompleted(MydoJob mydoJob,int type) {
|
||||
String jobId = mydoJob.getJobId();
|
||||
MydoJob job = selectMydoJobByJobId(jobId);
|
||||
if (job == null) {
|
||||
return AjaxResult.warn(MessageUtils.message("warn.message"));
|
||||
}
|
||||
if (type == 0){
|
||||
AjaxResult ajaxResult = iToWcsService.cancelTaskByTaskNo(job.getTaskNo());
|
||||
if (!ajaxResult.isSuccess()){
|
||||
return AjaxResult.error(MessageUtils.message("error.message17"));
|
||||
}
|
||||
}
|
||||
BasWarehouse basWarehouse = basWarehouseService.selectBasWarehouseByWarehouseId(job.getWarehouseId());
|
||||
if("2".equals(basWarehouse.getWarehouseType())) {
|
||||
if ("1".equals(job.getStatus()) || "2".equals(job.getStatus())) {
|
||||
return AjaxResult.warn(MessageUtils.message("warn.message13"));
|
||||
}
|
||||
}
|
||||
if ("1".equals(job.getInOrOut()) || "4".equals(job.getInOrOut())) {
|
||||
//空料箱入库 托盘垛入库
|
||||
//入库作业
|
||||
MydoJobDetail param = new MydoJobDetail();
|
||||
param.setJobId(jobId);
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(job.getCargoSpaceId());
|
||||
if (CollUtil.isNotEmpty(mydoJobDetails)) {
|
||||
List<BasStock> list = new ArrayList<>();
|
||||
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||
//正常库存
|
||||
list.add(getStockByInStockinDetail(mydoJobDetail, job, "1"));
|
||||
}
|
||||
//修改货位状态
|
||||
basCargoSpace.setStatus("2");
|
||||
basCargoSpace.setTrayCode(job.getTrayCode());
|
||||
basCargoSpace.setCargoSpaceId(job.getCargoSpaceId());
|
||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||
//插入库存信息
|
||||
basStockService.insertBasStockList(list);
|
||||
//结束任务
|
||||
mydoJob.setStatus("4");
|
||||
mydoJob.setFinishTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
updateMydoJob(mydoJob);
|
||||
// 插入任务历史表 删除任务
|
||||
insertHistory(mydoJob.getJobId());
|
||||
return AjaxResult.success();
|
||||
} else {
|
||||
return AjaxResult.warn(MessageUtils.message("warn.message2"));
|
||||
}
|
||||
} else if ("2".equals(job.getInOrOut()) || "3".equals(job.getInOrOut())) {
|
||||
//ctu物料入库 高架库入库
|
||||
//入库作业
|
||||
MydoJobDetail param = new MydoJobDetail();
|
||||
param.setJobId(jobId);
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(job.getCargoSpaceId());
|
||||
if (CollUtil.isNotEmpty(mydoJobDetails)) {
|
||||
List<BasStock> list = new ArrayList<>();
|
||||
//查找是否存在异常信息
|
||||
OutExceptionRecord outExceptionRecordParam = new OutExceptionRecord();
|
||||
outExceptionRecordParam.setTrayCode(job.getTrayCode());
|
||||
outExceptionRecordParam.setWarehouseId(job.getWarehouseId());
|
||||
List<OutExceptionRecord> outExceptionRecords = outExceptionRecordService.selectOutExceptionRecordList(outExceptionRecordParam);
|
||||
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||
if (job.getJobId().startsWith("RK")){
|
||||
//修改单据实际数量 物料入库 高架库入库
|
||||
String inOrOutDId = mydoJobDetail.getInOrOutDId();
|
||||
InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(inOrOutDId);
|
||||
inStockinDetail.setAssignNum(Convert.toStr(Convert.toBigDecimal(inStockinDetail.getAssignNum()).add(Convert.toBigDecimal(mydoJobDetail.getInQuantity()))));
|
||||
inStockinDetailService.updateInStockinDetail(inStockinDetail);
|
||||
}
|
||||
|
||||
Optional<OutExceptionRecord> first = outExceptionRecords.stream().filter(x -> x.getTrayCode().equals(job.getTrayCode()) && x.getProductId().equals(mydoJobDetail.getProductId())).findFirst();
|
||||
if (first.isPresent()) {
|
||||
//生成异常库存
|
||||
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, job, "3");
|
||||
list.add(stockByInStockinDetail);
|
||||
//修改异常记录中的库存id
|
||||
OutExceptionRecord outExceptionRecord = first.get();
|
||||
outExceptionRecord.setStockId(stockByInStockinDetail.getStockId());
|
||||
outExceptionRecordService.updateOutExceptionRecord(outExceptionRecord);
|
||||
} else {
|
||||
//正常库存
|
||||
list.add(getStockByInStockinDetail(mydoJobDetail, job, "1"));
|
||||
}
|
||||
}
|
||||
//删除异常库存记录
|
||||
List<Long> collect = outExceptionRecords.stream().map(OutExceptionRecord::getOutGuid).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(collect)) {
|
||||
for (Long id : collect) {
|
||||
outExceptionRecordService.deleteOutExceptionRecordByOutGuid(id);
|
||||
}
|
||||
|
||||
}
|
||||
//修改货位状态
|
||||
basCargoSpace.setStatus("2");
|
||||
basCargoSpace.setTrayCode(job.getTrayCode());
|
||||
basCargoSpace.setCargoSpaceId(job.getCargoSpaceId());
|
||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||
|
||||
//插入库存信息
|
||||
basStockService.insertBasStockList(list);
|
||||
|
||||
//结束任务
|
||||
mydoJob.setStatus("4");
|
||||
mydoJob.setFinishTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
updateMydoJob(mydoJob);
|
||||
// 插入任务历史表 删除任务
|
||||
insertHistory(mydoJob.getJobId());
|
||||
return AjaxResult.success();
|
||||
} else {
|
||||
return AjaxResult.warn(MessageUtils.message("warn.message2"));
|
||||
}
|
||||
} else if ("5".equals(job.getInOrOut()) || "6".equals(job.getInOrOut())) {
|
||||
//盘点 ctu入库 高架库入库
|
||||
//入库作业
|
||||
MydoJobDetail param = new MydoJobDetail();
|
||||
param.setJobId(jobId);
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(job.getCargoSpaceId());
|
||||
if (CollUtil.isNotEmpty(mydoJobDetails)) {
|
||||
List<BasStock> list = new ArrayList<>();
|
||||
|
||||
|
||||
//查询盘点信息中的异常信息
|
||||
CheckDifferenceRecord checkDifferenceRecordParam = new CheckDifferenceRecord();
|
||||
checkDifferenceRecordParam.setTrayCode(job.getTrayCode());
|
||||
checkDifferenceRecordParam.setWarehouseId(job.getWarehouseId());
|
||||
List<CheckDifferenceRecord> checkDifferenceRecords = checkDifferenceRecordService.selectCheckDifferenceRecordList(checkDifferenceRecordParam);
|
||||
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||
//如果存在盘点异常信息 根据托盘条码和物料id 筛选异常信息
|
||||
Optional<CheckDifferenceRecord> first = checkDifferenceRecords.stream().filter(x -> x.getTrayCode().equals(job.getTrayCode()) && x.getProductId().equals(mydoJobDetail.getProductId())).findFirst();
|
||||
if (first.isPresent()) {
|
||||
//生成盘点待审批库存
|
||||
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, job, "2");
|
||||
list.add(stockByInStockinDetail);
|
||||
//修改异常记录中的库存id
|
||||
CheckDifferenceRecord checkDifferenceRecord = first.get();
|
||||
checkDifferenceRecord.setStockId(stockByInStockinDetail.getStockId());
|
||||
checkDifferenceRecordService.updateCheckDifferenceRecord(checkDifferenceRecord);
|
||||
|
||||
} else {
|
||||
//正常库存
|
||||
list.add(getStockByInStockinDetail(mydoJobDetail, job, "1"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//修改货位状态
|
||||
basCargoSpace.setStatus("2");
|
||||
basCargoSpace.setTrayCode(job.getTrayCode());
|
||||
basCargoSpace.setCargoSpaceId(job.getCargoSpaceId());
|
||||
basCargoSpaceService.updateBasCargoSpace(basCargoSpace);
|
||||
|
||||
//插入库存信息
|
||||
basStockService.insertBasStockList(list);
|
||||
|
||||
//结束任务
|
||||
mydoJob.setStatus("4");
|
||||
mydoJob.setFinishTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
updateMydoJob(mydoJob);
|
||||
// 插入任务历史表 删除任务
|
||||
insertHistory(mydoJob.getJobId());
|
||||
return AjaxResult.success();
|
||||
} else {
|
||||
return AjaxResult.warn(MessageUtils.message("warn.message2"));
|
||||
}
|
||||
} else {
|
||||
return AjaxResult.warn(MessageUtils.message("warn.message3"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private BasStock getStockByInStockinDetail(MydoJobDetail mydoJobDetail, MydoJob mydoJob, String productStatus) {
|
||||
BasStock stock = new BasStock();
|
||||
stock.setStockId(basJobIdService.getJobId("KC"));
|
||||
stock.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
stock.setStockStatus("1");
|
||||
stock.setProductStatus(productStatus);
|
||||
stock.setLotNo(mydoJobDetail.getLotNo());
|
||||
stock.setInDate(DateUtils.getTime());
|
||||
stock.setProductGuid(mydoJobDetail.getProductGuid());
|
||||
stock.setQuantity(mydoJobDetail.getInQuantity());
|
||||
stock.setJobId(mydoJob.getJobId());
|
||||
stock.setTrayCode(mydoJob.getTrayCode());
|
||||
stock.setInClassId(mydoJob.getClassId());
|
||||
stock.setWarehouseId(mydoJob.getWarehouseId());
|
||||
stock.setStackingId(mydoJobDetail.getStackingId());
|
||||
stock.setOutQuantity("0");
|
||||
stock.setProductId(mydoJobDetail.getProductId());
|
||||
stock.setStockinId(mydoJobDetail.getInOrOutId());
|
||||
stock.setStockinDetailId(mydoJobDetail.getInOrOutDId());
|
||||
stock.setInType(mydoJob.getInOrOut());
|
||||
return stock;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult OuthandFinish(String[] jobIds) {
|
||||
for (String jobId : jobIds) {
|
||||
MydoJob job = selectMydoJobByJobId(jobId);
|
||||
BasWarehouse basWarehouse = basWarehouseService.selectBasWarehouseByWarehouseId(job.getWarehouseId());
|
||||
|
||||
if("2".equals(basWarehouse.getWarehouseType()) && Integer.parseInt(job.getStatus())<3){
|
||||
log.error("只能完成正执行的作业");
|
||||
return AjaxResult.error(MessageUtils.message("error.message14"));
|
||||
}
|
||||
TrayCodeMakeSure trayCodeMakeSure = new TrayCodeMakeSure();
|
||||
trayCodeMakeSure.setTrayCode(job.getTrayCode());
|
||||
iToWcsService.cancelTaskByTaskNo(job.getTaskNo());
|
||||
pdaService.outMakeSure(trayCodeMakeSure);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult OuthandInvalidation(String[] jobIds) {
|
||||
try {
|
||||
for (String jobId : jobIds) {
|
||||
MydoJob job = selectMydoJobByJobId(jobId);
|
||||
if (job == null) {
|
||||
log.error("任务不存在");
|
||||
return AjaxResult.error(MessageUtils.message("error.message28"));
|
||||
}
|
||||
MydoJobDetail mydoJobDetail = new MydoJobDetail();
|
||||
mydoJobDetail.setJobId(jobId);
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(mydoJobDetail);
|
||||
for (MydoJobDetail detail : mydoJobDetails) {
|
||||
//修改库存的出库数量
|
||||
BasStock basStock = basStockService.selectBasStockByStockId(detail.getStockId());
|
||||
if (basStock != null) {
|
||||
BigDecimal outQuantity = Convert.toBigDecimal(basStock.getOutQuantity());
|
||||
BigDecimal substract = outQuantity.subtract(Convert.toBigDecimal(detail.getOutQuantity()));
|
||||
basStock.setOutQuantity(String.valueOf(substract));
|
||||
basStockService.updateBasStock(basStock);
|
||||
}
|
||||
//修改单据数量
|
||||
OutStockoutDetail outStockoutDetail = outStockoutDetailService.selectOutStockoutDetailByStockoutDetailId(detail.getInOrOutDId());
|
||||
if (outStockoutDetail != null) {
|
||||
BigDecimal allotQuantity = outStockoutDetail.getAllotQuantity();
|
||||
BigDecimal substract = allotQuantity.subtract(Convert.toBigDecimal(detail.getOutQuantity()));
|
||||
outStockoutDetail.setAllotQuantity(substract);
|
||||
outStockoutDetailService.updateOutStockoutDetail(outStockoutDetail);
|
||||
}
|
||||
}
|
||||
//修改货位状态
|
||||
BasCargoSpace cargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(job.getCargoSpaceId());
|
||||
if (cargoSpace != null) {
|
||||
cargoSpace.setStatus("2");
|
||||
basCargoSpaceService.updateBasCargoSpace(cargoSpace);
|
||||
}
|
||||
job.setStatus("5");
|
||||
job.setFinishTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
updateMydoJob(job);
|
||||
insertHistory(jobId);
|
||||
//通知wcs
|
||||
AjaxResult ajaxResult = iToWcsService.cancelTaskByTaskNo(job.getTaskNo());
|
||||
if (ajaxResult.isSuccess()){
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
throw new RuntimeException(Convert.toStr(ajaxResult.get("msg")));
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
log.error("任务处理异常", e);
|
||||
return AjaxResult.error();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult pointOut(String[] stockIds,String exitId) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
String msg = "";
|
||||
String Stringbuilder = "";
|
||||
for (String stockId : stockIds) {
|
||||
map.put("v_stock_id", stockId);
|
||||
map.put("v_exit_id", exitId);
|
||||
mydoJobMapper.pointOut(map);
|
||||
iToWcsService.pushOutMydoJob();
|
||||
String result = map.get("v_result").toString();
|
||||
if ("10".equals(result)) {
|
||||
msg = "操作成功!";
|
||||
} else {
|
||||
msg = map.get("v_resultmsg").toString();
|
||||
}
|
||||
Stringbuilder += stockId + msg + "<br/>";
|
||||
}
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MydoJob selectMydoJobByTrayCode(String trayCode) {
|
||||
return mydoJobMapper.selectByTrayCode(trayCode);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.ruoyi.job.mydojobdetail.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
||||
import com.ruoyi.job.mydojobdetail.service.IMydoJobDetailService;
|
||||
import com.ruoyi.job.mydojobdetailfinish.service.IMydoJobDetailFinishService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 子任务Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/job/mydoJobDetail")
|
||||
public class MydoJobDetailController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMydoJobDetailService mydoJobDetailService;
|
||||
@Autowired
|
||||
private IMydoJobDetailFinishService mydoJobDetailFinishService;
|
||||
|
||||
/**
|
||||
* 查询子任务列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobDetail:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MydoJobDetail mydoJobDetail)
|
||||
{
|
||||
startPage();
|
||||
List<MydoJobDetail> list = new ArrayList<>();
|
||||
if(Integer.parseInt(mydoJobDetail.getStatus())<4) {
|
||||
list = mydoJobDetailService.selectMydoJobDetailList(mydoJobDetail);
|
||||
}else{
|
||||
list = mydoJobDetailFinishService.selectMydoJobDetailFinishListByJobDetail(mydoJobDetail);
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出子任务列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobDetail:export')")
|
||||
@Log(title = "子任务", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MydoJobDetail mydoJobDetail)
|
||||
{
|
||||
List<MydoJobDetail> list = mydoJobDetailService.selectMydoJobDetailList(mydoJobDetail);
|
||||
ExcelUtil<MydoJobDetail> util = new ExcelUtil<MydoJobDetail>(MydoJobDetail.class);
|
||||
util.exportExcel(response, list, "子任务数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取子任务详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobDetail:query')")
|
||||
@GetMapping(value = "/{jobDetailId}")
|
||||
public AjaxResult getInfo(@PathVariable("jobDetailId") String jobDetailId)
|
||||
{
|
||||
return success(mydoJobDetailService.selectMydoJobDetailByJobDetailId(jobDetailId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增子任务
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobDetail:add')")
|
||||
@Log(title = "子任务", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MydoJobDetail mydoJobDetail)
|
||||
{
|
||||
return toAjax(mydoJobDetailService.insertMydoJobDetail(mydoJobDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改子任务
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobDetail:edit')")
|
||||
@Log(title = "子任务", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MydoJobDetail mydoJobDetail)
|
||||
{
|
||||
return toAjax(mydoJobDetailService.updateMydoJobDetail(mydoJobDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除子任务
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobDetail:remove')")
|
||||
@Log(title = "子任务", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{jobDetailIds}")
|
||||
public AjaxResult remove(@PathVariable String[] jobDetailIds)
|
||||
{
|
||||
return toAjax(mydoJobDetailService.deleteMydoJobDetailByJobDetailIds(jobDetailIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,463 @@
|
||||
package com.ruoyi.job.mydojobdetail.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.ruoyi.common.domain.ExtraField;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 子任务对象 mydo_job_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-22
|
||||
*/
|
||||
public class MydoJobDetail extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 子任务ID */
|
||||
@Excel(name = "子任务ID")
|
||||
private String jobDetailId;
|
||||
|
||||
/** 任务ID */
|
||||
@Excel(name = "任务ID")
|
||||
private String jobId;
|
||||
|
||||
/** 库存ID */
|
||||
@Excel(name = "库存ID")
|
||||
private String stockId;
|
||||
|
||||
/** 批次号 */
|
||||
@Excel(name = "批次号")
|
||||
private String lotNo;
|
||||
|
||||
/** 入库时间 */
|
||||
@Excel(name = "入库时间")
|
||||
private String inDate;
|
||||
|
||||
/** 单据ID */
|
||||
@Excel(name = "单据ID")
|
||||
private String inOrOutId;
|
||||
|
||||
/** 子单据ID */
|
||||
@Excel(name = "子单据ID")
|
||||
private String inOrOutDId;
|
||||
|
||||
/** 物料GUID */
|
||||
@Excel(name = "物料GUID")
|
||||
private String productGuid;
|
||||
|
||||
/** 物料编码 */
|
||||
@Excel(name = "物料编码")
|
||||
private String productId;
|
||||
|
||||
/** 库存状态 */
|
||||
@Excel(name = "库存状态")
|
||||
private String stockStatus;
|
||||
|
||||
/** 入库数量 */
|
||||
@Excel(name = "入库数量")
|
||||
private String inQuantity;
|
||||
|
||||
/** 库存数量 */
|
||||
@Excel(name = "库存数量")
|
||||
private String stockQuantity;
|
||||
|
||||
/** 出库数量 */
|
||||
@Excel(name = "出库数量")
|
||||
private String outQuantity;
|
||||
|
||||
/** 整层数量 */
|
||||
@Excel(name = "整层数量")
|
||||
private String layerQuantity;
|
||||
|
||||
/** 出库层数量 */
|
||||
@Excel(name = "出库层数量")
|
||||
private String outLayerQuantity;
|
||||
|
||||
/** 回流数量 */
|
||||
@Excel(name = "回流数量")
|
||||
private String giveNum;
|
||||
|
||||
/** 追溯入库单ID */
|
||||
@Excel(name = "追溯入库单ID")
|
||||
private String stockinId;
|
||||
|
||||
/** 垛型ID */
|
||||
@Excel(name = "垛型ID")
|
||||
private String stackingId;
|
||||
|
||||
/** 出库口ID */
|
||||
@Excel(name = "出库口ID")
|
||||
private String exitId;
|
||||
|
||||
/** 生产日期 */
|
||||
@Excel(name = "生产日期")
|
||||
private String printDate;
|
||||
|
||||
/** 客户ID */
|
||||
@Excel(name = "客户ID")
|
||||
private String customerId;
|
||||
|
||||
/** 供应商ID */
|
||||
@Excel(name = "供应商ID")
|
||||
private String supplierId;
|
||||
|
||||
/** 备用字段1 */
|
||||
@Excel(name = "备用字段1")
|
||||
private String spare1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String spare2;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String spare3;
|
||||
|
||||
/** 备用字段4 */
|
||||
@Excel(name = "备用字段4")
|
||||
private String spare4;
|
||||
|
||||
private String status;
|
||||
@Excel(name = "拣选数量")
|
||||
private String pickQuantity;
|
||||
//额外字段
|
||||
private ExtraField extraField;
|
||||
private String pickQuantityReal;
|
||||
//绑定容器物品数量
|
||||
private String pickBindQuantity;
|
||||
|
||||
public String getPickBindQuantity() {
|
||||
return pickBindQuantity;
|
||||
}
|
||||
|
||||
public void setPickBindQuantity(String pickBindQuantity) {
|
||||
this.pickBindQuantity = pickBindQuantity;
|
||||
}
|
||||
|
||||
public String getPickQuantityReal() {
|
||||
return pickQuantityReal;
|
||||
}
|
||||
|
||||
public void setPickQuantityReal(String pickQuantityReal) {
|
||||
this.pickQuantityReal = pickQuantityReal;
|
||||
}
|
||||
|
||||
public String getPickQuantity() {
|
||||
return pickQuantity;
|
||||
}
|
||||
|
||||
public void setPickQuantity(String pickQuantity) {
|
||||
this.pickQuantity = pickQuantity;
|
||||
}
|
||||
|
||||
public ExtraField getExtraField() {
|
||||
return extraField;
|
||||
}
|
||||
|
||||
public void setExtraField(ExtraField extraField) {
|
||||
this.extraField = extraField;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public void setJobDetailId(String jobDetailId)
|
||||
{
|
||||
this.jobDetailId = jobDetailId;
|
||||
}
|
||||
|
||||
public String getJobDetailId()
|
||||
{
|
||||
return jobDetailId;
|
||||
}
|
||||
|
||||
public void setJobId(String jobId)
|
||||
{
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
public String getJobId()
|
||||
{
|
||||
return jobId;
|
||||
}
|
||||
|
||||
public void setStockId(String stockId)
|
||||
{
|
||||
this.stockId = stockId;
|
||||
}
|
||||
|
||||
public String getStockId()
|
||||
{
|
||||
return stockId;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo)
|
||||
{
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getLotNo()
|
||||
{
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setInDate(String inDate)
|
||||
{
|
||||
this.inDate = inDate;
|
||||
}
|
||||
|
||||
public String getInDate()
|
||||
{
|
||||
return inDate;
|
||||
}
|
||||
|
||||
public void setInOrOutId(String inOrOutId)
|
||||
{
|
||||
this.inOrOutId = inOrOutId;
|
||||
}
|
||||
|
||||
public String getInOrOutId()
|
||||
{
|
||||
return inOrOutId;
|
||||
}
|
||||
|
||||
public void setInOrOutDId(String inOrOutDId)
|
||||
{
|
||||
this.inOrOutDId = inOrOutDId;
|
||||
}
|
||||
|
||||
public String getInOrOutDId()
|
||||
{
|
||||
return inOrOutDId;
|
||||
}
|
||||
|
||||
public void setProductGuid(String productGuid)
|
||||
{
|
||||
this.productGuid = productGuid;
|
||||
}
|
||||
|
||||
public String getProductGuid()
|
||||
{
|
||||
return productGuid;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setStockStatus(String stockStatus)
|
||||
{
|
||||
this.stockStatus = stockStatus;
|
||||
}
|
||||
|
||||
public String getStockStatus()
|
||||
{
|
||||
return stockStatus;
|
||||
}
|
||||
|
||||
public void setInQuantity(String inQuantity)
|
||||
{
|
||||
this.inQuantity = inQuantity;
|
||||
}
|
||||
|
||||
public String getInQuantity()
|
||||
{
|
||||
return inQuantity;
|
||||
}
|
||||
|
||||
public void setStockQuantity(String stockQuantity)
|
||||
{
|
||||
this.stockQuantity = stockQuantity;
|
||||
}
|
||||
|
||||
public String getStockQuantity()
|
||||
{
|
||||
return stockQuantity;
|
||||
}
|
||||
|
||||
public void setOutQuantity(String outQuantity)
|
||||
{
|
||||
this.outQuantity = outQuantity;
|
||||
}
|
||||
|
||||
public String getOutQuantity()
|
||||
{
|
||||
return outQuantity;
|
||||
}
|
||||
|
||||
public void setLayerQuantity(String layerQuantity)
|
||||
{
|
||||
this.layerQuantity = layerQuantity;
|
||||
}
|
||||
|
||||
public String getLayerQuantity()
|
||||
{
|
||||
return layerQuantity;
|
||||
}
|
||||
|
||||
public void setOutLayerQuantity(String outLayerQuantity)
|
||||
{
|
||||
this.outLayerQuantity = outLayerQuantity;
|
||||
}
|
||||
|
||||
public String getOutLayerQuantity()
|
||||
{
|
||||
return outLayerQuantity;
|
||||
}
|
||||
|
||||
public void setGiveNum(String giveNum)
|
||||
{
|
||||
this.giveNum = giveNum;
|
||||
}
|
||||
|
||||
public String getGiveNum()
|
||||
{
|
||||
return giveNum;
|
||||
}
|
||||
|
||||
public void setStockinId(String stockinId)
|
||||
{
|
||||
this.stockinId = stockinId;
|
||||
}
|
||||
|
||||
public String getStockinId()
|
||||
{
|
||||
return stockinId;
|
||||
}
|
||||
|
||||
public void setStackingId(String stackingId)
|
||||
{
|
||||
this.stackingId = stackingId;
|
||||
}
|
||||
|
||||
public String getStackingId()
|
||||
{
|
||||
return stackingId;
|
||||
}
|
||||
|
||||
public void setExitId(String exitId)
|
||||
{
|
||||
this.exitId = exitId;
|
||||
}
|
||||
|
||||
public String getExitId()
|
||||
{
|
||||
return exitId;
|
||||
}
|
||||
|
||||
public void setPrintDate(String printDate)
|
||||
{
|
||||
this.printDate = printDate;
|
||||
}
|
||||
|
||||
public String getPrintDate()
|
||||
{
|
||||
return printDate;
|
||||
}
|
||||
|
||||
public void setCustomerId(String customerId)
|
||||
{
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public String getCustomerId()
|
||||
{
|
||||
return customerId;
|
||||
}
|
||||
|
||||
public void setSupplierId(String supplierId)
|
||||
{
|
||||
this.supplierId = supplierId;
|
||||
}
|
||||
|
||||
public String getSupplierId()
|
||||
{
|
||||
return supplierId;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setSpare4(String spare4)
|
||||
{
|
||||
this.spare4 = spare4;
|
||||
}
|
||||
|
||||
public String getSpare4()
|
||||
{
|
||||
return spare4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("jobDetailId", getJobDetailId())
|
||||
.append("jobId", getJobId())
|
||||
.append("stockId", getStockId())
|
||||
.append("lotNo", getLotNo())
|
||||
.append("inDate", getInDate())
|
||||
.append("inOrOutId", getInOrOutId())
|
||||
.append("inOrOutDId", getInOrOutDId())
|
||||
.append("productGuid", getProductGuid())
|
||||
.append("productId", getProductId())
|
||||
.append("stockStatus", getStockStatus())
|
||||
.append("inQuantity", getInQuantity())
|
||||
.append("stockQuantity", getStockQuantity())
|
||||
.append("outQuantity", getOutQuantity())
|
||||
.append("layerQuantity", getLayerQuantity())
|
||||
.append("outLayerQuantity", getOutLayerQuantity())
|
||||
.append("giveNum", getGiveNum())
|
||||
.append("stockinId", getStockinId())
|
||||
.append("stackingId", getStackingId())
|
||||
.append("exitId", getExitId())
|
||||
.append("printDate", getPrintDate())
|
||||
.append("customerId", getCustomerId())
|
||||
.append("supplierId", getSupplierId())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.append("spare4", getSpare4())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.ruoyi.job.mydojobdetail.mapper;
|
||||
|
||||
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 子任务Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-22
|
||||
*/
|
||||
public interface MydoJobDetailMapper
|
||||
{
|
||||
/**
|
||||
* 查询子任务
|
||||
*
|
||||
* @param jobDetailId 子任务主键
|
||||
* @return 子任务
|
||||
*/
|
||||
public MydoJobDetail selectMydoJobDetailByJobDetailId(String jobDetailId);
|
||||
|
||||
/**
|
||||
* 查询子任务列表
|
||||
*
|
||||
* @param mydoJobDetail 子任务
|
||||
* @return 子任务集合
|
||||
*/
|
||||
public List<MydoJobDetail> selectMydoJobDetailList(MydoJobDetail mydoJobDetail);
|
||||
|
||||
/**
|
||||
* 新增子任务
|
||||
*
|
||||
* @param mydoJobDetail 子任务
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMydoJobDetail(MydoJobDetail mydoJobDetail);
|
||||
|
||||
/**
|
||||
* 修改子任务
|
||||
*
|
||||
* @param mydoJobDetail 子任务
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMydoJobDetail(MydoJobDetail mydoJobDetail);
|
||||
|
||||
/**
|
||||
* 删除子任务
|
||||
*
|
||||
* @param jobDetailId 子任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobDetailByJobDetailId(String jobDetailId);
|
||||
|
||||
/**
|
||||
* 批量删除子任务
|
||||
*
|
||||
* @param jobDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobDetailByJobDetailIds(String[] jobDetailIds);
|
||||
|
||||
void insertHistory(String jobId);
|
||||
|
||||
void deleteMydoJobDetailByJobId(String jobId);
|
||||
|
||||
List<MydoJobDetail> selectMydoJobDetailListByJobId(String jobId);
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.ruoyi.job.mydojobdetail.service;
|
||||
|
||||
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 子任务Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-22
|
||||
*/
|
||||
public interface IMydoJobDetailService
|
||||
{
|
||||
/**
|
||||
* 查询子任务
|
||||
*
|
||||
* @param jobDetailId 子任务主键
|
||||
* @return 子任务
|
||||
*/
|
||||
public MydoJobDetail selectMydoJobDetailByJobDetailId(String jobDetailId);
|
||||
|
||||
/**
|
||||
* 查询子任务列表
|
||||
*
|
||||
* @param mydoJobDetail 子任务
|
||||
* @return 子任务集合
|
||||
*/
|
||||
public List<MydoJobDetail> selectMydoJobDetailList(MydoJobDetail mydoJobDetail);
|
||||
|
||||
/**
|
||||
* 新增子任务
|
||||
*
|
||||
* @param mydoJobDetail 子任务
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMydoJobDetail(MydoJobDetail mydoJobDetail);
|
||||
|
||||
/**
|
||||
* 修改子任务
|
||||
*
|
||||
* @param mydoJobDetail 子任务
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMydoJobDetail(MydoJobDetail mydoJobDetail);
|
||||
|
||||
/**
|
||||
* 批量删除子任务
|
||||
*
|
||||
* @param jobDetailIds 需要删除的子任务主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobDetailByJobDetailIds(String[] jobDetailIds);
|
||||
|
||||
/**
|
||||
* 删除子任务信息
|
||||
*
|
||||
* @param jobDetailId 子任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobDetailByJobDetailId(String jobDetailId);
|
||||
|
||||
void insertHistory(String jobId);
|
||||
|
||||
void deleteMydoJobDetailByJobId(String jobId);
|
||||
|
||||
List<MydoJobDetail> selectMydoJobDetailListByJobId(String jobId);
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.ruoyi.job.mydojobdetail.service.impl;
|
||||
|
||||
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
||||
import com.ruoyi.job.mydojobdetail.mapper.MydoJobDetailMapper;
|
||||
import com.ruoyi.job.mydojobdetail.service.IMydoJobDetailService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 子任务Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-22
|
||||
*/
|
||||
@Service
|
||||
public class MydoJobDetailServiceImpl implements IMydoJobDetailService
|
||||
{
|
||||
@Autowired
|
||||
private MydoJobDetailMapper mydoJobDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询子任务
|
||||
*
|
||||
* @param jobDetailId 子任务主键
|
||||
* @return 子任务
|
||||
*/
|
||||
@Override
|
||||
public MydoJobDetail selectMydoJobDetailByJobDetailId(String jobDetailId)
|
||||
{
|
||||
return mydoJobDetailMapper.selectMydoJobDetailByJobDetailId(jobDetailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询子任务列表
|
||||
*
|
||||
* @param mydoJobDetail 子任务
|
||||
* @return 子任务
|
||||
*/
|
||||
@Override
|
||||
public List<MydoJobDetail> selectMydoJobDetailList(MydoJobDetail mydoJobDetail)
|
||||
{
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailMapper.selectMydoJobDetailList(mydoJobDetail);
|
||||
/*for (MydoJobDetail jobDetail : mydoJobDetails) {
|
||||
if (StrUtil.isNotEmpty(jobDetail.getSpare1())){
|
||||
jobDetail.setExtraField(JSONUtil.toBean(jobDetail.getSpare1(), ExtraField.class));
|
||||
}
|
||||
}*/
|
||||
return mydoJobDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增子任务
|
||||
*
|
||||
* @param mydoJobDetail 子任务
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMydoJobDetail(MydoJobDetail mydoJobDetail)
|
||||
{
|
||||
return mydoJobDetailMapper.insertMydoJobDetail(mydoJobDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改子任务
|
||||
*
|
||||
* @param mydoJobDetail 子任务
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMydoJobDetail(MydoJobDetail mydoJobDetail)
|
||||
{
|
||||
return mydoJobDetailMapper.updateMydoJobDetail(mydoJobDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除子任务
|
||||
*
|
||||
* @param jobDetailIds 需要删除的子任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMydoJobDetailByJobDetailIds(String[] jobDetailIds)
|
||||
{
|
||||
return mydoJobDetailMapper.deleteMydoJobDetailByJobDetailIds(jobDetailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除子任务信息
|
||||
*
|
||||
* @param jobDetailId 子任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMydoJobDetailByJobDetailId(String jobDetailId)
|
||||
{
|
||||
return mydoJobDetailMapper.deleteMydoJobDetailByJobDetailId(jobDetailId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertHistory(String jobId) {
|
||||
mydoJobDetailMapper.insertHistory(jobId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteMydoJobDetailByJobId(String jobId) {
|
||||
mydoJobDetailMapper.deleteMydoJobDetailByJobId(jobId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MydoJobDetail> selectMydoJobDetailListByJobId(String jobId) {
|
||||
return mydoJobDetailMapper.selectMydoJobDetailListByJobId(jobId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.ruoyi.job.mydojobdetailfinish.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.job.mydojobdetailfinish.domain.MydoJobDetailFinish;
|
||||
import com.ruoyi.job.mydojobdetailfinish.service.IMydoJobDetailFinishService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 历史子作业Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/job/mydoJobDetailfinish")
|
||||
public class MydoJobDetailFinishController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMydoJobDetailFinishService mydoJobDetailFinishService;
|
||||
|
||||
/**
|
||||
* 查询历史子作业列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobDetailfinish:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MydoJobDetailFinish mydoJobDetailFinish)
|
||||
{
|
||||
startPage();
|
||||
List<MydoJobDetailFinish> list = mydoJobDetailFinishService.selectMydoJobDetailFinishList(mydoJobDetailFinish);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出历史子作业列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobDetailfinish:export')")
|
||||
@Log(title = "历史子作业", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MydoJobDetailFinish mydoJobDetailFinish)
|
||||
{
|
||||
List<MydoJobDetailFinish> list = mydoJobDetailFinishService.selectMydoJobDetailFinishList(mydoJobDetailFinish);
|
||||
ExcelUtil<MydoJobDetailFinish> util = new ExcelUtil<MydoJobDetailFinish>(MydoJobDetailFinish.class);
|
||||
util.exportExcel(response, list, "历史子作业数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取历史子作业详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobDetailfinish:query')")
|
||||
@GetMapping(value = "/{jobDetailId}")
|
||||
public AjaxResult getInfo(@PathVariable("jobDetailId") String jobDetailId)
|
||||
{
|
||||
return success(mydoJobDetailFinishService.selectMydoJobDetailFinishByJobDetailId(jobDetailId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增历史子作业
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobDetailfinish:add')")
|
||||
@Log(title = "历史子作业", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MydoJobDetailFinish mydoJobDetailFinish)
|
||||
{
|
||||
return toAjax(mydoJobDetailFinishService.insertMydoJobDetailFinish(mydoJobDetailFinish));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改历史子作业
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobDetailfinish:edit')")
|
||||
@Log(title = "历史子作业", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MydoJobDetailFinish mydoJobDetailFinish)
|
||||
{
|
||||
return toAjax(mydoJobDetailFinishService.updateMydoJobDetailFinish(mydoJobDetailFinish));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除历史子作业
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobDetailfinish:remove')")
|
||||
@Log(title = "历史子作业", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{jobDetailIds}")
|
||||
public AjaxResult remove(@PathVariable String[] jobDetailIds)
|
||||
{
|
||||
return toAjax(mydoJobDetailFinishService.deleteMydoJobDetailFinishByJobDetailIds(jobDetailIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,424 @@
|
||||
package com.ruoyi.job.mydojobdetailfinish.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 历史子作业对象 mydo_job_detail_finish
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public class MydoJobDetailFinish extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 子任务ID */
|
||||
@Excel(name = "子任务ID")
|
||||
private String jobDetailId;
|
||||
|
||||
/** 任务ID */
|
||||
@Excel(name = "任务ID")
|
||||
private String jobId;
|
||||
|
||||
/** 库存ID */
|
||||
@Excel(name = "库存ID")
|
||||
private String stockId;
|
||||
|
||||
/** 批次号 */
|
||||
@Excel(name = "批次号")
|
||||
private String lotNo;
|
||||
|
||||
/** 入库时间 */
|
||||
@Excel(name = "入库时间")
|
||||
private String inDate;
|
||||
|
||||
/** 单据ID */
|
||||
@Excel(name = "单据ID")
|
||||
private String inOrOutId;
|
||||
|
||||
/** 子单据ID */
|
||||
@Excel(name = "子单据ID")
|
||||
private String inOrOutDId;
|
||||
|
||||
/** 物料GUID */
|
||||
@Excel(name = "物料GUID")
|
||||
private String productGuid;
|
||||
|
||||
/** 物料编码 */
|
||||
@Excel(name = "物料编码")
|
||||
private String productId;
|
||||
|
||||
/** 库存状态 */
|
||||
@Excel(name = "库存状态")
|
||||
private String stockStatus;
|
||||
|
||||
/** 入库数量 */
|
||||
@Excel(name = "入库数量")
|
||||
private String inQuantity;
|
||||
|
||||
/** 库存数量 */
|
||||
@Excel(name = "库存数量")
|
||||
private String stockQuantity;
|
||||
|
||||
/** 出库数量 */
|
||||
@Excel(name = "出库数量")
|
||||
private String outQuantity;
|
||||
|
||||
/** 整层数量 */
|
||||
@Excel(name = "整层数量")
|
||||
private String layerQuantity;
|
||||
|
||||
/** 出库层数量 */
|
||||
@Excel(name = "出库层数量")
|
||||
private String outLayerQuantity;
|
||||
|
||||
/** 回流数量 */
|
||||
@Excel(name = "回流数量")
|
||||
private String giveNum;
|
||||
|
||||
/** 追溯入库单ID */
|
||||
@Excel(name = "追溯入库单ID")
|
||||
private String stockinId;
|
||||
|
||||
/** 垛型ID */
|
||||
@Excel(name = "垛型ID")
|
||||
private String stackingId;
|
||||
|
||||
/** 出库口ID */
|
||||
@Excel(name = "出库口ID")
|
||||
private String exitId;
|
||||
|
||||
/** 生产日期 */
|
||||
@Excel(name = "生产日期")
|
||||
private String printDate;
|
||||
|
||||
/** 客户ID */
|
||||
@Excel(name = "客户ID")
|
||||
private String customerId;
|
||||
|
||||
/** 供应商ID */
|
||||
@Excel(name = "供应商ID")
|
||||
private String supplierId;
|
||||
|
||||
/** 备用字段1 */
|
||||
@Excel(name = "备用字段1")
|
||||
private String spare1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String spare2;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String spare3;
|
||||
|
||||
/** 备用字段4 */
|
||||
@Excel(name = "备用字段4")
|
||||
private String spare4;
|
||||
@Excel(name = "拣选数量")
|
||||
private String pickQuantity;
|
||||
|
||||
public String getPickQuantity() {
|
||||
return pickQuantity;
|
||||
}
|
||||
|
||||
public void setPickQuantity(String pickQuantity) {
|
||||
this.pickQuantity = pickQuantity;
|
||||
}
|
||||
|
||||
|
||||
public void setJobDetailId(String jobDetailId)
|
||||
{
|
||||
this.jobDetailId = jobDetailId;
|
||||
}
|
||||
|
||||
public String getJobDetailId()
|
||||
{
|
||||
return jobDetailId;
|
||||
}
|
||||
|
||||
public void setJobId(String jobId)
|
||||
{
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
public String getJobId()
|
||||
{
|
||||
return jobId;
|
||||
}
|
||||
|
||||
public void setStockId(String stockId)
|
||||
{
|
||||
this.stockId = stockId;
|
||||
}
|
||||
|
||||
public String getStockId()
|
||||
{
|
||||
return stockId;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo)
|
||||
{
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getLotNo()
|
||||
{
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setInDate(String inDate)
|
||||
{
|
||||
this.inDate = inDate;
|
||||
}
|
||||
|
||||
public String getInDate()
|
||||
{
|
||||
return inDate;
|
||||
}
|
||||
|
||||
public void setInOrOutId(String inOrOutId)
|
||||
{
|
||||
this.inOrOutId = inOrOutId;
|
||||
}
|
||||
|
||||
public String getInOrOutId()
|
||||
{
|
||||
return inOrOutId;
|
||||
}
|
||||
|
||||
public void setInOrOutDId(String inOrOutDId)
|
||||
{
|
||||
this.inOrOutDId = inOrOutDId;
|
||||
}
|
||||
|
||||
public String getInOrOutDId()
|
||||
{
|
||||
return inOrOutDId;
|
||||
}
|
||||
|
||||
public void setProductGuid(String productGuid)
|
||||
{
|
||||
this.productGuid = productGuid;
|
||||
}
|
||||
|
||||
public String getProductGuid()
|
||||
{
|
||||
return productGuid;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setStockStatus(String stockStatus)
|
||||
{
|
||||
this.stockStatus = stockStatus;
|
||||
}
|
||||
|
||||
public String getStockStatus()
|
||||
{
|
||||
return stockStatus;
|
||||
}
|
||||
|
||||
public void setInQuantity(String inQuantity)
|
||||
{
|
||||
this.inQuantity = inQuantity;
|
||||
}
|
||||
|
||||
public String getInQuantity()
|
||||
{
|
||||
return inQuantity;
|
||||
}
|
||||
|
||||
public void setStockQuantity(String stockQuantity)
|
||||
{
|
||||
this.stockQuantity = stockQuantity;
|
||||
}
|
||||
|
||||
public String getStockQuantity()
|
||||
{
|
||||
return stockQuantity;
|
||||
}
|
||||
|
||||
public void setOutQuantity(String outQuantity)
|
||||
{
|
||||
this.outQuantity = outQuantity;
|
||||
}
|
||||
|
||||
public String getOutQuantity()
|
||||
{
|
||||
return outQuantity;
|
||||
}
|
||||
|
||||
public void setLayerQuantity(String layerQuantity)
|
||||
{
|
||||
this.layerQuantity = layerQuantity;
|
||||
}
|
||||
|
||||
public String getLayerQuantity()
|
||||
{
|
||||
return layerQuantity;
|
||||
}
|
||||
|
||||
public void setOutLayerQuantity(String outLayerQuantity)
|
||||
{
|
||||
this.outLayerQuantity = outLayerQuantity;
|
||||
}
|
||||
|
||||
public String getOutLayerQuantity()
|
||||
{
|
||||
return outLayerQuantity;
|
||||
}
|
||||
|
||||
public void setGiveNum(String giveNum)
|
||||
{
|
||||
this.giveNum = giveNum;
|
||||
}
|
||||
|
||||
public String getGiveNum()
|
||||
{
|
||||
return giveNum;
|
||||
}
|
||||
|
||||
public void setStockinId(String stockinId)
|
||||
{
|
||||
this.stockinId = stockinId;
|
||||
}
|
||||
|
||||
public String getStockinId()
|
||||
{
|
||||
return stockinId;
|
||||
}
|
||||
|
||||
public void setStackingId(String stackingId)
|
||||
{
|
||||
this.stackingId = stackingId;
|
||||
}
|
||||
|
||||
public String getStackingId()
|
||||
{
|
||||
return stackingId;
|
||||
}
|
||||
|
||||
public void setExitId(String exitId)
|
||||
{
|
||||
this.exitId = exitId;
|
||||
}
|
||||
|
||||
public String getExitId()
|
||||
{
|
||||
return exitId;
|
||||
}
|
||||
|
||||
public void setPrintDate(String printDate)
|
||||
{
|
||||
this.printDate = printDate;
|
||||
}
|
||||
|
||||
public String getPrintDate()
|
||||
{
|
||||
return printDate;
|
||||
}
|
||||
|
||||
public void setCustomerId(String customerId)
|
||||
{
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public String getCustomerId()
|
||||
{
|
||||
return customerId;
|
||||
}
|
||||
|
||||
public void setSupplierId(String supplierId)
|
||||
{
|
||||
this.supplierId = supplierId;
|
||||
}
|
||||
|
||||
public String getSupplierId()
|
||||
{
|
||||
return supplierId;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setSpare4(String spare4)
|
||||
{
|
||||
this.spare4 = spare4;
|
||||
}
|
||||
|
||||
public String getSpare4()
|
||||
{
|
||||
return spare4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("jobDetailId", getJobDetailId())
|
||||
.append("jobId", getJobId())
|
||||
.append("stockId", getStockId())
|
||||
.append("lotNo", getLotNo())
|
||||
.append("inDate", getInDate())
|
||||
.append("inOrOutId", getInOrOutId())
|
||||
.append("inOrOutDId", getInOrOutDId())
|
||||
.append("productGuid", getProductGuid())
|
||||
.append("productId", getProductId())
|
||||
.append("stockStatus", getStockStatus())
|
||||
.append("inQuantity", getInQuantity())
|
||||
.append("stockQuantity", getStockQuantity())
|
||||
.append("outQuantity", getOutQuantity())
|
||||
.append("layerQuantity", getLayerQuantity())
|
||||
.append("outLayerQuantity", getOutLayerQuantity())
|
||||
.append("giveNum", getGiveNum())
|
||||
.append("stockinId", getStockinId())
|
||||
.append("stackingId", getStackingId())
|
||||
.append("exitId", getExitId())
|
||||
.append("printDate", getPrintDate())
|
||||
.append("customerId", getCustomerId())
|
||||
.append("supplierId", getSupplierId())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.append("spare4", getSpare4())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.job.mydojobdetailfinish.mapper;
|
||||
|
||||
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
||||
import com.ruoyi.job.mydojobdetailfinish.domain.MydoJobDetailFinish;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 历史子作业Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public interface MydoJobDetailFinishMapper
|
||||
{
|
||||
/**
|
||||
* 查询历史子作业
|
||||
*
|
||||
* @param jobDetailId 历史子作业主键
|
||||
* @return 历史子作业
|
||||
*/
|
||||
public MydoJobDetailFinish selectMydoJobDetailFinishByJobDetailId(String jobDetailId);
|
||||
|
||||
/**
|
||||
* 查询历史子作业列表
|
||||
*
|
||||
* @param mydoJobDetailFinish 历史子作业
|
||||
* @return 历史子作业集合
|
||||
*/
|
||||
public List<MydoJobDetailFinish> selectMydoJobDetailFinishList(MydoJobDetailFinish mydoJobDetailFinish);
|
||||
|
||||
|
||||
public List<MydoJobDetail> selectMydoJobDetailFinishListByJobId(String jobId);
|
||||
/**
|
||||
* 新增历史子作业
|
||||
*
|
||||
* @param mydoJobDetailFinish 历史子作业
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMydoJobDetailFinish(MydoJobDetailFinish mydoJobDetailFinish);
|
||||
|
||||
/**
|
||||
* 修改历史子作业
|
||||
*
|
||||
* @param mydoJobDetailFinish 历史子作业
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMydoJobDetailFinish(MydoJobDetailFinish mydoJobDetailFinish);
|
||||
|
||||
/**
|
||||
* 删除历史子作业
|
||||
*
|
||||
* @param jobDetailId 历史子作业主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobDetailFinishByJobDetailId(String jobDetailId);
|
||||
|
||||
/**
|
||||
* 批量删除历史子作业
|
||||
*
|
||||
* @param jobDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobDetailFinishByJobDetailIds(String[] jobDetailIds);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.job.mydojobdetailfinish.service;
|
||||
|
||||
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
||||
import com.ruoyi.job.mydojobdetailfinish.domain.MydoJobDetailFinish;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 历史子作业Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public interface IMydoJobDetailFinishService
|
||||
{
|
||||
/**
|
||||
* 查询历史子作业
|
||||
*
|
||||
* @param jobDetailId 历史子作业主键
|
||||
* @return 历史子作业
|
||||
*/
|
||||
public MydoJobDetailFinish selectMydoJobDetailFinishByJobDetailId(String jobDetailId);
|
||||
|
||||
/**
|
||||
* 查询历史子作业列表
|
||||
*
|
||||
* @param mydoJobDetailFinish 历史子作业
|
||||
* @return 历史子作业集合
|
||||
*/
|
||||
public List<MydoJobDetailFinish> selectMydoJobDetailFinishList(MydoJobDetailFinish mydoJobDetailFinish);
|
||||
public List<MydoJobDetail> selectMydoJobDetailFinishListByJobDetail(MydoJobDetail mydoJobDetail);
|
||||
|
||||
/**
|
||||
* 新增历史子作业
|
||||
*
|
||||
* @param mydoJobDetailFinish 历史子作业
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMydoJobDetailFinish(MydoJobDetailFinish mydoJobDetailFinish);
|
||||
|
||||
/**
|
||||
* 修改历史子作业
|
||||
*
|
||||
* @param mydoJobDetailFinish 历史子作业
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMydoJobDetailFinish(MydoJobDetailFinish mydoJobDetailFinish);
|
||||
|
||||
/**
|
||||
* 批量删除历史子作业
|
||||
*
|
||||
* @param jobDetailIds 需要删除的历史子作业主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobDetailFinishByJobDetailIds(String[] jobDetailIds);
|
||||
|
||||
/**
|
||||
* 删除历史子作业信息
|
||||
*
|
||||
* @param jobDetailId 历史子作业主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobDetailFinishByJobDetailId(String jobDetailId);
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.ruoyi.job.mydojobdetailfinish.service.impl;
|
||||
|
||||
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
||||
import com.ruoyi.job.mydojobdetailfinish.domain.MydoJobDetailFinish;
|
||||
import com.ruoyi.job.mydojobdetailfinish.mapper.MydoJobDetailFinishMapper;
|
||||
import com.ruoyi.job.mydojobdetailfinish.service.IMydoJobDetailFinishService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 历史子作业Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
@Service
|
||||
public class MydoJobDetailFinishServiceImpl implements IMydoJobDetailFinishService
|
||||
{
|
||||
@Autowired
|
||||
private MydoJobDetailFinishMapper mydoJobDetailFinishMapper;
|
||||
|
||||
/**
|
||||
* 查询历史子作业
|
||||
*
|
||||
* @param jobDetailId 历史子作业主键
|
||||
* @return 历史子作业
|
||||
*/
|
||||
@Override
|
||||
public MydoJobDetailFinish selectMydoJobDetailFinishByJobDetailId(String jobDetailId)
|
||||
{
|
||||
return mydoJobDetailFinishMapper.selectMydoJobDetailFinishByJobDetailId(jobDetailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询历史子作业列表
|
||||
*
|
||||
* @param mydoJobDetailFinish 历史子作业
|
||||
* @return 历史子作业
|
||||
*/
|
||||
@Override
|
||||
public List<MydoJobDetailFinish> selectMydoJobDetailFinishList(MydoJobDetailFinish mydoJobDetailFinish)
|
||||
{
|
||||
return mydoJobDetailFinishMapper.selectMydoJobDetailFinishList(mydoJobDetailFinish);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MydoJobDetail> selectMydoJobDetailFinishListByJobDetail(MydoJobDetail mydoJobDetail) {
|
||||
String jobId = mydoJobDetail.getJobId();
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailFinishMapper.selectMydoJobDetailFinishListByJobId(jobId);
|
||||
|
||||
/*for (MydoJobDetail jobDetail : mydoJobDetails) {
|
||||
if (StrUtil.isNotEmpty(jobDetail.getSpare1())){
|
||||
jobDetail.setExtraField(JSONUtil.toBean(jobDetail.getSpare1(), ExtraField.class));
|
||||
}
|
||||
}*/
|
||||
return mydoJobDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增历史子作业
|
||||
*
|
||||
* @param mydoJobDetailFinish 历史子作业
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMydoJobDetailFinish(MydoJobDetailFinish mydoJobDetailFinish)
|
||||
{
|
||||
return mydoJobDetailFinishMapper.insertMydoJobDetailFinish(mydoJobDetailFinish);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改历史子作业
|
||||
*
|
||||
* @param mydoJobDetailFinish 历史子作业
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMydoJobDetailFinish(MydoJobDetailFinish mydoJobDetailFinish)
|
||||
{
|
||||
return mydoJobDetailFinishMapper.updateMydoJobDetailFinish(mydoJobDetailFinish);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除历史子作业
|
||||
*
|
||||
* @param jobDetailIds 需要删除的历史子作业主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMydoJobDetailFinishByJobDetailIds(String[] jobDetailIds)
|
||||
{
|
||||
return mydoJobDetailFinishMapper.deleteMydoJobDetailFinishByJobDetailIds(jobDetailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除历史子作业信息
|
||||
*
|
||||
* @param jobDetailId 历史子作业主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMydoJobDetailFinishByJobDetailId(String jobDetailId)
|
||||
{
|
||||
return mydoJobDetailFinishMapper.deleteMydoJobDetailFinishByJobDetailId(jobDetailId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.ruoyi.job.mydojobfinish.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.job.mydojobfinish.domain.MydoJobFinish;
|
||||
import com.ruoyi.job.mydojobfinish.service.IMydoJobFinishService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 历史主作业Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/job/mydoJobFinish")
|
||||
public class MydoJobFinishController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMydoJobFinishService mydoJobFinishService;
|
||||
|
||||
/**
|
||||
* 查询历史主作业列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobFinish:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MydoJobFinish mydoJobFinish)
|
||||
{
|
||||
startPage();
|
||||
List<MydoJobFinish> list = mydoJobFinishService.selectMydoJobFinishList(mydoJobFinish);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出历史主作业列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobFinish:export')")
|
||||
@Log(title = "历史主作业", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MydoJobFinish mydoJobFinish)
|
||||
{
|
||||
List<MydoJobFinish> list = mydoJobFinishService.selectMydoJobFinishList(mydoJobFinish);
|
||||
ExcelUtil<MydoJobFinish> util = new ExcelUtil<MydoJobFinish>(MydoJobFinish.class);
|
||||
util.exportExcel(response, list, "历史主作业数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取历史主作业详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobFinish:query')")
|
||||
@GetMapping(value = "/{jobId}")
|
||||
public AjaxResult getInfo(@PathVariable("jobId") String jobId)
|
||||
{
|
||||
return success(mydoJobFinishService.selectMydoJobFinishByJobId(jobId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增历史主作业
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobFinish:add')")
|
||||
@Log(title = "历史主作业", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MydoJobFinish mydoJobFinish)
|
||||
{
|
||||
return toAjax(mydoJobFinishService.insertMydoJobFinish(mydoJobFinish));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改历史主作业
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobFinish:edit')")
|
||||
@Log(title = "历史主作业", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MydoJobFinish mydoJobFinish)
|
||||
{
|
||||
return toAjax(mydoJobFinishService.updateMydoJobFinish(mydoJobFinish));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除历史主作业
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJobFinish:remove')")
|
||||
@Log(title = "历史主作业", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{jobIds}")
|
||||
public AjaxResult remove(@PathVariable String[] jobIds)
|
||||
{
|
||||
return toAjax(mydoJobFinishService.deleteMydoJobFinishByJobIds(jobIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,384 @@
|
||||
package com.ruoyi.job.mydojobfinish.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 历史主作业对象 mydo_job_finish
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public class MydoJobFinish extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 任务ID */
|
||||
@Excel(name = "任务ID")
|
||||
private String jobId;
|
||||
|
||||
/** 任务状态 */
|
||||
@Excel(name = "任务状态")
|
||||
private String status;
|
||||
|
||||
/** 上线类型 */
|
||||
@Excel(name = "上线类型")
|
||||
private String onLineType;
|
||||
|
||||
/** 任务号 */
|
||||
@Excel(name = "任务号")
|
||||
private String taskNo;
|
||||
|
||||
/** 供应商ID */
|
||||
@Excel(name = "供应商ID")
|
||||
private String supplierId;
|
||||
|
||||
/** 客户ID */
|
||||
@Excel(name = "客户ID")
|
||||
private String customerId;
|
||||
|
||||
/** 部门ID */
|
||||
@Excel(name = "部门ID")
|
||||
private String departmentId;
|
||||
|
||||
/** 托盘码 */
|
||||
@Excel(name = "托盘码")
|
||||
private String trayCode;
|
||||
|
||||
/** 巷道ID */
|
||||
@Excel(name = "巷道ID")
|
||||
private String roadwayId;
|
||||
|
||||
/** 货位ID */
|
||||
@Excel(name = "货位ID")
|
||||
private String cargoSpaceId;
|
||||
|
||||
/** 目标巷道ID */
|
||||
@Excel(name = "目标巷道ID")
|
||||
private String targetRoadwayId;
|
||||
|
||||
/** 目标货位ID */
|
||||
@Excel(name = "目标货位ID")
|
||||
private String targetCargoSpaceId;
|
||||
|
||||
/** 产线ID */
|
||||
@Excel(name = "产线ID")
|
||||
private String lineId;
|
||||
|
||||
/** 车间ID */
|
||||
@Excel(name = "车间ID")
|
||||
private String workshopId;
|
||||
|
||||
/** 优先级 */
|
||||
@Excel(name = "优先级")
|
||||
private Long priority;
|
||||
|
||||
/** 执行阶段 */
|
||||
@Excel(name = "执行阶段")
|
||||
private String executionPhase;
|
||||
|
||||
/** 任务类型 */
|
||||
@Excel(name = "任务类型")
|
||||
private String inOrOut;
|
||||
|
||||
/** 开始时间 */
|
||||
@Excel(name = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
@Excel(name = "结束时间")
|
||||
private String finishTime;
|
||||
|
||||
/** 入口ID */
|
||||
@Excel(name = "入口ID")
|
||||
private String entranceId;
|
||||
|
||||
/** 出口ID */
|
||||
@Excel(name = "出口ID")
|
||||
private String exitId;
|
||||
|
||||
/** 班组ID */
|
||||
@Excel(name = "班组ID")
|
||||
private String classId;
|
||||
|
||||
/** 仓库ID */
|
||||
@Excel(name = "仓库ID")
|
||||
private String warehouseId;
|
||||
|
||||
/** 重分标记 */
|
||||
@Excel(name = "重分标记")
|
||||
private String faultFlag;
|
||||
|
||||
public void setJobId(String jobId)
|
||||
{
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
public String getJobId()
|
||||
{
|
||||
return jobId;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setOnLineType(String onLineType)
|
||||
{
|
||||
this.onLineType = onLineType;
|
||||
}
|
||||
|
||||
public String getOnLineType()
|
||||
{
|
||||
return onLineType;
|
||||
}
|
||||
|
||||
public void setTaskNo(String taskNo)
|
||||
{
|
||||
this.taskNo = taskNo;
|
||||
}
|
||||
|
||||
public String getTaskNo()
|
||||
{
|
||||
return taskNo;
|
||||
}
|
||||
|
||||
public void setSupplierId(String supplierId)
|
||||
{
|
||||
this.supplierId = supplierId;
|
||||
}
|
||||
|
||||
public String getSupplierId()
|
||||
{
|
||||
return supplierId;
|
||||
}
|
||||
|
||||
public void setCustomerId(String customerId)
|
||||
{
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public String getCustomerId()
|
||||
{
|
||||
return customerId;
|
||||
}
|
||||
|
||||
public void setDepartmentId(String departmentId)
|
||||
{
|
||||
this.departmentId = departmentId;
|
||||
}
|
||||
|
||||
public String getDepartmentId()
|
||||
{
|
||||
return departmentId;
|
||||
}
|
||||
|
||||
public void setTrayCode(String trayCode)
|
||||
{
|
||||
this.trayCode = trayCode;
|
||||
}
|
||||
|
||||
public String getTrayCode()
|
||||
{
|
||||
return trayCode;
|
||||
}
|
||||
|
||||
public void setRoadwayId(String roadwayId)
|
||||
{
|
||||
this.roadwayId = roadwayId;
|
||||
}
|
||||
|
||||
public String getRoadwayId()
|
||||
{
|
||||
return roadwayId;
|
||||
}
|
||||
|
||||
public void setCargoSpaceId(String cargoSpaceId)
|
||||
{
|
||||
this.cargoSpaceId = cargoSpaceId;
|
||||
}
|
||||
|
||||
public String getCargoSpaceId()
|
||||
{
|
||||
return cargoSpaceId;
|
||||
}
|
||||
|
||||
public void setTargetRoadwayId(String targetRoadwayId)
|
||||
{
|
||||
this.targetRoadwayId = targetRoadwayId;
|
||||
}
|
||||
|
||||
public String getTargetRoadwayId()
|
||||
{
|
||||
return targetRoadwayId;
|
||||
}
|
||||
|
||||
public void setTargetCargoSpaceId(String targetCargoSpaceId)
|
||||
{
|
||||
this.targetCargoSpaceId = targetCargoSpaceId;
|
||||
}
|
||||
|
||||
public String getTargetCargoSpaceId()
|
||||
{
|
||||
return targetCargoSpaceId;
|
||||
}
|
||||
|
||||
public void setLineId(String lineId)
|
||||
{
|
||||
this.lineId = lineId;
|
||||
}
|
||||
|
||||
public String getLineId()
|
||||
{
|
||||
return lineId;
|
||||
}
|
||||
|
||||
public void setWorkshopId(String workshopId)
|
||||
{
|
||||
this.workshopId = workshopId;
|
||||
}
|
||||
|
||||
public String getWorkshopId()
|
||||
{
|
||||
return workshopId;
|
||||
}
|
||||
|
||||
public void setPriority(Long priority)
|
||||
{
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
public Long getPriority()
|
||||
{
|
||||
return priority;
|
||||
}
|
||||
|
||||
public void setExecutionPhase(String executionPhase)
|
||||
{
|
||||
this.executionPhase = executionPhase;
|
||||
}
|
||||
|
||||
public String getExecutionPhase()
|
||||
{
|
||||
return executionPhase;
|
||||
}
|
||||
|
||||
public void setInOrOut(String inOrOut)
|
||||
{
|
||||
this.inOrOut = inOrOut;
|
||||
}
|
||||
|
||||
public String getInOrOut()
|
||||
{
|
||||
return inOrOut;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime)
|
||||
{
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getStartTime()
|
||||
{
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setFinishTime(String finishTime)
|
||||
{
|
||||
this.finishTime = finishTime;
|
||||
}
|
||||
|
||||
public String getFinishTime()
|
||||
{
|
||||
return finishTime;
|
||||
}
|
||||
|
||||
public void setEntranceId(String entranceId)
|
||||
{
|
||||
this.entranceId = entranceId;
|
||||
}
|
||||
|
||||
public String getEntranceId()
|
||||
{
|
||||
return entranceId;
|
||||
}
|
||||
|
||||
public void setExitId(String exitId)
|
||||
{
|
||||
this.exitId = exitId;
|
||||
}
|
||||
|
||||
public String getExitId()
|
||||
{
|
||||
return exitId;
|
||||
}
|
||||
|
||||
public void setClassId(String classId)
|
||||
{
|
||||
this.classId = classId;
|
||||
}
|
||||
|
||||
public String getClassId()
|
||||
{
|
||||
return classId;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setFaultFlag(String faultFlag)
|
||||
{
|
||||
this.faultFlag = faultFlag;
|
||||
}
|
||||
|
||||
public String getFaultFlag()
|
||||
{
|
||||
return faultFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("jobId", getJobId())
|
||||
.append("status", getStatus())
|
||||
.append("onLineType", getOnLineType())
|
||||
.append("taskNo", getTaskNo())
|
||||
.append("supplierId", getSupplierId())
|
||||
.append("customerId", getCustomerId())
|
||||
.append("departmentId", getDepartmentId())
|
||||
.append("trayCode", getTrayCode())
|
||||
.append("roadwayId", getRoadwayId())
|
||||
.append("cargoSpaceId", getCargoSpaceId())
|
||||
.append("targetRoadwayId", getTargetRoadwayId())
|
||||
.append("targetCargoSpaceId", getTargetCargoSpaceId())
|
||||
.append("lineId", getLineId())
|
||||
.append("workshopId", getWorkshopId())
|
||||
.append("priority", getPriority())
|
||||
.append("executionPhase", getExecutionPhase())
|
||||
.append("inOrOut", getInOrOut())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("startTime", getStartTime())
|
||||
.append("finishTime", getFinishTime())
|
||||
.append("entranceId", getEntranceId())
|
||||
.append("exitId", getExitId())
|
||||
.append("classId", getClassId())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("faultFlag", getFaultFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.ruoyi.job.mydojobfinish.mapper;
|
||||
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
import com.ruoyi.job.mydojobfinish.domain.MydoJobFinish;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 历史主作业Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public interface MydoJobFinishMapper
|
||||
{
|
||||
/**
|
||||
* 查询历史主作业
|
||||
*
|
||||
* @param jobId 历史主作业主键
|
||||
* @return 历史主作业
|
||||
*/
|
||||
public MydoJobFinish selectMydoJobFinishByJobId(String jobId);
|
||||
|
||||
/**
|
||||
* 查询历史主作业列表
|
||||
*
|
||||
* @param mydoJobFinish 历史主作业
|
||||
* @return 历史主作业集合
|
||||
*/
|
||||
public List<MydoJobFinish> selectMydoJobFinishList(MydoJobFinish mydoJobFinish);
|
||||
|
||||
|
||||
public List<MydoJob> selectMydoJobFinishListByMydoJob(MydoJob mydoJob);
|
||||
|
||||
/**
|
||||
* 新增历史主作业
|
||||
*
|
||||
* @param mydoJobFinish 历史主作业
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMydoJobFinish(MydoJobFinish mydoJobFinish);
|
||||
|
||||
/**
|
||||
* 修改历史主作业
|
||||
*
|
||||
* @param mydoJobFinish 历史主作业
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMydoJobFinish(MydoJobFinish mydoJobFinish);
|
||||
|
||||
/**
|
||||
* 删除历史主作业
|
||||
*
|
||||
* @param jobId 历史主作业主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobFinishByJobId(String jobId);
|
||||
|
||||
/**
|
||||
* 批量删除历史主作业
|
||||
*
|
||||
* @param jobIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobFinishByJobIds(String[] jobIds);
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.ruoyi.job.mydojobfinish.service;
|
||||
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
import com.ruoyi.job.mydojobfinish.domain.MydoJobFinish;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 历史主作业Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
public interface IMydoJobFinishService
|
||||
{
|
||||
/**
|
||||
* 查询历史主作业
|
||||
*
|
||||
* @param jobId 历史主作业主键
|
||||
* @return 历史主作业
|
||||
*/
|
||||
public MydoJobFinish selectMydoJobFinishByJobId(String jobId);
|
||||
|
||||
/**
|
||||
* 查询历史主作业列表
|
||||
*
|
||||
* @param mydoJobFinish 历史主作业
|
||||
* @return 历史主作业集合
|
||||
*/
|
||||
public List<MydoJobFinish> selectMydoJobFinishList(MydoJobFinish mydoJobFinish);
|
||||
|
||||
|
||||
public List<MydoJob> selectMydoJobFinishListByMydoJob(MydoJob mydoJob);
|
||||
|
||||
/**
|
||||
* 新增历史主作业
|
||||
*
|
||||
* @param mydoJobFinish 历史主作业
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMydoJobFinish(MydoJobFinish mydoJobFinish);
|
||||
|
||||
/**
|
||||
* 修改历史主作业
|
||||
*
|
||||
* @param mydoJobFinish 历史主作业
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMydoJobFinish(MydoJobFinish mydoJobFinish);
|
||||
|
||||
/**
|
||||
* 批量删除历史主作业
|
||||
*
|
||||
* @param jobIds 需要删除的历史主作业主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobFinishByJobIds(String[] jobIds);
|
||||
|
||||
/**
|
||||
* 删除历史主作业信息
|
||||
*
|
||||
* @param jobId 历史主作业主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobFinishByJobId(String jobId);
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.job.mydojobfinish.service.impl;
|
||||
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
import com.ruoyi.job.mydojobfinish.domain.MydoJobFinish;
|
||||
import com.ruoyi.job.mydojobfinish.mapper.MydoJobFinishMapper;
|
||||
import com.ruoyi.job.mydojobfinish.service.IMydoJobFinishService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 历史主作业Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-23
|
||||
*/
|
||||
@Service
|
||||
public class MydoJobFinishServiceImpl implements IMydoJobFinishService
|
||||
{
|
||||
@Autowired
|
||||
private MydoJobFinishMapper mydoJobFinishMapper;
|
||||
|
||||
/**
|
||||
* 查询历史主作业
|
||||
*
|
||||
* @param jobId 历史主作业主键
|
||||
* @return 历史主作业
|
||||
*/
|
||||
@Override
|
||||
public MydoJobFinish selectMydoJobFinishByJobId(String jobId)
|
||||
{
|
||||
return mydoJobFinishMapper.selectMydoJobFinishByJobId(jobId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询历史主作业列表
|
||||
*
|
||||
* @param mydoJobFinish 历史主作业
|
||||
* @return 历史主作业
|
||||
*/
|
||||
@Override
|
||||
public List<MydoJobFinish> selectMydoJobFinishList(MydoJobFinish mydoJobFinish)
|
||||
{
|
||||
return mydoJobFinishMapper.selectMydoJobFinishList(mydoJobFinish);
|
||||
}
|
||||
|
||||
@Override
|
||||
@DataScope(warehouseAlias = "bw")
|
||||
public List<MydoJob> selectMydoJobFinishListByMydoJob(MydoJob mydoJob) {
|
||||
return mydoJobFinishMapper.selectMydoJobFinishListByMydoJob(mydoJob);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增历史主作业
|
||||
*
|
||||
* @param mydoJobFinish 历史主作业
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMydoJobFinish(MydoJobFinish mydoJobFinish)
|
||||
{
|
||||
mydoJobFinish.setCreateTime(DateUtils.getNowDate());
|
||||
return mydoJobFinishMapper.insertMydoJobFinish(mydoJobFinish);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改历史主作业
|
||||
*
|
||||
* @param mydoJobFinish 历史主作业
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMydoJobFinish(MydoJobFinish mydoJobFinish)
|
||||
{
|
||||
return mydoJobFinishMapper.updateMydoJobFinish(mydoJobFinish);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除历史主作业
|
||||
*
|
||||
* @param jobIds 需要删除的历史主作业主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMydoJobFinishByJobIds(String[] jobIds)
|
||||
{
|
||||
return mydoJobFinishMapper.deleteMydoJobFinishByJobIds(jobIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除历史主作业信息
|
||||
*
|
||||
* @param jobId 历史主作业主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMydoJobFinishByJobId(String jobId)
|
||||
{
|
||||
return mydoJobFinishMapper.deleteMydoJobFinishByJobId(jobId);
|
||||
}
|
||||
}
|
||||
21
ruoyi-admin/src/main/java/com/ruoyi/job/readme.md
Normal file
21
ruoyi-admin/src/main/java/com/ruoyi/job/readme.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# 入出库作业目录说明
|
||||
|
||||
## 目录用途
|
||||
存放入出库作业相关的业务代码和配置文件
|
||||
|
||||
## 主要功能
|
||||
- 处理入库作业流程
|
||||
- 处理出库作业流程
|
||||
- 管理作业任务分配
|
||||
- 作业进度跟踪和监控
|
||||
- 作业数据统计分析
|
||||
|
||||
## 目录结构
|
||||
```
|
||||
job/
|
||||
├── config/ # 作业配置文件
|
||||
├── controller/ # 作业控制器
|
||||
├── model/ # 作业数据模型
|
||||
├── service/ # 作业业务逻辑
|
||||
└── utils/ # 作业相关工具类
|
||||
```
|
||||
Reference in New Issue
Block a user