| | |
| | | package com.zy.asrs.task.handler; |
| | | |
| | | import cn.hutool.core.util.NumberUtil; |
| | | import com.alibaba.excel.util.NumberUtils; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.core.common.Cools; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | |
| | | |
| | | @Value("${spring.profiles.active}") |
| | | private String active; |
| | | |
| | | @Value("${u8.report}") |
| | | private Boolean report; |
| | | |
| | | @Value("${u8.url}") |
| | | private String url; |
| | |
| | | |
| | | @Transactional |
| | | public void timelyStart(Order order) { |
| | | if (!report){ |
| | | return; |
| | | } |
| | | |
| | | List<String> docNames = new ArrayList<>(Arrays.asList("银座采购入库单", "银座委外材料出库单", "银座生产材料出库单")); |
| | | |
| | |
| | | if (s.length > 1) { |
| | | childInfo.setCBatch(s[0]); |
| | | childInfo.setBFree1(s[1]); |
| | | } else { |
| | | } else if (s.length == 1) { |
| | | childInfo.setCBatch(s[0]); |
| | | childInfo.setBFree1(""); |
| | | } else { |
| | | childInfo.setCBatch(""); |
| | | childInfo.setBFree1(""); |
| | | } |
| | | } |
| | |
| | | childInfo.setCOrderCode(orderDetl.getOrderNo()); |
| | | childInfo.setIvouchrowno(orderDetl.getItemNum()); |
| | | childInfo.setDefine22(orderDetl.getThreeCode()); |
| | | |
| | | if (!Cools.isEmpty(orderDetl.getWeight()) && !Cools.isEmpty(orderDetl.getVolume())) { |
| | | BigDecimal mul = NumberUtil.div(childInfo.getIQuantity(), orderDetl.getVolume() + ""); |
| | | childInfo.setINum(mul.toString()); |
| | | } else { |
| | | childInfo.setINum("1"); |
| | | } |
| | | childInfo.setIinvexchrate(Cools.isEmpty(orderDetl.getVolume()) ? "" : orderDetl.getVolume() + ""); |
| | | paramChild.add(childInfo); |
| | | } |
| | | |