移动-退料审核修改

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() { private String purchaseCodeRule() {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
Date nowDate = DateUtils.getNowDate(); Date nowDate = DateUtils.getNowDate();
String format = dateFormat.format(nowDate); String format = dateFormat.format(nowDate);
int taskNum = tmTaskService.selectTaskNumByMonth(nowDate,36) + 1; int taskNum = tmTaskService.selectTaskNumByMonth(nowDate,36) + 1;
@ -279,9 +279,9 @@ public class BackApplyController extends BaseController {
@ApiOperation("退料审核列表-审核") @ApiOperation("退料审核列表-审核")
@Log(title = "退料审核列表-审核", businessType = BusinessType.UPDATE) @Log(title = "退料审核列表-审核", businessType = BusinessType.UPDATE)
@PostMapping("/audit") @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); 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); 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 @Override
public int audit(String id) { public int audit(BackApplyInfo record) {
return backApplyMapper.audit(id); return backApplyMapper.audit(record);
} }
} }

View File

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