src/main/java/com/zy/asrs/controller/MobileController.java
@@ -219,6 +219,25 @@ return R.ok("组托成功"); } @RequestMapping("/getMatInfoByBarcode/auth") @ManagerAuth(memo = "根据条码获取物料信息") public R getMatInfoByBarcode(@RequestBody CombParam combParam){ String barcode = combParam.getBarcode(); if(Cools.isEmpty(barcode)) { return R.error("条码不能为空"); } return mobileService.getMatInfoByBarcode(barcode); } @RequestMapping("/barcodeComb/auth") // @ManagerAuth(memo = "创建组拖") public R barcodeComb(@RequestBody BarcodeCombParam combParam){ if(Cools.isEmpty(combParam,combParam.getBarcode(),combParam.getCombMats().get(0).getMatnr())) { return R.error("条码和商品编码不能为空"); } return mobileService.barcodeComb(combParam); } @RequestMapping("/pack/get/auth") @ManagerAuth public R packGet(@RequestParam String barcode){ src/main/java/com/zy/asrs/controller/OutController.java
@@ -5,11 +5,14 @@ import com.core.common.BaseRes; import com.core.common.Cools; import com.core.common.R; import com.core.exception.CoolException; import com.zy.asrs.entity.*; import com.zy.asrs.service.*; import com.zy.common.model.LocDto; import com.zy.common.model.TaskDto; import com.zy.common.web.BaseController; import com.zy.system.entity.Config; import com.zy.system.service.ConfigService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -46,6 +49,9 @@ @Resource private OrderPakoutService orderPakOutService; @Resource private ConfigService configService; @PostMapping("/out/pakout/orderDetlIds/auth") @@ -217,6 +223,16 @@ // ----------------------------------------------------------------------------------------------- for (TaskDto taskDto : taskDtos) { BasDevp staNo = basDevpService.checkSiteStatus(taskDto.getStaNo()); // 判断任务目标站点是否是出库模式 if (staNo.getDevNo() == 1016 || staNo.getDevNo() == 1043) { Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "inOrOutBoundMode").eq("status", 1)); if (config != null && !Cools.isEmpty(config.getValue())) { int value = Integer.parseInt(config.getValue()); if (value != 2) { throw new CoolException("目标站点" + staNo.getDevNo() + "不是出库模式,当前模式为:" + value); } } } workService.stockOut(staNo, taskDto, getUserId()); } return R.ok(); src/main/java/com/zy/asrs/entity/WaitPakin.java
@@ -93,7 +93,8 @@ private Double weight; @ApiModelProperty(value= "长度") private Double man_length; @TableField("man_length") private Double manLength; @ApiModelProperty(value= "体积") private Double volume; src/main/java/com/zy/asrs/entity/param/BarcodeCombParam.java
New file @@ -0,0 +1,49 @@ package com.zy.asrs.entity.param; import lombok.Data; import java.util.List; /** * 条码组拖 */ @Data public class BarcodeCombParam { // 托盘条码 private String barcode; private List<CombMat> combMats; @Data public static class CombMat { // 商品编码 private String matnr; // 商品名称 private String maktx; // 批次 private String batch; // 桶型 private String model; // 数量 private Double anfme; // 生产日期 private String manuDate; // 净重 private Double weight; // 毛重 private Double manLength; // 罐装量 private Double volume; } } src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java
@@ -1,9 +1,7 @@ package com.zy.asrs.entity.param; import com.core.common.Cools; import lombok.Data; import java.util.ArrayList; import java.util.List; /** @@ -30,33 +28,43 @@ // 变更数量 private Double count; public LocDetlAdjust(String matnr, String batch, Double count) { this.matnr = matnr; this.batch = batch; this.count = count; } private String zpallet; private String model; private String manuDate; private Double weight; private Double manLength; private Double volume; // public LocDetlAdjust(String matnr, String batch, Double count) { // this.matnr = matnr; // this.batch = batch; // this.count = count; // } } public void integrate() { if (Cools.isEmpty(list)) { return; } List<LocDetlAdjust> copyList = new ArrayList<>(); for (LocDetlAdjust adjust : list) { boolean exit = false; for (LocDetlAdjust copy : copyList) { if (adjust.getMatnr().equals(copy.getMatnr()) && Cools.eq(adjust.getBatch(), copy.getBatch())) { copy.setCount(copy.getCount() + adjust.getCount()); exit = true; break; } } if (!exit) { copyList.add(new LocDetlAdjustParam.LocDetlAdjust(adjust.getMatnr(), adjust.getBatch(), adjust.getCount())); } } list = copyList; } // public void integrate() { // if (Cools.isEmpty(list)) { // return; // } // List<LocDetlAdjust> copyList = new ArrayList<>(); // for (LocDetlAdjust adjust : list) { // boolean exit = false; // for (LocDetlAdjust copy : copyList) { // if (adjust.getMatnr().equals(copy.getMatnr()) && Cools.eq(adjust.getBatch(), copy.getBatch())) { // copy.setCount(copy.getCount() + adjust.getCount()); // exit = true; // break; // } // } // if (!exit) { // copyList.add(new LocDetlAdjustParam.LocDetlAdjust(adjust.getMatnr(), adjust.getBatch(), adjust.getCount())); // } // } // list = copyList; // } } src/main/java/com/zy/asrs/service/MobileService.java
@@ -67,4 +67,16 @@ void stockOut(OrderDetl orderDetl, BasDevp staNo, LocDetl locDetl, Double curOutQty, Integer ioType, Long userId, Date now); /** * 根据条码获取上一次出库物料信息 * @param barcode 条码 * @return 物料信息 */ R getMatInfoByBarcode(String barcode); /** * 创建组拖通知档案 */ R barcodeComb(BarcodeCombParam combParam); } src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -96,6 +96,9 @@ @Resource private OrderDetlPakoutService orderDetlPakoutService; @Resource private WrkDetlLogService wrkDetlLogService; @Override @Transactional public R WarehouseOutPickMergeV1(WarehouseOutPickMergeParam param, Long hostId, Long userId) { @@ -1111,4 +1114,47 @@ throw new CoolException(locDetl.getLocNo() + "库位不是在库状态"); } } @Override public R getMatInfoByBarcode(String barcode) { WrkDetlLog wrkDetl = wrkDetlLogService.selectOne(new EntityWrapper<WrkDetlLog>().eq("zpallet", barcode).orderBy("io_time", false)); if(wrkDetl == null) { return R.parse("该条码没有查询到物料信息"); } return R.ok(wrkDetl); } @Override public R barcodeComb(BarcodeCombParam combParams) { String barcode = combParams.getBarcode(); BarcodeCombParam.CombMat combParam = combParams.getCombMats().get(0); String matnr = combParam.getMatnr(); int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet",barcode)); int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",barcode)); int countwait = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet",barcode)); if (countLoc > 0 || countWrk > 0 || countwait > 0) { throw new CoolException("组托档/工作档/库存条码数据已存在===>>" + barcode); } Mat mat = matService.selectByMatnr(matnr); if (Cools.isEmpty(mat)) { throw new CoolException(matnr + "商品档案不存在"); } Date now = new Date(); WaitPakin waitPakin = new WaitPakin(); waitPakin.sync(combParam); waitPakin.setZpallet(barcode); // 托盘码 waitPakin.setIoStatus("N"); // 入出状态 waitPakin.setStatus("Y"); // 状态 waitPakin.setDanger(1); // 手动组拖入库 // waitPakin.setAppeUser(userId); waitPakin.setAppeTime(now); // waitPakin.setModiUser(userId); waitPakin.setModiTime(now); if (!waitPakinService.insert(waitPakin)) { throw new CoolException("保存入库通知档失败"); } return R.ok("组拖绑定成功"); } } src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -24,6 +24,8 @@ import com.zy.common.properties.SlaveProperties; import com.zy.common.service.CommonService; import com.zy.common.web.WcsController; import com.zy.system.entity.Config; import com.zy.system.service.ConfigService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -97,6 +99,9 @@ @Resource private OrderDetlPakoutMapper orderDetlPakoutMapper; @Resource private ConfigService configService; @Override @Transactional @@ -184,6 +189,16 @@ public void startupFullTakeStore(StockOutParam param, Long userId) { // 目标站点状态检测 BasDevp staNo = basDevpService.checkSiteStatus(param.getOutSite()); // 判断任务目标站点是否是出库模式 if (param.getOutSite() == 1016 || param.getOutSite() == 1043) { Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "inOrOutBoundMode").eq("status", 1)); if (config != null && !Cools.isEmpty(config.getValue())) { int value = Integer.parseInt(config.getValue()); if (value != 2) { throw new CoolException("目标站点" + param.getOutSite() + "不是出库模式,当前模式为:" + value); } } } // 获取库位明细 List<LocDetlDto> locDetlDtos = new ArrayList<>(); for (StockOutParam.LocDetl paramLocDetl : param.getLocDetls()) { @@ -897,7 +912,7 @@ wrkMast.setCrnNo(locMast.getCrnNo()); wrkMast.setSourceLocNo(locMast.getLocNo()); wrkMast.setLocNo(locMast.getLocNo()); wrkMast.setBarcode(locMast.getBarcode()); // 托盘码 wrkMast.setBarcode(list.get(0).getZpallet()); // 托盘码 wrkMast.setFullPlt("Y"); // 满板:Y wrkMast.setPicking("N"); // 拣料 wrkMast.setExitMk("N"); // 退出 @@ -914,6 +929,10 @@ boolean deleteFlag = true; boolean addFlag = true; // 库位状态是空,则添加 // 库位状态在库,有提交数据,则修改 // 库位状态在库,没有提交数据,则删除 // 修改数量 Iterator<LocDetl> iterator = locDetls.iterator(); while (iterator.hasNext()) { @@ -924,13 +943,20 @@ LocDetlAdjustParam.LocDetlAdjust adjust = iterator1.next(); if (adjust.getCount() == 0) { continue; } if (locDetl.getMatnr().equals(adjust.getMatnr()) && Cools.eq(locDetl.getBatch(), adjust.getBatch())) { if (!locDetl.getAnfme().equals(adjust.getCount())) { // todo 盘点记录 // 修改库存 if (!locDetlService.updateAnfme(adjust.getCount(), locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch(),locDetl.getBrand(), locDetl.getStandby1(),locDetl.getStandby2(),locDetl.getStandby3(),locDetl.getBoxType1(),locDetl.getBoxType2(),locDetl.getBoxType3())) { throw new CoolException(locDetl.getLocNo() + "库位," + locDetl.getMatnr() + "商品," + locDetl.getBatch() + "批号修改数量失败"); } // if (!locDetlService.updateAnfme(adjust.getCount(), locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch(),locDetl.getBrand(), // locDetl.getStandby1(),locDetl.getStandby2(),locDetl.getStandby3(),locDetl.getBoxType1(),locDetl.getBoxType2(),locDetl.getBoxType3())) { // throw new CoolException(locDetl.getLocNo() + "库位," + locDetl.getMatnr() + "商品," + locDetl.getBatch() + "批号修改数量失败"); // } locDetl.setAnfme(adjust.getCount()); locDetl.setZpallet(adjust.getZpallet()); locDetl.setModel(adjust.getModel()); locDetl.setManuDate(adjust.getManuDate()); locDetl.setWeight(adjust.getWeight()); locDetl.setManLength(adjust.getManLength()); locDetl.setVolume(adjust.getVolume()); locDetlService.update(locDetl,new EntityWrapper<LocDetl>().eq("loc_no",locDetl.getLocNo()).eq("matnr",locDetl.getMatnr()).eq("batch",locDetl.getBatch())); // 保存调整记录 AdjDetl adjDetl = new AdjDetl(); adjDetl.setLocNo(locDetl.getLocNo()); @@ -960,13 +986,19 @@ wrkDetl.setWrkNo(wrkMast.getWrkNo()); wrkDetl.setIoTime(wrkMast.getIoTime()); wrkDetl.setAnfme(adjust.getCount()); wrkDetl.setAnfme(adjust.getCount()); wrkDetl.setZpallet(adjust.getZpallet()); wrkDetl.setModel(adjust.getModel()); wrkDetl.setManuDate(adjust.getManuDate()); wrkDetl.setWeight(adjust.getWeight()); wrkDetl.setManLength(adjust.getManLength()); wrkDetl.setVolume(adjust.getVolume()); wrkDetl.setAppeTime(now); wrkDetl.setModiTime(now); wrkMast.setAppeUser(userId); wrkMast.setModiUser(userId); if (!wrkDetlLogService.insert(wrkDetl)) { throw new CoolException("保存工作明细失败"); } } iterator.remove(); iterator1.remove(); @@ -1027,8 +1059,13 @@ locDetl.sync(mat); locDetl.setBatch(adjust.getBatch()); locDetl.setLocNo(locMast.getLocNo()); locDetl.setZpallet(locMast.getBarcode()); locDetl.setZpallet(adjust.getZpallet()); locDetl.setAnfme(adjust.getCount()); // 数量 locDetl.setModel(adjust.getModel()); locDetl.setManuDate(adjust.getManuDate()); locDetl.setWeight(adjust.getWeight()); locDetl.setManLength(adjust.getManLength()); locDetl.setVolume(adjust.getVolume()); locDetl.setModiUser(userId); // 操作人员信息 locDetl.setModiTime(now); locDetl.setAppeUser(userId); @@ -1077,12 +1114,15 @@ int count = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("loc_no", locMast.getLocNo())); if (locMast.getLocSts().equals("F")) { if (count == 0) { locMast.setLocSts("D"); locMast.setLocSts("O"); } else { locMast.setBarcode(wrkMast.getBarcode()); } } if (locMast.getLocSts().equals("D") || locMast.getLocSts().equals("O")) { if (count > 0) { locMast.setLocSts("F"); locMast.setBarcode(wrkMast.getBarcode()); } } locMast.setModiUser(userId); @@ -1103,7 +1143,52 @@ } String locNo = ""; // 待修改目标库位 String locSts = ""; // 待修改目标库位状态 Long wrkSts = wrkMast.getWrkSts(); Integer ioType = wrkMast.getIoType(); // 任务完成,无法取消 if(wrkSts == 4 || wrkSts == 5 || wrkSts == 14 || wrkSts == 15 || wrkSts == 54) { throw new CoolException(workNo+"任务已完成,无法取消"); } if(ioType == 101 || ioType == 110) { if(wrkSts == 11 || wrkSts == 12) { } else { throw new CoolException(workNo+"库存信息已更新,无法取消"); } } // 入库取消(修改目标库位) // if(ioType == 1 || ioType == 10) { // if(wrkSts == 1 || wrkSts == 2|| wrkSts == 3 || wrkSts == 9 || wrkSts == 10) { // locNo = wrkMast.getLocNo(); // locSts = "O"; // } else { // throw new CoolException(workNo+"取消失败,当前状态:" + wrkSts); // } // } else if(ioType == 11){ // if(wrkSts <= 10) { // locNo = wrkMast.getLocNo(); // locSts = "O"; // // 库位转移:源库位 // LocMast locMast = locMastService.selectById(wrkMast.getSourceLocNo()); // if (Cools.isEmpty(locMast)) { // throw new CoolException("取消库位转移失败,源库位不存在:"+ wrkMast.getSourceLocNo()); // } // locMast.setLocSts(wrkMast.getFullPlt().equalsIgnoreCase("N")?wrkMast.getEmptyMk():"F"); // locMast.setModiTime(now); // locMast.setModiUser(userId); // locMastService.updateById(locMast); // } else { // throw new CoolException(workNo+"取消失败,当前状态:" + wrkSts); // } // } else if(ioType == 3) { // // } else if(ioType == 101) { // // } else if(ioType == 110) { // // } if (wrkMast.getWrkSts() <= 10 && wrkMast.getIoType()!=120) { locNo = wrkMast.getLocNo(); locSts = "O"; @@ -1135,7 +1220,7 @@ locSts = "F"; // 空板出库 ===>> D.空桶/空栈板 } else if (wrkMast.getIoType() == 11) { locSts = wrkMast.getFullPlt().equalsIgnoreCase("N")?"D":"F"; locSts = wrkMast.getFullPlt().equalsIgnoreCase("N")?wrkMast.getEmptyMk():"F"; // 库位转移:目标库位 LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); if (Cools.isEmpty(locMast)) { src/main/java/com/zy/asrs/task/MdqzScheduler.java
@@ -2,7 +2,11 @@ import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.core.common.Cools; import com.zy.asrs.entity.LocMast; import com.zy.asrs.entity.WrkDetl; import com.zy.asrs.entity.WrkMast; import com.zy.asrs.service.LocMastService; import com.zy.asrs.service.WrkDetlService; import com.zy.asrs.service.WrkMastService; import com.zy.system.entity.Config; import com.zy.system.service.ConfigService; @@ -11,6 +15,8 @@ import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.util.*; import java.util.stream.Collectors; /** * @author pang.jiabao @@ -27,15 +33,60 @@ @Resource private WrkMastService wrkMastService; @Resource private LocMastService locMastService; @Resource private WrkDetlService wrkDetlService; // 读补尾桶配置,给对应任务号补尾桶信号--替换为入库寻找库位时,发现前面类型不一样单着,自动补尾桶 @Scheduled(cron = "0/5 * * * * ?") private void tailFillingBuckets() { Config config = configService.selectConfigByCode("tailFillingBuckets"); if (config != null && config.getStatus() == 1 && !Cools.isEmpty(config.getValue())) { WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", config.getValue())); if (wrkMast != null && wrkMast.getCtnType() == 0) { wrkMast.setCtnType(1); Integer wrkNo = wrkMast.getWrkNo(); // 取新库位组的第一个库位 List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("crn_no", 4).eq("loc_sts", "O")); List<LocMast> collect = locMasts.stream().filter(locMast1 -> locMast1.getRow1() == 9 || locMast1.getRow1() == 11).collect(Collectors.toList()); List<LocMast> collect1 = locMasts.stream().filter(locMast1 -> locMast1.getRow1() == 10 || locMast1.getRow1() == 12).collect(Collectors.toList()); // 第一个先放这两排 if (collect.size() <= 0 && collect1.size() <= 0) { log.error("站点:{},任务号{}:入库空桶库无空库位",1050,wrkNo); return; } // 可用库位组 List<LocMast> locMastList = new ArrayList<>(); for(LocMast locMast1:collect) { Optional<LocMast> first = collect1.stream().filter(locMast2 -> locMast1.getRow1() + 1 == locMast2.getRow1() && Objects.equals(locMast1.getLev1(), locMast2.getLev1()) && Objects.equals(locMast1.getBay1(), locMast2.getBay1())).findFirst(); first.ifPresent(locMastList::add); } if (locMastList.size() == 0) { log.error("站点:{},任务号{}:入库空桶库无对应空空桶组",1050,wrkNo); return; } WrkDetl wrkDetl = wrkDetlService.selectOne(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkNo)); if (wrkDetl.getModel().equals("208L") && locMastList.size() <= 40 * 2 * 2) { // 最上面一层只能放208L,库位剩余量不多时,如果是208L桶入库,则先从最顶层放 locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).reversed().thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); } else { locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); } LocMast locMast = locMastList.get(0); wrkMast.setLocNo(locMast.getLocNo()); wrkMast.setCtnType(1); // 尾托标识 wrkMastService.updateById(wrkMast); if (locMast.getLocSts().equals("O")){ locMast.setLocSts("S"); // S.入库预约 locMast.setModiTime(new Date()); if (!locMastService.updateById(locMast)){ log.error("站点:{},任务号{}:改变库位{}状态{}失败",1050,wrkNo,locMast.getLocNo(),locMast.getLocSts()); } } else { log.error("站点:{},任务号{}:目标库位:{}已被占用",1050,wrkNo,locMast.getLocNo()); } } } } src/main/java/com/zy/common/service/CommonService.java
@@ -185,162 +185,165 @@ throw new CoolException("入空桶库输送线缓存任务数:"+count+",超配置缓存数:" + value); } } locMast = new LocMast(); locMast.setCrnNo(4); locMast.setLocNo(""); List<WrkMast> wrkMastList = wrkMastMapper.selectLastInEmptyLoc(); // 前面入空桶库的任务(未执行堆垛机入库) if (wrkMastList.size() == 0) { // if (wrkMastList.size() == 0) { // 取新库位组的第一个库位 List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("crn_no", 4).eq("loc_sts", "O")); List<LocMast> collect = locMasts.stream().filter(locMast1 -> locMast1.getRow1() == 9 || locMast1.getRow1() == 11).collect(Collectors.toList()); List<LocMast> collect1 = locMasts.stream().filter(locMast1 -> locMast1.getRow1() == 10 || locMast1.getRow1() == 12).collect(Collectors.toList()); // 第一个先放这两排 if (collect.size() == 0 || collect1.size() == 0) { if (collect.size() - wrkMastList.size() <= 0 && collect1.size() - wrkMastList.size() <= 0) { log.error("-----空桶库无空库位----"); throw new CoolException("空桶库无空库位"); } // 可用库位组 List<LocMast> locMastList = new ArrayList<>(); for(LocMast locMast1:collect) { Optional<LocMast> first = collect1.stream().filter(locMast2 -> locMast1.getRow1() + 1 == locMast2.getRow1() && Objects.equals(locMast1.getLev1(), locMast2.getLev1()) && Objects.equals(locMast1.getBay1(), locMast2.getBay1())).findFirst(); first.ifPresent(locMastList::add); } if (locMastList.size() == 0) { log.error("-----空桶库无对应空空桶组----"); throw new CoolException("空桶库无对应空空桶组"); } String model = findLocNoAttributeVo.getModel(); // 当前桶类型 if (model.equals("208L") && locMastList.size() <= 40 * 2 * 2) { // 最上面一层只能放208L,库位剩余量不多时,如果是208L桶入库,则先从最顶层放 locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).reversed().thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); } else { locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); } locMast = locMastList.get(0); } else { WrkMast wrkMast = wrkMastList.get(0); // 最后一个入空桶库任务 // 前一个任务桶类型 String oldModel = wrkMast.getPdcType(); // 前一个任务尾托标识 Integer oldCtnType = wrkMast.getCtnType(); // 当前桶类型 String matnr = findLocNoAttributeVo.getMatnr(); if(findLocNoAttributeVo.getMatnr().equals(wrkMast.getPdcType())) { // 当前桶与前桶是一种类型 // 当前桶类型的任务有几个 long count = wrkMastList.stream().filter(wrkMast1 -> wrkMast1.getPdcType().equals(matnr)).count(); if (count % 2 == 0) { // 偶数,取一组新库位 // 取新库位组的第一个库位 List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("crn_no", 4).eq("loc_sts", "O")); List<LocMast> collect = locMasts.stream().filter(locMast1 -> locMast1.getRow1() == 9 || locMast1.getRow1() == 11).collect(Collectors.toList()); List<LocMast> collect1 = locMasts.stream().filter(locMast1 -> locMast1.getRow1() == 10 || locMast1.getRow1() == 12).collect(Collectors.toList()); // 第一个先放这两排 if (collect.size() == 0 || collect1.size() == 0) { log.error("-----空桶库无空库位----"); throw new CoolException("空桶库无空库位"); } // 可用库位组 List<LocMast> locMastList = new ArrayList<>(); for(LocMast locMast1:collect) { Optional<LocMast> first = collect1.stream().filter(locMast2 -> locMast1.getRow1() + 1 == locMast2.getRow1() && Objects.equals(locMast1.getLev1(), locMast2.getLev1()) && Objects.equals(locMast1.getBay1(), locMast2.getBay1())).findFirst(); first.ifPresent(locMastList::add); } if (locMastList.size() == 0) { log.error("-----空桶库无对应空空桶组----"); throw new CoolException("空桶库无对应空空桶组"); } String model = findLocNoAttributeVo.getModel(); // 当前桶类型 if (model.equals("208L") && locMastList.size() <= 40 * 2 * 2) { // 最上面一层只能放208L,库位剩余量不多时,如果是208L桶入库,则先从最顶层放 locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).reversed().thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); } else { locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); } locMast = locMastList.get(0); } else { // 奇数,取前一库位对应的空库位 String locNo = wrkMast.getLocNo(); int row = Integer.parseInt(locNo.substring(0, 2)); if(row == 10 || row == 12) { String newLocNo =(row == 10 ? "09" : "11") + locNo.substring(2); locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", newLocNo).eq("loc_sts","O")); if (locMast == null) { log.error("-----与前面桶类型一样,前面该桶类型任务数是奇数,10,12排,但是对应库位不为空----"); throw new CoolException("与前面桶类型一样,前面该桶类型任务数是奇数,是10,12排,但是对应库位不为空"); } } else { // 自动给前面任务补尾桶信号 wrkMastService.updateCtnType(wrkMast); log.error("-----与前面桶类型一样,前面该桶类型任务数是奇数,但是不是10,12排----"); throw new CoolException("与前面桶类型一样,前面该桶类型任务数是奇数,但是不是10,12排"); } } } else { // 当前桶与前桶不是一种类型 if(oldCtnType == 1) { // 前面是尾桶 // 取新库位组的第一个库位 List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("crn_no", 4).eq("loc_sts", "O")); List<LocMast> collect = locMasts.stream().filter(locMast1 -> locMast1.getRow1() == 9 || locMast1.getRow1() == 11).collect(Collectors.toList()); List<LocMast> collect1 = locMasts.stream().filter(locMast1 -> locMast1.getRow1() == 10 || locMast1.getRow1() == 12).collect(Collectors.toList()); // 第一个先放这两排 if (collect.size() == 0 || collect1.size() == 0) { log.error("-----空桶库无空库位----"); throw new CoolException("空桶库无空库位"); } // 可用库位组 List<LocMast> locMastList = new ArrayList<>(); for(LocMast locMast1:collect) { Optional<LocMast> first = collect1.stream().filter(locMast2 -> locMast1.getRow1() + 1 == locMast2.getRow1() && Objects.equals(locMast1.getLev1(), locMast2.getLev1()) && Objects.equals(locMast1.getBay1(), locMast2.getBay1())).findFirst(); first.ifPresent(locMastList::add); } if (locMastList.size() == 0) { log.error("-----空桶库无对应空空桶组----"); throw new CoolException("空桶库无对应空空桶组"); } String model = findLocNoAttributeVo.getModel(); // 当前桶类型 if (model.equals("208L") && locMastList.size() <= 40 * 2 * 2) { // 最上面一层只能放208L,库位剩余量不多时,如果是208L桶入库,则先从最顶层放 locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).reversed().thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); } else { locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); } locMast = locMastList.get(0); } else { // 前面不是尾桶 // 判断前面入空桶库任务数量(未执行堆垛机入库) long count = wrkMastList.stream().filter(wrkMast1 -> wrkMast1.getPdcType().equals(oldModel)).count(); if (count % 2 == 0) { // 偶数,可以入库 // 取新库位组的第一个库位 List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("crn_no", 4).eq("loc_sts", "O")); List<LocMast> collect = locMasts.stream().filter(locMast1 -> locMast1.getRow1() == 9 || locMast1.getRow1() == 11).collect(Collectors.toList()); List<LocMast> collect1 = locMasts.stream().filter(locMast1 -> locMast1.getRow1() == 10 || locMast1.getRow1() == 12).collect(Collectors.toList()); // 第一个先放这两排 if (collect.size() == 0 || collect1.size() == 0) { log.error("-----空桶库无空库位----"); throw new CoolException("空桶库无空库位"); } // 可用库位组 List<LocMast> locMastList = new ArrayList<>(); for(LocMast locMast1:collect) { Optional<LocMast> first = collect1.stream().filter(locMast2 -> locMast1.getRow1() + 1 == locMast2.getRow1() && Objects.equals(locMast1.getLev1(), locMast2.getLev1()) && Objects.equals(locMast1.getBay1(), locMast2.getBay1())).findFirst(); first.ifPresent(locMastList::add); } if (locMastList.size() == 0) { log.error("-----空桶库无对应空空桶组----"); throw new CoolException("空桶库无对应空空桶组"); } String model = findLocNoAttributeVo.getModel(); // 当前桶类型 if (model.equals("208L") && locMastList.size() <= 40 * 2 * 2) { // 最上面一层只能放208L,库位剩余量不多时,如果是208L桶入库,则先从最顶层放 locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).reversed().thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); } else { locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); } locMast = locMastList.get(0); } else { // 奇数,不可以入库 // 自动给前面任务补尾桶信号 wrkMastService.updateCtnType(wrkMast); log.error("-----与前面桶类型不一样,前面桶不是尾桶,前面该桶类型任务数不是偶数,不能入库----"); throw new CoolException("与前面桶类型不一样,前面桶不是尾桶,前面该桶类型任务数不是偶数,不能入库"); } } } } // // 可用库位组 // List<LocMast> locMastList = new ArrayList<>(); // for(LocMast locMast1:collect) { // Optional<LocMast> first = collect1.stream().filter(locMast2 -> locMast1.getRow1() + 1 == locMast2.getRow1() && Objects.equals(locMast1.getLev1(), locMast2.getLev1()) // && Objects.equals(locMast1.getBay1(), locMast2.getBay1())).findFirst(); // first.ifPresent(locMastList::add); // } // // if (locMastList.size() == 0) { // log.error("-----空桶库无对应空空桶组----"); // throw new CoolException("空桶库无对应空空桶组"); // } // String model = findLocNoAttributeVo.getModel(); // 当前桶类型 // if (model.equals("208L") && locMastList.size() <= 40 * 2 * 2) { // 最上面一层只能放208L,库位剩余量不多时,如果是208L桶入库,则先从最顶层放 // locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).reversed().thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); // } else { // locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); // } // locMast = locMastList.get(0); // // } else { // WrkMast wrkMast = wrkMastList.get(0); // 最后一个入空桶库任务 // // 前一个任务桶类型 // String oldModel = wrkMast.getPdcType(); // // 前一个任务尾托标识 // Integer oldCtnType = wrkMast.getCtnType(); // // 当前桶类型 // String matnr = findLocNoAttributeVo.getMatnr(); // if(findLocNoAttributeVo.getMatnr().equals(wrkMast.getPdcType())) { // 当前桶与前桶是一种类型 // // 当前桶类型的任务有几个 // long count = wrkMastList.stream().filter(wrkMast1 -> wrkMast1.getPdcType().equals(matnr)).count(); // if (count % 2 == 0) { // 偶数,取一组新库位 // // 取新库位组的第一个库位 // List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("crn_no", 4).eq("loc_sts", "O")); // List<LocMast> collect = locMasts.stream().filter(locMast1 -> locMast1.getRow1() == 9 || locMast1.getRow1() == 11).collect(Collectors.toList()); // List<LocMast> collect1 = locMasts.stream().filter(locMast1 -> locMast1.getRow1() == 10 || locMast1.getRow1() == 12).collect(Collectors.toList()); // 第一个先放这两排 // if (collect.size() == 0 || collect1.size() == 0) { // log.error("-----空桶库无空库位----"); // throw new CoolException("空桶库无空库位"); // } // // 可用库位组 // List<LocMast> locMastList = new ArrayList<>(); // for(LocMast locMast1:collect) { // Optional<LocMast> first = collect1.stream().filter(locMast2 -> locMast1.getRow1() + 1 == locMast2.getRow1() && Objects.equals(locMast1.getLev1(), locMast2.getLev1()) // && Objects.equals(locMast1.getBay1(), locMast2.getBay1())).findFirst(); // first.ifPresent(locMastList::add); // } // // if (locMastList.size() == 0) { // log.error("-----空桶库无对应空空桶组----"); // throw new CoolException("空桶库无对应空空桶组"); // } // String model = findLocNoAttributeVo.getModel(); // 当前桶类型 // if (model.equals("208L") && locMastList.size() <= 40 * 2 * 2) { // 最上面一层只能放208L,库位剩余量不多时,如果是208L桶入库,则先从最顶层放 // locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).reversed().thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); // } else { // locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); // } // locMast = locMastList.get(0); // } else { // 奇数,取前一库位对应的空库位 // String locNo = wrkMast.getLocNo(); // int row = Integer.parseInt(locNo.substring(0, 2)); // if(row == 10 || row == 12) { // String newLocNo =(row == 10 ? "09" : "11") + locNo.substring(2); // locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", newLocNo).eq("loc_sts","O")); // if (locMast == null) { // log.error("-----与前面桶类型一样,前面该桶类型任务数是奇数,10,12排,但是对应库位不为空----"); // throw new CoolException("与前面桶类型一样,前面该桶类型任务数是奇数,是10,12排,但是对应库位不为空"); // } // } else { // // 自动给前面任务补尾桶信号 // wrkMastService.updateCtnType(wrkMast); // log.error("-----与前面桶类型一样,前面该桶类型任务数是奇数,但是不是10,12排----"); // throw new CoolException("与前面桶类型一样,前面该桶类型任务数是奇数,但是不是10,12排"); // } // } // } else { // 当前桶与前桶不是一种类型 // if(oldCtnType == 1) { // 前面是尾桶 // // 取新库位组的第一个库位 // List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("crn_no", 4).eq("loc_sts", "O")); // List<LocMast> collect = locMasts.stream().filter(locMast1 -> locMast1.getRow1() == 9 || locMast1.getRow1() == 11).collect(Collectors.toList()); // List<LocMast> collect1 = locMasts.stream().filter(locMast1 -> locMast1.getRow1() == 10 || locMast1.getRow1() == 12).collect(Collectors.toList()); // 第一个先放这两排 // if (collect.size() == 0 || collect1.size() == 0) { // log.error("-----空桶库无空库位----"); // throw new CoolException("空桶库无空库位"); // } // // 可用库位组 // List<LocMast> locMastList = new ArrayList<>(); // for(LocMast locMast1:collect) { // Optional<LocMast> first = collect1.stream().filter(locMast2 -> locMast1.getRow1() + 1 == locMast2.getRow1() && Objects.equals(locMast1.getLev1(), locMast2.getLev1()) // && Objects.equals(locMast1.getBay1(), locMast2.getBay1())).findFirst(); // first.ifPresent(locMastList::add); // } // // if (locMastList.size() == 0) { // log.error("-----空桶库无对应空空桶组----"); // throw new CoolException("空桶库无对应空空桶组"); // } // String model = findLocNoAttributeVo.getModel(); // 当前桶类型 // if (model.equals("208L") && locMastList.size() <= 40 * 2 * 2) { // 最上面一层只能放208L,库位剩余量不多时,如果是208L桶入库,则先从最顶层放 // locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).reversed().thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); // } else { // locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); // } // locMast = locMastList.get(0); // } else { // 前面不是尾桶 // // 判断前面入空桶库任务数量(未执行堆垛机入库) // long count = wrkMastList.stream().filter(wrkMast1 -> wrkMast1.getPdcType().equals(oldModel)).count(); // if (count % 2 == 0) { // 偶数,可以入库 // // 取新库位组的第一个库位 // List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("crn_no", 4).eq("loc_sts", "O")); // List<LocMast> collect = locMasts.stream().filter(locMast1 -> locMast1.getRow1() == 9 || locMast1.getRow1() == 11).collect(Collectors.toList()); // List<LocMast> collect1 = locMasts.stream().filter(locMast1 -> locMast1.getRow1() == 10 || locMast1.getRow1() == 12).collect(Collectors.toList()); // 第一个先放这两排 // if (collect.size() == 0 || collect1.size() == 0) { // log.error("-----空桶库无空库位----"); // throw new CoolException("空桶库无空库位"); // } // // 可用库位组 // List<LocMast> locMastList = new ArrayList<>(); // for(LocMast locMast1:collect) { // Optional<LocMast> first = collect1.stream().filter(locMast2 -> locMast1.getRow1() + 1 == locMast2.getRow1() && Objects.equals(locMast1.getLev1(), locMast2.getLev1()) // && Objects.equals(locMast1.getBay1(), locMast2.getBay1())).findFirst(); // first.ifPresent(locMastList::add); // } // // if (locMastList.size() == 0) { // log.error("-----空桶库无对应空空桶组----"); // throw new CoolException("空桶库无对应空空桶组"); // } // String model = findLocNoAttributeVo.getModel(); // 当前桶类型 // if (model.equals("208L") && locMastList.size() <= 40 * 2 * 2) { // 最上面一层只能放208L,库位剩余量不多时,如果是208L桶入库,则先从最顶层放 // locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).reversed().thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); // } else { // locMastList = locMastList.stream().sorted(Comparator.comparing(LocMast::getLev1).thenComparing(LocMast::getBay1).thenComparing(LocMast::getRow1)).collect(Collectors.toList()); // } // locMast = locMastList.get(0); // } else { // 奇数,不可以入库 // // 自动给前面任务补尾桶信号 // wrkMastService.updateCtnType(wrkMast); // log.error("-----与前面桶类型不一样,前面桶不是尾桶,前面该桶类型任务数不是偶数,不能入库----"); // throw new CoolException("与前面桶类型不一样,前面桶不是尾桶,前面该桶类型任务数不是偶数,不能入库"); // } // } // } // } } else if ((staDescId == 1 && locArea == 1) || staDescId == 10) { // 满板入成品库或者空板入成品库 src/main/java/com/zy/common/web/WcsController.java
@@ -93,7 +93,14 @@ if (Cools.isEmpty(param.getSourceStaNo())) { return R.error("源站编号不能为空"); } WaitPakin waitPakin = null; WaitPakin waitPakin; // 判断是不是成品入库 waitPakin = waitPakinService.selectOne(new EntityWrapper<WaitPakin>(). eq("zpallet", param.getBarcode()).eq("danger", 1)); if (waitPakin != null) { param.setIoType(0); } if (param.getIoType() == 1) { // 先创建入库通知档 waitPakin = comb(param.getBarcode(),param.getBucketType(),param.getBucketCount()); @@ -144,6 +151,9 @@ } switch (param.getIoType()) { case 0: // 成品入库 dto = finishedProductIn(param.getSourceStaNo(), param.getBarcode(), waitPakin); break; case 1://满托盘入库 assert waitPakin != null; dto = startupFullPutStore(param.getSourceStaNo(), param.getBarcode(), locTypeDto, waitPakin, param.isTailSupportFlag()); @@ -794,7 +804,7 @@ wrkMast.setExitMk("N"); // 退出 wrkMast.setEmptyMk("N"); // 空板 wrkMast.setLinkMis("Y"); wrkMast.setCtnType(tailSupportFlag ? 1 : 0); // 尾托标识 wrkMast.setCtnType(0); // 尾托标识 wrkMast.setPdcType(waitPakins.getMatnr()); // 空桶类型 // 操作人员数据 wrkMast.setAppeTime(now); @@ -829,6 +839,87 @@ if (!basDevpService.updateById(sourceStaNo)){ throw new CoolException("更新源站失败"); } if(!dto.getLocNo().isEmpty()) { // 更新目标库位状态 LocMast locMast = locMastService.selectById(dto.getLocNo()); if (locMast.getLocSts().equals("O")){ locMast.setLocSts("S"); // S.入库预约 locMast.setModiTime(now); if (!locMastService.updateById(locMast)){ throw new CoolException("改变库位状态失败"); } } else { throw new CoolException(dto.getLocNo()+"目标库位已被占用"); } } return dto; } /** * 成品入库 */ @Transactional(propagation = Propagation.REQUIRED) public StartupDto finishedProductIn(Integer devpNo, String barcode, WaitPakin waitPakins) { // 源站点状态检测 BasDevp sourceStaNo = basDevpService.checkSiteStatus(devpNo, true); // 检索库位 FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo(waitPakins); StartupDto dto = commonService.getLocNoNew( 1, devpNo,findLocNoAttributeVo,1); int workNo = dto.getWorkNo(); Date now = new Date(); // 生成工作档 WrkMast wrkMast = new WrkMast(); wrkMast.setWrkNo(workNo); wrkMast.setIoTime(new Date()); wrkMast.setWrkSts(2L); // 工作状态:生成入库ID wrkMast.setIoType(1); // 入出库状态:1.入库 wrkMast.setIoPri(13D); // 优先级 wrkMast.setCrnNo(dto.getCrnNo()); wrkMast.setSourceStaNo(dto.getSourceStaNo()); wrkMast.setStaNo(dto.getStaNo()); wrkMast.setLocNo(dto.getLocNo()); wrkMast.setBarcode(barcode); // 托盘码 wrkMast.setFullPlt("Y"); // 满板:Y wrkMast.setPicking("N"); // 拣料 wrkMast.setExitMk("N"); // 退出 wrkMast.setEmptyMk("N"); // 空板 wrkMast.setLinkMis("Y"); // wrkMast.setCtnType(tailSupportFlag ? 1 : 0); // 尾托标识 wrkMast.setPdcType(waitPakins.getModel()); // 空桶类型 // 操作人员数据 wrkMast.setAppeTime(now); wrkMast.setModiTime(now); boolean res = wrkMastService.insert(wrkMast); if (!res) { throw new CoolException("保存工作档失败"); } // 生成工作档明细 WrkDetl wrkDetl = new WrkDetl(); wrkDetl.sync(waitPakins); wrkDetl.setWrkNo(wrkMast.getWrkNo()); wrkDetl.setIoTime(wrkMast.getIoTime()); wrkDetl.setAppeTime(now); wrkDetl.setModiTime(now); if (!wrkDetlService.insert(wrkDetl)) { throw new CoolException("保存工作明细失败"); } // 更新入库通知档 ioStatus ===>> Y Wrapper<WaitPakin> wrapper = new EntityWrapper<WaitPakin>() .eq("zpallet", barcode); WaitPakin setParam = new WaitPakin(); setParam.setLocNo(dto.getLocNo()); setParam.setIoStatus("Y"); setParam.setModiTime(now); if (!waitPakinService.update(setParam, wrapper)) { throw new CoolException("更新通知档失败"); } // 更新源站点信息 sourceStaNo.setWrkNo(workNo); sourceStaNo.setModiTime(now); if (!basDevpService.updateById(sourceStaNo)){ throw new CoolException("更新源站失败"); } // 更新目标库位状态 LocMast locMast = locMastService.selectById(dto.getLocNo()); if (locMast.getLocSts().equals("O")){ src/main/java/com/zy/system/controller/UserController.java
@@ -117,6 +117,9 @@ if (user.getMobile()!=null) { entity.setMobile(user.getMobile()); } if (user.getRoleId() !=null) { entity.setRoleId(user.getRoleId()); } userService.updateById(entity); return R.ok(); } src/main/webapp/static/js/pakStore/stockAdjust.js
@@ -8,21 +8,21 @@ {fixed: 'left', field: 'count', title: '实际数量', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'} ,{field: 'anfme', align: 'center',title: '数量'} ,{field: 'batch', align: 'center',title: '批号(编辑)', edit: true, style: 'font-weight:bold'} // ,{field: 'zpallet', align: 'center',title: '托盘条码', edit: true} // ,{field: 'model', align: 'center',title: '桶型', edit: true} // ,{field: 'manuDate', align: 'center',title: '生产日期', edit: true} // ,{field: 'weight', align: 'center',title: '净重', edit: true} // ,{field: 'manLength', align: 'center',title: '毛重', edit: true} // ,{field: 'volume', align: 'center',title: '罐装量', edit: true} ,{field: 'zpallet', align: 'center',title: '托盘条码', edit: true} ,{field: 'model', align: 'center',title: '桶型', edit: true} ,{field: 'manuDate', align: 'center',title: '生产日期', edit: true} ,{field: 'weight', align: 'center',title: '净重', edit: true} ,{field: 'manLength', align: 'center',title: '毛重', edit: true} ,{field: 'volume', align: 'center',title: '罐装量', edit: true} ]; arrRemove(detlCols, "field", "anfme"); arrRemove(detlCols, "field", "batch"); // arrRemove(detlCols, "field", "zpallet"); // arrRemove(detlCols, "field", "model"); // arrRemove(detlCols, "field", "manuDate"); // arrRemove(detlCols, "field", "weight"); // arrRemove(detlCols, "field", "manLength"); // arrRemove(detlCols, "field", "volume"); arrRemove(detlCols, "field", "zpallet"); arrRemove(detlCols, "field", "model"); arrRemove(detlCols, "field", "manuDate"); arrRemove(detlCols, "field", "weight"); arrRemove(detlCols, "field", "manLength"); arrRemove(detlCols, "field", "volume"); cols.push.apply(cols, detlCols); cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:80}) return cols;