| | |
| | | return R.ok(sum); |
| | | } |
| | | |
| | | @RequestMapping(value = "/stock/out/list/{locNo}/auth") |
| | | @ManagerAuth |
| | | public R stockOutList(@PathVariable("locNo") String locNo){ |
| | | if (Cools.isEmpty(locNo)){ |
| | | return R.error(); |
| | | } |
| | | return R.ok(locDetlService.selectLocDetl(locNo)); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 此类为隔膜卷信息,用于接收MES系统接口提供的隔膜卷信息 |
| | | */ |
| | | @Data |
| | | public class DiaphragmInfo { |
| | | |
| | | //生产批号 |
| | | private String batchNo; |
| | | |
| | | //物料编码 |
| | | private String itemCode; |
| | | |
| | | //物料名称 |
| | | private String itemName; |
| | | |
| | | //条形码 |
| | | private String barCode; |
| | | |
| | | //大卷位置 |
| | | private String position; |
| | | |
| | | //小卷位置 |
| | | private String position2; |
| | | |
| | | //数量 |
| | | private BigDecimal quantity; |
| | | |
| | | //辅数量 |
| | | private BigDecimal assQuantity; |
| | | |
| | | //规格/型号 |
| | | private String std; |
| | | |
| | | //等级 |
| | | private String grade; |
| | | |
| | | //备注 |
| | | private String note; |
| | | |
| | | //收卷开始日期 |
| | | private Date startDate; |
| | | |
| | | //收卷结束日期 |
| | | private Date endDate; |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 此类为物料档案信息,用于接收MES系统接口提供的物料档案信息 |
| | | */ |
| | | @Data |
| | | public class MaterialInfo { |
| | | |
| | | //更新时间 |
| | | private Date mdate; |
| | | |
| | | //物料编码 |
| | | private String itemCode; |
| | | |
| | | //物料名称 |
| | | private String itemName; |
| | | |
| | | //规格 |
| | | private String std; |
| | | |
| | | //材质 |
| | | private String material; |
| | | |
| | | //品牌 |
| | | private String brand; |
| | | |
| | | //备注 |
| | | private String note; |
| | | |
| | | //主单位 |
| | | private String unitName; |
| | | |
| | | //辅单位 |
| | | private String assUnitName; |
| | | |
| | | //主辅关系 |
| | | private BigDecimal rate; |
| | | |
| | | //宽 |
| | | private BigDecimal width; |
| | | |
| | | //厚 |
| | | private BigDecimal thickness; |
| | | } |
| | |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 存储隔膜系统中隔膜卷信息的条形码 |
| | | */ |
| | | @ApiModelProperty(value= "条形码") |
| | | private String qrCode; |
| | | |
| | | /** |
| | | * 产地 |
| | | */ |
| | | @ApiModelProperty(value= "产地") |
| | |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "收卷开始日期") |
| | | @TableField("start_date") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date startDate; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "收卷结束日期") |
| | | @TableField("end_date") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date endDate; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | |
| | | |
| | | void updateMatTurn(@Param("matnrOld")String matnrOld,@Param("matnr")String matnr); |
| | | |
| | | List<LocDetl> selectLocDetl(String locNo); |
| | | } |
| | |
| | | Double getLocDetlSumQty(String locNo); |
| | | |
| | | void updateMatTurn(String matnrOld,String matnr); |
| | | |
| | | List<LocDetl> selectLocDetl(String locNo); |
| | | } |
| | |
| | | public void updateMatTurn(String matnrOld,String matnr){ |
| | | this.baseMapper.updateMatTurn(matnrOld,matnr); |
| | | } |
| | | |
| | | @Override |
| | | public List<LocDetl> selectLocDetl(String locNo) { |
| | | return this.baseMapper.selectLocDetl(locNo); |
| | | } |
| | | } |
| | |
| | | if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) { |
| | | throw new CoolException(BaseRes.PARAM); |
| | | } |
| | | if(param.getCombMats().size()>1){ |
| | | throw new CoolException("请提取一个商品,或者刷新重新组托!"); |
| | | } |
| | | // if(param.getCombMats().size()>1){ |
| | | // throw new CoolException("请提取一个商品,或者刷新重新组托!"); |
| | | // } |
| | | // 判断是否有相同条码的数据 |
| | | if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>(). |
| | | eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) { |
| | |
| | | if(param.getBarcode().length()!=8){ |
| | | throw new CoolException("条码长度不是8位===>>" + param.getBarcode()); |
| | | } |
| | | if (param.getCombMats().size()>1){ |
| | | throw new CoolException("不允许混料===>>" + param.getBarcode()); |
| | | } |
| | | // if (param.getCombMats().size()>1){ |
| | | // throw new CoolException("不允许混料===>>" + param.getBarcode()); |
| | | // } |
| | | |
| | | int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet",param.getBarcode())); |
| | | int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",param.getBarcode())); |
| | |
| | | // 获取目标站 |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | | .eq("type_no", wrkMast.getIoType() - 50) |
| | | .eq("stn_no", wrkMast.getStaNo()) // 作业站点 = 拣料出库的目标站 |
| | | .eq("stn_no",wrkMast.getStaNo() ) // 作业站点 = 拣料出库的目标站 |
| | | .eq("crn_no", wrkMast.getCrnNo()); // 堆垛机号 |
| | | StaDesc staDesc = staDescService.selectOne(wrapper); |
| | | if (Cools.isEmpty(staDesc)) { |
New file |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.MesMatSyncHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * 轮询MES接口,同步物料档案信息 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class MesMatSyncScheduler { |
| | | |
| | | @Autowired |
| | | MesMatSyncHandler handler; |
| | | |
| | | //@Scheduled(cron = "0/30 * * * * ?") |
| | | private void execute() { |
| | | |
| | | ReturnT<String> result = null; |
| | | try { |
| | | result = handler.start(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | if (!result.isSuccess()) { |
| | | log.error(""); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.MesPakinHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 轮询MES接口,生成入库单据 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class MesPakinScheduler { |
| | | |
| | | @Autowired |
| | | MesPakinHandler handler; |
| | | |
| | | //@Scheduled(cron = "0/30 * * * * ?") |
| | | private void execute() { |
| | | |
| | | ReturnT<String> result = null; |
| | | |
| | | result = handler.start(); |
| | | |
| | | if (!result.isSuccess()) { |
| | | log.error(""); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.MesPakoutHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * 轮询MES接口,生成出库单据 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class MesPakoutScheduler { |
| | | |
| | | @Autowired |
| | | MesPakoutHandler handler; |
| | | |
| | | //@Scheduled(cron = "0/30 * * * * ?") |
| | | private void execute() { |
| | | |
| | | ReturnT<String> result = null; |
| | | try { |
| | | result = handler.start(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | if (!result.isSuccess()) { |
| | | log.error(""); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | // @Scheduled(cron = "0/5 * * * * ? ") |
| | | //@Scheduled(cron = "0/5 * * * * ? ") |
| | | @Async("orderThreadPool") |
| | | public void completeAndReport(){ |
| | | String erpReport = Parameter.get().getErpReport(); |
New file |
| | |
| | | package com.zy.asrs.task.handler; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.entity.MaterialInfo; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.utils.MesSyncUtil; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.DigestUtils; |
| | | |
| | | import java.io.IOException; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class MesMatSyncHandler extends AbstractHandler<String> { |
| | | |
| | | @Value("${mes.mat-sync.url}") |
| | | private String url; |
| | | |
| | | @Value("${mes.mat-sync.path}") |
| | | private String path; |
| | | |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | |
| | | @Autowired |
| | | MatService matService; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start() throws IOException { |
| | | boolean success = true; |
| | | log.info("url:" + url + path); |
| | | JSONObject jsonObject = doGetJsonData(); |
| | | |
| | | int code = jsonObject.getInteger("code"); |
| | | |
| | | if(code == 200){ |
| | | insertOrUpdateMat(jsonObject); |
| | | |
| | | }else { |
| | | success = false; |
| | | log.error("请求mes接口响应错误,响应码为: " + code); |
| | | } |
| | | saveApiLog(jsonObject.toJSONString(),success); |
| | | return SUCCESS; |
| | | } |
| | | |
| | | /* |
| | | 保存请求日志 |
| | | */ |
| | | private void saveApiLog(String response, boolean success) { |
| | | apiLogService.save( |
| | | "商品信息同步", |
| | | url + path, |
| | | null, |
| | | "127.0.0.1", |
| | | null, |
| | | response, |
| | | success |
| | | ); |
| | | } |
| | | |
| | | /* |
| | | 发起一个doGet请求 |
| | | */ |
| | | private JSONObject doGetJsonData() throws IOException { |
| | | |
| | | return JSON.parseObject( new HttpHandler.Builder() |
| | | .setUri(url) |
| | | .setPath(path) |
| | | .setParams(MesSyncUtil.getRequestParamMap()) |
| | | .build() |
| | | .doGet()); |
| | | } |
| | | |
| | | /* |
| | | 插入或更改mat信息 |
| | | */ |
| | | private void insertOrUpdateMat(JSONObject jsonObject){ |
| | | List<MaterialInfo> dataList = JSONObject.parseArray(jsonObject.getString("data"),MaterialInfo.class); |
| | | //MaterialInfo data = jsonObject.getObject("data",MaterialInfo.class); |
| | | dataList.forEach(data -> { |
| | | Mat m = matService.selectByMatnr(data.getItemCode()); |
| | | if(m == null){ |
| | | m = new Mat(); |
| | | m.setCreateTime(jsonObject.getDate("createDate")); |
| | | matMapping(data,m); |
| | | matService.insert(m); |
| | | }else { |
| | | matMapping(data,m); |
| | | EntityWrapper<Mat> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("matnr",m.getMatnr()); |
| | | matService.update(m,wrapper); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* |
| | | 映射mat和物料档案信息字段 |
| | | */ |
| | | private void matMapping(MaterialInfo data, Mat m){ |
| | | //修改时间 -- 更新时间 |
| | | m.setUpdateTime(data.getMdate()); |
| | | //商品编码 -- 物料编码 |
| | | m.setMatnr(data.getItemCode()); |
| | | //商品名称 -- 物料名称 |
| | | m.setMaktx(data.getItemName()); |
| | | //规格 -- 规格 |
| | | m.setSpecs(data.getStd()); |
| | | //型号 -- 材质 |
| | | m.setModel(data.getMaterial()); |
| | | //品牌 -- 品牌 |
| | | m.setBrand(data.getBrand()); |
| | | //备注 --备注 |
| | | m.setMemo(data.getNote()); |
| | | //单位 -- 主单位 |
| | | m.setUnit(data.getUnitName()); |
| | | //品项数 -- 辅单位 |
| | | m.setItemNum(data.getAssUnitName()); |
| | | //单位量 -- 主辅关系 |
| | | m.setUnits(data.getRate() == null ? null : data.getRate().doubleValue()); |
| | | //长度 -- 宽 |
| | | m.setLength(data.getWidth() == null ? null : data.getWidth().doubleValue()); |
| | | //体积 -- 厚 |
| | | m.setVolume(data.getThickness() == null ? null : data.getThickness().doubleValue()); |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.zy.asrs.task.handler; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.DiaphragmInfo; |
| | | import com.zy.asrs.entity.DocType; |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.zy.asrs.service.DocTypeService; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | | import com.zy.asrs.service.OrderService; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.utils.MesSyncUtil; |
| | | import com.zy.common.constant.MesConstant; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class MesPakinHandler extends AbstractHandler<String> { |
| | | @Value("${mes.pakin.url}") |
| | | private String url; |
| | | |
| | | @Value("${mes.pakin.path}") |
| | | private String path; |
| | | |
| | | @Autowired |
| | | private DocTypeService docTypeService; |
| | | |
| | | @Autowired |
| | | private SnowflakeIdWorker snowflakeIdWorker; |
| | | |
| | | @Autowired |
| | | private OrderService orderService; |
| | | |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | |
| | | @Autowired |
| | | private OrderDetlService orderDetlService; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start() { |
| | | boolean success = true; |
| | | log.info("url:" + url + path); |
| | | JSONObject jsonObject = null; |
| | | String respone; |
| | | try { |
| | | jsonObject = doGetJsonData(); |
| | | } catch (IOException e) { |
| | | success = false; |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | int code = jsonObject.getInteger("code"); |
| | | |
| | | if(code == 200){ |
| | | JSONObject jsonData = jsonObject.getJSONObject("data"); |
| | | String orderNo = jsonData.getString("orderNo"); |
| | | Order o = insertOrder(jsonData,orderNo); |
| | | insertOrUpdateOrderDetl(jsonData, o); |
| | | |
| | | }else { |
| | | success = false; |
| | | log.error("请求mes接口响应错误,响应码为: " + code); |
| | | } |
| | | saveApiLog(jsonObject.toJSONString(),success); |
| | | return SUCCESS; |
| | | } |
| | | |
| | | /* |
| | | 保存日志 |
| | | */ |
| | | private void saveApiLog(String response, boolean success){ |
| | | apiLogService.save( |
| | | "生成入库单据", |
| | | url + path, |
| | | null, |
| | | "127.0.0.1", |
| | | null, |
| | | response, |
| | | success |
| | | ); |
| | | } |
| | | |
| | | /* |
| | | 发起一个doGet请求 |
| | | */ |
| | | private JSONObject doGetJsonData() throws IOException { |
| | | return JSON.parseObject( new HttpHandler.Builder() |
| | | .setUri(url) |
| | | .setPath(path) |
| | | .setParams(MesSyncUtil.getRequestParamMap()) |
| | | .build() |
| | | .doGet()); |
| | | } |
| | | |
| | | /* |
| | | 新增order信息 |
| | | */ |
| | | private Order insertOrder(JSONObject jsonData, String orderNo){ |
| | | Order o = orderService.selectByNo(orderNo); |
| | | if (!Cools.isEmpty(o)) { |
| | | throw new CoolException(jsonData.getString("orderNo") + "单据已存在,请勿重复提交"); |
| | | } |
| | | |
| | | o = orderMapping(jsonData); |
| | | if (!orderService.insert(o)) { |
| | | throw new CoolException("生成单据主档失败,请联系管理员"); |
| | | } |
| | | return o; |
| | | } |
| | | |
| | | /* |
| | | 根据orderNo、matnr、batch,新增或者更改orderDetl信息 |
| | | */ |
| | | private void insertOrUpdateOrderDetl(JSONObject jsonData, Order o){ |
| | | List<DiaphragmInfo> diaphragmInfoList = JSONObject.parseArray(jsonData.getString("orderDetails"),DiaphragmInfo.class); |
| | | |
| | | diaphragmInfoList.forEach(d -> { |
| | | EntityWrapper<OrderDetl> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("order_no",o.getOrderNo()).eq("matnr",d.getItemCode()).eq("batch",d.getBatchNo()); |
| | | OrderDetl od = orderDetlService.selectOne(wrapper); |
| | | if(od == null){ |
| | | od = new OrderDetl(); |
| | | od.setOrderNo(o.getOrderNo()); |
| | | od.setOrderId(o.getId()); |
| | | orderDetlMapping(d,od); |
| | | orderDetlService.insert(od); |
| | | }else { |
| | | od.setQty(od.getQty() + d.getQuantity().doubleValue()); |
| | | od.setAnfme(od.getAnfme() + d.getAssQuantity().doubleValue()); |
| | | od.setUpdateTime(new Date()); |
| | | orderDetlService.updateById(od); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* |
| | | 映射Order类和jsonData的字段 |
| | | */ |
| | | private Order orderMapping(JSONObject jsonData){ |
| | | Order o = new Order(); |
| | | o.setStatus(1); |
| | | //设置订单状态 --- 初始化状态 |
| | | o.setSettle(0L); |
| | | //uuid |
| | | o.setUuid(String.valueOf(snowflakeIdWorker.nextId())); |
| | | //单据编号 |
| | | o.setOrderNo(jsonData.getString("orderNo")); |
| | | //单据时间 |
| | | o.setOrderTime(jsonData.getString("orderTime")); |
| | | //单据类型 |
| | | DocType docType = docTypeService.selectOrAdd(jsonData.getString("orderType"), Boolean.TRUE); |
| | | o.setDocType(docType.getDocId()); |
| | | o.setCreateTime(new Date()); |
| | | o.setUpdateTime(new Date()); |
| | | return o; |
| | | } |
| | | |
| | | /* |
| | | 映射OrderDetl与隔膜信息类的字段关系 |
| | | */ |
| | | private void orderDetlMapping(DiaphragmInfo d, OrderDetl od){ |
| | | //批号 -- 生产批号 |
| | | od.setBatch(d.getBatchNo()); |
| | | //商品编码 -- 物料编码 |
| | | od.setMatnr(d.getItemCode()); |
| | | //商品名称 -- 物料名称 |
| | | od.setMaktx(d.getItemName()); |
| | | //数量 -- 数量 |
| | | od.setAnfme(d.getQuantity() == null ? null : d.getQuantity().doubleValue()); |
| | | //完成数量 -- 辅数量 |
| | | od.setQty(d.getAssQuantity() == null ? null : d.getAssQuantity().doubleValue()); |
| | | //规格 -- 规格/型号 |
| | | od.setSpecs(d.getStd()); |
| | | //备注 -- 备注 |
| | | od.setMemo(d.getNote()); |
| | | //条形码 -- 条形码 |
| | | od.setQrCode(d.getBarCode()); |
| | | //颜色 -- 大卷位置 |
| | | od.setColor(d.getPosition()); |
| | | //型号 -- 小卷位置 |
| | | od.setModel(d.getPosition2()); |
| | | //品牌 -- 等级 |
| | | od.setBrand(d.getGrade()); |
| | | //收卷开始日期 |
| | | od.setStartDate(d.getStartDate()); |
| | | //收卷结束日期 |
| | | od.setEndDate(d.getEndDate()); |
| | | |
| | | od.setCreateTime(new Date()); |
| | | od.setUpdateTime(new Date()); |
| | | } |
| | | } |
New file |
| | |
| | | package com.zy.asrs.task.handler; |
| | | |
| | | import com.zy.asrs.service.DocTypeService; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | | import com.zy.asrs.service.OrderService; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class MesPakoutHandler extends AbstractHandler<String> { |
| | | @Value("${mes.pakin.url}") |
| | | private String url; |
| | | |
| | | @Value("${mes.pakin.path}") |
| | | private String path; |
| | | |
| | | @Autowired |
| | | private DocTypeService docTypeService; |
| | | |
| | | @Autowired |
| | | private OrderService orderService; |
| | | |
| | | @Autowired |
| | | private OrderDetlService orderDetlService; |
| | | |
| | | public ReturnT<String> start() throws IOException { |
| | | |
| | | return SUCCESS; |
| | | } |
| | | } |
| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.exception.CoolException; |
| | | import com.sun.org.apache.xpath.internal.operations.Or; |
| | | import com.zy.asrs.entity.DiaphragmInfo; |
| | | import com.zy.asrs.entity.DocType; |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | |
| | | import com.zy.common.model.MesPakoutParam; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | |
| | | @Autowired |
| | | private DocTypeService docTypeService; |
| | | |
| | | @Value("${mes.pakin-sync.url}") |
| | | private String pakinUrl; |
| | | |
| | | @Value("${mes.pakin-sync.path}") |
| | | private String pakinPath; |
| | | |
| | | @Value("${mes.pakout-sync.url}") |
| | | private String pakoutUrl; |
| | | |
| | | @Value("${mes.pakout-sync.path}") |
| | | private String pakoutPath; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start(Order order) { |
| | | DocType docType = docTypeService.selectById(order.getDocType()); |
| | |
| | | List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId()); |
| | | // 入库完成上报 |
| | | if (docType.getPakin() == 1) { |
| | | /* |
| | | MesPakinParam pakinParam = new MesPakinParam(); |
| | | pakinParam.setPakinTime(DateUtils.convert(order.getUpdateTime())); |
| | | pakinParam.setLgortFrom("5008"); |
| | |
| | | success |
| | | ); |
| | | } catch (Exception e) { log.error("", e); } |
| | | } |
| | | } */ |
| | | |
| | | return orderPakinSync(order,docType.getDocName(),orderDetls); |
| | | } |
| | | // 出库完成上报 |
| | | if (docType.getPakout() == 1) { |
| | | /* |
| | | MesPakoutParam pakoutParam = new MesPakoutParam(); |
| | | pakoutParam.setTag(!order.getDocType$().equalsIgnoreCase("手动出库单")); |
| | | pakoutParam.setPakoutTime(DateUtils.convert(order.getUpdateTime())); |
| | |
| | | ); |
| | | } catch (Exception e) { log.error("", e); } |
| | | } |
| | | */ |
| | | |
| | | return orderPakoutSync(order,docType.getDocName(),orderDetls); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | private ReturnT<String> orderPakoutSync (Order order, String orderType, List<OrderDetl> orderDetls){ |
| | | Map<String,Object> requestMap = getRequestMap(order,orderType,orderDetls); |
| | | String response = ""; |
| | | boolean success = false; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | .setUri(pakoutUrl) |
| | | .setPath(pakoutPath) |
| | | .setJson(JSON.toJSONString(requestMap)) |
| | | .build() |
| | | .doPost(); |
| | | success = orderSettleUpdate(response,order); |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |
| | | // TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } finally { |
| | | try { |
| | | // 保存接口日志 |
| | | apiLogService.save( |
| | | "成品库出库上报", |
| | | pakoutUrl + pakoutPath, |
| | | null, |
| | | "127.0.0.1", |
| | | JSON.toJSONString(requestMap), |
| | | response, |
| | | success |
| | | ); |
| | | } catch (Exception e) { log.error("", e); } |
| | | } |
| | | |
| | | return SUCCESS; |
| | | } |
| | | |
| | | private ReturnT<String> orderPakinSync (Order order, String orderType, List<OrderDetl> orderDetls){ |
| | | Map<String,Object> requestMap = getRequestMap(order,orderType,orderDetls); |
| | | |
| | | String response = ""; |
| | | boolean success = false; |
| | | |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | .setUri(pakinUrl) |
| | | .setPath(pakinPath) |
| | | .setJson(JSON.toJSONString(requestMap)) |
| | | .build() |
| | | .doPost(); |
| | | success = orderSettleUpdate(response,order); |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |
| | | // TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } finally { |
| | | try { |
| | | // 保存接口日志 |
| | | apiLogService.save( |
| | | "成品库入库上报", |
| | | pakinUrl + pakinPath, |
| | | null, |
| | | "127.0.0.1", |
| | | JSON.toJSONString(requestMap), |
| | | response, |
| | | success |
| | | ); |
| | | } catch (Exception e) { log.error("", e); } |
| | | } |
| | | |
| | | return SUCCESS; |
| | | |
| | | } |
| | | |
| | | private Map<String,Object> getRequestMap(Order order,String orderType, List<OrderDetl> orderDetls){ |
| | | Map<String,Object> requestMap = new HashMap<>(); |
| | | requestMap.put("orderNo",order.getOrderNo()); |
| | | requestMap.put("orderTime",order.getOrderTime()); |
| | | requestMap.put("orderType",orderType); |
| | | |
| | | List<DiaphragmInfo> diaphragmInfoList = orderDetls.stream().map(od -> { |
| | | DiaphragmInfo diaphragmInfo = new DiaphragmInfo(); |
| | | diaphragmInfo.setBatchNo(od.getBatch()); |
| | | diaphragmInfo.setItemCode(od.getMatnr()); |
| | | diaphragmInfo.setBarCode(od.getQrCode()); |
| | | diaphragmInfo.setQuantity(new BigDecimal(od.getAnfme())); |
| | | diaphragmInfo.setAssQuantity(new BigDecimal(od.getQty())); |
| | | return diaphragmInfo; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | requestMap.put("orderDetails",diaphragmInfoList); |
| | | |
| | | return requestMap; |
| | | } |
| | | |
| | | private boolean orderSettleUpdate(String response, Order order){ |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | //success = true; |
| | | // 修改订单状态 4.完成 ===>> 6.已上报 |
| | | if (!orderService.updateSettle(order.getId(), 6L, null)) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | } |
| | | } else { |
| | | //log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(requestMap), response); |
| | | throw new CoolException("上报mes系统失败"); |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.utils; |
| | | |
| | | import org.springframework.util.DigestUtils; |
| | | |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | public class MesSyncUtil { |
| | | |
| | | public static Map<String,Object> getRequestParamMap(){ |
| | | Date date = new Date(); |
| | | String ts = date.getTime() + ""; |
| | | String key = DigestUtils.md5DigestAsHex(("appkey" + ts).getBytes(StandardCharsets.UTF_8)); |
| | | Map<String,Object> requestParamMap = new HashMap<>(); |
| | | requestParamMap.put("ts",ts); |
| | | requestParamMap.put("key",key); |
| | | return requestParamMap; |
| | | } |
| | | } |
| | |
| | | server: |
| | | port: 8080 |
| | | port: 8082 |
| | | servlet: |
| | | context-path: /@pom.build.finalName@ |
| | | |
| | |
| | | enabled: false |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | url: jdbc:sqlserver://192.168.4.15:1433;databasename=sxlktasrs |
| | | url: jdbc:sqlserver://localhost:1433;databasename=sxlktasrs |
| | | username: sa |
| | | password: sa@123 |
| | | mvc: |
| | |
| | | host: localhost |
| | | port: 6379 |
| | | database: 0 |
| | | # password: xltys1995 |
| | | # password: xltys1995 |
| | | servlet: |
| | | multipart: |
| | | maxFileSize: 100MB |
| | | maxRequestSize: 100MB |
| | | # rabbitmq: |
| | | # host: 121.41.63.25 # rabbitMQ的ip地址 |
| | | # port: 5672 # 端口 |
| | | # username: zyx |
| | | # password: zyx123456 |
| | | # virtual-host: / |
| | | |
| | | |
| | | mybatis-plus: |
| | | mapper-locations: classpath:mapper/*.xml |
| | |
| | | # 双深 |
| | | doubleDeep: true |
| | | # 双深库位排号 |
| | | # doubleLocs: 1,4,11,14,21,24 |
| | | doubleLocs: 1,4,5,8,9,12 |
| | | # 一个堆垛机负责的货架排数 |
| | | groupCount: 4 |
| | |
| | | doubleLocsRight : 4,8,12 |
| | | |
| | | comb: |
| | | limit: 5000 |
| | | limit: 5000 |
| | | |
| | | mes: |
| | | mat-sync: |
| | | url: localhost:8080 |
| | | path: /test/getMat |
| | | pakin: |
| | | url: localhost:8080 |
| | | path: /test/getOrder |
| | | pakout: |
| | | url: localhost:8080 |
| | | path: /test/getOrder |
| | | pakin-sync: |
| | | url: localhost:8080 |
| | | path: /test/syncOrderPakin |
| | | pakout-sync: |
| | | url: localhost:8080 |
| | | path: /test/syncOrderPakout |
| | | |
| | |
| | | INNER JOIN man_mat b ON a.matnr=#{matnrOld} AND b.matnr=#{matnr}; |
| | | </update> |
| | | |
| | | <select id="selectLocDetl" resultMap="BaseResultMap"> |
| | | select * |
| | | from asr_loc_detl |
| | | where loc_no=#{locNo} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </update> |
| | | |
| | | <select id="selectComplete" resultMap="BaseResultMap"> |
| | | select top 5 * |
| | | select top 6 * |
| | | from man_order |
| | | where 1=1 |
| | | and settle = 4 |
| | |
| | | } |
| | | |
| | | var matCols = [ |
| | | {field: 'matnr', align: 'center',title: '商品编号(品号)', width: 180} |
| | | {field: 'matnr', align: 'center',title: '物料编码', width: 180} |
| | | // {field: 'id', align: 'center',title: 'ID'} |
| | | // ,{field: 'uuid', align: 'center',title: '编号'} |
| | | // ,{field: 'tagId$', align: 'center',title: '所属归类'} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称(品名)', width: 200} |
| | | ,{field: 'maktx', align: 'center',title: '物料名称', width: 200} |
| | | // ,{field: 'name', align: 'center',title: '别名'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'model', align: 'center',title: '代码', hide: true} |
| | | ,{field: 'color', align: 'center',title: '颜色', hide: true} |
| | | ,{field: 'brand', align: 'center',title: '品牌', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: false} |
| | | ,{field: 'price', align: 'center',title: '单价', hide: true} |
| | | ,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | | ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
| | | ,{field: 'weight', align: 'center',title: '单箱净重', hide: true} |
| | | ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | ,{field: 'volume', align: 'center',title: '单箱体积', hide: true} |
| | | ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | ,{field: 'supp', align: 'center',title: '供应商', hide: true} |
| | | ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true} |
| | | ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true} |
| | | ,{field: 'deadTime', align: 'center',title: '保质期', hide: true} |
| | | ,{field: 'deadWarn', align: 'center',title: '预警天数', hide: true} |
| | | ,{field: 'source$', align: 'center',title: '制购', hide: true} |
| | | ,{field: 'check$', align: 'center',title: '要求检验', hide: true} |
| | | ,{field: 'danger$', align: 'center',title: '危险品', hide: true} |
| | | ,{field: 'model', align: 'center',title: '材质', hide: true} |
| | | //,{field: 'color', align: 'center',title: '颜色', hide: true} |
| | | //,{field: 'brand', align: 'center',title: '品牌', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '主单位', hide: false} |
| | | //,{field: 'price', align: 'center',title: '单价', hide: true} |
| | | //,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | | ,{field: 'units', align: 'center',title: '主辅关系', hide: true} |
| | | //,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | //,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | //,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | //,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '辅单位', hide: true} |
| | | // ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
| | | // ,{field: 'weight', align: 'center',title: '单箱净重', hide: true} |
| | | ,{field: 'length', align: 'center',title: '宽', hide: true} |
| | | ,{field: 'volume', align: 'center',title: '厚', hide: true} |
| | | // ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | // ,{field: 'supp', align: 'center',title: '供应商', hide: true} |
| | | // ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true} |
| | | // ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true} |
| | | // ,{field: 'deadTime', align: 'center',title: '保质期', hide: true} |
| | | // ,{field: 'deadWarn', align: 'center',title: '预警天数', hide: true} |
| | | // ,{field: 'source$', align: 'center',title: '制购', hide: true} |
| | | // ,{field: 'check$', align: 'center',title: '要求检验', hide: true} |
| | | // ,{field: 'danger$', align: 'center',title: '危险品', hide: true} |
| | | // ,{field: 'status$', align: 'center',title: '状态'} |
| | | // ,{field: 'createBy$', align: 'center',title: '添加人员'} |
| | | // ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | |
| | | ] |
| | | |
| | | var detlCols = [ |
| | | {field: 'matnr', align: 'center',title: '商品编号(品号)', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称(品名)', sort:true} |
| | | {field: 'matnr', align: 'center',title: '物料编码', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '物料名称', sort:true} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false} |
| | | ,{field: 'batch', align: 'center',title: '货品特征', sort:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量', hide: false} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码', hide: false} |
| | | |
| | | ,{field: 'specs', align: 'center',title: '规格', hide: false} |
| | | ,{field: 'model', align: 'center',title: '代码', hide: true} |
| | | ,{field: 'color', align: 'center',title: '颜色', hide: true} |
| | | ,{field: 'brand', align: 'center',title: '品牌', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: false} |
| | | ,{field: 'price', align: 'center',title: '单价', hide: true} |
| | | ,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | | ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | // ,{field: 'batch', align: 'center',title: '货品特征', sort:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量', hide: true} |
| | | ,{field: 'qty', align: 'center',title: '辅数量', hide: true} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码', hide: true} |
| | | ,{field: 'specs', align: 'center',title: '规格/型号', hide: false} |
| | | ,{field: 'memo', align: 'center',title: '备注', hide: true} |
| | | ,{field: 'qrCode', align: 'center',title: '条形码', hide: false} |
| | | ,{field: 'model', align: 'center',title: '小卷位置', hide: false} |
| | | ,{field: 'color', align: 'center',title: '大卷位置', hide: false} |
| | | ,{field: 'brand', align: 'center',title: '等级', hide: false} |
| | | ,{field: 'startDate', align: 'center',title: '收卷开始日期', hide: false} |
| | | ,{field: 'endDate', align: 'center',title: '收卷结束日期', hide: false} |
| | | // ,{field: 'unit', align: 'center',title: '单位', hide: false} |
| | | // ,{field: 'price', align: 'center',title: '单价', hide: true} |
| | | // ,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | | // ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
| | | ,{field: 'weight', align: 'center',title: '单箱净重', hide: true} |
| | | ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | ,{field: 'volume', align: 'center',title: '单箱体积', hide: true} |
| | | ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | ,{field: 'supp', align: 'center',title: '供应商', hide: true} |
| | | ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true} |
| | | ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true} |
| | | ,{field: 'deadTime', align: 'center',title: '保质期', hide: true} |
| | | ,{field: 'deadWarn', align: 'center',title: '预警天数', hide: true} |
| | | ,{field: 'source$', align: 'center',title: '制购', hide: true} |
| | | ,{field: 'check$', align: 'center',title: '要求检验', hide: true} |
| | | ,{field: 'danger$', align: 'center',title: '危险品', hide: true} |
| | | // ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | // ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | // ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | // ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | // ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
| | | // ,{field: 'weight', align: 'center',title: '单箱净重', hide: true} |
| | | // ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | // ,{field: 'volume', align: 'center',title: '单箱体积', hide: true} |
| | | // ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | // ,{field: 'supp', align: 'center',title: '供应商', hide: true} |
| | | // ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true} |
| | | // ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true} |
| | | // ,{field: 'deadTime', align: 'center',title: '保质期', hide: true} |
| | | // ,{field: 'deadWarn', align: 'center',title: '预警天数', hide: true} |
| | | // ,{field: 'source$', align: 'center',title: '制购', hide: true} |
| | | // ,{field: 'check$', align: 'center',title: '要求检验', hide: true} |
| | | // ,{field: 'danger$', align: 'center',title: '危险品', hide: true} |
| | | ] |
| | | |
| | |
| | | var pageCurr; |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'locNo$', align: 'center',title: '库位号'}, |
| | | {field: 'matnr', align: 'center',title: '商品编号', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称', sort:true} |
| | | {field: 'locNo$', align: 'center',title: '库位号'} |
| | | ,{field: 'matnr', align: 'center',title: '物料编码', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '物料名称', sort:true} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false} |
| | | ,{field: 'batch', align: 'center',title: '批号', width: 300, sort:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'model', align: 'center',title: '代码', hide: true} |
| | | ,{field: 'color', align: 'center',title: '颜色', hide: true} |
| | | ,{field: 'brand', align: 'center',title: '品牌', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: true} |
| | | ,{field: 'price', align: 'center',title: '单价', hide: true} |
| | | ,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | | ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
| | | ,{field: 'weight', align: 'center',title: '单箱净重', hide: true} |
| | | ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | ,{field: 'volume', align: 'center',title: '单箱体积', hide: true} |
| | | ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | ,{field: 'supp', align: 'center',title: '供应商', hide: true} |
| | | ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true} |
| | | ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true} |
| | | ,{field: 'deadTime', align: 'center',title: '保质期', hide: true} |
| | | ,{field: 'deadWarn', align: 'center',title: '预警天数', hide: true} |
| | | ,{field: 'source$', align: 'center',title: '制购', hide: true} |
| | | ,{field: 'check$', align: 'center',title: '要求检验', hide: true} |
| | | ,{field: 'danger$', align: 'center',title: '危险品', hide: true} |
| | | ,{field: 'anfme', align: 'center',title: '数量', hide: true} |
| | | ,{field: 'qty', align: 'center',title: '辅数量', hide: true} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码', hide: true} |
| | | ,{field: 'specs', align: 'center',title: '规格/型号', hide: true} |
| | | ,{field: 'model', align: 'center',title: '小卷位置', hide: true} |
| | | ,{field: 'color', align: 'center',title: '大卷位置', hide: true} |
| | | ,{field: 'brand', align: 'center',title: '等级', hide: true} |
| | | ,{field: 'qrCode', align: 'center',title: '条形码', hide: true} |
| | | ,{field: 'memo', align: 'center',title: '备注', hide: true} |
| | | ,{field: 'startDate', align: 'center',title: '收卷开始日期', hide: true} |
| | | ,{field: 'endDate', align: 'center',title: '收卷结束日期', hide: true} |
| | | // ,{field: 'unit', align: 'center',title: '单位', hide: true} |
| | | // ,{field: 'price', align: 'center',title: '单价', hide: true} |
| | | // ,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | | // ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | // ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | // ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | // ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | // ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | // ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | // ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
| | | // ,{field: 'weight', align: 'center',title: '单箱净重', hide: true} |
| | | // ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | // ,{field: 'volume', align: 'center',title: '单箱体积', hide: true} |
| | | // ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | // ,{field: 'supp', align: 'center',title: '供应商', hide: true} |
| | | // ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true} |
| | | // ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true} |
| | | // ,{field: 'deadTime', align: 'center',title: '保质期', hide: true} |
| | | // ,{field: 'deadWarn', align: 'center',title: '预警天数', hide: true} |
| | | // ,{field: 'source$', align: 'center',title: '制购', hide: true} |
| | | // ,{field: 'check$', align: 'center',title: '要求检验', hide: true} |
| | | // ,{field: 'danger$', align: 'center',title: '危险品', hide: true} |
| | | |
| | | ]; |
| | | |
| | |
| | | {type: 'checkbox'} |
| | | ,{type: 'numbers', title: '#'} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', templet: '#orderNoTpl', width: 160} |
| | | ,{field: 'matnr', align: 'center',title: '商品编码', width: 160} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称', width: 200} |
| | | ,{field: 'batch', align: 'center',title: '序列码'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'matnr', align: 'center',title: '物料编码', width: 160} |
| | | ,{field: 'maktx', align: 'center',title: '物料名称', width: 200} |
| | | ,{field: 'batch', align: 'center',title: '生产批号'} |
| | | ,{field: 'specs', align: 'center',title: '规格/型号'} |
| | | // ,{field: 'anfme', align: 'center',title: '数量'} |
| | | // ,{field: 'qty', align: 'center',title: '作业数量', style: 'font-weight: bold'} |
| | | ,{field: 'enableQty', align: 'center',title: '待出数量', style: 'font-weight: bold'} |
| | |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>中扬 - 自动化立体仓库 - AS / RS</title> |
| | | <title>蓝科途 - 自动化立体仓库 - AS / RS</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
| | |
| | | <div class="layui-body"></div> |
| | | <!-- 底部 --> |
| | | <div class="layui-footer layui-text"> |
| | | copyright © 2022 <a href="https://www.superton.cn/" target="_blank">浙江中扬立库有限公司</a> all rights reserved. |
| | | copyright © 2022 <a href="https://www.superton.cn/" target="_blank">苏州冠鸿智能装备有限公司</a> all rights reserved. |
| | | <span class="pull-right">Version 1.0.0</span> |
| | | </div> |
| | | |
| | |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | | <title>中扬 │ login of zoneyung wms</title> |
| | | <title>蓝科途 │ login of Luckt wms</title> |
| | | <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1"> |
| | | <meta name="description" content="study of Instancing with three.js"> |
| | | <meta name="keywords" content="undefined, Yoichi Kobayashi, WebGL, three.js"> |
| | |
| | | table.on('toolbar(stockOut)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | var data = checkStatus.data; |
| | | let tmp = [] |
| | | data.forEach((item,index) => { |
| | | $.ajax({ |
| | | url: baseUrl+"/stock/out/list/" + item.locNo + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | res.data.forEach((val,idx) => { |
| | | tmp.push(val) |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | data = tmp |
| | | switch(obj.event) { |
| | | case 'confirm': |
| | | if (data.length === 0){ |