| | |
| | | return R.ok(matService.getMatTurnPage(toPage(curr, limit, param, Mat.class))); |
| | | } |
| | | |
| | | @RequestMapping("/mat/turn/over/out/start") |
| | | @ManagerAuth(memo = "品号移交") |
| | | public R turnOverOutStart(@RequestBody EmptyPlateOutParam param) { |
| | | |
| | | return R.ok("品号移交成功"); |
| | | } |
| | | |
| | | @RequestMapping("/mat/turn/over/take/site") |
| | | @ManagerAuth() |
| | | public R availableTakeSite(@RequestParam(required = false) String matnr){ |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.WaitPakin; |
| | | import com.zy.asrs.entity.param.EmptyPlateOutParam; |
| | |
| | | return R.ok("移库启动成功"); |
| | | } |
| | | |
| | | @RequestMapping("/mat/turn/over/out/start") |
| | | @ManagerAuth(memo = "品号移交") |
| | | public R turnMatLocDetl(@RequestBody EmptyPlateOutParam param) { |
| | | if (Cools.isEmpty(param) || Cools.isEmpty(param.getLocDetls(),param.getMatId()) || Cools.isEmpty(param.getLocDetls().get(0)) || Cools.isEmpty(param.getLocDetls().get(0).getMatnr())){ |
| | | return R.error("参数为空"); |
| | | } |
| | | if (param.getLocDetls().size()>1){ |
| | | return R.error("请单条数据修改,谨慎操作!"); |
| | | } |
| | | workService.turnMatLocDetl(param, getUserId()); |
| | | return R.ok("品号移交成功"); |
| | | } |
| | | |
| | | @RequestMapping("/locDdetl/adjust/start") |
| | | @ManagerAuth(memo = "库存调整") |
| | | public R locDetlAdjustStart(@RequestBody LocDetlAdjustParam param) { |
| | |
| | | /** |
| | | * 商品编号 |
| | | */ |
| | | @ApiModelProperty(value= "商品编号") |
| | | @ApiModelProperty(value= "变更商品编号") |
| | | private String matnr; |
| | | |
| | | /** |
| | | * 商品编号 |
| | | */ |
| | | @ApiModelProperty(value= "商品编号") |
| | | @TableField("matnr_old") |
| | | private String matnrOld; |
| | | |
| | | /** |
| | | * 批号 |
| | | */ |
| | | @ApiModelProperty(value= "批号") |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/6/13 |
| | | */ |
| | | @Data |
| | | public class EmptyPlateOutParam { |
| | | |
| | | // 出站口 |
| | |
| | | // 库位号集合 |
| | | private List<String> locNos; |
| | | |
| | | // 物料编号集合 |
| | | private List<EmptyPlateOutParam.LocDetl> locDetls; |
| | | |
| | | @Data |
| | | public static class LocDetl { |
| | | |
| | | // 商品id |
| | | private Integer matId; |
| | | |
| | | // 商品编号 |
| | | private String matnr; |
| | | |
| | | // 商品编号 |
| | | private String maktx; |
| | | |
| | | // 商品编号 |
| | | private String specs; |
| | | |
| | | // 序列码 |
| | | private String batch; |
| | | |
| | | // 数量 |
| | | private Double count; |
| | | |
| | | // 订单 |
| | | private String orderNo; |
| | | |
| | | // 翻包 |
| | | private String memo; |
| | | |
| | | } |
| | | |
| | | public Integer getOutSite() { |
| | | return outSite; |
| | | } |
| | |
| | | |
| | | Double selectLocDetlSumQty(String locNo); |
| | | |
| | | void updateMatTurn(@Param("matnrOld")String matnrOld,@Param("matnr")String matnr); |
| | | |
| | | } |
| | |
| | | List<LocDetl> unreason(); |
| | | |
| | | Double getLocDetlSumQty(String locNo); |
| | | |
| | | void updateMatTurn(String matnrOld,String matnr); |
| | | } |
| | |
| | | */ |
| | | String dealPreHaveStart(Integer wrkNo, Long userId); |
| | | |
| | | void turnMatLocDetl(EmptyPlateOutParam param, Long userId); |
| | | |
| | | } |
| | |
| | | public Double getLocDetlSumQty(String locNo) { |
| | | return this.baseMapper.selectLocDetlSumQty(locNo); |
| | | } |
| | | |
| | | @Override |
| | | public void updateMatTurn(String matnrOld,String matnr){ |
| | | this.baseMapper.updateMatTurn(matnrOld,matnr); |
| | | } |
| | | } |
| | |
| | | return targetLoc.getLocNo(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void turnMatLocDetl(EmptyPlateOutParam param, Long userId) { |
| | | Mat mat = matService.selectOne(new EntityWrapper<Mat>().eq("id", param.getMatId())); |
| | | if (Cools.isEmpty(mat)){ |
| | | throw new CoolException("目标库位商品编码有误!"); |
| | | } |
| | | locDetlService.updateMatTurn(param.getLocDetls().get(0).getMatnr(),mat.getMatnr()); |
| | | } |
| | | |
| | | } |
| | |
| | | <id column="adj_id" property="adjId" /> |
| | | <result column="loc_no" property="locNo" /> |
| | | <result column="matnr" property="matnr" /> |
| | | <result column="matnr_old" property="matnrOld" /> |
| | | <result column="batch" property="batch" /> |
| | | <result column="ori_ctns" property="oriCtns" /> |
| | | <result column="ori_qty" property="oriQty" /> |
| | |
| | | where loc_no=#{locNo} |
| | | </select> |
| | | |
| | | <update id="updateMatTurn"> |
| | | UPDATE a |
| | | SET a.matnr=b.matnr, |
| | | a.specs=b.specs, |
| | | a.maktx=b.maktx, |
| | | a.unit=b.unit |
| | | FROM asr_loc_detl a |
| | | INNER JOIN man_mat b ON a.matnr=#{matnrOld} AND b.matnr=#{matnr}; |
| | | </update> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | // ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} |
| | | // {field: 'adjId', align: 'center',title: '序号'} |
| | | {field: 'locNo', align: 'center',title: '库位号'} |
| | | ,{field: 'matnr', align: 'center',title: '商品编号'} |
| | | ,{field: 'matnrOld', align: 'center',title: '原品号'} |
| | | ,{field: 'matnr', align: 'center',title: '当前品号'} |
| | | ,{field: 'batch', align: 'center',title: '批号'} |
| | | // ,{field: 'oriCtns', align: 'center',title: '原箱数'} |
| | | ,{field: 'oriQty', align: 'center',title: '原数量'} |
| | |
| | | } |
| | | }); |
| | | |
| | | // 页面修改 |
| | | table.on('edit(chooseData)', function (obj) { |
| | | let index = obj.tr.attr("data-index"); |
| | | let data = locDetlData[index]; |
| | | let modify = true; |
| | | if (obj.field === 'count'){ |
| | | let vle = Number(obj.value); |
| | | if (isNaN(vle)) { |
| | | layer.msg("请输入数字", {icon: 2}); |
| | | modify = false; |
| | | } else { |
| | | if (vle <= 0) { |
| | | layer.msg("数量必须大于零", {icon: 2}); |
| | | modify = false; |
| | | } |
| | | if (vle > Number(data.anfme)) { |
| | | layer.msg("出库数量不得大于库存数量", {icon: 2}); |
| | | modify = false; |
| | | } |
| | | } |
| | | } |
| | | if (modify) { |
| | | data[obj.field] = obj.value; |
| | | } |
| | | tableIns.reload({data: locDetlData}); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(chooseData)', function (obj) { |
| | | switch (obj.event) { |
| | |
| | | matId: staNo, |
| | | locDetls: locDetlData |
| | | } |
| | | console.log(param) |
| | | $.ajax({ |
| | | url: baseUrl+"/mat/turn/over/out/start", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="matnr" placeholder="商品" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="matnr" placeholder="当前品号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="matnr_old" placeholder="原品号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |