diff --git a/doc/设计文档/数据库设计/mes-pro.sql b/doc/设计文档/数据库设计/mes-pro.sql
index e7c3f0a..cef7e83 100644
--- a/doc/设计文档/数据库设计/mes-pro.sql
+++ b/doc/设计文档/数据库设计/mes-pro.sql
@@ -228,6 +228,7 @@ create table pro_task (
end_time datetime comment '完成生产时间',
color_code char(7) default '#00AEF3' comment '甘特图显示颜色',
request_date datetime comment '需求日期',
+ stauts varchar(64) default 'NORMARL' comment '生产状态',
remark varchar(500) default '' comment '备注',
attr1 varchar(64) default null comment '预留字段1',
attr2 varchar(255) default null comment '预留字段2',
diff --git a/doc/设计文档/数据库设计/数据库设计.xlsx b/doc/设计文档/数据库设计/数据库设计.xlsx
index 7db59da..d344759 100644
Binary files a/doc/设计文档/数据库设计/数据库设计.xlsx and b/doc/设计文档/数据库设计/数据库设计.xlsx differ
diff --git a/ktg-mes/src/main/java/com/ktg/mes/pro/controller/ProTaskMobController.java b/ktg-mes/src/main/java/com/ktg/mes/pro/controller/ProTaskMobController.java
index 27ed588..1f59505 100644
--- a/ktg-mes/src/main/java/com/ktg/mes/pro/controller/ProTaskMobController.java
+++ b/ktg-mes/src/main/java/com/ktg/mes/pro/controller/ProTaskMobController.java
@@ -1,15 +1,14 @@
package com.ktg.mes.pro.controller;
+import com.ktg.common.annotation.Log;
import com.ktg.common.core.controller.BaseController;
import com.ktg.common.core.domain.AjaxResult;
+import com.ktg.common.enums.BusinessType;
import com.ktg.mes.pro.domain.ProTask;
import com.ktg.mes.pro.service.IProTaskService;
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.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
import java.util.List;
@@ -40,4 +39,19 @@ public class ProTaskMobController extends BaseController {
{
return AjaxResult.success(proTaskService.selectProTaskByTaskId(taskId));
}
+
+
+ /**
+ * 修改生产任务状态
+ */
+ @PreAuthorize("@ss.hasPermi('mes:pro:protask:edit')")
+ @Log(title = "生产任务", businessType = BusinessType.UPDATE)
+ @PostMapping
+ @ResponseBody
+ public AjaxResult edit(@RequestBody ProTask proTask)
+ {
+ return toAjax(proTaskService.updateProTask(proTask));
+ }
+
+
}
diff --git a/ktg-mes/src/main/java/com/ktg/mes/pro/domain/ProTask.java b/ktg-mes/src/main/java/com/ktg/mes/pro/domain/ProTask.java
index 1e74ee4..29be6f9 100644
--- a/ktg-mes/src/main/java/com/ktg/mes/pro/domain/ProTask.java
+++ b/ktg-mes/src/main/java/com/ktg/mes/pro/domain/ProTask.java
@@ -136,6 +136,8 @@ public class ProTask extends BaseEntity
@Excel(name = "需求日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date requestDate;
+ private String status;
+
/** 预留字段1 */
private String attr1;
@@ -409,7 +411,16 @@ public class ProTask extends BaseEntity
{
return requestDate;
}
- public void setAttr1(String attr1)
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public void setAttr1(String attr1)
{
this.attr1 = attr1;
}
@@ -448,45 +459,41 @@ public class ProTask extends BaseEntity
@Override
public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("taskId", getTaskId())
- .append("taskCode", getTaskCode())
- .append("taskName", getTaskName())
- .append("workorderId", getWorkorderId())
- .append("workorderCode", getWorkorderCode())
- .append("workorderName", getWorkorderName())
- .append("workstationId", getWorkstationId())
- .append("workstationCode", getWorkstationCode())
- .append("workstationName", getWorkstationName())
- .append("processId", getProcessId())
- .append("processCode", getProcessCode())
- .append("processName", getProcessName())
- .append("itemId", getItemId())
- .append("itemCode", getItemCode())
- .append("itemName", getItemName())
- .append("specification", getSpecification())
- .append("unitOfMeasure", getUnitOfMeasure())
- .append("quantity", getQuantity())
- .append("quantityProduced", getQuantityProduced())
- .append("quantityChanged", getQuantityChanged())
- .append("clientId", getClientId())
- .append("clientCode", getClientCode())
- .append("clientName", getClientName())
- .append("clientNick", getClientNick())
- .append("startTime", getStartTime())
- .append("duration", getDuration())
- .append("endTime", getEndTime())
- .append("colorCode", getColorCode())
- .append("requestDate", getRequestDate())
- .append("remark", getRemark())
- .append("attr1", getAttr1())
- .append("attr2", getAttr2())
- .append("attr3", getAttr3())
- .append("attr4", getAttr4())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .toString();
+ return "ProTask{" +
+ "taskId=" + taskId +
+ ", taskCode='" + taskCode + '\'' +
+ ", taskName='" + taskName + '\'' +
+ ", workorderId=" + workorderId +
+ ", workorderCode='" + workorderCode + '\'' +
+ ", workorderName='" + workorderName + '\'' +
+ ", workstationId=" + workstationId +
+ ", workstationCode='" + workstationCode + '\'' +
+ ", workstationName='" + workstationName + '\'' +
+ ", processId=" + processId +
+ ", processCode='" + processCode + '\'' +
+ ", processName='" + processName + '\'' +
+ ", itemId=" + itemId +
+ ", itemCode='" + itemCode + '\'' +
+ ", itemName='" + itemName + '\'' +
+ ", specification='" + specification + '\'' +
+ ", unitOfMeasure='" + unitOfMeasure + '\'' +
+ ", quantity=" + quantity +
+ ", quantityProduced=" + quantityProduced +
+ ", quantityChanged=" + quantityChanged +
+ ", clientId=" + clientId +
+ ", clientCode='" + clientCode + '\'' +
+ ", clientName='" + clientName + '\'' +
+ ", clientNick='" + clientNick + '\'' +
+ ", startTime=" + startTime +
+ ", duration=" + duration +
+ ", endTime=" + endTime +
+ ", colorCode='" + colorCode + '\'' +
+ ", requestDate=" + requestDate +
+ ", status='" + status + '\'' +
+ ", attr1='" + attr1 + '\'' +
+ ", attr2='" + attr2 + '\'' +
+ ", attr3=" + attr3 +
+ ", attr4=" + attr4 +
+ '}';
}
}
diff --git a/ktg-mes/src/main/resources/mapper/pro/ProTaskMapper.xml b/ktg-mes/src/main/resources/mapper/pro/ProTaskMapper.xml
index 010c237..4e1961d 100644
--- a/ktg-mes/src/main/resources/mapper/pro/ProTaskMapper.xml
+++ b/ktg-mes/src/main/resources/mapper/pro/ProTaskMapper.xml
@@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
@@ -46,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- select task_id, task_code, task_name, workorder_id, workorder_code, workorder_name, workstation_id, workstation_code, workstation_name,process_id,process_code,process_name, item_id, item_code, item_name, specification, unit_of_measure, quantity, quantity_produced, quantity_changed, client_id, client_code, client_name, client_nick, start_time, duration, end_time, color_code, request_date, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from pro_task
+ select task_id, task_code, task_name, workorder_id, workorder_code, workorder_name, workstation_id, workstation_code, workstation_name,process_id,process_code,process_name, item_id, item_code, item_name, specification, unit_of_measure, quantity, quantity_produced, quantity_changed, client_id, client_code, client_name, client_nick, start_time, duration, end_time, color_code, request_date, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from pro_task
@@ -120,6 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
end_time,
color_code,
request_date,
+ status,
remark,
attr1,
attr2,
@@ -159,6 +162,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{endTime},
#{colorCode},
#{requestDate},
+ #{status},
#{remark},
#{attr1},
#{attr2},
@@ -202,6 +206,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
end_time = #{endTime},
color_code = #{colorCode},
request_date = #{requestDate},
+ status = #{status},
remark = #{remark},
attr1 = #{attr1},
attr2 = #{attr2},