触控屏端生产报工,合格品数量和不良品数量更新
This commit is contained in:
parent
b0b7c8b645
commit
3f4fbfc1c4
@ -218,6 +218,8 @@ create table pro_task (
|
|||||||
unit_of_measure varchar(64) not null comment '单位',
|
unit_of_measure varchar(64) not null comment '单位',
|
||||||
quantity double(14,2) default 1 not null comment '排产数量',
|
quantity double(14,2) default 1 not null comment '排产数量',
|
||||||
quantity_produced double(14,2) default 0 comment '已生产数量',
|
quantity_produced double(14,2) default 0 comment '已生产数量',
|
||||||
|
quantity_quanlify double(14,2) default 0 comment '合格品数量',
|
||||||
|
quantity_unquanlify double(14,2) default 0 comment '不良品数量',
|
||||||
quantity_changed double(14,2) default 0 comment '调整数量',
|
quantity_changed double(14,2) default 0 comment '调整数量',
|
||||||
client_id bigint(20) not null comment '客户ID',
|
client_id bigint(20) not null comment '客户ID',
|
||||||
client_code varchar(64) not null comment '客户编码',
|
client_code varchar(64) not null comment '客户编码',
|
||||||
@ -262,6 +264,7 @@ create table pro_feedback (
|
|||||||
quantity_unquanlified double(14,2) comment '不良品数量',
|
quantity_unquanlified double(14,2) comment '不良品数量',
|
||||||
user_name varchar(64) comment '报工用户名',
|
user_name varchar(64) comment '报工用户名',
|
||||||
nick_name varchar(64) comment '昵称',
|
nick_name varchar(64) comment '昵称',
|
||||||
|
feedback_channel varchar(64) comment '报工途径',
|
||||||
feedback_time datetime comment '报工时间',
|
feedback_time datetime comment '报工时间',
|
||||||
remark varchar(500) default '' comment '备注',
|
remark varchar(500) default '' comment '备注',
|
||||||
attr1 varchar(64) default null comment '预留字段1',
|
attr1 varchar(64) default null comment '预留字段1',
|
||||||
|
@ -64,12 +64,9 @@ public class ProTaskMobController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Log(title = "生产报工", businessType = BusinessType.INSERT)
|
@Log(title = "生产报工", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/feedBack")
|
@PostMapping("/feedback")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult feedBack( ProFeedback feedback){
|
public AjaxResult feedBack( ProFeedback feedback){
|
||||||
MdWorkstation workstation = mdWorkstationService.selectMdWorkstationByWorkstationId(feedback.getWorkstationId());
|
|
||||||
feedback.setWorkstationCode(workstation.getWorkstationCode());
|
|
||||||
feedback.setWorkstationName(workstation.getWorkstationName());
|
|
||||||
|
|
||||||
ProTask task = proTaskService.selectProTaskByTaskId(feedback.getTaskId());
|
ProTask task = proTaskService.selectProTaskByTaskId(feedback.getTaskId());
|
||||||
feedback.setTaskCode(task.getTaskCode());
|
feedback.setTaskCode(task.getTaskCode());
|
||||||
@ -78,6 +75,19 @@ public class ProTaskMobController extends BaseController {
|
|||||||
feedback.setWorkorderName(task.getWorkorderName());
|
feedback.setWorkorderName(task.getWorkorderName());
|
||||||
feedback.setQuantity(task.getQuantity());
|
feedback.setQuantity(task.getQuantity());
|
||||||
feedback.setFeedbackTime(new Date());
|
feedback.setFeedbackTime(new Date());
|
||||||
|
|
||||||
|
if(feedback.getWorkstationId() == null){
|
||||||
|
feedback.setWorkstationId(task.getWorkstationId());
|
||||||
|
}
|
||||||
|
|
||||||
|
MdWorkstation workstation = mdWorkstationService.selectMdWorkstationByWorkstationId(feedback.getWorkstationId());
|
||||||
|
feedback.setWorkstationCode(workstation.getWorkstationCode());
|
||||||
|
feedback.setWorkstationName(workstation.getWorkstationName());
|
||||||
|
|
||||||
|
task.setQuantityProduced(task.getQuantityProduced().add(feedback.getQuantityFeedback()));
|
||||||
|
task.setQuantityQuanlify(task.getQuantityQuanlify().add(feedback.getQuantityQualified()));
|
||||||
|
task.setQuantityUnquanlify(task.getQuantityUnquanlify().add(feedback.getQuantityUnquanlified()));
|
||||||
|
proTaskService.updateProTask(task);
|
||||||
return toAjax(proFeedbackService.insertProFeedback(feedback));
|
return toAjax(proFeedbackService.insertProFeedback(feedback));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,6 +93,10 @@ public class ProTask extends BaseEntity
|
|||||||
@Excel(name = "已生产数量")
|
@Excel(name = "已生产数量")
|
||||||
private BigDecimal quantityProduced;
|
private BigDecimal quantityProduced;
|
||||||
|
|
||||||
|
private BigDecimal quantityQuanlify;
|
||||||
|
|
||||||
|
private BigDecimal quantityUnquanlify;
|
||||||
|
|
||||||
/** 调整数量 */
|
/** 调整数量 */
|
||||||
@Excel(name = "调整数量")
|
@Excel(name = "调整数量")
|
||||||
private BigDecimal quantityChanged;
|
private BigDecimal quantityChanged;
|
||||||
@ -326,7 +330,23 @@ public class ProTask extends BaseEntity
|
|||||||
this.quantityChanged = quantityChanged;
|
this.quantityChanged = quantityChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getQuantityChanged()
|
public BigDecimal getQuantityQuanlify() {
|
||||||
|
return quantityQuanlify;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuantityQuanlify(BigDecimal quantityQuanlify) {
|
||||||
|
this.quantityQuanlify = quantityQuanlify;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQuantityUnquanlify() {
|
||||||
|
return quantityUnquanlify;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuantityUnquanlify(BigDecimal quantityUnquanlify) {
|
||||||
|
this.quantityUnquanlify = quantityUnquanlify;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQuantityChanged()
|
||||||
{
|
{
|
||||||
return quantityChanged;
|
return quantityChanged;
|
||||||
}
|
}
|
||||||
@ -479,6 +499,8 @@ public class ProTask extends BaseEntity
|
|||||||
", unitOfMeasure='" + unitOfMeasure + '\'' +
|
", unitOfMeasure='" + unitOfMeasure + '\'' +
|
||||||
", quantity=" + quantity +
|
", quantity=" + quantity +
|
||||||
", quantityProduced=" + quantityProduced +
|
", quantityProduced=" + quantityProduced +
|
||||||
|
", quantityQuanlify=" + quantityQuanlify +
|
||||||
|
", quantityUnquanlify=" + quantityUnquanlify +
|
||||||
", quantityChanged=" + quantityChanged +
|
", quantityChanged=" + quantityChanged +
|
||||||
", clientId=" + clientId +
|
", clientId=" + clientId +
|
||||||
", clientCode='" + clientCode + '\'' +
|
", clientCode='" + clientCode + '\'' +
|
||||||
|
@ -24,6 +24,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="unitOfMeasure" column="unit_of_measure" />
|
<result property="unitOfMeasure" column="unit_of_measure" />
|
||||||
<result property="quantity" column="quantity" />
|
<result property="quantity" column="quantity" />
|
||||||
<result property="quantityProduced" column="quantity_produced" />
|
<result property="quantityProduced" column="quantity_produced" />
|
||||||
|
<result property="quantityQuanlify" column="quantity_quanlify" />
|
||||||
|
<result property="quantityUnquanlify" column="quantity_unquanlify" />
|
||||||
<result property="quantityChanged" column="quantity_changed" />
|
<result property="quantityChanged" column="quantity_changed" />
|
||||||
<result property="clientId" column="client_id" />
|
<result property="clientId" column="client_id" />
|
||||||
<result property="clientCode" column="client_code" />
|
<result property="clientCode" column="client_code" />
|
||||||
@ -47,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectProTaskVo">
|
<sql id="selectProTaskVo">
|
||||||
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
|
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_quanlify,quantity_unquanlify, 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
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectProTaskList" parameterType="ProTask" resultMap="ProTaskResult">
|
<select id="selectProTaskList" parameterType="ProTask" resultMap="ProTaskResult">
|
||||||
@ -71,6 +73,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="unitOfMeasure != null and unitOfMeasure != ''"> and unit_of_measure = #{unitOfMeasure}</if>
|
<if test="unitOfMeasure != null and unitOfMeasure != ''"> and unit_of_measure = #{unitOfMeasure}</if>
|
||||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||||
<if test="quantityProduced != null "> and quantity_produced = #{quantityProduced}</if>
|
<if test="quantityProduced != null "> and quantity_produced = #{quantityProduced}</if>
|
||||||
|
<if test="quantityQuanlify != null "> and quantity_quanlify = #{quantityQuanlify}</if>
|
||||||
|
<if test="quantityUnquanlify != null "> and quantity_unquanlify = #{quantityUnquanlify}</if>
|
||||||
<if test="quantityChanged != null "> and quantity_changed = #{quantityChanged}</if>
|
<if test="quantityChanged != null "> and quantity_changed = #{quantityChanged}</if>
|
||||||
<if test="clientId != null "> and client_id = #{clientId}</if>
|
<if test="clientId != null "> and client_id = #{clientId}</if>
|
||||||
<if test="clientCode != null and clientCode != ''"> and client_code = #{clientCode}</if>
|
<if test="clientCode != null and clientCode != ''"> and client_code = #{clientCode}</if>
|
||||||
@ -112,6 +116,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="unitOfMeasure != null and unitOfMeasure != ''">unit_of_measure,</if>
|
<if test="unitOfMeasure != null and unitOfMeasure != ''">unit_of_measure,</if>
|
||||||
<if test="quantity != null">quantity,</if>
|
<if test="quantity != null">quantity,</if>
|
||||||
<if test="quantityProduced != null">quantity_produced,</if>
|
<if test="quantityProduced != null">quantity_produced,</if>
|
||||||
|
<if test="quantityQuanlify != null ">quantity_quanlify,</if>
|
||||||
|
<if test="quantityUnquanlify != null ">quantity_unquanlify,</if>
|
||||||
<if test="quantityChanged != null">quantity_changed,</if>
|
<if test="quantityChanged != null">quantity_changed,</if>
|
||||||
<if test="clientId != null">client_id,</if>
|
<if test="clientId != null">client_id,</if>
|
||||||
<if test="clientCode != null and clientCode != ''">client_code,</if>
|
<if test="clientCode != null and clientCode != ''">client_code,</if>
|
||||||
@ -152,6 +158,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="unitOfMeasure != null and unitOfMeasure != ''">#{unitOfMeasure},</if>
|
<if test="unitOfMeasure != null and unitOfMeasure != ''">#{unitOfMeasure},</if>
|
||||||
<if test="quantity != null">#{quantity},</if>
|
<if test="quantity != null">#{quantity},</if>
|
||||||
<if test="quantityProduced != null">#{quantityProduced},</if>
|
<if test="quantityProduced != null">#{quantityProduced},</if>
|
||||||
|
<if test="quantityQuanlify != null ">#{quantityQuanlify},</if>
|
||||||
|
<if test="quantityUnquanlify != null ">#{quantityUnquanlify},</if>
|
||||||
<if test="quantityChanged != null">#{quantityChanged},</if>
|
<if test="quantityChanged != null">#{quantityChanged},</if>
|
||||||
<if test="clientId != null">#{clientId},</if>
|
<if test="clientId != null">#{clientId},</if>
|
||||||
<if test="clientCode != null and clientCode != ''">#{clientCode},</if>
|
<if test="clientCode != null and clientCode != ''">#{clientCode},</if>
|
||||||
@ -196,6 +204,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="unitOfMeasure != null and unitOfMeasure != ''">unit_of_measure = #{unitOfMeasure},</if>
|
<if test="unitOfMeasure != null and unitOfMeasure != ''">unit_of_measure = #{unitOfMeasure},</if>
|
||||||
<if test="quantity != null">quantity = #{quantity},</if>
|
<if test="quantity != null">quantity = #{quantity},</if>
|
||||||
<if test="quantityProduced != null">quantity_produced = #{quantityProduced},</if>
|
<if test="quantityProduced != null">quantity_produced = #{quantityProduced},</if>
|
||||||
|
<if test="quantityQuanlify != null ">quantity_quanlify = #{quantityQuanlify},</if>
|
||||||
|
<if test="quantityUnquanlify != null ">quantity_unquanlify = #{quantityUnquanlify},</if>
|
||||||
<if test="quantityChanged != null">quantity_changed = #{quantityChanged},</if>
|
<if test="quantityChanged != null">quantity_changed = #{quantityChanged},</if>
|
||||||
<if test="clientId != null">client_id = #{clientId},</if>
|
<if test="clientId != null">client_id = #{clientId},</if>
|
||||||
<if test="clientCode != null and clientCode != ''">client_code = #{clientCode},</if>
|
<if test="clientCode != null and clientCode != ''">client_code = #{clientCode},</if>
|
||||||
|
Loading…
Reference in New Issue
Block a user