移动-退料审核修改

This commit is contained in:
bns_han 2023-12-21 10:39:12 +08:00
parent ad8385a9a7
commit aa8d460a0a
5 changed files with 52 additions and 62 deletions

View File

@ -241,7 +241,7 @@ public class BackApplyController extends BaseController {
// 退料编号生成规则
private String purchaseCodeRule() {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
Date nowDate = DateUtils.getNowDate();
String format = dateFormat.format(nowDate);
int taskNum = tmTaskService.selectTaskNumByMonth(nowDate,36) + 1;
@ -279,9 +279,9 @@ public class BackApplyController extends BaseController {
@ApiOperation("退料审核列表-审核")
@Log(title = "退料审核列表-审核", businessType = BusinessType.UPDATE)
@PostMapping("/audit")
public AjaxResult audit(String id)
public AjaxResult audit(@RequestBody BackApplyInfo record)
{
return toAjax(backApplyService.audit(id));
return toAjax(backApplyService.audit(record));
}
}

View File

@ -41,5 +41,5 @@ public interface BackApplyMapper {
List<BackApplyInfo> examineView(BackApplyInfo record);
int audit(String id);
int audit(BackApplyInfo record);
}

View File

@ -44,5 +44,5 @@ public interface BackApplyService {
List<BackApplyInfo> examineView(BackApplyInfo record);
int audit(String id);
int audit(BackApplyInfo record);
}

View File

@ -82,8 +82,8 @@ public class BackApplyServiceImpl implements BackApplyService {
}
@Override
public int audit(String id) {
return backApplyMapper.audit(id);
public int audit(BackApplyInfo record) {
return backApplyMapper.audit(record);
}
}

View File

@ -336,23 +336,19 @@
</select>
<select id="materialList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
SELECT
subquery1.type_id as typeId,
SELECT subquery1.type_id as typeId,
subquery1.typeName typeCode,
subquery1.typeNames as typeName,
subquery1.out_num - COALESCE(subquery2.pre_num, 0) AS num,
subquery1.out_num - COALESCE(subquery2.audit_num, 0) AS num,
subquery1.ma_code as maCode
FROM
(
FROM (
-- 第一个查询作为子查询
SELECT
mt.type_id,
SELECT mt.type_id,
mt.type_name as typeName,
CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeNames,
lod.out_num,
mm.ma_code
FROM
tm_task_agreement tta
FROM tm_task_agreement tta
LEFT JOIN lease_apply_info lai on lai.task_id = tta.task_id
LEFT JOIN lease_out_details lod on lod.parent_id = lai.id
LEFT JOIN ma_type mt on mt.type_id = lod.type_id
@ -362,21 +358,17 @@
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
LEFT JOIN ma_machine mm on mm.ma_id = lod.ma_id
WHERE
tta.agreement_id=#{agreementId}
WHERE tta.agreement_id = '11'
and tt.task_type = '29'
and tt.task_status='35'
) AS subquery1
LEFT JOIN
(
-- 第二个查询作为子查询
SELECT
mt.type_id,
SELECT mt.type_id,
mt.type_name,
CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeNames,
bad.pre_num
FROM
tm_task tt
bad.audit_num
FROM tm_task tt
LEFT JOIN tm_task_agreement tta on tta.task_id = tt.task_id
LEFT JOIN back_apply_info bai on bai.task_id = tta.task_id
LEFT JOIN back_apply_details bad on bad.parent_id = bai.id
@ -385,10 +377,8 @@
LEFT JOIN ma_type mt2 ON mt2.type_id = mt1.parent_id
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
WHERE
tta.agreement_id=#{agreementId}
WHERE tta.agreement_id = '11'
and tt.task_type = '36'
and tt.task_status='40'
) AS subquery2
ON subquery1.type_id = subquery2.type_id
</select>