Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/in27sung/stock-mate.git
Browse files Browse the repository at this point in the history
…into develop
  • Loading branch information
in27sung committed Dec 12, 2024
2 parents 18bf6e3 + 9e23e0b commit 76e0349
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import com.stockm8.service.OrderService;

@Controller
@RequestMapping(value = "/order")
@RequestMapping(value = "/order/*")
public class OrderController {

private static final Logger logger = LoggerFactory.getLogger(OrderController.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import com.stockm8.service.StockService;

@Controller
@RequestMapping("/stock") // 모든 요청이 /stock으로 시작합니다.
@RequestMapping(value = "/stock/*") // 모든 요청이 /stock으로 시작합니다.
public class StockController {

@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.stockm8.domain.vo.OrderVO; // OrderItemVO import 제거
import com.stockm8.domain.vo.ProductVO;
import com.stockm8.persistence.OrderDAO;
import com.stockm8.persistence.ReceivingDAO;

@Service
public class OrderServiceImpl implements OrderService {
Expand All @@ -20,6 +21,9 @@ public class OrderServiceImpl implements OrderService {
@Inject
private OrderDAO odao;

@Inject
private ReceivingDAO rdao;

@Override
@Transactional
public void insertOrder(OrderVO order, OrderItemVO orderItem) throws Exception {
Expand All @@ -31,6 +35,7 @@ public void insertOrder(OrderVO order, OrderItemVO orderItem) throws Exception {

// 주문항목 등록
odao.insertOrderItem(orderItem);
rdao.insertReceiving();
}

@Override
Expand Down
19 changes: 7 additions & 12 deletions stockMate/src/main/resources/mappers/receivingMapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
created_by
)
SELECT
'in',
'pending',
'INBOUND',
'PENDING',
p.product_id,
o.quantity,
p.base_unit,
Expand All @@ -66,12 +66,11 @@
p.name,
p.description,
r.change_quantity,
r.transaction_unit,
r.memo
from receiving_shipment r
join products p on r.product_id = p.product_id
join warehouses w on w.warehouse_id = r.warehouse_id
where Date(r.created_at) = CURRENT_DATE and r.status = 'pending' and r.transaction_type = 'in'
where Date(r.created_at) = CURRENT_DATE and r.status = 'pending' and r.transaction_type = 'INBOUND'
order by r.receiving_shipment_no desc
limit 0, 20
</select>
Expand All @@ -87,7 +86,6 @@
p.name,
p.description,
r.change_quantity,
r.transaction_unit,
r.memo
from receiving_shipment r
join products p on r.product_id = p.product_id
Expand All @@ -108,7 +106,6 @@
p.name,
p.description,
r.change_quantity,
r.transaction_unit,
r.memo
from receiving_shipment r
join products p on r.product_id = p.product_id
Expand All @@ -129,13 +126,12 @@
p.name,
p.description,
r.change_quantity,
r.transaction_unit,
p.price,
r.memo
from receiving_shipment r
join products p on r.product_id = p.product_id
join warehouses w on w.warehouse_id = r.warehouse_id
where transaction_type = 'in'
where transaction_type = 'INBOUND'
order by r.receiving_shipment_no desc
limit #{startPage},#{pageSize};
</select>
Expand All @@ -151,7 +147,6 @@
p.name,
p.description,
r.change_quantity,
r.transaction_unit,
p.price,
r.memo
FROM receiving_shipment r
Expand All @@ -167,7 +162,7 @@
<if test="keyword != ''">
AND (p.name LIKE CONCAT('%', #{keyword}, '%') )
</if>
AND transaction_type = 'in'
AND transaction_type = 'INBOUND'
</where>
ORDER BY r.receiving_shipment_no desc
limit #{cri.startPage},#{cri.pageSize};
Expand All @@ -188,7 +183,7 @@
<if test="keyword != ''">
AND p.name LIKE CONCAT('%', #{keyword}, '%')
</if>
AND r.transaction_type = 'in'
AND r.transaction_type = 'INBOUND'
</where>
ORDER BY r.receiving_shipment_no desc
</select>
Expand All @@ -197,7 +192,7 @@
<select id="getTotalCount" resultType="int">
select count(*)
from receiving_shipment
where transaction_type = 'in'
where transaction_type = 'INBOUND'
</select>

</mapper>
10 changes: 5 additions & 5 deletions stockMate/src/main/webapp/WEB-INF/views/dashboard.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@
대시보드
</div>
<div class="menu-bar">
<a href="order">주문</a>
<a href="stock">입고</a>
<a href="shipment">출고</a>
<a href="stock">재고</a>
<a href="admin">관리자 페이지</a>
<a href="/register">주문</a>
<a href="/receiving/main">입고</a>
<a href="/shipment/main">출고</a>
<a href="/stock/list">재고</a>
<a href="user/admin">관리자 페이지</a>
</div>

<!-- Content Section -->
Expand Down
8 changes: 4 additions & 4 deletions stockMate/src/main/webapp/WEB-INF/views/user/dashboard.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@
대시보드
</div>
<div class="menu-bar">
<a href="order">주문</a>
<a href="/order/register">주문</a>
<a href="/receiving/main">입고</a>
<a href="shipment">출고</a>
<a href="stock">재고</a>
<a href="admin">관리자 페이지</a>
<a href="/shipment/main">출고</a>
<a href="/stock/list">재고</a>
<a href="/admin">관리자 페이지</a>
</div>

<!-- Content Section -->
Expand Down

0 comments on commit 76e0349

Please sign in to comment.