This commit is contained in:
parent
38c6886c25
commit
d29393b664
|
|
@ -72,7 +72,7 @@ public class MachineHistoryRecordBean {
|
|||
private String leaseMan;
|
||||
|
||||
@ApiModelProperty(value = "领用时间")
|
||||
@Excel(name = "领用时间")
|
||||
@Excel(name = "领用时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date leaseDate;
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ public class MachineHistoryRecordBean {
|
|||
private String backMan;
|
||||
|
||||
@ApiModelProperty(value = "退料时间")
|
||||
@Excel(name = "退料时间")
|
||||
@Excel(name = "退料时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date backDate;
|
||||
|
||||
|
|
|
|||
|
|
@ -168,41 +168,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="getMachineHistoryRecordList" resultType="com.bonus.material.basic.domain.MachineHistoryRecordBean">
|
||||
SELECT
|
||||
bai.agreement_id as agreementId,
|
||||
mt.type_id as typeId,
|
||||
bai.agreement_code AS agreementCode,
|
||||
bui.unit_name AS unitName,
|
||||
bpl.pro_name AS proName,
|
||||
bpl.contract_part as contractPart,
|
||||
sd.dept_name as impUnitName,
|
||||
mt2.type_name AS typeName,
|
||||
mt.type_name AS typeModelName,
|
||||
mt.unit_name AS unit,
|
||||
lai.lease_person AS leaseMan,
|
||||
lod.create_time AS leaseDate,
|
||||
mm.ma_code AS maCode,
|
||||
baif.back_person AS backMan,
|
||||
bcd.create_time AS backDate,
|
||||
CASE
|
||||
WHEN baif.back_person IS NULL THEN '在用'
|
||||
ELSE '已退'
|
||||
END AS statusName
|
||||
bai.agreement_id as agreementId,
|
||||
mt.type_id as typeId,
|
||||
bai.agreement_code AS agreementCode,
|
||||
bui.unit_name AS unitName,
|
||||
bpl.pro_name AS proName,
|
||||
bpl.contract_part as contractPart,
|
||||
sd.dept_name as impUnitName,
|
||||
mt2.type_name AS typeName,
|
||||
mt.type_name AS typeModelName,
|
||||
mt.unit_name AS unit,
|
||||
lai.lease_person AS leaseMan,
|
||||
lai.create_time AS leaseDate,
|
||||
mm.ma_code AS maCode,
|
||||
baif.back_person AS backMan,
|
||||
sai.end_time AS backDate,
|
||||
CASE
|
||||
WHEN baif.back_person IS NULL THEN '在用'
|
||||
ELSE '已退'
|
||||
END AS statusName
|
||||
FROM
|
||||
lease_out_details lod
|
||||
LEFT JOIN lease_apply_info lai ON lai.id = lod.parent_id
|
||||
LEFT JOIN tm_task_agreement tta ON tta.task_id = lai.task_id
|
||||
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
|
||||
LEFT JOIN bm_project bpl ON bpl.pro_id = bai.project_id
|
||||
LEFT JOIN sys_dept sd on sd.dept_id = bpl.imp_unit
|
||||
LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id
|
||||
LEFT JOIN ma_type mt ON mt.type_id = lod.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||
LEFT JOIN ma_machine mm ON mm.ma_id = lod.ma_id
|
||||
LEFT JOIN back_check_details bcd ON bcd.ma_id = lod.ma_id
|
||||
LEFT JOIN back_apply_info baif ON baif.id = bcd.parent_id
|
||||
slt_agreement_info sai
|
||||
LEFT JOIN lease_apply_info lai ON lai.id = sai.lease_id
|
||||
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = sai.agreement_id
|
||||
LEFT JOIN bm_project bpl ON bpl.pro_id = bai.project_id
|
||||
LEFT JOIN sys_dept sd on sd.dept_id = bpl.imp_unit
|
||||
LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id
|
||||
LEFT JOIN ma_type mt ON mt.type_id = sai.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||
LEFT JOIN ma_machine mm ON mm.ma_id = sai.ma_id
|
||||
LEFT JOIN back_apply_info baif ON baif.id = sai.back_id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND lod.ma_id IS NOT NULL
|
||||
AND sai.ma_id IS NOT NULL
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and (bai.agreement_code like concat('%',#{keyWord},'%') or
|
||||
bui.unit_name like concat('%',#{keyWord},'%') or
|
||||
|
|
@ -241,10 +239,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
END = #{statusName}
|
||||
)
|
||||
</if>
|
||||
GROUP BY
|
||||
mm.ma_code
|
||||
ORDER BY
|
||||
bcd.create_time
|
||||
sai.end_time
|
||||
</select>
|
||||
|
||||
<select id="getInputRecordList" resultType="com.bonus.material.basic.domain.InputRecordInfo">
|
||||
|
|
@ -569,7 +565,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt2.type_name AS typeName,
|
||||
mt2.type_id AS thirdTypeId,
|
||||
mt.type_name AS typeModelName,
|
||||
SUM(IF(sad.ledger_status = '0', IFNULL(sad.scrap_num, 0), 0)) AS pendingScrapNum,
|
||||
SUM(IF(sad.status IN ('0','1'), IFNULL(sad.scrap_num, 0), 0)) AS pendingScrapNum,
|
||||
SUM(IF(sad.ledger_status = '1', IFNULL(sad.scrap_num, 0), 0)) AS scrapNum
|
||||
FROM scrap_apply_details sad
|
||||
LEFT JOIN ma_type mt ON mt.type_id = sad.type_id
|
||||
|
|
@ -842,7 +838,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
LEFT JOIN ma_machine mm ON mm.ma_id = sad.ma_id
|
||||
LEFT JOIN sys_user su ON sad.audit_by = su.user_id
|
||||
WHERE sad.ledger_status = '0'
|
||||
WHERE sad.status IN ('0','1')
|
||||
<if test="typeId != null">
|
||||
AND sad.type_id = #{typeId}
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue