| | |
| | | import com.zy.asrs.entity.result.MobileAdjustResult; |
| | | import com.zy.asrs.mapper.ManLocDetlMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.service.impl.OrderDetlPakinServiceImpl; |
| | | import com.zy.asrs.service.impl.OrderPakinServiceImpl; |
| | | import com.zy.asrs.utils.OrderInAndOutUtil; |
| | | import com.zy.common.model.WrkDto; |
| | | import com.zy.common.web.BaseController; |
| | |
| | | |
| | | @Resource |
| | | private StaDescService staDescService; |
| | | @Autowired |
| | | private OrderPakinServiceImpl orderPakinService; |
| | | @Autowired |
| | | private OrderDetlPakinServiceImpl orderDetlPakinService; |
| | | |
| | | @RequestMapping("/pda/WarehouseOut/v1") |
| | | @ManagerAuth(memo = "并板途中拣料-参考念初") |
| | |
| | | return R.ok().add(combParams); |
| | | } |
| | | |
| | | @RequestMapping("/order/search/orderDetl/auth") |
| | | @ManagerAuth |
| | | public R orderDetlSearchByBarcode(@RequestBody OrderDetlByCode param){ |
| | | if (Cools.isEmpty(param)){ |
| | | return R.ok(); |
| | | } |
| | | List<OrderDetlPakin> orderDetls = orderDetlPakinService.selectOrderDetls(param); |
| | | CombParam combParam = new CombParam(); |
| | | if (!Cools.isEmpty(orderDetls)) { |
| | | LinkedList<CombParam.CombMat> combMats = new LinkedList<>(); |
| | | |
| | | for (OrderDetlPakin od : orderDetls) { |
| | | CombParam.CombMat mat = new CombParam.CombMat(); |
| | | mat.setMatnr(od.getMatnr()); |
| | | mat.setOrderNo(od.getOrderNo()); |
| | | mat.setAnfme(od.getAnfme() - od.getWorkQty()); |
| | | mat.setMaktx(od.getMaktx()); |
| | | mat.setSku(od.getSku()); |
| | | mat.setMemo(od.getMemo()); |
| | | mat.setSupp(od.getSupp()); |
| | | mat.setBoxType1(od.getBoxType1()); |
| | | mat.setBoxType2(od.getBoxType2()); |
| | | mat.setBoxType3(od.getBoxType3()); |
| | | mat.setStandby1(od.getStandby1()); |
| | | mat.setStandby2(od.getStandby2()); |
| | | mat.setStandby3(od.getStandby3()); |
| | | combMats.add(mat); |
| | | } |
| | | combParam.setCombMats(combMats); |
| | | } |
| | | return R.ok().add(combParam); |
| | | } |
| | | |
| | | |
| | | |
| | | @RequestMapping("/comb/auth") |
| | | @ManagerAuth(memo = "组托") |
| | |
| | | @TableField("height") |
| | | private Double height; |
| | | |
| | | /** |
| | | * erp数量 |
| | | */ |
| | | @ApiModelProperty(value= "erp数量") |
| | | @TableField("erp_anfme") |
| | | private Double erpAnfme; |
| | | |
| | | public OrderDetl() {} |
| | | |
| | | public OrderDetl(Long orderId, String orderNo, Double anfme, Double qty, String matnr, String maktx, String batch, String specs, String model, String color, String brand, String unit, Double price, String sku, Double units, String barcode, String origin, String manu, String manuDate, String itemNum, Double safeQty, Double weight, Double manLength, Double volume, String threeCode, String supp, String suppCode, Integer beBatch, String deadTime, Integer deadWarn, Integer source, Integer inspect, Integer danger, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo,Double width,Double height) { |
| | |
| | | @TableField("height") |
| | | private Double height; |
| | | |
| | | /** |
| | | * erp数量 |
| | | */ |
| | | @ApiModelProperty(value= "erp数量") |
| | | @TableField("erp_anfme") |
| | | private Double erpAnfme; |
| | | |
| | | public OrderDetlPakin() {} |
| | | |
| | | public OrderDetlPakin(Long orderId, String orderNo, Double anfme, Double qty, String matnr, String maktx, String batch, String specs, String model, String color, String brand, String unit, Double price, String sku, Double units, String barcode, String origin, String manu, String manuDate, String itemNum, Double safeQty, Double weight, Double manLength, Double volume, String threeCode, String supp, String suppCode, Integer beBatch, String deadTime, Integer deadWarn, Integer source, Integer inspect, Integer danger, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | public OrderDetlPakin(Long id, Long orderId, String orderNo, Double anfme, Double workQty, Double qty, String matnr, String maktx, String batch, String specs, String model, String color, String brand, String unit, Double price, String sku, Double units, String barcode, String origin, String manu, String manuDate, String itemNum, Double safeQty, Double weight, Double manLength, Double volume, String threeCode, String supp, String suppCode, Integer beBatch, String deadTime, Integer deadWarn, Integer source, Integer inspect, Integer danger, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo, Integer pakinPakoutStatus, Long lineNumber, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double width, Double height, Double erpAnfme) { |
| | | this.id = id; |
| | | this.orderId = orderId; |
| | | this.orderNo = orderNo; |
| | | this.anfme = anfme; |
| | | this.workQty = workQty; |
| | | this.qty = qty; |
| | | this.matnr = matnr; |
| | | this.maktx = maktx; |
| | |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | this.pakinPakoutStatus = pakinPakoutStatus; |
| | | this.lineNumber = lineNumber; |
| | | this.standby1 = standby1; |
| | | this.standby2 = standby2; |
| | | this.standby3 = standby3; |
| | | this.boxType1 = boxType1; |
| | | this.boxType2 = boxType2; |
| | | this.boxType3 = boxType3; |
| | | this.width = width; |
| | | this.height = height; |
| | | this.erpAnfme = erpAnfme; |
| | | } |
| | | |
| | | public String getOrderId$(){ |
| | |
| | | @TableField("height") |
| | | private Double height; |
| | | |
| | | /** |
| | | * erp数量 |
| | | */ |
| | | @ApiModelProperty(value= "erp数量") |
| | | @TableField("erp_anfme") |
| | | private Double erpAnfme; |
| | | |
| | | public OrderDetlPakout() {} |
| | | |
| | | public OrderDetlPakout(Long orderId, String orderNo, Double anfme, Double qty, String matnr, String maktx, String batch, String specs, String model, String color, String brand, String unit, Double price, String sku, Double units, String barcode, String origin, String manu, String manuDate, String itemNum, Double safeQty, Double weight, Double manLength, Double volume, String threeCode, String supp, String suppCode, Integer beBatch, String deadTime, Integer deadWarn, Integer source, Integer inspect, Integer danger, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class OrderDetlByCode { |
| | | String sku;//客户sku |
| | | String upc;//条码upc |
| | | String orderNo;//采购单号 |
| | | } |
| | |
| | | , @Param("boxType1")String boxType1, |
| | | @Param("boxType2")String boxType2, |
| | | @Param("boxType3")String boxType3, @Param("workQty")Double workQty); |
| | | |
| | | List<OrderDetlPakin> selectOrderDetls(@Param("orderNo")String orderNo,@Param("sku")String sku,@Param("upc") String upc); |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.OrderDetlPakin; |
| | | import com.zy.asrs.entity.OrderPakin; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.OrderDetlPakin; |
| | | import com.zy.asrs.entity.param.OrderDetlByCode; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3 |
| | | , String boxType1, String boxType2, String boxType3, Double workQty); |
| | | |
| | | List<OrderDetlPakin> selectOrderDetls(OrderDetlByCode orderDetlByCode); |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.entity.OrderDetlPakin; |
| | | import com.zy.asrs.entity.WrkDetl; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.entity.param.OrderDetlByCode; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | boolean updateOrderStatus(String orderNo); |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.OrderDetlPakin; |
| | | import com.zy.asrs.entity.param.OrderDetlByCode; |
| | | import com.zy.asrs.mapper.OrderDetlPakinMapper; |
| | | import com.zy.asrs.service.OrderDetlPakinService; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | public boolean increaseWorkQty(Long orderId, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double workQty) { |
| | | return this.baseMapper.increaseWorkQty(orderId, matnr, batch,brand,standby1,standby2,standby3,boxType1,boxType2,boxType3, workQty) > 0; |
| | | } |
| | | @Override |
| | | public List<OrderDetlPakin> selectOrderDetls(OrderDetlByCode orderDetlByCode){ |
| | | String orderNo = orderDetlByCode.getOrderNo(); |
| | | String upc = orderDetlByCode.getUpc(); |
| | | String sku = orderDetlByCode.getSku(); |
| | | return this.baseMapper.selectOrderDetls(orderNo,sku,upc); |
| | | } |
| | | } |
| | |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.OpenOrderPakinParam; |
| | | import com.zy.asrs.entity.param.OpenOrderPakoutParam; |
| | | import com.zy.asrs.entity.param.OrderDetlByCode; |
| | | import com.zy.asrs.mapper.OrderDetlPakinMapper; |
| | | import com.zy.asrs.mapper.OrderPakinMapper; |
| | | import com.zy.asrs.service.*; |
| | |
| | | public boolean updateOrderStatus(String orderNo){ |
| | | return this.baseMapper.updateOrderStatus(orderNo); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @Autowired |
| | | private BasArmMastSignService basArmMastSignService; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | // @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void orderToSortLine() { |
| | | //获取未下发单据 |
| | | List<String> orderNos = orderPakinService.AllStatusSatisfyOrder(0); |
| | |
| | | if (!Cools.isEmpty(order1)){ |
| | | return FAIL.setMsg("请等待...订单执行档案正在转历史档案!!!"); |
| | | } |
| | | List<OrderDetl> orderDetls = OrderInAndOutUtil.selectByOrderId(order.getPakinPakoutStatus$(), order.getId()); |
| | | if (!Cools.isEmpty(orderDetls) || !orderDetls.isEmpty()) { |
| | | return FAIL.setMsg("请等待...订单执行明细档案正在转历史档案!!!"); |
| | | } |
| | | // List<OrderDetl> orderDetls = OrderInAndOutUtil.selectByOrderId(order.getPakinPakoutStatus$(), order.getId()); |
| | | // if (!Cools.isEmpty(orderDetls) || !orderDetls.isEmpty()) { |
| | | // return FAIL.setMsg("请等待...订单执行明细档案正在转历史档案!!!"); |
| | | // } |
| | | |
| | | // 单据明细档 |
| | | List<OrderDetl> orderDetlList = orderDetlService.selectByOrderId(order.getId()); |
| | |
| | | DetlDto detlDto = DetlDto.find(list, dto.getMatnr(), dto.getBatch(),dto.getBrand(),dto.getStandby1(),dto.getStandby2(),dto.getStandby3(),dto.getBoxType1(),dto.getBoxType2(),dto.getBoxType3()); |
| | | assert detlDto != null; |
| | | detlDto.setAnfme(detlDto.getAnfme() + detail.getAnfme()); |
| | | detlDto.setErpAnfme(detlDto.getErpAnfme() + detail.getErpAnfme()); |
| | | |
| | | OrderDetl orderDetl = OrderDetl.find(orderDetlList, dto.getMatnr(), dto.getBatch(),dto.getBrand(),dto.getStandby1(),dto.getStandby2(),dto.getStandby3(),dto.getBoxType1(),dto.getBoxType2(),dto.getBoxType3()); |
| | | assert orderDetl != null; |
| | | orderDetl.setAnfme(orderDetl.getAnfme() + detail.getAnfme()); |
| | | } else { |
| | | dto.setErpAnfme(detail.getErpAnfme()); |
| | | list.add(dto); |
| | | orderDetlList.add(detail); |
| | | } |
| | |
| | | private String boxType3 = "1"; |
| | | |
| | | private Double anfme; |
| | | private Double erpAnfme; |
| | | |
| | | public DetlDto() { |
| | | } |
| | |
| | | <result column="box_type1" property="boxType1" /> |
| | | <result column="box_type2" property="boxType2" /> |
| | | <result column="box_type3" property="boxType3" /> |
| | | <result column="width" property="width" /> |
| | | <result column="height" property="height" /> |
| | | <result column="erp_anfme" property="erpAnfme" /> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | <result column="box_type1" property="boxType1" /> |
| | | <result column="box_type2" property="boxType2" /> |
| | | <result column="box_type3" property="boxType3" /> |
| | | <result column="width" property="width" /> |
| | | <result column="height" property="height" /> |
| | | <result column="erp_anfme" property="erpAnfme" /> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | <include refid="standbyAll"></include> |
| | | </update> |
| | | |
| | | <select id="selectOrderDetls" resultMap="BaseResultMap"> |
| | | SELECT * |
| | | FROM man_order_detl_pakin |
| | | where 1=1 |
| | | and box_type3 = #{orderNo} |
| | | and standby3 = #{sku} |
| | | and standby2 = #{upc} |
| | | order by update_time |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="box_type1" property="boxType1" /> |
| | | <result column="box_type2" property="boxType2" /> |
| | | <result column="box_type3" property="boxType3" /> |
| | | <result column="width" property="width" /> |
| | | <result column="height" property="height" /> |
| | | <result column="erp_anfme" property="erpAnfme" /> |
| | | </resultMap> |
| | | |
| | | <sql id="standbyAll"> |
| | |
| | | and order_no = #{orderNo} |
| | | </update> |
| | | |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <!-- <el-table-column prop="boxType1" label="货主" min-width="80" align="center" ></el-table-column>--> |
| | | <!-- <el-table-column prop="boxType2" label="货主" min-width="80" align="center" ></el-table-column>--> |
| | | <el-table-column prop="boxType3" label="采购单号" min-width="80" align="center" ></el-table-column> |
| | | <el-table-column prop="anfme" label="数量" min-width="100" align="center"></el-table-column> |
| | | <el-table-column prop="status" label="状态" min-width="100" align="center" :formatter="formatStatusB"></el-table-column> |
| | | <el-table-column prop="anfme" label="数量" min-width="80" align="center"></el-table-column> |
| | | <el-table-column prop="erpAnfme" label="erp下发数量" min-width="80" align="center"></el-table-column> |
| | | <el-table-column prop="status" label="状态" min-width="80" align="center" :formatter="formatStatusB"></el-table-column> |
| | | <!-- 新增操作列,根据status值控制显示 --> |
| | | <el-table-column label="是否上报" width="120" align="center" fixed="right"> |
| | | <template slot-scope="scope"> |
| | |
| | | // 格式化状态显示 |
| | | formatStatusB(row) { |
| | | if (row.status === 0) { |
| | | return '异常'; |
| | | return '初始化'; |
| | | } else if (row.status === 1) { |
| | | return '不上报'; |
| | | return '待处理'; |
| | | } else if (row.status === 2) { |
| | | return '待上报'; |
| | | return '作业中'; |
| | | } else if (row.status === 3) { |
| | | return '已上报'; |
| | | return '已取消'; |
| | | } else if (row.status === 4) { |
| | | return '已完成'; |
| | | } else if (row.status === 5) { |
| | | return '准备取消'; |
| | | } else if (row.status === 6) { |
| | | return '上报完成'; |
| | | } else if (row.status === 7) { |
| | | return '数据异常'; |
| | | } else if (row.status === 8) { |
| | | return '审核完成'; |
| | | } else if (row.status === 9) { |
| | | return '提交完成'; |
| | | } else if (row.status === 10) { |
| | | return '保存完成'; |
| | | } else if (row.status === 98) { |
| | | return '上报完成未完结'; |
| | | } else if (row.status === 99) { |
| | | return '重新下发'; |
| | | } else { |
| | | return row.status || '未知'; |
| | | } |