Merge branch 'master' of https://gitee.com/luxiaotao1123/zy-asrs into hylyasrs
# Conflicts:
# src/main/java/com/zy/asrs/controller/MatCodeController.java
# src/main/java/com/zy/asrs/utils/VersionUtils.java
# src/main/java/com/zy/common/utils/excel/matcode/MatCodeExcel.java
# src/main/java/com/zy/common/utils/excel/matcode/MatCodeExcelListener.java
# src/main/resources/application.yml
| | |
| | | /** |
| | | * 作业数量 |
| | | * |
| | | * 1. 入库 : qty 👆 |
| | | * 1. 出库 : qty 👆 |
| | | * 入库 : 组托完成,组托档、工作档、入库完成数量 |
| | | * 出库 : 工作档、出库完成数量 |
| | | */ |
| | | @ApiModelProperty(value= "作业数量") |
| | | @TableField("work_qty") |
| | | private Double workQty; |
| | | |
| | | /** |
| | | * 完成数量 |
| | | * |
| | | * 入库 : qty 👆 |
| | | * 出库 : qty 👆 |
| | | */ |
| | | @ApiModelProperty(value= "完成数量") |
| | | private Double qty; |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | public Double getEnableQty() { |
| | | if (null != this.anfme && this.qty != null) { |
| | | return this.anfme - this.qty; |
| | | if (null != this.anfme && this.workQty != null) { |
| | | return this.anfme - this.workQty; |
| | | } |
| | | // if (null != this.anfme && this.qty != null) { |
| | | // return this.anfme - this.qty; |
| | | // } |
| | | return null; |
| | | } |
| | | |
| | |
| | | Synchro.Copy(source, this); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | int modifyStatus(@Param("orderId") Long orderId, @Param("status")Integer status); |
| | | |
| | | int addToLogTable(OrderDetl orderDetl); |
| | | |
| | | int increaseWorkQty(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("qty")Double workQty); |
| | | } |
| | |
| | | boolean modifyStatus(Long orderId, Integer status); |
| | | |
| | | boolean addToLogTable(OrderDetl orderDetl); |
| | | |
| | | /** |
| | | * 入出库任务生成时,更新单据表中作业数量 |
| | | * @param orderId |
| | | * @param matnr |
| | | * @param batch |
| | | * @param workQty |
| | | * @return |
| | | */ |
| | | boolean increaseWorkQty(Long orderId, String matnr, String batch, Double workQty); |
| | | } |
| | |
| | | if (detlDto.getAnfme() > orderDetl.getEnableQty()) { |
| | | throw new CoolException(orderDetl.getMatnr() + "入库数量不合法"); |
| | | } |
| | | // 修改订单明细数量 |
| | | if (!orderDetlService.increase(order.getId(), detlDto.getMatnr(), detlDto.getBatch(), detlDto.getAnfme())) { |
| | | throw new CoolException("修改单据明细数量失败"); |
| | | // 修改订单作业数量 |
| | | if (!orderDetlService.increaseWorkQty(order.getId(), detlDto.getMatnr(), detlDto.getBatch(), detlDto.getAnfme())) { |
| | | throw new CoolException("修改单据作业数量失败"); |
| | | } |
| | | |
| | | // 保存入库通知档 |
| | |
| | | public boolean addToLogTable(OrderDetl orderDetl) { |
| | | return this.baseMapper.addToLogTable(orderDetl) > 0; |
| | | } |
| | | |
| | | /** |
| | | * 入出库任务生成时,更新单据表中作业数量 |
| | | * @param orderId |
| | | * @param matnr |
| | | * @param batch |
| | | * @param workQty |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean increaseWorkQty(Long orderId, String matnr, String batch, Double workQty) { |
| | | return this.baseMapper.increaseWorkQty(orderId, matnr, batch, workQty) > 0; |
| | | } |
| | | } |
| | |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException("取消库位转移失败,源库位不存在:"+ wrkMast.getSourceLocNo()); |
| | | } |
| | | locMast.setLocSts("F"); |
| | | locMast.setLocSts(wrkMast.getFullPlt().equalsIgnoreCase("N")?"D":"F"); |
| | | locMast.setModiTime(new Date()); |
| | | locMast.setModiUser(userId); |
| | | locMastService.updateById(locMast); |
| | |
| | | } |
| | | } |
| | | |
| | | @Scheduled(cron = "0/5 * * * * ? ") |
| | | // @Scheduled(cron = "0/5 * * * * ? ") |
| | | @Async("orderThreadPool") |
| | | public void completeAndReport(){ |
| | | String erpReport = Parameter.get().getErpReport(); |
| | |
| | | <result column="order_id" property="orderId" /> |
| | | <result column="order_no" property="orderNo" /> |
| | | <result column="anfme" property="anfme" /> |
| | | <result column="work_qty" property="workQty" /> |
| | | <result column="qty" property="qty" /> |
| | | <result column="matnr" property="matnr" /> |
| | | <result column="maktx" property="maktx" /> |
| | | <result column="batch" property="batch" /> |
| | | |
| | | <result column="specs" property="specs" /> |
| | | <result column="model" property="model" /> |
| | | <result column="color" property="color" /> |
| | |
| | | <result column="source" property="source" /> |
| | | <result column="inspect" property="inspect" /> |
| | | <result column="danger" property="danger" /> |
| | | |
| | | <result column="status" property="status" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | |
| | | INSERT INTO man_order_detl_log SELECT * FROM man_order_detl WHERE id = #{id} |
| | | </insert> |
| | | |
| | | <update id="increaseWorkQty"> |
| | | update man_order_detl |
| | | set work_qty = work_qty + #{workQty} |
| | | where 1=1 |
| | | and order_id = #{orderId} |
| | | and matnr = #{matnr} |
| | | <choose> |
| | | <when test="batch != null and batch != ''"> |
| | | and batch = #{batch} |
| | | </when> |
| | | <otherwise> |
| | | and (batch IS NULL OR batch = '') |
| | | </otherwise> |
| | | </choose> |
| | | </update> |
| | | |
| | | </mapper> |
| | |
| | | {field: 'maktx', title: '商品名称', width: 160}, |
| | | {field: 'batch', title: '序列码'}, |
| | | {field: 'anfme', title: '数量'}, |
| | | {field: 'qty', title: '作业数量', style: 'font-weight: bold'}, |
| | | {field: 'workQty', title: '作业数量'}, |
| | | {field: 'qty', title: '完成数量', style: 'font-weight: bold'}, |
| | | // {field: 'unit', title: '单位'}, |
| | | // { |
| | | // field: 'createTime$', title: '创建时间', sort: true, templet: function (d) { |