| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @DS("mm") |
| | |
| | | //获取对象集合循环进行新增修改 |
| | | List<FlowCard> flowCardlist = JSONArray.parseArray(JSONObject.toJSONString(object.get("flowCard")), FlowCard.class); |
| | | if (!flowCardlist.isEmpty()){ |
| | | //获取单号 |
| | | String oddNumber= orderNumberSetting("入库"); |
| | | for (FlowCard flowCard : flowCardlist) { |
| | | //获取单号 |
| | | String oddNumber= orderNumberSetting("入库"); |
| | | //添加出入库记录 |
| | | finishedOperateLogMapper.insertIntFinishedOperateLog(flowCard,userName,oddNumber,container); |
| | | Integer finishedGoodsInventorycount = finishedGoodsInventoryMapper.findOrderNumberdcount(flowCard.getOrder().getOrderId(),flowCard.getOrderNumber()); |
| | |
| | | fc.process_id, |
| | | fc.received_quantity, |
| | | o.batch |
| | | from pp.flow_card fc left join sd.order_detail od on fc.order_id=od.order_id and fc.order_number=od.order_number inner join sd.`order` o on |
| | | from (select *,min(inventory_quantity) as min_inventory_quantity from pp.flow_card group by order_id,order_number,process_id) as fc |
| | | left join sd.order_detail od on fc.order_id=od.order_id and fc.order_number=od.order_number inner join sd.`order` o on |
| | | o.order_id=fc.order_id |
| | | <where> |
| | | and fc.received_quantity <![CDATA[<]]> fc.inventory_quantity |
| | | and fc.received_quantity <![CDATA[<]]> fc.min_inventory_quantity |
| | | <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''"> |
| | | and o.order_id regexp #{flowCard.order.orderId} |
| | | </if> |
| | |
| | | <if test="finishedOperateLog.quantity != null and finishedOperateLog.quantity != ''"> |
| | | and fol.quantity regexp #{finishedOperateLog.quantity} |
| | | </if> |
| | | <if test="finishedOperateLog.processId != null and finishedOperateLog.processId != ''"> |
| | | and fol.process_id regexp #{finishedOperateLog.processId} |
| | | </if> |
| | | <if test="finishedOperateLog.operator != null and finishedOperateLog.operator != ''"> |
| | | and fol.operator regexp #{finishedOperateLog.operator} |
| | | </if> |