移动-退料审核修改
This commit is contained in:
parent
ad8385a9a7
commit
aa8d460a0a
|
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -336,61 +336,51 @@
|
||||||
</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.audit_num, 0) AS num,
|
||||||
subquery1.out_num - COALESCE(subquery2.pre_num, 0) AS num,
|
subquery1.ma_code as maCode
|
||||||
subquery1.ma_code as maCode
|
FROM (
|
||||||
FROM
|
-- 第一个查询作为子查询
|
||||||
(
|
SELECT mt.type_id,
|
||||||
-- 第一个查询作为子查询
|
mt.type_name as typeName,
|
||||||
SELECT
|
CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeNames,
|
||||||
mt.type_id,
|
lod.out_num,
|
||||||
mt.type_name as typeName,
|
mm.ma_code
|
||||||
CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeNames,
|
FROM tm_task_agreement tta
|
||||||
lod.out_num,
|
LEFT JOIN lease_apply_info lai on lai.task_id = tta.task_id
|
||||||
mm.ma_code
|
LEFT JOIN lease_out_details lod on lod.parent_id = lai.id
|
||||||
FROM
|
LEFT JOIN ma_type mt on mt.type_id = lod.type_id
|
||||||
tm_task_agreement tta
|
LEFT JOIN tm_task tt on tt.task_id = tta.task_id
|
||||||
LEFT JOIN lease_apply_info lai on lai.task_id=tta.task_id
|
LEFT JOIN ma_type mt1 ON mt1.type_id = lod.type_id
|
||||||
LEFT JOIN lease_out_details lod on lod.parent_id=lai.id
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt1.parent_id
|
||||||
LEFT JOIN ma_type mt on mt.type_id=lod.type_id
|
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
||||||
LEFT JOIN tm_task tt on tt.task_id=tta.task_id
|
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
||||||
LEFT JOIN ma_type mt1 ON mt1.type_id=lod.type_id
|
LEFT JOIN ma_machine mm on mm.ma_id = lod.ma_id
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id=mt1.parent_id
|
WHERE tta.agreement_id = '11'
|
||||||
LEFT JOIN ma_type mt3 ON mt3.type_id=mt2.parent_id
|
and tt.task_type = '29'
|
||||||
LEFT JOIN ma_type mt4 ON mt4.type_id=mt3.parent_id
|
) AS subquery1
|
||||||
LEFT JOIN ma_machine mm on mm.ma_id=lod.ma_id
|
LEFT JOIN
|
||||||
WHERE
|
(
|
||||||
tta.agreement_id=#{agreementId}
|
-- 第二个查询作为子查询
|
||||||
and tt.task_type='29'
|
SELECT mt.type_id,
|
||||||
and tt.task_status='35'
|
mt.type_name,
|
||||||
) AS subquery1
|
CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeNames,
|
||||||
LEFT JOIN
|
bad.audit_num
|
||||||
(
|
FROM tm_task tt
|
||||||
-- 第二个查询作为子查询
|
LEFT JOIN tm_task_agreement tta on tta.task_id = tt.task_id
|
||||||
SELECT
|
LEFT JOIN back_apply_info bai on bai.task_id = tta.task_id
|
||||||
mt.type_id,
|
LEFT JOIN back_apply_details bad on bad.parent_id = bai.id
|
||||||
mt.type_name,
|
LEFT JOIN ma_type mt on mt.type_id = bad.type_id
|
||||||
CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeNames,
|
LEFT JOIN ma_type mt1 ON mt1.type_id = bad.type_id
|
||||||
bad.pre_num
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt1.parent_id
|
||||||
FROM
|
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
||||||
tm_task tt
|
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
||||||
LEFT JOIN tm_task_agreement tta on tta.task_id=tt.task_id
|
WHERE tta.agreement_id = '11'
|
||||||
LEFT JOIN back_apply_info bai on bai.task_id=tta.task_id
|
and tt.task_type = '36'
|
||||||
LEFT JOIN back_apply_details bad on bad.parent_id=bai.id
|
) AS subquery2
|
||||||
LEFT JOIN ma_type mt on mt.type_id=bad.type_id
|
ON subquery1.type_id = subquery2.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 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}
|
|
||||||
and tt.task_type='36'
|
|
||||||
and tt.task_status='40'
|
|
||||||
) AS subquery2
|
|
||||||
ON subquery1.type_id = subquery2.type_id
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="view" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
<select id="view" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue