This commit is contained in:
sxu 2024-08-02 16:47:09 +08:00
parent 66f76ac918
commit 167dc7d5ae
4 changed files with 14 additions and 3 deletions

View File

@ -78,6 +78,8 @@ public interface BackReceiveMapper {
*/
int updateMaStatus(@Param("maId") int maId,@Param("maStatus") String maStatus);
int getmaChineByCt(BackApplyInfo record);
/**
* getHgList
* @param record

View File

@ -177,6 +177,8 @@ public class BackReceiveServiceImpl implements BackReceiveService {
if (StringUtils.isNotBlank(record.getTypeId())) {
for (String s : record.getTypeId().split(",")) {
record.setTypeId(s);
int num = backReceiveMapper.getmaChineByCt(record);
record.setNum(String.valueOf(num));
if (allZeros) {
//修改back_apply_details为已退料1
res = updateStatus(record);
@ -238,7 +240,8 @@ public class BackReceiveServiceImpl implements BackReceiveService {
}
//完成退料的部分更新 back_check_details is_finished=1此部分不支持撤回
finishBackCheckDetails(record);
int count = finishBackCheckDetails(record);
record.setBackNum(count);
}
} else {
throw new RuntimeException("typeId为空");

View File

@ -618,7 +618,7 @@
update back_apply_details set back_status = 1 where parent_id = #{parentId} and type_id = #{typeId}
</update>
<update id="finishBackCheckDetails">
update back_check_details set is_finished = 1 where parent_id = #{parentId} and type_id = #{typeId}
update back_check_details set is_finished = 1 where parent_id = #{parentId} and type_id = #{typeId} and (is_finished is null or is_finished != 1)
</update>
<delete id="deleteCheckDetails">
delete from back_check_details where parent_id = #{parentId} and type_id = #{typeId} and (is_finished is null or is_finished != 1)
@ -759,6 +759,11 @@
<select id="selectTaskNumByMonthWx" resultType="java.lang.Integer">
select count(*) from tm_task where DATE_FORMAT(create_time,'%y%m') = DATE_FORMAT(#{date},'%y%m') and task_type = #{taskType}
</select>
<select id="getmaChineByCt" resultType="java.lang.Integer">
select num from ma_type WHERE type_id = #{typeId}
</select>
<select id="getHgList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
SELECT
tta.agreement_id as agreementId,

View File

@ -17,6 +17,7 @@
<result column="pre_store_num" jdbcType="VARCHAR" property="preStoreNum" />
<result column="in_num" jdbcType="VARCHAR" property="inNum" />
<result column="out_num" jdbcType="VARCHAR" property="outNum" />
<result column="back_num" jdbcType="VARCHAR" property="backNum" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="json_result" jdbcType="VARCHAR" property="jsonResult" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
@ -46,7 +47,7 @@
<select id="selectAll" resultMap="BaseResultMap">
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.`description`, bnl.json_result, bnl.create_time, bnl.creator, bnl.manage_type,
bnl.back_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
from bm_num_logs bnl
left join ma_type mt on bnl.type_id = mt.type_id