退料申请表数据问题修改
This commit is contained in:
parent
e24109076c
commit
c723a725b2
|
|
@ -116,7 +116,7 @@ public class WorkSiteDirectManageController extends BaseController {
|
|||
return AjaxResult.error("直转信息为空,未通过");
|
||||
}
|
||||
|
||||
TmTask task = directApplyInfoDetails.getTask();
|
||||
TmTask task = directApplyInfoDetails.getLeaseApplyInfo();
|
||||
if (task == null) {
|
||||
return AjaxResult.error("领料任务参数为空");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public class DirectPassApplyInfoDetails extends BaseEntity {
|
|||
|
||||
private String id;
|
||||
|
||||
private TmTask task;
|
||||
private TmTask leaseApplyInfo;
|
||||
|
||||
private BackApplyInfo backApplyInfo;
|
||||
|
||||
|
|
|
|||
|
|
@ -58,4 +58,6 @@ public interface WorkSiteDirectManageMapper {
|
|||
int insertBackApplyInfo(TmTask task);
|
||||
|
||||
DirectApplyInfo getInfoById(String id);
|
||||
|
||||
List<DirectApplyDetails> getDetailById(String id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -330,7 +330,10 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService {
|
|||
|
||||
@Override
|
||||
public DirectApplyInfo getInfoById(String id) {
|
||||
return workSiteDirectManageMapper.getInfoById(id);
|
||||
DirectApplyInfo directApplyInfo = workSiteDirectManageMapper.getInfoById(id);
|
||||
List<DirectApplyDetails> detailById = workSiteDirectManageMapper.getDetailById(id);
|
||||
directApplyInfo.setDirectApplyDetails(detailById);
|
||||
return directApplyInfo;
|
||||
}
|
||||
|
||||
public int insertBcd(BackApplyInfo backApplyInfo) {
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@
|
|||
LEFT JOIN ma_machine mm on sai.ma_id = mm.ma_id
|
||||
where sai.agreement_id = #{agreementId} and sai.status = '0'
|
||||
GROUP BY
|
||||
sai.type_id,sai.ma_id
|
||||
sai.ma_id,sai.type_id
|
||||
</select>
|
||||
<select id="getList" resultType="com.bonus.sgzb.base.api.domain.DirectApplyInfo">
|
||||
SELECT DISTINCT
|
||||
|
|
@ -412,13 +412,9 @@
|
|||
<select id="getInfoById" resultType="com.bonus.sgzb.base.api.domain.DirectApplyInfo">
|
||||
SELECT
|
||||
dai.*,
|
||||
dad.direct_num AS directNum,
|
||||
bai.agreement_code as backAgreementCode,
|
||||
bai1.agreement_code as leaseAgreementCode,
|
||||
bpl.lot_id AS backProId,
|
||||
mt3.type_name AS typeName,
|
||||
mt2.type_name AS kindName,
|
||||
mt.type_name AS modelName,
|
||||
mt.unit_name AS unitName,
|
||||
mm.ma_code AS maCode,
|
||||
bpl.lot_name AS backProName,
|
||||
bui.unit_id AS backUnitId,
|
||||
bui.unit_name AS backUnitName,
|
||||
|
|
@ -429,17 +425,38 @@
|
|||
FROM
|
||||
direct_apply_info dai
|
||||
LEFT JOIN direct_apply_details dad ON dai.id = dad.direct_id
|
||||
LEFT JOIN ma_type mt ON mt.type_id = dad.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id
|
||||
LEFT JOIN ma_machine mm ON dad.ma_id = mm.ma_id
|
||||
LEFT JOIN bm_agreement_info bai ON dai.back_agreement_id = bai.agreement_id
|
||||
LEFT JOIN bm_agreement_info bai1 ON dai.lease_agreement_id = bai1.agreement_id
|
||||
LEFT JOIN bm_project_lot bpl ON bpl.lot_id = bai.project_id
|
||||
LEFT JOIN bm_project_lot bpl1 ON bpl1.lot_id = bai1.project_id
|
||||
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
||||
LEFT JOIN bm_unit_info bui1 ON bui1.unit_id = bai1.unit_id
|
||||
WHERE
|
||||
dai.id = #{id} GROUP BY dai.id
|
||||
</select>
|
||||
<select id="getDetailById" resultType="com.bonus.sgzb.base.api.domain.DirectApplyDetails">
|
||||
SELECT
|
||||
dad.direct_num AS directNum,
|
||||
dad.type_id AS typeId,
|
||||
mt3.type_name AS typeName,
|
||||
mt2.type_name AS kindName,
|
||||
mt.type_name AS modelName,
|
||||
mt.unit_name AS unitName,
|
||||
sum( sai.num ) AS useNum,
|
||||
mm.ma_code AS maCode
|
||||
FROM
|
||||
direct_apply_info dai
|
||||
LEFT JOIN direct_apply_details dad ON dai.id = dad.direct_id
|
||||
LEFT JOIN slt_agreement_info sai ON dai.back_agreement_id = sai.agreement_id
|
||||
AND sai.type_id = dad.type_id
|
||||
LEFT JOIN ma_type mt ON mt.type_id = dad.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id
|
||||
LEFT JOIN ma_machine mm ON dad.ma_id = mm.ma_id
|
||||
WHERE
|
||||
dai.id = #{id}
|
||||
AND sai.STATUS = '0'
|
||||
GROUP BY
|
||||
dad.id,sai.ma_id,sai.type_id
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue