库存日志

This commit is contained in:
sxu 2024-08-06 13:10:26 +08:00
parent 9b06f3178f
commit 892399bbce
5 changed files with 32 additions and 25 deletions

View File

@ -42,6 +42,9 @@ public class BmStorageLog extends BaseEntity {
@Excel(name = "实例/任务") @Excel(name = "实例/任务")
private String taskId; private String taskId;
@Excel(name = "协议id")
private int agreementId;
/** /**
* 任务名称 * 任务名称
*/ */

View File

@ -330,6 +330,9 @@ public class LogAspect
bmStorageLogList.add(bmStorageLog); bmStorageLogList.add(bmStorageLog);
} }
// 二级库出入库 // 二级库出入库
// if (joinPoint.getArgs()[0] instanceof TeamLeaseInfo) {
//
// }
} }
} }

View File

@ -8,7 +8,7 @@ import java.util.List;
public interface BmStorageLogMapper { public interface BmStorageLogMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
int insert(BmStorageLog record); // int insert(BmStorageLog record);
int batchInsert(List<BmStorageLog> records); int batchInsert(List<BmStorageLog> records);

View File

@ -23,9 +23,9 @@ public class BmStorageLogService {
return bmStorageLogMapper.deleteByPrimaryKey(id); return bmStorageLogMapper.deleteByPrimaryKey(id);
} }
public int insert(BmStorageLog record) { // public int insert(BmStorageLog record) {
return bmStorageLogMapper.insert(record); // return bmStorageLogMapper.insert(record);
} // }
public int batchInsert(List<BmStorageLog> records) { public int batchInsert(List<BmStorageLog> records) {
log.info("batch insert log {}", records); log.info("batch insert log {}", records);

View File

@ -8,6 +8,7 @@
<result column="model_title" jdbcType="VARCHAR" property="modelTitle" /> <result column="model_title" jdbcType="VARCHAR" property="modelTitle" />
<result column="method" jdbcType="VARCHAR" property="method" /> <result column="method" jdbcType="VARCHAR" property="method" />
<result column="task_id" jdbcType="VARCHAR" property="taskId" /> <result column="task_id" jdbcType="VARCHAR" property="taskId" />
<result column="agreement_id" jdbcType="INTEGER" property="agreementId" />
<result column="task_name" jdbcType="VARCHAR" property="taskName" /> <result column="task_name" jdbcType="VARCHAR" property="taskName" />
<result column="type_id" jdbcType="INTEGER" property="typeId" /> <result column="type_id" jdbcType="INTEGER" property="typeId" />
<result column="type_name" jdbcType="VARCHAR" property="typeName" /> <result column="type_name" jdbcType="VARCHAR" property="typeName" />
@ -38,7 +39,7 @@
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
bsl.id, bsl.model_title, bsl.`method`, bsl.task_id, bsl.type_id, bsl.pre_store_num, bsl.in_num, bsl.out_num,bsl.post_store_num,bsl.result_code,bsl.result_msg, bsl.id, bsl.model_title, bsl.`method`, bsl.task_id, bsl.type_id, bsl.pre_store_num, bsl.in_num, bsl.out_num,bsl.post_store_num,bsl.result_code,bsl.result_msg,
bsl.back_num, bsl.pass_num, bsl.maintenance_num, bsl.scrap_num, bsl.json_result, bsl.create_time, bsl.creator, bsl.manage_type, bsl.back_num, bsl.pass_num, bsl.maintenance_num, bsl.scrap_num, bsl.json_result, bsl.create_time, bsl.creator, bsl.manage_type, bsl.agreement_id,
bsl.remark, bsl.`status`, mt.type_name, mt1.type_name as type_parent_name, tt.code as task_name bsl.remark, bsl.`status`, mt.type_name, mt1.type_name as type_parent_name, tt.code as task_name
from bm_storage_log bsl from bm_storage_log bsl
left join ma_type mt on bsl.type_id = mt.type_id left join ma_type mt on bsl.type_id = mt.type_id
@ -50,7 +51,7 @@
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select select
bsl.id, bsl.model_title, bsl.`method`, bsl.task_id, bsl.type_id, bsl.pre_store_num, bsl.in_num, bsl.out_num,bsl.post_store_num,bsl.result_code,bsl.result_msg, bsl.id, bsl.model_title, bsl.`method`, bsl.task_id, bsl.type_id, bsl.pre_store_num, bsl.in_num, bsl.out_num,bsl.post_store_num,bsl.result_code,bsl.result_msg,
bsl.back_num, bsl.pass_num, bsl.maintenance_num, bsl.scrap_num, bsl.json_result, bsl.create_time, bsl.creator, bsl.manage_type, bsl.back_num, bsl.pass_num, bsl.maintenance_num, bsl.scrap_num, bsl.json_result, bsl.create_time, bsl.creator, bsl.manage_type, bsl.agreement_id,
bsl.remark, bsl.`status`, mt.type_name, mt1.type_name as type_parent_name, tt.code as task_name bsl.remark, bsl.`status`, mt.type_name, mt1.type_name as type_parent_name, tt.code as task_name
from bm_storage_log bsl from bm_storage_log bsl
left join ma_type mt on bsl.type_id = mt.type_id left join ma_type mt on bsl.type_id = mt.type_id
@ -72,28 +73,28 @@
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</delete> </delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.system.api.domain.BmStorageLog" useGeneratedKeys="true"> <!-- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.system.api.domain.BmStorageLog" useGeneratedKeys="true">-->
<!--@mbg.generated--> <!-- &lt;!&ndash;@mbg.generated&ndash;&gt;-->
insert into bm_storage_log (model_title, `method`, task_id, type_id, <!-- insert into bm_storage_log (model_title, `method`, task_id, type_id,-->
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, pass_num, maintenance_num, scrap_num, `status`, post_store_num <!-- back_num, pass_num, maintenance_num, scrap_num, `status`, post_store_num-->
) <!-- )-->
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}, #{passNum,jdbcType=VARCHAR}, #{maintenanceNum,jdbcType=VARCHAR}, #{scrapNum,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, <!-- #{backNum,jdbcType=VARCHAR}, #{passNum,jdbcType=VARCHAR}, #{maintenanceNum,jdbcType=VARCHAR}, #{scrapNum,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},-->
#{postStoreNum,jdbcType=VARCHAR} <!-- #{postStoreNum,jdbcType=VARCHAR}-->
) <!-- )-->
</insert> <!-- </insert>-->
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.system.api.domain.BmStorageLog" useGeneratedKeys="true"> <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.system.api.domain.BmStorageLog" useGeneratedKeys="true">
insert into bm_storage_log (model_title, `method`, task_id, type_id, insert into bm_storage_log (model_title, `method`, task_id, type_id,
create_time, creator, remark, out_num, manage_type, create_time, creator, remark, out_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, pass_num, maintenance_num, back_num, pass_num, maintenance_num, agreement_id,
scrap_num, `status`, post_store_num, result_code, result_msg, json_result scrap_num, `status`, post_store_num, result_code, result_msg, json_result
) values ) values
<foreach item="item" index="index" collection="list" separator=","> <foreach item="item" index="index" collection="list" separator=",">
@ -101,8 +102,8 @@
#{item.modelTitle,jdbcType=VARCHAR}, #{item.method,jdbcType=VARCHAR}, #{item.taskId,jdbcType=VARCHAR}, #{item.typeId,jdbcType=INTEGER}, #{item.modelTitle,jdbcType=VARCHAR}, #{item.method,jdbcType=VARCHAR}, #{item.taskId,jdbcType=VARCHAR}, #{item.typeId,jdbcType=INTEGER},
now(), #{item.creator,jdbcType=VARCHAR}, #{item.remark,jdbcType=VARCHAR}, #{item.outNum,jdbcType=INTEGER}, #{item.manageType,jdbcType=VARCHAR}, now(), #{item.creator,jdbcType=VARCHAR}, #{item.remark,jdbcType=VARCHAR}, #{item.outNum,jdbcType=INTEGER}, #{item.manageType,jdbcType=VARCHAR},
#{item.typeName,jdbcType=VARCHAR}, #{item.typeModelName,jdbcType=VARCHAR}, #{item.preStoreNum,jdbcType=INTEGER}, #{item.inNum,jdbcType=INTEGER}, #{item.typeName,jdbcType=VARCHAR}, #{item.typeModelName,jdbcType=VARCHAR}, #{item.preStoreNum,jdbcType=INTEGER}, #{item.inNum,jdbcType=INTEGER},
#{item.backNum,jdbcType=INTEGER}, #{item.passNum,jdbcType=INTEGER}, #{item.maintenanceNum,jdbcType=INTEGER}, #{item.backNum,jdbcType=INTEGER}, #{item.passNum,jdbcType=INTEGER}, #{item.maintenanceNum,jdbcType=INTEGER}, #{item.agreementId,jdbcType=INTEGER},
#{item.scrapNum,jdbcType=INTEGER}, #{item.status,jdbcType=VARCHAR}, #{item.postStoreNum,jdbcType=INTEGER}, #{item.scrapNum,jdbcType=INTEGER}, #{item.status,jdbcType=VARCHAR}, #{item.postStoreNum,jdbcType=INTEGER},
#{item.resultCode,jdbcType=INTEGER}, #{item.resultMsg,jdbcType=VARCHAR}, #{item.jsonResult,jdbcType=VARCHAR} #{item.resultCode,jdbcType=INTEGER}, #{item.resultMsg,jdbcType=VARCHAR}, #{item.jsonResult,jdbcType=VARCHAR}
) )
</foreach> </foreach>