numlog
This commit is contained in:
parent
167dc7d5ae
commit
7f323f3e50
|
|
@ -122,6 +122,15 @@ public class BmNumLogs extends BaseEntity {
|
||||||
@Excel(name = "退库数量")
|
@Excel(name = "退库数量")
|
||||||
private String backNum;
|
private String backNum;
|
||||||
|
|
||||||
|
@Excel(name = "合格数量")
|
||||||
|
private String passNum;
|
||||||
|
|
||||||
|
@Excel(name = "维修数量")
|
||||||
|
private String maintenanceNum;
|
||||||
|
|
||||||
|
@Excel(name = "报废数量")
|
||||||
|
private String scrapNum;
|
||||||
|
|
||||||
@Excel(name = "出库类型 0编码出库 1数量出库 2成套出库")
|
@Excel(name = "出库类型 0编码出库 1数量出库 2成套出库")
|
||||||
private String manageType;
|
private String manageType;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -179,6 +179,9 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
record.setTypeId(s);
|
record.setTypeId(s);
|
||||||
int num = backReceiveMapper.getmaChineByCt(record);
|
int num = backReceiveMapper.getmaChineByCt(record);
|
||||||
record.setNum(String.valueOf(num));
|
record.setNum(String.valueOf(num));
|
||||||
|
int passNum = 0;
|
||||||
|
int maintenanceNum = 0;
|
||||||
|
int scrapNum = 0;
|
||||||
if (allZeros) {
|
if (allZeros) {
|
||||||
//修改back_apply_details为已退料(1)
|
//修改back_apply_details为已退料(1)
|
||||||
res = updateStatus(record);
|
res = updateStatus(record);
|
||||||
|
|
@ -207,6 +210,9 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
throw new RuntimeException("ma_machines");
|
throw new RuntimeException("ma_machines");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (BackApplyInfo bi : hgList) {
|
||||||
|
passNum += bi.getBackNum();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//维修的创建维修任务,插入任务协议表
|
//维修的创建维修任务,插入任务协议表
|
||||||
|
|
@ -218,6 +224,9 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
res = insertTta(newTaskId, wxList);
|
res = insertTta(newTaskId, wxList);
|
||||||
//插入维修记录表repair_apply_details
|
//插入维修记录表repair_apply_details
|
||||||
res = insertRad(newTaskId, wxList);
|
res = insertRad(newTaskId, wxList);
|
||||||
|
for (BackApplyInfo bi : wxList) {
|
||||||
|
maintenanceNum += bi.getBackNum();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//待报废的创建报废任务,插入任务协议表
|
//待报废的创建报废任务,插入任务协议表
|
||||||
|
|
@ -229,6 +238,9 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
res = insertTta(newTaskId, bfList);
|
res = insertTta(newTaskId, bfList);
|
||||||
//插入维修记录表scrap_apply_details
|
//插入维修记录表scrap_apply_details
|
||||||
res = insertSad(newTaskId, bfList);
|
res = insertSad(newTaskId, bfList);
|
||||||
|
for (BackApplyInfo bi : bfList) {
|
||||||
|
scrapNum += bi.getBackNum();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 结算功能
|
// 结算功能
|
||||||
List<BackApplyInfo> allList = backReceiveMapper.getAllList(record);
|
List<BackApplyInfo> allList = backReceiveMapper.getAllList(record);
|
||||||
|
|
@ -240,8 +252,13 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
}
|
}
|
||||||
|
|
||||||
//完成退料的部分,更新 back_check_details 为 is_finished=1,此部分不支持撤回
|
//完成退料的部分,更新 back_check_details 为 is_finished=1,此部分不支持撤回
|
||||||
int count = finishBackCheckDetails(record);
|
finishBackCheckDetails(record);
|
||||||
record.setBackNum(count);
|
|
||||||
|
//库存日志
|
||||||
|
record.setBackNum(passNum+maintenanceNum+scrapNum);
|
||||||
|
record.setPassNum(passNum);
|
||||||
|
record.setMaintenanceNum(maintenanceNum);
|
||||||
|
record.setScrapNum(scrapNum);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new RuntimeException("typeId为空");
|
throw new RuntimeException("typeId为空");
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,8 @@
|
||||||
type_id = #{typeId}
|
type_id = #{typeId}
|
||||||
AND
|
AND
|
||||||
ma_id IS NULL
|
ma_id IS NULL
|
||||||
|
AND
|
||||||
|
status = '0'
|
||||||
AND
|
AND
|
||||||
DATE(start_time) = CURDATE();
|
DATE(start_time) = CURDATE();
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,9 @@ public class BmNumLogsService{
|
||||||
record.setInNum(des.getInNum()); //入库数
|
record.setInNum(des.getInNum()); //入库数
|
||||||
record.setOutNum(des.getOutNum()); // 出库数
|
record.setOutNum(des.getOutNum()); // 出库数
|
||||||
record.setBackNum(des.getBackNum()); //退料数
|
record.setBackNum(des.getBackNum()); //退料数
|
||||||
|
record.setPassNum(des.getPassNum()); //退料合格数量
|
||||||
|
record.setMaintenanceNum(des.getMaintenanceNum()); //退料维修数量
|
||||||
|
record.setScrapNum(des.getScrapNum()); //退料报废数量
|
||||||
record.setManageType(des.getManageType());
|
record.setManageType(des.getManageType());
|
||||||
record.setTaskId(des.getTaskId());
|
record.setTaskId(des.getTaskId());
|
||||||
record.setTypeId(des.getTypeId());
|
record.setTypeId(des.getTypeId());
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,9 @@
|
||||||
<result column="in_num" jdbcType="VARCHAR" property="inNum" />
|
<result column="in_num" jdbcType="VARCHAR" property="inNum" />
|
||||||
<result column="out_num" jdbcType="VARCHAR" property="outNum" />
|
<result column="out_num" jdbcType="VARCHAR" property="outNum" />
|
||||||
<result column="back_num" jdbcType="VARCHAR" property="backNum" />
|
<result column="back_num" jdbcType="VARCHAR" property="backNum" />
|
||||||
|
<result column="pass_num" jdbcType="VARCHAR" property="passNum" />
|
||||||
|
<result column="maintenance_num" jdbcType="VARCHAR" property="maintenanceNum" />
|
||||||
|
<result column="scrap_num" jdbcType="VARCHAR" property="scrapNum" />
|
||||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||||
<result column="json_result" jdbcType="VARCHAR" property="jsonResult" />
|
<result column="json_result" jdbcType="VARCHAR" property="jsonResult" />
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
|
@ -35,7 +38,7 @@
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
bnl.id, bnl.model_title, bnl.`method`, bnl.task_id, bnl.type_id, bnl.pre_num, bnl.audit_num, bnl.pre_store_num, bnl.in_num, bnl.out_num,
|
bnl.id, bnl.model_title, bnl.`method`, bnl.task_id, bnl.type_id, bnl.pre_num, bnl.audit_num, bnl.pre_store_num, bnl.in_num, bnl.out_num,
|
||||||
bnl.`description`, bnl.json_result, bnl.create_time, bnl.creator, bnl.manage_type,
|
bnl.back_num, bnl.pass_num, bnl.maintenance_num, bnl.scrap_num, bnl.`description`, bnl.json_result, bnl.create_time, bnl.creator, bnl.manage_type,
|
||||||
bnl.remark, bnl.`status`, mt.type_name, mt1.type_name as type_parent_name, tt.code as task_name
|
bnl.remark, bnl.`status`, mt.type_name, mt1.type_name as type_parent_name, tt.code as task_name
|
||||||
from bm_num_logs bnl
|
from bm_num_logs bnl
|
||||||
left join ma_type mt on bnl.type_id = mt.type_id
|
left join ma_type mt on bnl.type_id = mt.type_id
|
||||||
|
|
@ -47,7 +50,7 @@
|
||||||
<select id="selectAll" resultMap="BaseResultMap">
|
<select id="selectAll" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
bnl.id, bnl.model_title, bnl.`method`, bnl.task_id, bnl.type_id, bnl.pre_num, bnl.audit_num, bnl.pre_store_num, bnl.in_num, bnl.out_num,
|
bnl.id, bnl.model_title, bnl.`method`, bnl.task_id, bnl.type_id, bnl.pre_num, bnl.audit_num, bnl.pre_store_num, bnl.in_num, bnl.out_num,
|
||||||
bnl.back_num, bnl.`description`, bnl.json_result, bnl.create_time, bnl.creator, bnl.manage_type,
|
bnl.back_num, bnl.pass_num, bnl.maintenance_num, bnl.scrap_num, bnl.`description`, bnl.json_result, bnl.create_time, bnl.creator, bnl.manage_type,
|
||||||
bnl.remark, bnl.`status`, mt.type_name, mt1.type_name as type_parent_name, tt.code as task_name
|
bnl.remark, bnl.`status`, mt.type_name, mt1.type_name as type_parent_name, tt.code as task_name
|
||||||
from bm_num_logs bnl
|
from bm_num_logs bnl
|
||||||
left join ma_type mt on bnl.type_id = mt.type_id
|
left join ma_type mt on bnl.type_id = mt.type_id
|
||||||
|
|
@ -75,13 +78,13 @@
|
||||||
description, json_result, create_time, creator, remark,
|
description, json_result, create_time, creator, remark,
|
||||||
pre_num, input_num, out_num, audit_num, manage_type,
|
pre_num, input_num, out_num, audit_num, manage_type,
|
||||||
type_name, type_model_name, pre_store_num, in_num,
|
type_name, type_model_name, pre_store_num, in_num,
|
||||||
back_num, `status`
|
back_num, pass_num, maintenance_num, scrap_num, `status`
|
||||||
)
|
)
|
||||||
values (#{modelTitle,jdbcType=VARCHAR}, #{method,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR}, #{typeId,jdbcType=INTEGER},
|
values (#{modelTitle,jdbcType=VARCHAR}, #{method,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR}, #{typeId,jdbcType=INTEGER},
|
||||||
#{description,jdbcType=VARCHAR}, #{jsonResult,jdbcType=VARCHAR}, now(), #{creator,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
|
#{description,jdbcType=VARCHAR}, #{jsonResult,jdbcType=VARCHAR}, now(), #{creator,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
|
||||||
#{preNum,jdbcType=VARCHAR}, #{inputNum,jdbcType=VARCHAR}, #{outNum,jdbcType=VARCHAR}, #{auditNum,jdbcType=VARCHAR}, #{manageType,jdbcType=VARCHAR},
|
#{preNum,jdbcType=VARCHAR}, #{inputNum,jdbcType=VARCHAR}, #{outNum,jdbcType=VARCHAR}, #{auditNum,jdbcType=VARCHAR}, #{manageType,jdbcType=VARCHAR},
|
||||||
#{typeName,jdbcType=VARCHAR}, #{typeModelName,jdbcType=VARCHAR}, #{preStoreNum,jdbcType=VARCHAR}, #{inNum,jdbcType=VARCHAR},
|
#{typeName,jdbcType=VARCHAR}, #{typeModelName,jdbcType=VARCHAR}, #{preStoreNum,jdbcType=VARCHAR}, #{inNum,jdbcType=VARCHAR},
|
||||||
#{backNum,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}
|
#{backNum,jdbcType=VARCHAR}, #{passNum,jdbcType=VARCHAR}, #{maintenanceNum,jdbcType=VARCHAR}, #{scrapNum,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,9 @@ export default {
|
||||||
{ label: '机具规格', content: 'typeName' },
|
{ label: '机具规格', content: 'typeName' },
|
||||||
{ label: '申请数量', content: 'preNum' },
|
{ label: '申请数量', content: 'preNum' },
|
||||||
{ label: '审核数量', content: 'auditNum' },
|
{ label: '审核数量', content: 'auditNum' },
|
||||||
|
{ label: '合格数量', content: 'passNum' },
|
||||||
|
{ label: '维修数量', content: 'maintenanceNum' },
|
||||||
|
{ label: '报废数量', content: 'scrapNum' },
|
||||||
{ label: '日期', content: 'createTime' },
|
{ label: '日期', content: 'createTime' },
|
||||||
],
|
],
|
||||||
logsDetailsInfo: {},
|
logsDetailsInfo: {},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue