Skip to content

Commit

Permalink
Merge pull request #261 from in27sung/shipment21
Browse files Browse the repository at this point in the history
asdf
  • Loading branch information
shoqying authored Dec 24, 2024
2 parents d720e30 + 55309df commit 2e019a3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ public void searchGET(@RequestParam(value = "startDate", required = false) Strin
int totalCount = 0;

// 날짜와 키워드가 모두 있는 경우
if (startDate != null && endDate != null && keyword != null) {
if (startDate != null && !startDate.trim().isEmpty() &&
endDate != null && !endDate.trim().isEmpty() &&
keyword != null && !keyword.trim().isEmpty()) {
ReceivingList = rService.getHistoryByDateRange(startDate, endDate, keyword, cri, businessId);
totalCount = rService.getTotalCountBySearch(startDate, endDate, keyword, businessId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ public void searchGET(@RequestParam(value = "startDate", required = false) Strin
int totalCount = 0;

// 날짜와 키워드가 모두 있는 경우
if (startDate != null && endDate != null && keyword != null) {
if (startDate != null && !startDate.trim().isEmpty() &&
endDate != null && !endDate.trim().isEmpty() &&
keyword != null && !keyword.trim().isEmpty()) {
ShipmentList = sService.getHistoryByDateRange(startDate, endDate, keyword, cri, businessId);
totalCount = sService.getTotalCountBySearch(startDate, endDate, keyword, businessId);

Expand Down
19 changes: 10 additions & 9 deletions stockMate/src/main/resources/mappers/receivingMapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,18 @@ WHERE NOT EXISTS (
JOIN warehouses w ON w.warehouse_id = r.warehouse_id
JOIN users u on u.user_id = r.created_by
<where>
<if test="startDate != ''">
r.created_at &gt;= #{startDate}
</if>
<if test="endDate != ''">
AND r.created_at &lt;= #{endDate}
</if>
<if test="keyword != ''">
AND (p.product_name LIKE CONCAT('%', #{keyword}, '%') )
</if>
<if test="startDate != null and startDate != ''">
r.created_at &gt;= #{startDate}
</if>
<if test="endDate != null and endDate != ''">
AND r.created_at &lt;= #{endDate}
</if>
<if test="keyword != null and keyword != ''">
AND p.product_name LIKE CONCAT('%', #{keyword}, '%')
</if>
AND transaction_type = 'INBOUND'
AND u.business_id = #{businessId}

</where>
ORDER BY r.receiving_shipment_no desc
limit #{cri.startPage},#{cri.pageSize};
Expand Down
18 changes: 9 additions & 9 deletions stockMate/src/main/resources/mappers/shipmentMapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,15 @@ WHERE NOT EXISTS (
JOIN warehouses w ON w.warehouse_id = r.warehouse_id
JOIN users u on u.user_id = r.created_by
<where>
<if test="startDate != ''">
r.created_at &gt;= #{startDate}
</if>
<if test="endDate != ''">
AND r.created_at &lt;= #{endDate}
</if>
<if test="keyword != ''">
AND (p.product_name LIKE CONCAT('%', #{keyword}, '%') )
</if>
<if test="startDate != null and startDate != ''">
r.created_at &gt;= #{startDate}
</if>
<if test="endDate != null and endDate != ''">
AND r.created_at &lt;= #{endDate}
</if>
<if test="keyword != null and keyword != ''">
AND p.product_name LIKE CONCAT('%', #{keyword}, '%')
</if>
AND transaction_type = 'OUTBOUND'
AND u.business_id = #{businessId}
</where>
Expand Down

0 comments on commit 2e019a3

Please sign in to comment.