Browse Source

领料申请单修改

master
shenzhouyu 2 months ago
parent
commit
52cba5b577
  1. 5
      src/main/java/com/gaotao/modules/production/controller/ProductionIssueController.java
  2. 3
      src/main/java/com/gaotao/modules/production/service/impl/ProductionIssueServiceImpl.java
  3. 4
      src/main/resources/mapper/notify/NewIssureMapper.xml

5
src/main/java/com/gaotao/modules/production/controller/ProductionIssueController.java

@ -56,7 +56,10 @@ public class ProductionIssueController {
public R getWorkOrderInfo(@RequestBody DirectIssueDto dto){
try {
List<ShopOrderVo> workOrders = productionIssueService.getWorkOrderInfo(dto.getWorkOrderNo(), dto.getSite());
return R.ok().put("workOrders", workOrders);
if(workOrders != null && workOrders.size() > 0){
return R.ok().put("workOrders", workOrders);
}
return R.error("工单不存在");
} catch (Exception e) {
return R.error(e.getMessage());
}

3
src/main/java/com/gaotao/modules/production/service/impl/ProductionIssueServiceImpl.java

@ -89,6 +89,9 @@ public class ProductionIssueServiceImpl implements ProductionIssueService {
List<ShopOrderVo> orderInfo = ifsApiIssueAndReturnService.getWorkOrderInfo(workOrderNo, site, "*", "*");
Set<String> allowedStatuses = new HashSet<>(Arrays.asList("Released", "Reserved", "Started"));
List<ShopOrderVo> shopOrderVos = orderInfo.stream().filter(item -> allowedStatuses.contains(item.getObjstate())).collect(Collectors.toList());
if(orderInfo.size() >0 && shopOrderVos.size() == 0){
throw new XJException("工单"+workOrderNo+"状态不允许发料");
}
return shopOrderVos;
}

4
src/main/resources/mapper/notify/NewIssureMapper.xml

@ -77,9 +77,9 @@
<!-- AI制作 - 查询申请单明细 -->
<select id="searchNotifyOrderListNew" resultType="SOIssueNotifyOrderListData">
select a.notify_no as notifyNo,a.site,a.item_no as itemNo,a.fgpart_no as fgPartNo,a.soorder_no as soorderNo,a.ops_item_no as opsItemNo,a.seq_no as seqNo,
a.issure_qty as issureQty,a.location_no as locationNo,a.need_date as needDate,a.out_work_order_flag as outWorkOrderFlag,a.release_no as releaseNo,a.sequence_no as sequenceNo
a.issure_qty as issureQty,a.location_no as locationNo,a.need_date as needDate,a.out_work_order_flag as outWorkOrderFlag,a.release_no as releaseNo,a.sequence_no as sequenceNo,a.push_wms_flag as pushWmsFlag,a.transport_flag as transportFlag
from SOIssueNotifyOrderList a
where a.notify_no=#{notifyNo} and a.site=#{site}
where a.notify_no=#{notifyNo} and a.site=#{site} and a.order_type='shoporder'
order by a.item_no
</select>

Loading…
Cancel
Save