Browse Source

bug修改

master
wenkuan.shi 2 years ago
parent
commit
45dff79d7b
  1. 2
      src/main/java/com/spring/modules/material/data/FindByNum.java
  2. 2
      src/main/java/com/spring/modules/material/data/FindByTrans.java
  3. 58
      src/main/resources/mapper/material/SeekByTransMapper.xml

2
src/main/java/com/spring/modules/material/data/FindByNum.java

@ -39,5 +39,7 @@ public class FindByNum extends QueryPage {
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date expiredDate;
//卷数量
private int num;
}

2
src/main/java/com/spring/modules/material/data/FindByTrans.java

@ -66,5 +66,7 @@ public class FindByTrans extends QueryPage {
private String transType;
//TransDetail
private Double itemNo;
//卷数量
private int num;
}

58
src/main/resources/mapper/material/SeekByTransMapper.xml

@ -20,24 +20,29 @@
a.userName,
a.transType,
d.part_desc,
c.itemNo
c.itemNo,
(SELECT COUNT(*)
FROM TransDetailsub
WHERE transNo = a.transNo AND itemNo = c.itemNo) AS num
FROM
TransHeader AS a
LEFT JOIN TransDetail AS c ON a.Site = c.Site
AND a.TransNo = c.TransNo
LEFT JOIN part AS d ON d.part_no = c.partNo
<if test = "list.partNo != null and list.partNo != ''">
AND c.partNo = #{list.partNo}
</if>
<if test = "list.locationID != null and list.locationID != ''">
AND c.locationID = #{list.locationID}
</if>
<if test = "list.partDesc != null and list.partDesc != ''">
AND d.part_desc = #{list.partDesc}
</if>
<if test = "list.transType != null and list.transType != ''">
AND a.transType = #{list.transType}
</if>
<where>
<if test = "list.partNo != null and list.partNo != ''">
AND c.partNo = #{list.partNo}
</if>
<if test = "list.locationID != null and list.locationID != ''">
AND c.locationID = #{list.locationID}
</if>
<if test = "list.partDesc != null and list.partDesc != ''">
AND d.part_desc = #{list.partDesc}
</if>
<if test = "list.transType != null and list.transType != ''">
AND a.transType = #{list.transType}
</if>
</where>
</select>
<select id="fingByRollNo" resultType="com.spring.modules.material.entity.TransDetailsub">
@ -64,23 +69,28 @@
a.transNo,
d.part_desc,
c.itemNo,
c.expiredDate
c.expiredDate,
(SELECT COUNT(*)
FROM TransDetailsub
WHERE transNo = a.transNo AND itemNo = c.itemNo) AS num
FROM
TransHeader AS a
INNER JOIN TransDetail AS c ON a.Site = c.Site
AND a.TransNo = c.TransNo
INNER JOIN part AS d ON d.part_no = c.partNo
<if test = "list.partNo != null and list.partNo != ''">
AND c.partNo = #{list.partNo}
</if>
<if test = "list.locationID != null and list.locationID != ''">
AND c.locationID = #{list.locationID}
</if>
<if test = "list.partDesc != null and list.partDesc != ''">
AND d.part_desc = #{list.partDesc}
</if>
<where>
<if test = "list.partNo != null and list.partNo != ''">
AND c.partNo = #{list.partNo}
</if>
<if test = "list.locationID != null and list.locationID != ''">
AND c.locationID = #{list.locationID}
</if>
<if test = "list.partDesc != null and list.partDesc != ''">
AND d.part_desc = #{list.partDesc}
</if>
</where>
</select>
<select id="sendByTime" resultType="com.spring.modules.material.entity.TransDetail">
select trans_no ,expiredDate where TransDetail
select trans_no ,expiredDate from TransDetail
</select>
</mapper>
Loading…
Cancel
Save