Browse Source

2025-11-17

订单产出标签报表加分页
master
fengyuan_yang 7 months ago
parent
commit
57a2c2b2fc
  1. 20
      src/main/java/com/gaotao/modules/rollNoReview/data/SFDCRollsOutData.java
  2. 4
      src/main/java/com/gaotao/modules/shopOrder/controller/ProductionReportController.java
  3. 2
      src/main/java/com/gaotao/modules/shopOrder/dao/ProductionReportMapper.java
  4. 6
      src/main/java/com/gaotao/modules/shopOrder/service/Impl/ProductionReportServiceImpl.java
  5. 2
      src/main/java/com/gaotao/modules/shopOrder/service/ProductionReportService.java
  6. 38
      src/main/resources/mapper/shopOrder/ProductionReportMapper.xml

20
src/main/java/com/gaotao/modules/rollNoReview/data/SFDCRollsOutData.java

@ -56,6 +56,26 @@ public class SFDCRollsOutData {
private String parentRollType;
private String finalStatus;
private String batchNo;
// 分页参数
private Integer page;
private Integer limit;
public Integer getPage() {
return page;
}
public void setPage(Integer page) {
this.page = page;
}
public Integer getLimit() {
return limit;
}
public void setLimit(Integer limit) {
this.limit = limit;
}
public Date getCreatedDate3() {
return createdDate3;
}

4
src/main/java/com/gaotao/modules/shopOrder/controller/ProductionReportController.java

@ -173,9 +173,11 @@ public class ProductionReportController {
Map<String, Object> map = new HashMap<>();
try {
List<SFDCRollsOutData> result = productionReportService.searchSfdcRollsReport(indata);
// 查询总数
int total = productionReportService.searchSfdcRollsReportCount(indata);
map.put("success", true);
map.put("rows", result);
map.put("total", result.size());
map.put("total", total);
} catch (Exception e) {
map.put("success", false);
map.put("msg", e.getMessage());

2
src/main/java/com/gaotao/modules/shopOrder/dao/ProductionReportMapper.java

@ -144,5 +144,7 @@ public interface ProductionReportMapper {
List<SFDCRollsOutData> searchSfdcRollsReport(SFDCRollsOutData indata);
int searchSfdcRollsReportCount(SFDCRollsOutData indata);
void updateSfdcRollsAttribute(SFDCRollsOutData data);
}

6
src/main/java/com/gaotao/modules/shopOrder/service/Impl/ProductionReportServiceImpl.java

@ -178,6 +178,12 @@ public class ProductionReportServiceImpl implements ProductionReportService {
return result;
}
@Override
public int searchSfdcRollsReportCount(SFDCRollsOutData indata) {
int count = productionReportMapper.searchSfdcRollsReportCount(indata);
return count;
}
@Override
public void updateSfdcRollsAttribute(List<SFDCRollsOutData> indata) {
for (SFDCRollsOutData data : indata) {

2
src/main/java/com/gaotao/modules/shopOrder/service/ProductionReportService.java

@ -114,5 +114,7 @@ public interface ProductionReportService {
List<SFDCRollsOutData> searchSfdcRollsReport(SFDCRollsOutData indata);
int searchSfdcRollsReportCount(SFDCRollsOutData indata);
void updateSfdcRollsAttribute(List<SFDCRollsOutData> indata);
}

38
src/main/resources/mapper/shopOrder/ProductionReportMapper.xml

@ -293,5 +293,43 @@
AND B.ItemNo like '%'+#{consumeItemNo}+'%'
</if>
</where>
ORDER BY A.CreatedDate DESC
<if test="page != null and limit != null">
OFFSET #{page} ROWS FETCH NEXT #{limit} ROWS ONLY
</if>
</select>
<!-- 查询订单产出标签总数 -->
<select id="searchSfdcRollsReportCount" resultType="int">
SELECT COUNT(*)
FROM SFDC_Rolls A
LEFT JOIN SFDC_MaterialHist B ON A.Site = B.SITE AND A.OrderNo = B.OrderNo AND A.RollNo = B.StartFromRollNo
<where>
a.CreatedDate >= #{createdDate2}
<if test=" createdDate3 != null">
AND #{createdDate3} >= CONVERT(varchar(10), a.CreatedDate, 120)
</if>
<if test=" Site != null and Site != ''">
AND A.site = #{Site}
</if>
<if test=" OrderNo != null and OrderNo != ''">
AND A.OrderNo like '%'+#{OrderNo}+'%'
</if>
<if test=" CreatedOpsSeqNo != 0">
AND A.CreatedOpsSeqNo = #{CreatedOpsSeqNo}
</if>
<if test=" CreatedOpsItemNo != 0">
AND A.CreatedOpsItemNo = #{CreatedOpsItemNo}
</if>
<if test=" consumeOrderNo != null and consumeOrderNo != ''">
AND B.OrderNo like '%'+#{consumeOrderNo}+'%'
</if>
<if test=" consumeSeqNo != null and consumeSeqNo != ''">
AND B.SeqNo like '%'+#{consumeSeqNo}+'%'
</if>
<if test=" consumeItemNo != null and consumeItemNo != ''">
AND B.ItemNo like '%'+#{consumeItemNo}+'%'
</if>
</where>
</select>
</mapper>
Loading…
Cancel
Save