退料接收时,检查结算表拿到待退料数量,防止多退
This commit is contained in:
parent
6ded192657
commit
29523f27fd
|
|
@ -30,9 +30,9 @@ public interface BackReceiveMapper {
|
||||||
* @param record 查询条件
|
* @param record 查询条件
|
||||||
* @return List<BackApplyInfo>
|
* @return List<BackApplyInfo>
|
||||||
*/
|
*/
|
||||||
List<BackApplyInfo> receiveView(BackApplyInfo record);
|
List<BackApplyInfo> receiveView4FrontEnd(BackApplyInfo record);
|
||||||
|
|
||||||
List<BackApplyInfo> receiveView2(BackApplyInfo record);
|
List<BackApplyInfo> receiveView4Backend(BackApplyInfo record);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加接收数据back_check_details
|
* 添加接收数据back_check_details
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BackApplyInfo> receiveView(BackApplyInfo record) {
|
public List<BackApplyInfo> receiveView(BackApplyInfo record) {
|
||||||
List<BackApplyInfo> backApplyInfoList = backReceiveMapper.receiveView(record);
|
List<BackApplyInfo> backApplyInfoList = backReceiveMapper.receiveView4FrontEnd(record);
|
||||||
int count1 = 0;
|
int count1 = 0;
|
||||||
int count2 = 0;
|
int count2 = 0;
|
||||||
for (BackApplyInfo backApplyInfo : backApplyInfoList) {
|
for (BackApplyInfo backApplyInfo : backApplyInfoList) {
|
||||||
|
|
@ -169,7 +169,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
throw new RuntimeException("该退料单已完成退料");
|
throw new RuntimeException("该退料单已完成退料");
|
||||||
}
|
}
|
||||||
//修改任务状态
|
//修改任务状态
|
||||||
List<BackApplyInfo> list = backReceiveMapper.receiveView2(record);
|
List<BackApplyInfo> list = backReceiveMapper.receiveView4Backend(record);
|
||||||
if (!CollectionUtils.isEmpty(list)) {
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
for (BackApplyInfo backApplyInfo : list) {
|
for (BackApplyInfo backApplyInfo : list) {
|
||||||
maxBackNum += (int) backApplyInfo.getMaxBackNum();
|
maxBackNum += (int) backApplyInfo.getMaxBackNum();
|
||||||
|
|
|
||||||
|
|
@ -659,7 +659,7 @@
|
||||||
bai.create_time DESC
|
bai.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="receiveView" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
<select id="receiveView4FrontEnd" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||||
SELECT
|
SELECT
|
||||||
bai.id,
|
bai.id,
|
||||||
bai.task_id as taskId,
|
bai.task_id as taskId,
|
||||||
|
|
@ -672,7 +672,7 @@
|
||||||
bad.pre_num as preNum,
|
bad.pre_num as preNum,
|
||||||
bad.audit_num as auditNum,
|
bad.audit_num as auditNum,
|
||||||
bad.status as status,
|
bad.status as status,
|
||||||
IFNULL(sai.num, 0)-IFNULL(aa.back_num,0) as max_back_num,
|
CASE WHEN (IFNULL(sai.num, 0)-IFNULL(aa.back_num,0)) < 0 THEN 0 ELSE (IFNULL(sai.num, 0)-IFNULL(aa.back_num,0)) END as max_back_num,
|
||||||
IFNULL(aa.back_num,0) as in_completed_back_num,
|
IFNULL(aa.back_num,0) as in_completed_back_num,
|
||||||
IFNULL(bb.finished_back_num, 0) as finished_back_num,
|
IFNULL(bb.finished_back_num, 0) as finished_back_num,
|
||||||
mt.manage_type as manageType,
|
mt.manage_type as manageType,
|
||||||
|
|
@ -717,7 +717,7 @@
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="receiveView2" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
<select id="receiveView4Backend" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||||
SELECT
|
SELECT
|
||||||
bai.id,
|
bai.id,
|
||||||
bai.task_id as taskId,
|
bai.task_id as taskId,
|
||||||
|
|
@ -730,7 +730,7 @@
|
||||||
bad.pre_num as preNum,
|
bad.pre_num as preNum,
|
||||||
bad.audit_num as auditNum,
|
bad.audit_num as auditNum,
|
||||||
bad.status as status,
|
bad.status as status,
|
||||||
IFNULL(sai.num, 0)-IFNULL(aa.back_num,0) as max_back_num,
|
IFNULL(sai.num, 0) as max_back_num,
|
||||||
IFNULL(aa.back_num,0) as in_completed_back_num,
|
IFNULL(aa.back_num,0) as in_completed_back_num,
|
||||||
IFNULL(bb.finished_back_num, 0) as finished_back_num,
|
IFNULL(bb.finished_back_num, 0) as finished_back_num,
|
||||||
mt.manage_type as manageType,
|
mt.manage_type as manageType,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue