| | |
| | | } |
| | | |
| | | @RequestMapping("/plaDetl/packin/v1") |
| | | @ManagerAuth(memo="pla入库") |
| | | //@ManagerAuth(memo="pla入库") |
| | | public R plaPackIn(@RequestBody JSONObject json){ |
| | | String locNo = json.get("locNo").toString(); |
| | | String batch = json.get("batch").toString(); |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.ManLocDetl; |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.mapper.PakoutMapper; |
| | | import com.zy.asrs.entity.Pakout; |
| | | import com.zy.asrs.service.*; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.GlobleParameter; |
| | | import com.zy.asrs.mapper.PakoutMapper; |
| | | import com.zy.asrs.service.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Service("pakoutService") |
| | |
| | | |
| | | @Autowired |
| | | private ManLocDetlService manLocDetlService; |
| | | |
| | | @Autowired |
| | | private PlaService plaService; |
| | | |
| | | @Autowired |
| | | private PlaQtyService plaQtyService; |
| | | |
| | | @Override |
| | | public void deletePakout(String docNum) { |
| | |
| | | throw new RuntimeException("订单明细批量更新失败"); |
| | | } |
| | | |
| | | List<Pakout> pakouts = selectList(new EntityWrapper<Pakout>().eq("doc_num", docNum)); |
| | | List<Pakout> pakouts = selectList(new EntityWrapper<Pakout>().eq("doc_num", docNum)); |
| | | for (Pakout pakout: pakouts){ |
| | | ManLocDetl manLocDetl = manLocDetlService.selectOne(new EntityWrapper<ManLocDetl>() |
| | | .eq("loc_no", pakout.getLocNo()) |
| | | .eq("matnr", pakout.getMatnr())); |
| | | manLocDetl.setStatus(1); |
| | | if (!manLocDetlService.update(manLocDetl,new EntityWrapper<ManLocDetl>() |
| | | .eq("loc_no", pakout.getLocNo()) |
| | | .eq("matnr", pakout.getMatnr()))){ |
| | | throw new RuntimeException("库存状态更新失败"); |
| | | |
| | | Pla pla = plaService.selectByBatchAndPackageNo(pakout.getBatch(), pakout.getBarcode()); |
| | | if(!Cools.isEmpty(pla)){ |
| | | pla.setQtyAnfme(pla.getQtyAnfme() - pakout.getAnfme()); |
| | | pla.setModifyTime(new Date()); |
| | | if(pla.getQtyAnfme() <= 0){ |
| | | pla.setStatus(GlobleParameter.PLA_STATUS_1); |
| | | } |
| | | plaService.updateById(pla); |
| | | plaQtyService.deleteById(pakout.getNodeId()); |
| | | |
| | | }else { |
| | | ManLocDetl manLocDetl = manLocDetlService.selectOne(new EntityWrapper<ManLocDetl>() |
| | | .eq("loc_no", pakout.getLocNo()) |
| | | .eq("matnr", pakout.getMatnr())); |
| | | manLocDetl.setStatus(1); |
| | | if (!manLocDetlService.update(manLocDetl,new EntityWrapper<ManLocDetl>() |
| | | .eq("loc_no", pakout.getLocNo()) |
| | | .eq("matnr", pakout.getMatnr()))){ |
| | | throw new RuntimeException("库存状态更新失败"); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | ,{field: 'qtyAnfme', align: 'center',title: '待出库重量(KG)',hide:true} |
| | | ,{field: 'status', align: 'center',title: '状态', templet: setState ,edit:true} |
| | | ,{align: 'center', title: '流转明细', toolbar: '#tbLook'} |
| | | ,{field: 'orderNo', align: 'center',title: '单号', hide:true} |
| | | ,{field: 'pakoutTime', align: 'center',title: '出库时间', hide:true} |
| | | ,{field: 'orderWeight', align: 'center',title: '重量', hide:true} |
| | | ,{field: 'handlerBy', align: 'center',title: '经办人', hide:true} |
| | | ,{field: 'transfer', align: 'center',title: '流转形式', hide:true} |
| | | ,{field: 'customer', align: 'center',title: '客户名称', hide:true} |
| | | ,{field: 'allocate', align: 'center',title: '调拨到', hide:true} |
| | | ,{field: 'memo', align: 'center',title: '备注', hide:true} |
| | | // ,{field: 'orderNo', align: 'center',title: '单号', hide:true} |
| | | // ,{field: 'pakoutTime', align: 'center',title: '出库时间', hide:true} |
| | | // ,{field: 'orderWeight', align: 'center',title: '重量', hide:true} |
| | | // ,{field: 'handlerBy', align: 'center',title: '经办人', hide:true} |
| | | // ,{field: 'transfer', align: 'center',title: '流转形式', hide:true} |
| | | // ,{field: 'customer', align: 'center',title: '客户名称', hide:true} |
| | | // ,{field: 'allocate', align: 'center',title: '调拨到', hide:true} |
| | | // ,{field: 'memo', align: 'center',title: '备注', hide:true} |
| | | ]; |
| | | return cols; |
| | | } |
| | |
| | | <a class="list fn_1 moveUpDownFla1" ew-href="order/order.html?resourceId=40517"> |
| | | <p>单据管理</p> |
| | | </a> |
| | | <a class="list fn_2 moveUpDownFla2" ew-href="wrkMast/wrkMast.html?resourceId=214"> |
| | | <p>运行任务</p> |
| | | <a class="list fn_2 moveUpDownFla2" ew-href="pla/plaDetl.html?resourceId=214"> |
| | | <p>聚乳酸明细管理</p> |
| | | </a> |
| | | <a class="list fn_3 moveUpDownFla1" ew-href="stoMan/stoQue.html?resourceId=10276"> |
| | | <p>库存明细</p> |
| | | <a class="list fn_3 moveUpDownFla1" ew-href="picking/picking.html?resourceId=10276"> |
| | | <p>拣料单管理</p> |
| | | </a> |
| | | </div> |
| | | |