| | |
| | | |
| | | int increaseWorkQtyByOrderNo(@Param("orderNo") String orderNo, @Param("matnr") String matnr, @Param("batch") String batch, @Param("qty") Double qty, @Param("hostId") Long hostId); |
| | | |
| | | int increaseWorkQty(@Param("orderId") Long orderId, @Param("matnr") String matnr, @Param("batch") String batch, @Param("workQty") Double workQty, @Param("hostId") Long hostId); |
| | | |
| | | } |
| | |
| | | |
| | | boolean increaseWorkQtyByOrderNo(String orderNo, String matnr, String batch, Double qty, Long hostId); |
| | | |
| | | boolean increaseWorkQty(Long orderId, String matnr, String batch, Double workQty, Long hostId); |
| | | |
| | | } |
| | |
| | | public boolean increaseWorkQtyByOrderNo(String orderNo, String matnr, String batch, Double qty, Long hostId) { |
| | | return this.baseMapper.increaseWorkQtyByOrderNo(orderNo, matnr, batch, qty, hostId) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public boolean increaseWorkQty(Long orderId, String matnr, String batch, Double workQty, Long hostId) { |
| | | return this.baseMapper.increaseWorkQty(orderId, matnr, batch, workQty, hostId) > 0; |
| | | } |
| | | } |
| | |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | | // 修改订单明细 |
| | | if (!orderDetlService.increase(orderDetl.getOrderId(), hostId, orderDetl.getMatnr(), orderDetl.getBatch(), locDto.getAnfme())) { |
| | | if (!orderDetlService.increaseWorkQty(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), locDto.getAnfme(), hostId)) { |
| | | throw new CoolException("修改订单明细数量失败"); |
| | | } |
| | | orderService.updateSettle(orderDetl.getOrderId(), 2L, userId, hostId); |
| | |
| | | </choose> |
| | | </update> |
| | | |
| | | <update id="increaseWorkQty"> |
| | | update man_order_detl |
| | | set work_qty = work_qty + #{workQty} |
| | | where 1=1 |
| | | and order_id = #{orderId} |
| | | and matnr = #{matnr} |
| | | and host_id = #{hostId} |
| | | <choose> |
| | | <when test="batch != null and batch != ''"> |
| | | and batch = #{batch} |
| | | </when> |
| | | <otherwise> |
| | | and (batch IS NULL OR batch = '') |
| | | </otherwise> |
| | | </choose> |
| | | </update> |
| | | |
| | | </mapper> |