| | |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | return agvScheduleService.callback(params); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.core.common.R; |
| | | import com.zy.api.entity.OrderParams; |
| | | import com.zy.api.entity.SyncMatParmas; |
| | | import com.zy.api.service.KopenApiService; |
| | | import com.zy.asrs.entity.Mat; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | */ |
| | | @ApiOperation("零件信息数据更新") |
| | | @PostMapping("/sync/mat") |
| | | public R basMatUpdate(@RequestBody Map<String, String> params) { |
| | | if (Objects.isNull(params.get("matnrs"))) { |
| | | public R basMatUpdate(@RequestBody SyncMatParmas params) { |
| | | if (Objects.isNull(params)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | if (params.get("matnrs").isEmpty()) { |
| | | return R.error("变更零件明细不能为空!!"); |
| | | if (Objects.isNull(params.getPro_komcode())) { |
| | | return R.error("零件编码不能为空!!"); |
| | | } |
| | | List<Mat> mats = JSON.parseArray(params.get("matnrs"), Mat.class); |
| | | |
| | | return kopenApiService.basMatupdate(mats); |
| | | return kopenApiService.basMatupdate(params); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | @ApiModelProperty("目标库位") |
| | | private String tarLoc; |
| | | |
| | | @ApiModelProperty("搬运状态") |
| | | private String status; |
| | | |
| | | @ApiModelProperty("任务号") |
| | | private String wrkNo; |
| | | } |
| New file |
| | |
| | | package com.zy.api.entity; |
| | | |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "SyncMatParmas", description = "物料同步参数") |
| | | public class SyncMatParmas implements Serializable { |
| | | |
| | | |
| | | @ApiModelProperty("零件类型") |
| | | private String pro_type; |
| | | |
| | | @ApiModelProperty("零件代码") |
| | | private String pro_komcode; |
| | | |
| | | @ApiModelProperty("供应商编码") |
| | | private String pro_id; |
| | | |
| | | @ApiModelProperty("入库通知数量") |
| | | private Double inv_qty; |
| | | |
| | | @ApiModelProperty("公司ID") |
| | | private String company_id; |
| | | |
| | | @ApiModelProperty("零件名称") |
| | | private String pro_name; |
| | | |
| | | @ApiModelProperty("尺寸") |
| | | private String pro_size; |
| | | |
| | | @ApiModelProperty("重量") |
| | | private String pro_wet; |
| | | |
| | | @ApiModelProperty("更新时间") |
| | | private String update_time; |
| | | |
| | | } |
| | |
| | | this.type = type; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public static String getTagName(String type) { |
| | | if (type.equals(MatLocType.AUTOMATED.type)) { |
| | | return MatLocType.AUTOMATED.desc; |
| | | } else if (type.equals(MatLocType.SO_HOLDING.type)) { |
| | | return MatLocType.SO_HOLDING.desc; |
| | | } else if (type.equals(MatLocType.EO_HOLDING.type)) { |
| | | return MatLocType.EO_HOLDING.desc; |
| | | } else { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | public static Long getTag(String type) { |
| | | if (type.equals(MatType.LARGE.type)) { |
| | | return Long.parseLong(MatLocType.AUTOMATED.type); |
| | | } else if (type.equals(MatType.MIDDEL.type)) { |
| | | return Long.parseLong(MatLocType.SO_HOLDING.type); |
| | | } else if (type.equals(MatType.SMALL.type)) { |
| | | return Long.parseLong(MatLocType.EO_HOLDING.type); |
| | | } else { |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public static Long getTag(String type) { |
| | | if (type.equals(MatType.LARGE.type)) { |
| | | return Long.parseLong(MatLocType.AUTOMATED.type); |
| | | } else if (type.equals(MatType.MIDDEL.type)) { |
| | | return Long.parseLong(MatLocType.SO_HOLDING.type); |
| | | } else if (type.equals(MatType.SMALL.type)) { |
| | | return Long.parseLong(MatLocType.EO_HOLDING.type); |
| | | } else { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import com.core.common.R; |
| | | import com.zy.api.entity.OrderParams; |
| | | import com.zy.asrs.entity.Mat; |
| | | |
| | | import java.util.List; |
| | | import com.zy.api.entity.SyncMatParmas; |
| | | |
| | | public interface KopenApiService { |
| | | |
| | |
| | | * @param matnrs |
| | | * @return com.core.common.R |
| | | */ |
| | | R basMatupdate(List<Mat> matnrs); |
| | | R basMatupdate(SyncMatParmas matnrs); |
| | | |
| | | |
| | | /** |
| | |
| | | package com.zy.api.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.api.entity.CallAgvParams; |
| | | import com.zy.api.enums.OrderType; |
| | | import com.zy.api.service.AgvScheduleService; |
| | | import com.zy.asrs.entity.LocCache; |
| | | import com.zy.asrs.entity.Task; |
| | | import com.zy.asrs.entity.result.ForwardAGVTaskDTO; |
| | | import com.zy.asrs.entity.result.HIKApiDTO; |
| | | import com.zy.asrs.entity.result.HIKResultDTO; |
| | | import com.zy.asrs.enums.LocStsType; |
| | | import com.zy.asrs.enums.TaskIOType; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.zy.asrs.service.LocCacheService; |
| | | import com.zy.asrs.service.TaskService; |
| | | import com.zy.asrs.service.impl.LocCacheServiceImpl; |
| | | import com.zy.common.constant.HIKApiConstant; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.UUID; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class AgvScheduleServiceImpl implements AgvScheduleService { |
| | | |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | @Autowired |
| | | private TaskService taskService; |
| | | @Autowired |
| | | private LocCacheService locCacheService; |
| | | |
| | | /** |
| | | * @author Ryan |
| | |
| | | |
| | | @Override |
| | | public R callback(CallAgvParams params) { |
| | | //TODO 1. 搬运完成,修改 |
| | | //TODO 1. 搬运完成,修改站点库位状态 |
| | | if (params.getType().equals(OrderType.ORDER_OUT.type)) { |
| | | //出库单 |
| | | if (params.getStatus().equals("RUNING")) { |
| | | LocCache locCache = locCacheService.selectOne(new EntityWrapper<LocCache>().eq("loc_no", params.getOrgLoc())); |
| | | if (Objects.isNull(locCache)) { |
| | | throw new CoolException("库位信息不存在!!"); |
| | | } |
| | | if (!locCache.getLocSts().equals(LocStsType.LOC_STS_TYPE_O.type)) { |
| | | locCache.setLocSts(LocStsType.LOC_STS_TYPE_O.type); |
| | | } |
| | | } else if (params.getStatus().equals("FINISHED")) { |
| | | Task task = taskService.selectOne(new EntityWrapper<Task>().eq("wrk_no", params.getWrkNo())); |
| | | if (Objects.isNull(task)) { |
| | | throw new CoolException("任务信息不存在!!"); |
| | | } |
| | | if (!taskService.updateById(task)) { |
| | | throw new CoolException("任务状态更新失败!!"); |
| | | } |
| | | } |
| | | } else { |
| | | //入库单 |
| | | |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public HIKResultDTO sendAgvTask(HIKApiDTO haiKangApiDTO, String path) { |
| | | HIKResultDTO result = new HIKResultDTO(); |
| | | ForwardAGVTaskDTO forwardAGVTaskParam = new ForwardAGVTaskDTO(); |
| | | forwardAGVTaskParam.setReqCode(UUID.randomUUID().toString().replace("-", "")); |
| | | forwardAGVTaskParam.setClientCode("IWMS"); |
| | | forwardAGVTaskParam.setTaskTyp(haiKangApiDTO.getTaskType()); |
| | | forwardAGVTaskParam.setCtnrTyp(haiKangApiDTO.getCtnrType()); |
| | | forwardAGVTaskParam.setPriority(haiKangApiDTO.getPriority()); |
| | | List<ForwardAGVTaskDTO.PositionCodePaths> positionCodePathsList = new ArrayList<>(); |
| | | positionCodePathsList.add(new ForwardAGVTaskDTO.PositionCodePaths(haiKangApiDTO.getOrg(), haiKangApiDTO.getOrgType())); |
| | | positionCodePathsList.add(new ForwardAGVTaskDTO.PositionCodePaths(haiKangApiDTO.getTar(), haiKangApiDTO.getTarType())); |
| | | forwardAGVTaskParam.setPositionCodePath(positionCodePathsList); |
| | | String body = JSON.toJSONString(forwardAGVTaskParam); |
| | | String response = ""; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | .setUri(HIKApiConstant.AGV_IP) |
| | | .setPath(path) |
| | | .setJson(body) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject.getInteger("code").equals(0)) { |
| | | result.setSuccess(true); |
| | | } else { |
| | | result.setMessage(jsonObject.getString("message")); |
| | | log.error("发送agv任务失败!!!url:{};request:{};response:{}", HIKApiConstant.AGV_IP + path, body, response); |
| | | } |
| | | // {"code":"1","data":"","interrupt":false,"message":"重复提交","msgErrCode":"0x3a80D012","reqCode":"fa92b49481a44627ae4d80c1400f28f6"} |
| | | } catch (Exception e) { |
| | | result.setMessage(e.getMessage()); |
| | | log.error("发送agv任务异常", e); |
| | | } finally { |
| | | try { |
| | | // 保存接口日志 |
| | | apiLogService.save( |
| | | "发送agv任务", |
| | | HIKApiConstant.AGV_IP + path, |
| | | null, |
| | | "127.0.0.1", |
| | | body, |
| | | response, |
| | | result.isSuccess() |
| | | ); |
| | | } catch (Exception e) { |
| | | log.error("", e); |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.api.entity.OrderParams; |
| | | import com.zy.api.entity.SyncMatParmas; |
| | | import com.zy.api.enums.MatLocType; |
| | | import com.zy.api.enums.MatType; |
| | | import com.zy.api.enums.OrderType; |
| | | import com.zy.api.enums.OrderWkType; |
| | | import com.zy.api.service.KopenApiService; |
| | |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.enums.CommonEnum; |
| | | import com.zy.asrs.enums.OrderSettle; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | | import com.zy.asrs.service.OrderService; |
| | | |
| | | import com.zy.asrs.utils.Utils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.text.DateFormat; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | @Service("kopenApiServiceImpl") |
| | |
| | | private OrderService orderService; |
| | | @Autowired |
| | | private OrderDetlService orderDetlService; |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | /** |
| | | * 接收下发订单信息 |
| | |
| | | * |
| | | * @author Ryan |
| | | * @date 2025/11/24 15:05 |
| | | * @param matnrs |
| | | * @param params |
| | | * @return com.core.common.R |
| | | */ |
| | | @Override |
| | | public R basMatupdate(List<Mat> matnrs) { |
| | | return null; |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public synchronized R basMatupdate(SyncMatParmas params) { |
| | | if (Objects.isNull(params.getPro_komcode())) { |
| | | return R.error("零件编码不能为空!!"); |
| | | } |
| | | Mat matnr = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", params.getPro_komcode())); |
| | | if (!Objects.isNull(matnr)) { |
| | | // 订单时间 |
| | | if (Utils.isValidFormat(params.getUpdate_time(), "yyyy-MM-dd HH:mm:ss")) { |
| | | Date date1 = Utils.getFormateDate(params.getUpdate_time()); |
| | | matnr.setUpdateTime(date1); |
| | | } |
| | | matnr.setMaktx(params.getPro_name()); |
| | | matnr.setSpecs(params.getPro_size()); |
| | | matnr.setWeight(Double.parseDouble(params.getPro_wet())); |
| | | matnr.setSuppCode(params.getPro_id()); |
| | | matnr.setTagId(MatLocType.getTag(params.getPro_type())); |
| | | matnr.setManu(params.getCompany_id()); |
| | | if (!matService.updateById(matnr)) { |
| | | throw new CoolException("物料更新失败或无需更新!!"); |
| | | } |
| | | } else { |
| | | if (Objects.isNull(matnr)) { |
| | | matnr = new Mat(); |
| | | } |
| | | // 订单时间 |
| | | if (Utils.isValidFormat(params.getUpdate_time(), "yyyy-MM-dd HH:mm:ss")) { |
| | | Date date1 = Utils.getFormateDate(params.getUpdate_time()); |
| | | matnr.setUpdateTime(date1); |
| | | } |
| | | matnr.setMaktx(params.getPro_name()); |
| | | matnr.setMatnr(params.getPro_komcode()); |
| | | matnr.setSpecs(params.getPro_size()); |
| | | matnr.setWeight(Double.parseDouble(params.getPro_wet())); |
| | | matnr.setSuppCode(params.getPro_id()); |
| | | matnr.setTagId(MatLocType.getTag(params.getPro_type())); |
| | | matnr.setManu(params.getCompany_id()); |
| | | if (!matService.insert(matnr)) { |
| | | throw new CoolException("物料更新失败!!"); |
| | | } |
| | | } |
| | | return R.ok("保存成功!!"); |
| | | } |
| | | |
| | | /** |
| | |
| | | newOrder.setSettle(OrderSettle.ORDER_SETTLE_HOLDING.type); |
| | | newOrder.setStatus(CommonEnum.COMMON_ENUM_Y.type); |
| | | // 订单时间 |
| | | newOrder.setOrderTime(DateUtils.convert(new Date(), "yyyy-MM-dd HH:mm:ss")); |
| | | if (Utils.isValidFormat(params.getUpdate_time(), "yyyy-MM-dd HH:mm:ss")) { |
| | | newOrder.setOrderTime(params.getUpdate_time()); |
| | | } |
| | | // 公司ID |
| | | newOrder.setCstmrName(params.getCompany_id()); |
| | | newOrder.setCreateTime(new Date()); |
| | |
| | | } |
| | | if (!Objects.isNull(params.getDetails()) && !params.getDetails().isEmpty()) { |
| | | params.getDetails().forEach(item -> { |
| | | Mat matnr = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", item.getPro_komcode())); |
| | | if (Objects.isNull(matnr)) { |
| | | throw new CoolException("物料编码不存在!!"); |
| | | } |
| | | OrderDetl orderItem = new OrderDetl(); |
| | | BeanUtils.copyProperties(item, orderItem); |
| | | BeanUtils.copyProperties(matnr, orderItem); |
| | | orderItem.setOrderId(newOrder.getId()); |
| | | orderItem.setOrderNo(newOrder.getOrderNo()); |
| | | orderItem.setAnfme(Math.round(item.getInv_qty() * 10000) / 10000.0); |
| | | orderItem.setMatnr(item.getPro_komcode()); |
| | | orderItem.setMatnr(matnr.getMatnr()); |
| | | orderItem.setMaktx(matnr.getMaktx()); |
| | | orderItem.setBrand(matnr.getBrand()); |
| | | orderItem.setBatch(1 + ""); |
| | | orderItem.setStandby1(item.getPro_id()); |
| | | //关联上加派工单号+零件代码+供应商代码 |
| | |
| | | @Resource |
| | | private StaDescService staDescService; |
| | | |
| | | @PostMapping("/agv/collectionPakin/view") |
| | | @ManagerAuth |
| | | public R pdaAgvCollectionPakinView(@RequestBody CollectionPakinParams params){ |
| | | return mobileService.collectionPakinView(params); |
| | | } |
| | | |
| | | @PostMapping("/agv/collectionPakin/auth") |
| | | @ManagerAuth |
| | | public R pdaAgvCollectionPakin(@RequestBody CollectionPakinParams params){ |
| | | return mobileService.collectionPakin(params, getUserId()); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/agv/callEmptyCar") |
| | | @ManagerAuth |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.annotations.AppAuth; |
| | | import com.core.common.*; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.Task; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.entity.param.*; |
| | | import com.zy.asrs.service.OpenService; |
| | | import com.zy.asrs.service.TaskService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.web.BaseController; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * Created by vincent on 2022/4/8 |
| | |
| | | @Autowired |
| | | private OpenService openService; |
| | | |
| | | @Autowired |
| | | private TaskService taskService; |
| | | |
| | | |
| | | |
| | | @PostMapping("/agvPickupComplete/agvCallback") |
| | | @AppAuth(memo = "AGV取货完成接口") |
| | | public Map<String, Object> agvPickupComplete(@RequestBody AgvTaskParam agvTaskParam, HttpServletRequest request) { |
| | | // DecimalFormat df = new DecimalFormat("0000"); |
| | | // String wrkNo = "Ctu"+df.format(param.getWrkNo())+date.getTime()/1000; |
| | | // String wrkNo = agvTaskParam.getTaskCode().substring(3,7); |
| | | // Task task = taskService.selectOne(new EntityWrapper<Task>().eq("wrk_no", Integer.parseInt(wrkNo))); |
| | | Task task = taskService.selectOne(new EntityWrapper<Task>().eq("wrk_no", agvTaskParam.getTaskCode())); |
| | | if (Cools.isEmpty(task)) { |
| | | log.error("未查询到任务号对应的数据"); |
| | | } |
| | | task.setWrkSts(0L); |
| | | taskService.updateById(task); |
| | | |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("code","0"); |
| | | map.put("message","成功"); |
| | | map.put("reqCode", ""); |
| | | log.info("agv请求取货完成,wms任务号:"+ JSON.toJSONString(agvTaskParam)); |
| | | return map; |
| | | |
| | | } |
| | | |
| | | @PostMapping("/agvTaskComplete/agvCallback") |
| | | @AppAuth(memo = "AGV放货完成接口") |
| | | public Map<String, Object> agvTaskComplete(@RequestBody AgvTaskParam agvTaskParam,HttpServletRequest request) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | // String wrkNo = agvTaskParam.getTaskCode().substring(3,7); |
| | | // Task task = taskService.selectOne(new EntityWrapper<Task>().eq("wrk_no", Integer.parseInt(wrkNo))); |
| | | Task task = taskService.selectOne(new EntityWrapper<Task>().eq("wrk_no", agvTaskParam.getTaskCode())); |
| | | if (Cools.isEmpty(task)) { |
| | | log.error("未查询到任务号对应的数据"); |
| | | } |
| | | if (task.getIoType() < 100 ){ |
| | | task.setWrkSts(4L); |
| | | }else { |
| | | task.setWrkSts(14L); |
| | | } |
| | | taskService.updateById(task); |
| | | |
| | | map.put("code","0"); |
| | | map.put("message","成功"); |
| | | map.put("reqCode", ""); |
| | | return map; |
| | | } |
| | | |
| | | @PostMapping("/order/matSync/default/v2") |
| | | // @AppAuth(memo = "商品信息同步接口") |
| | | public synchronized R syncMatInfoV2(@RequestHeader(required = false) String appkey, |
| | |
| | | this.barcode = barcode; |
| | | } |
| | | |
| | | |
| | | public String getType$() { |
| | | if (Cools.isEmpty(type)) { |
| | | return "料箱"; |
| | |
| | | return ContainerType.CONTAINER_TYPE_SALVER.desc; |
| | | } else if (type.equals(ContainerType.CONTAINER_TYPE_CAGE.type)) { |
| | | return ContainerType.CONTAINER_TYPE_CAGE.desc; |
| | | } else if (type.equals(ContainerType.CONTAINER_TYPE_CAR.type)) { |
| | | return ContainerType.CONTAINER_TYPE_CAR.desc; |
| | | } |
| | | return null; |
| | | } |
| | |
| | | return CommonEnum.COMMON_ENUM_N.desc; |
| | | } else if (flagMix.equals(CommonEnum.COMMON_ENUM_Y.type)) { |
| | | return CommonEnum.COMMON_ENUM_Y.desc; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | |
| | | import com.zy.system.entity.User; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import lombok.experimental.Accessors; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | |
| | | |
| | | @Data |
| | | @TableName("agv_bas_station_detl") |
| | | @Accessors(chain = true) |
| | | public class BasStationDetl implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasProcessProceduresService; |
| | | import com.zy.asrs.service.BasQualityTestingService; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.asrs.service.LocOwnerService; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.utils.Synchro; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | |
| | | } |
| | | } |
| | | |
| | | public String getTag$() { |
| | | MatService service = SpringUtils.getBean(MatService.class); |
| | | Mat order = service.selectOne(new EntityWrapper<Mat>().eq("matnr", this.matnr)); |
| | | if (Cools.isEmpty(order)){ |
| | | return null; |
| | | } |
| | | return order.getTagId$(); |
| | | } |
| | | |
| | | public String getSource$(){ |
| | | if (null == this.source){ return null; } |
| | | switch (this.source){ |
| | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.zy.api.enums.MatLocType; |
| | | import com.zy.asrs.enums.ContainerType; |
| | | import com.zy.asrs.service.BasContainerService; |
| | | import com.zy.asrs.service.TagService; |
| | |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | @ApiModelProperty("库位类型") |
| | |
| | | // ); |
| | | |
| | | public String getTagId$(){ |
| | | TagService service = SpringUtils.getBean(TagService.class); |
| | | Tag tag = service.selectById(this.tagId); |
| | | if (!Cools.isEmpty(tag)){ |
| | | return String.valueOf(tag.getName()); |
| | | } |
| | | return null; |
| | | // TagService service = SpringUtils.getBean(TagService.class); |
| | | // Tag tag = service.selectById(this.tagId); |
| | | // if (!Cools.isEmpty(tag)){ |
| | | // return String.valueOf(tag.getName()); |
| | | // } |
| | | return MatLocType.getTagName(this.tagId + ""); |
| | | } |
| | | |
| | | public String getLocType$(){ |
| | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.DocTypeService; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.OrderSettleService; |
| | | import com.zy.common.utils.Synchro; |
| | | import com.zy.system.entity.User; |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | public String getPayTime$(){ |
| | | if (Cools.isEmpty(this.payTime)){ |
| | | return ""; |
| | |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasProcessProceduresService; |
| | | import com.zy.asrs.service.BasQualityTestingService; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.OrderService; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | |
| | | } |
| | | } |
| | | |
| | | public String getTag$() { |
| | | MatService service = SpringUtils.getBean(MatService.class); |
| | | Mat order = service.selectOne(new EntityWrapper<Mat>().eq("matnr", this.matnr)); |
| | | if (Cools.isEmpty(order)){ |
| | | return null; |
| | | } |
| | | return order.getTagId$(); |
| | | } |
| | | |
| | | public String getInspect$(){ |
| | | if (null == this.inspect){ return null; } |
| | | switch (this.inspect){ |
| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasProcessProceduresService; |
| | | import com.zy.asrs.service.BasQualityTestingService; |
| | | import com.zy.asrs.service.OrderService; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.utils.Synchro; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | |
| | | } |
| | | } |
| | | |
| | | public String getTag$() { |
| | | MatService service = SpringUtils.getBean(MatService.class); |
| | | Mat order = service.selectOne(new EntityWrapper<Mat>().eq("matnr", this.matnr)); |
| | | if (Cools.isEmpty(order)){ |
| | | return null; |
| | | } |
| | | TagService tagService = SpringUtils.getBean(TagService.class); |
| | | Tag tag = tagService.selectOne(new EntityWrapper<Tag>().eq("id", order.getTagId())); |
| | | if (!Objects.isNull(tag)){ |
| | | return tag.getName(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getPakinPakoutStatus$(){ |
| | | if (Objects.isNull(pakinPakoutStatus)) {return null;} |
| | | switch (this.pakinPakoutStatus){ |
| | |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasProcessProceduresService; |
| | | import com.zy.asrs.service.BasQualityTestingService; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.OrderService; |
| | | import com.zy.common.utils.Synchro; |
| | | import com.zy.system.entity.User; |
| | |
| | | } |
| | | } |
| | | |
| | | public String getTag$() { |
| | | MatService service = SpringUtils.getBean(MatService.class); |
| | | Mat order = service.selectOne(new EntityWrapper<Mat>().eq("matnr", this.matnr)); |
| | | if (Cools.isEmpty(order)){ |
| | | return null; |
| | | } |
| | | return order.getTagId$(); |
| | | } |
| | | |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.api.enums.MatLocType; |
| | | import com.zy.asrs.service.BasProcessProceduresService; |
| | | import com.zy.asrs.service.BasQualityTestingService; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.TagService; |
| | | import com.zy.common.utils.Synchro; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.Objects; |
| | | |
| | | @Data |
| | | @TableName("cust_wait_pakin") |
| | |
| | | } |
| | | } |
| | | |
| | | public String getTag$() { |
| | | MatService service = SpringUtils.getBean(MatService.class); |
| | | Mat order = service.selectOne(new EntityWrapper<Mat>().eq("matnr", this.matnr)); |
| | | if (Cools.isEmpty(order)){ |
| | | return null; |
| | | } |
| | | return order.getTagId$(); |
| | | } |
| | | |
| | | public String getType$(){ |
| | | if (null == this.type){ return null; } |
| | | switch (this.type){ |
| New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class AgvTaskParam { |
| | | private String taskCode; |
| | | private String ctnrCode; |
| | | private String stgBinCode; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class CollectionPakinParams { |
| | | |
| | | private String orgBarcode; |
| | | |
| | | private String tarBarcode; |
| | | |
| | | private String devNo; |
| | | |
| | | private List<CombMat> combMats; |
| | | |
| | | @Data |
| | | public static class CombMat { |
| | | |
| | | private String orderNo; |
| | | |
| | | // 物料编号 |
| | | private String matnr = ""; |
| | | |
| | | // 序列码 |
| | | private String batch = ""; |
| | | private String brand = ""; |
| | | private String standby1 = ""; |
| | | private String standby2 = ""; |
| | | private String standby3 = ""; |
| | | |
| | | private String boxType1 = "1"; |
| | | private String boxType2 = "1"; |
| | | private String boxType3 = "1"; |
| | | |
| | | // 物料数量 |
| | | private BigDecimal anfme; |
| | | |
| | | // 物料数量 |
| | | private BigDecimal workQty; |
| | | |
| | | // 商品名称 |
| | | private String maktx; |
| | | |
| | | // 规格 |
| | | private String specs; |
| | | |
| | | private String threeCode; |
| | | } |
| | | } |
| | |
| | | |
| | | PICK_IN("53", "53.拣料入库"), |
| | | |
| | | MERGE_IN("54", "53.并板入库"), |
| | | MERGE_IN("54", "54.并板入库"), |
| | | |
| | | CHECK_IN("57", "57.盘点入库"), |
| | | |
| | |
| | | |
| | | import com.zy.asrs.entity.Task; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | public interface TaskMapper extends BaseMapper<Task> { |
| | | |
| | | List<Task> selectToBeCompleteData(); |
| | | |
| | | List<Task> selectToBeHistoryData(); |
| | | } |
| | |
| | | * @date 2025/12/9 15:04 |
| | | */ |
| | | void combInPub(CompleteParam combParam, Long userId); |
| | | |
| | | R collectionPakin(CollectionPakinParams params, Long userId); |
| | | |
| | | R collectionPakinView(CollectionPakinParams params); |
| | | } |
| | |
| | | |
| | | import com.zy.asrs.entity.Task; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | void pickWrkMast(String workNo, Long userId); |
| | | |
| | | List<Task> selectToBeCompleteData(); |
| | | |
| | | List<Task> selectToBeHistoryData(); |
| | | } |
| | |
| | | } else if (container.getType().equals(ContainerType.CONTAINER_TYPE_SALVER.type)) { |
| | | prefix = "TP4"; |
| | | basContainer.setMixMax(2); |
| | | } else if (container.getType().equals(ContainerType.CONTAINER_TYPE_CAR.type)) { |
| | | prefix = "TC5"; |
| | | basContainer.setMixMax(1); |
| | | } |
| | | ruleCode = prefix + StringUtils.leftPad(i + "", length, "0"); |
| | | basContainer.setType(container.getType()) |
| | |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.*; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.api.enums.MatLocType; |
| | | import com.zy.api.enums.MatType; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.*; |
| | | import com.zy.asrs.entity.result.FindLocNoAttributeVo; |
| | |
| | | throw new CoolException(param.getBarcode() + "数据正在进行入库"); |
| | | } |
| | | |
| | | if (param.getBarcode().length() != 8) { |
| | | throw new CoolException("条码长度不是8位===>>" + param.getBarcode()); |
| | | if (Objects.isNull(param.getBarcode())) { |
| | | throw new CoolException("托盘码不能为空!!"); |
| | | } |
| | | // if (param.getBarcode().length() != 8) { |
| | | // throw new CoolException("条码长度不是8位===>>" + param.getBarcode()); |
| | | // } |
| | | |
| | | if (Objects.isNull(param.getType())) { |
| | | param.setType("0"); |
| | |
| | | } |
| | | }); |
| | | |
| | | BasContainer container = basContainerService.selectOne(new EntityWrapper<BasContainer>().eq("barcode", param.getBarcode())); |
| | | if (Objects.isNull(container)) { |
| | | throw new CoolException("数据错误:容器码不存在!!"); |
| | | } |
| | | if (container.getMixMax() < detlDtos.size()) { |
| | | throw new CoolException("超出容器最大混装数量,当前容器最大数量为:" + container.getMixMax() + "!!"); |
| | | } |
| | | Set<String> matnrs = detlDtos.stream().map(DetlDto::getMatnr).collect(Collectors.toSet()); |
| | | List<Mat> mats = matService.selectList(new EntityWrapper<Mat>().in("matnr", matnrs)); |
| | | Set<Long> tagIds = mats.stream().map(Mat::getTagId).collect(Collectors.toSet()); |
| | | if (tagIds.size() > 1) { |
| | | throw new CoolException("组托物料类型不一致,只有相同的物料分类才可以组托!!"); |
| | | } |
| | | |
| | | // BasContainer container = basContainerService.selectOne(new EntityWrapper<BasContainer>().eq("barcode", param.getBarcode())); |
| | | // if (Objects.isNull(container)) { |
| | | // throw new CoolException("数据错误:容器码不存在!!"); |
| | | // } |
| | | // if (container.getMixMax() < detlDtos.size()) { |
| | | // throw new CoolException("超出容器最大混装数量,当前容器最大数量为:" + container.getMixMax() + "!!"); |
| | | // } |
| | | //还可以放入多少种物料 |
| | | Integer suplus = container.getMixMax(); |
| | | // Integer suplus = container.getMixMax(); |
| | | for (DetlDto detlDto : detlDtos) { |
| | | Mat mat = matService.selectByMatnr(detlDto.getMatnr()); |
| | | if (Cools.isEmpty(mat)) { |
| | | throw new CoolException(detlDto.getMatnr() + "商品档案不存在"); |
| | | } |
| | | //最多可放数量 |
| | | Double singleMax = mat.getUpQty() * suplus; |
| | | if (singleMax.compareTo(detlDto.getAnfme()) < 0) { |
| | | throw new CoolException("物料:" + detlDto.getMatnr() + "单次组托上限为:" + mat.getUpQty() + ",当前总量超出托盘装载上限!!"); |
| | | } |
| | | BigDecimal decimal = new BigDecimal(detlDto.getAnfme() / mat.getUpQty()); |
| | | //当前物料需要占用料箱格数 |
| | | Integer curr = decimal.setScale(0, RoundingMode.CEILING).intValue(); |
| | | suplus = suplus - curr; |
| | | if (suplus < 0) { |
| | | throw new CoolException("物料:" + detlDto.getMatnr() + ", 超出当前托盘装载上限!!"); |
| | | } |
| | | // //最多可放数量 |
| | | // Double singleMax = mat.getUpQty() * suplus; |
| | | // if (singleMax.compareTo(detlDto.getAnfme()) < 0) { |
| | | // throw new CoolException("物料:" + detlDto.getMatnr() + "单次组托上限为:" + mat.getUpQty() + ",当前总量超出托盘装载上限!!"); |
| | | // } |
| | | // BigDecimal decimal = new BigDecimal(detlDto.getAnfme() / mat.getUpQty()); |
| | | // //当前物料需要占用料箱格数 |
| | | // Integer curr = decimal.setScale(0, RoundingMode.CEILING).intValue(); |
| | | // suplus = suplus - curr; |
| | | // if (suplus < 0) { |
| | | // throw new CoolException("物料:" + detlDto.getMatnr() + ", 超出当前托盘装载上限!!"); |
| | | // } |
| | | |
| | | WaitPakin waitPakin = new WaitPakin(); |
| | | BeanUtils.copyProperties(mat, waitPakin); |
| | | // waitPakin.sync(mat); |
| | | waitPakin.setOrderNo(detlDto.getOrderNo()); // 单据编号 |
| | | waitPakin.setType(param.getType()); |
| | | waitPakin.setOrderId(detlDto.getOrderId()); |
| | | waitPakin.setBatch(detlDto.getBatch()); // 序列码 |
| | | waitPakin.setZpallet(param.getBarcode()); // 托盘码 |
| | |
| | | * @version 1.0 |
| | | */ |
| | | @Override |
| | | public R callAgvMove(AgvCallParams params, Long userId) { |
| | | if (Objects.isNull(params.getTarSite())) { |
| | | throw new CoolException("目标参数不能为空!!"); |
| | | } |
| | | @Transactional |
| | | public synchronized R callAgvMove(AgvCallParams params, Long userId) { |
| | | if (Objects.isNull(params.getOrgSite())) { |
| | | throw new CoolException("源站点不能为空!!"); |
| | | } |
| | | BasAreas basAreas = basAreasService.selectOne(new EntityWrapper<BasAreas>().eq("whs_type_id", LocAreaType.LOC_AREA_TYPE_IN_CACHE.type)); |
| | | LocCache locCache = locCacheService.selectOne(new EntityWrapper<LocCache>() |
| | | .eq("area_id",basAreas.getId()) |
| | | .eq("frozen", 0) |
| | | .eq("loc_sts", LocStsType.LOC_STS_TYPE_O.type) |
| | | .eq("loc_no", params.getTarSite()) |
| | | // .eq("loc_no", params.getTarSite()) |
| | | .orderAsc(Arrays.asList("loc_no")) |
| | | .last("OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY")); |
| | | if (Objects.isNull(locCache)) { |
| | | throw new CoolException("请检查目标库位是否闲置中!!"); |
| | | } |
| | | |
| | | generateAgvTask("agv", locCache, params.getOrgSite(), params.getBarcode(), userId); |
| | | try { |
| | | generateAgvTask("agv", locCache, params.getOrgSite(), params.getBarcode(), userId); |
| | | }catch (Exception e) { |
| | | throw new CoolException(e.getMessage()); |
| | | } |
| | | |
| | | |
| | | return R.ok(); |
| | | } |
| | |
| | | if (Objects.isNull(locCaches)) { |
| | | throw new CoolException("暂无满足需求库位!"); |
| | | } |
| | | |
| | | //获取缓存区信息 |
| | | BasAreas basAreas = basAreasService.selectOne(new EntityWrapper<BasAreas>().eq("whs_type_id", LocAreaType.LOC_AREA_TYPE_IN_CACHE.type)); |
| | | if (Objects.isNull(basAreas)) { |
| | | throw new CoolException("库区不存在!!"); |
| | | } |
| | | |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>() |
| | | .eq("area_id", basAreas.getId()) |
| | | .eq("loc_no", locCaches.getLocNo())); |
| | | if (Objects.isNull(locDetls) || locDetls.isEmpty()) { |
| | | throw new CoolException("库存明细不存在!!"); |
| | | } |
| | | |
| | | Set<String> set = locDetls.stream().map(LocDetl::getMatnr).collect(Collectors.toSet()); |
| | | List<Mat> matList = matService.selectList(new EntityWrapper<Mat>().in("matnr", set)); |
| | | if (Objects.isNull(matList) || matList.isEmpty()) { |
| | | throw new CoolException("物料库不存在该物料!!"); |
| | | } |
| | | Set<Long> longs = matList.stream().map(Mat::getTagId).collect(Collectors.toSet()); |
| | | if (!longs.isEmpty() && longs.size() > 1) { |
| | | throw new CoolException("物料类型不一致,请检查数据是否正确!!"); |
| | | } |
| | | |
| | | Mat mat = matList.stream().findFirst().get(); |
| | | |
| | | BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>() |
| | | .eq("loc_sts", LocStsType.LOC_STS_TYPE_O.type) |
| | | .eq("ctn_type", mat.getTagId()) |
| | | .eq("dev_no", params.getTarSite())); |
| | | if (Objects.isNull(station)) { |
| | | throw new CoolException("站点正在执行任务!!"); |
| | |
| | | } |
| | | |
| | | @Override |
| | | // @Transactional(rollbackFor = Exception.class) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R collectionInCall(AgvCallParams params, Long userId) { |
| | | if (Objects.isNull(params.getOrgSite())) { |
| | | throw new CoolException("源站点不能为空!!"); |
| | | } |
| | | List<Task> tasks = taskService.selectList(new EntityWrapper<Task>().eq("barcode", params.getBarcode())); |
| | | if (!tasks.isEmpty()) { |
| | | throw new CoolException("托盘码已生成任务"); |
| | | } |
| | | |
| | | BasAreas basAreas = basAreasService.selectOne(new EntityWrapper<BasAreas>().eq("name", params.getTarSite())); |
| | | |
| | | List<LocCache> locCaches = locCacheService.selectList(new EntityWrapper<LocCache>() |
| | | .in("loc_sts", LocStsType.LOC_STS_TYPE_O.type, LocStsType.LOC_STS_TYPE_D.type) |
| | | .in("loc_sts", LocStsType.LOC_STS_TYPE_O.type) |
| | | .eq("area_id", basAreas.getId())); |
| | | if (locCaches.isEmpty()) { |
| | | throw new CoolException("当前暂无空库位!!"); |
| | | } |
| | | |
| | | generateAgvTask("agv", locCaches.get(0), params.getOrgSite(), params.getBarcode(), userId); |
| | | BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", params.getOrgSite())); |
| | | if (Objects.isNull(station)) { |
| | | throw new CoolException("源站点未检索到数据!!"); |
| | | } |
| | | |
| | | generateSOEOInTask("agv", locCaches.get(0), params.getOrgSite(), station.getBarcode(), userId); |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void generateSOEOInTask(String type, LocCache loc, String orgSite, String barcode, Long userId) { |
| | | List<BasStationDetl> basStationDetls = basStationDetlService.selectList(new EntityWrapper<BasStationDetl>().eq("dev_no", orgSite)); |
| | | if (Objects.isNull(basStationDetls) || basStationDetls.isEmpty()) { |
| | | throw new CoolException("站点信息不存在!!"); |
| | | } |
| | | |
| | | List<Task> tasks = taskService.selectList(new EntityWrapper<Task>().eq("barcode", barcode)); |
| | | if (!tasks.isEmpty()) { |
| | | throw new CoolException("托盘已在任务执行中.."); |
| | | } |
| | | // 获取工作号 |
| | | int workNo = commonService.getWorkNo(WorkNoType.PICK.type); |
| | | // 保存工作档 |
| | | Task task = new Task(); |
| | | task.setWrkNo(workNo) |
| | | .setIoTime(new Date()) |
| | | .setWrkSts(1L) // 工作状态:11.生成出库ID |
| | | .setIoType(1) // 入出库状态: 11.库格移载 |
| | | .setTaskType("agv") |
| | | .setIoPri(10D) |
| | | .setLocNo(loc.getLocNo()) // 目标库位 |
| | | .setFullPlt("Y") // 满板:Y |
| | | .setPicking("N") // 拣料 |
| | | .setExitMk("N")// 退出 |
| | | .setSourceStaNo(orgSite) |
| | | .setEmptyMk(loc.getLocSts().equals("D") ? "Y" : "N")// 空板 |
| | | .setBarcode(barcode)// 托盘码 |
| | | .setLinkMis("N") |
| | | .setAppeUser(userId) |
| | | .setAppeTime(new Date()) |
| | | .setModiUser(userId) |
| | | .setModiTime(new Date()); |
| | | if (!taskService.insert(task)) { |
| | | throw new CoolException("保存工作档失败"); |
| | | } |
| | | |
| | | for (BasStationDetl basStationDetl : basStationDetls) { |
| | | TaskDetl wrkDetl = new TaskDetl(); |
| | | BeanUtils.copyProperties(basStationDetl, wrkDetl); |
| | | wrkDetl.setWrkNo(workNo) |
| | | .setIoTime(new Date()) |
| | | .setOrderNo(basStationDetl.getOrderNo()) |
| | | .setAnfme(basStationDetl.getAnfme()) |
| | | .setZpallet(basStationDetl.getBarcode()) |
| | | .setBatch(basStationDetl.getBatch()) |
| | | .setMatnr(basStationDetl.getMatnr()) |
| | | .setMaktx(basStationDetl.getMaktx()) |
| | | .setStandby1(basStationDetl.getStandby1()) |
| | | .setAppeUser(userId) |
| | | .setUnit(basStationDetl.getUnit()) |
| | | .setModel(basStationDetl.getModel()) |
| | | .setAppeTime(new Date()) |
| | | .setModiUser(userId); |
| | | |
| | | //保存工作档明细 |
| | | if (!taskDetlService.insert(wrkDetl)) { |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | | } |
| | | |
| | | // 修改目标库位状态 |
| | | if (loc.getLocSts().equals(LocStsType.LOC_STS_TYPE_O.type)) { |
| | | loc.setLocSts(LocStsType.LOC_STS_TYPE_S.type); // S.入库预约 |
| | | loc.setModiTime(new Date()); |
| | | loc.setModiUser(userId); |
| | | if (!locCacheService.updateById(loc)) { |
| | | throw new CoolException("更新目标库位状态失败"); |
| | | } |
| | | } else { |
| | | throw new CoolException("移转失败,目标库位状态:" + loc.getLocSts$()); |
| | | } |
| | | |
| | | // 修改目标站点信息 |
| | | BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", orgSite)); |
| | | if (Objects.isNull(station)) { |
| | | throw new CoolException("站点不存在!!"); |
| | | } |
| | | |
| | | if (station.getLocSts().equals(LocStsType.LOC_STS_TYPE_F.type)) { |
| | | station.setLocSts("R"); // S.入库预约 |
| | | station.setBarcode(barcode); |
| | | station.setModiTime(new Date()); |
| | | station.setModiUser(userId); |
| | | if (!basStationService.updateById(station)) { |
| | | throw new CoolException("更新目标库位状态失败"); |
| | | } |
| | | } else { |
| | | throw new CoolException("移转失败,目标库位状态:" + station.getLocSts()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | generateCrnInTask(waitPakins, station, param.getLocType1(), userId); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R collectionPakin(CollectionPakinParams params, Long userId) { |
| | | List<BasStation> basStations = basStationService.selectList(new EntityWrapper<BasStation>().eq("barcode", params.getTarBarcode())); |
| | | if (basStations.isEmpty() && Cools.isEmpty(params.getDevNo())) { |
| | | throw new CoolException("请输入站点号"); |
| | | } |
| | | BasStation basStation = null; |
| | | if (!basStations.isEmpty()) { |
| | | basStation = basStations.get(0); |
| | | }else { |
| | | basStation = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", params.getDevNo())); |
| | | } |
| | | if (Cools.isEmpty(basStation)){ |
| | | throw new CoolException("请输入正确的站点号"); |
| | | } |
| | | for (CollectionPakinParams.CombMat combMat : params.getCombMats()) { |
| | | if (combMat.getWorkQty().compareTo(BigDecimal.ZERO) == 0) { |
| | | continue; |
| | | } |
| | | |
| | | OrderPakin orderPakin = orderPakinService.selectByNo(combMat.getOrderNo()); |
| | | if (Cools.isEmpty(orderPakin)) { |
| | | throw new CoolException("未找到备货入库单"); |
| | | } |
| | | |
| | | UpdateDetailsOfPakin(orderPakin,combMat); |
| | | |
| | | BasStationDetl basStationDetl = basStationDetlService.selectOne(new EntityWrapper<BasStationDetl>() |
| | | .eq("dev_no", basStation.getDevNo()) |
| | | .eq("matnr", combMat.getMatnr()) |
| | | .eq("batch", combMat.getBatch()) |
| | | .eq("standby1", combMat.getStandby1()) |
| | | ); |
| | | if (Cools.isEmpty(basStationDetl)) { |
| | | basStationDetl = new BasStationDetl(); |
| | | Mat mat = matService.selectByMatnr(combMat.getMatnr()); |
| | | BeanUtils.copyProperties(mat,basStationDetl); |
| | | basStationDetl |
| | | .setOrderNo(orderPakin.getOrderNo()) |
| | | .setDevNo(basStation.getDevNo()) |
| | | .setBarcode(params.getTarBarcode()) |
| | | .setBatch(combMat.getBatch()) |
| | | .setStandby1(combMat.getStandby1()) |
| | | .setAnfme(combMat.getWorkQty().doubleValue()) |
| | | ; |
| | | if (!basStationDetlService.insert(basStationDetl)){ |
| | | throw new CoolException("插入明细失败"); |
| | | } |
| | | |
| | | |
| | | }else { |
| | | BigDecimal anfme = new BigDecimal(basStationDetl.getAnfme().toString()).add(combMat.getWorkQty()); |
| | | basStationDetl.setAnfme(anfme.doubleValue()); |
| | | if (!basStationDetlService.updateById(basStationDetl)){ |
| | | throw new CoolException("更新明细数据失败"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (basStation.getLocSts().equals(LocStsType.LOC_STS_TYPE_D.type) || basStation.getLocSts().equals(LocStsType.LOC_STS_TYPE_O.type)) { |
| | | basStation.setBarcode(params.getTarBarcode()); |
| | | basStation.setLocSts(LocStsType.LOC_STS_TYPE_F.type); |
| | | basStationService.updateById(basStation); |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void UpdateDetailsOfPakin(OrderPakin orderPakin,CollectionPakinParams.CombMat combMat){ |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectOne(new EntityWrapper<OrderDetlPakin>() |
| | | .eq("order_id", orderPakin.getId()) |
| | | .eq("matnr", combMat.getMatnr()) |
| | | .eq("batch", combMat.getBatch()) |
| | | .eq("standby1", combMat.getStandby1()) |
| | | ); |
| | | if (Cools.isEmpty(orderDetlPakin)) { |
| | | throw new CoolException("检索单据明细数据失败"); |
| | | } |
| | | if (orderDetlPakin.getWorkQty() >= orderDetlPakin.getAnfme()) { |
| | | throw new CoolException("请勿超出订单明细数量"); |
| | | } |
| | | BigDecimal workQty = new BigDecimal(orderDetlPakin.getWorkQty().toString()).add(combMat.getWorkQty()); |
| | | orderDetlPakin.setWorkQty(workQty.doubleValue()); |
| | | if (!orderDetlPakinService.updateById(orderDetlPakin)){ |
| | | throw new CoolException("更新单据明细数据失败"); |
| | | } |
| | | if (!orderPakin.getSettle().equals(2L)){ |
| | | orderPakin.setSettle(2L); |
| | | if (!orderPakinService.updateById(orderPakin)){ |
| | | throw new CoolException("更新单据状态失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public R collectionPakinView(CollectionPakinParams params) { |
| | | |
| | | WrkMast wrkMast = wrkMastService.selectByBarcode(params.getOrgBarcode()); |
| | | if (Cools.isEmpty(wrkMast)) { |
| | | throw new CoolException("未找到任务"); |
| | | } |
| | | |
| | | if (wrkMast.getIoType().equals(TaskIOType.ALL_OUT.type) && wrkMast.getIoType().equals(TaskIOType.PICK_OUT.type)){ |
| | | throw new CoolException("人物类型错误"); |
| | | } |
| | | |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()); |
| | | if (Cools.isEmpty(wrkDetls)) { |
| | | throw new CoolException("未找到任务明细"); |
| | | } |
| | | |
| | | |
| | | return R.ok(wrkDetls); |
| | | } |
| | | |
| | | /** |
| | | * 生成堆垛机入库任务 |
| | | * |
| | |
| | | throw new CoolException("库存明细不存在!!"); |
| | | } |
| | | |
| | | Set<String> set = locDetls.stream().map(LocDetl::getMatnr).collect(Collectors.toSet()); |
| | | List<Mat> matList = matService.selectList(new EntityWrapper<Mat>().in("matnr", set)); |
| | | if (Objects.isNull(matList) || matList.isEmpty()) { |
| | | throw new CoolException("物料库不存在该物料!!"); |
| | | } |
| | | Set<Long> longs = matList.stream().map(Mat::getTagId).collect(Collectors.toSet()); |
| | | if (!longs.isEmpty() && longs.size() > 1) { |
| | | throw new CoolException("物料类型不一致,请检查数据是否正确!!"); |
| | | } |
| | | // Set<String> set = locDetls.stream().map(LocDetl::getMatnr).collect(Collectors.toSet()); |
| | | // List<Mat> matList = matService.selectList(new EntityWrapper<Mat>().in("matnr", set)); |
| | | // |
| | | // if (Objects.isNull(matList) || matList.isEmpty()) { |
| | | // throw new CoolException("物料库不存在该物料!!"); |
| | | // } |
| | | // Set<Long> longs = matList.stream().map(Mat::getTagId).collect(Collectors.toSet()); |
| | | // if (!longs.isEmpty() && longs.size() > 1) { |
| | | // throw new CoolException("物料类型不一致,请检查数据是否正确!!"); |
| | | // } |
| | | |
| | | //获取立库区信息 |
| | | BasAreas one = basAreasService.selectOne(new EntityWrapper<BasAreas>().eq("whs_type_id", LocAreaType.LOC_AREA_TYPE_CRN.type)); |
| | |
| | | throw new CoolException("保存工作档失败"); |
| | | } |
| | | |
| | | List<TaskDetl> taskDetls = new ArrayList<>(); |
| | | pakins.forEach(pakin -> { |
| | | for (WaitPakin pakin :pakins){ |
| | | TaskDetl wrkDetl = new TaskDetl(); |
| | | BeanUtils.copyProperties(pakin, wrkDetl); |
| | | wrkDetl.setWrkNo(workNo) |
| | | wrkDetl.setId(null).setWrkNo(workNo) |
| | | .setIoTime(new Date()) |
| | | .setOrderNo(pakin.getOrderNo()) |
| | | .setAnfme(pakin.getAnfme()) |
| | |
| | | .setModel(pakin.getModel()) |
| | | .setAppeTime(new Date()) |
| | | .setModiUser(userId); |
| | | taskDetls.add(wrkDetl); |
| | | }); |
| | | if (!taskDetlService.insert(wrkDetl)){ |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | | |
| | | //保存工作档明细 |
| | | if (!taskDetlService.insertBatch(taskDetls)) { |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | | |
| | | pakins.forEach(pakin -> { |
| | | |
| | | for (WaitPakin pakin : pakins){ |
| | | pakin.setIoStatus("Y"); |
| | | }); |
| | | |
| | | if (!waitPakinService.updateBatchById(pakins)) { |
| | | throw new CoolException("更新组托信息失败"); |
| | | if (!waitPakinService.updateById(pakin)) { |
| | | throw new CoolException("更新组托信息失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | // 修改目标库位状态 |
| | | if (loc.getLocSts().equals(LocStsType.LOC_STS_TYPE_O.type)) { |
| | | loc.setLocSts(LocStsType.LOC_STS_TYPE_S.type); // S.入库预约 |
| | |
| | | } |
| | | if (complete) { |
| | | // 出库订单重新整理明细 |
| | | DocType docType = docTypeService.selectById(order.getDocType()); |
| | | if (null != docType && docType.getPakout() == 1) { |
| | | if (!orderDetlService.delete(new EntityWrapper<OrderDetlPakin>().eq("order_id", order.getId()))) { |
| | | throw new CoolException("重整出库订单【orderNo = " + order.getOrderNo() + "】明细失败"); |
| | | } |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectAndLogByOrderNo(orderNo); |
| | | for (WrkDetl wrkDetl : wrkDetls) { |
| | | OrderDetlPakin orderDetl = new OrderDetlPakin(); |
| | | orderDetl.sync(wrkDetl); |
| | | orderDetl.setQty(orderDetl.getAnfme()); |
| | | orderDetl.setOrderId(order.getId()); |
| | | orderDetl.setOrderNo(orderNo); |
| | | orderDetl.setStatus(1); |
| | | orderDetl.setCreateTime(order.getCreateTime()); |
| | | orderDetl.setCreateBy(order.getCreateBy()); |
| | | orderDetl.setUpdateTime(order.getUpdateTime()); |
| | | orderDetl.setUpdateBy(order.getUpdateBy()); |
| | | if (!orderDetlService.insert(orderDetl)) { |
| | | throw new CoolException("重整出库订单【orderNo = " + order.getOrderNo() + "】明细失败"); |
| | | } |
| | | } |
| | | } |
| | | // DocType docType = docTypeService.selectById(order.getDocType()); |
| | | // if (null != docType && docType.getPakout() == 1) { |
| | | // if (!orderDetlService.delete(new EntityWrapper<OrderDetlPakin>().eq("order_id", order.getId()))) { |
| | | // throw new CoolException("重整出库订单【orderNo = " + order.getOrderNo() + "】明细失败"); |
| | | // } |
| | | // List<WrkDetl> wrkDetls = wrkDetlService.selectAndLogByOrderNo(orderNo); |
| | | // for (WrkDetl wrkDetl : wrkDetls) { |
| | | // OrderDetlPakin orderDetl = new OrderDetlPakin(); |
| | | // orderDetl.sync(wrkDetl); |
| | | // orderDetl.setQty(orderDetl.getAnfme()); |
| | | // orderDetl.setOrderId(order.getId()); |
| | | // orderDetl.setOrderNo(orderNo); |
| | | // orderDetl.setStatus(1); |
| | | // orderDetl.setCreateTime(order.getCreateTime()); |
| | | // orderDetl.setCreateBy(order.getCreateBy()); |
| | | // orderDetl.setUpdateTime(order.getUpdateTime()); |
| | | // orderDetl.setUpdateBy(order.getUpdateBy()); |
| | | // if (!orderDetlService.insert(orderDetl)) { |
| | | // throw new CoolException("重整出库订单【orderNo = " + order.getOrderNo() + "】明细失败"); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | if (!this.updateSettle(order.getId(), 4L, null)) { |
| | | throw new CoolException("修改订单【orderNo = " + order.getOrderNo() + "】状态为已完成失败"); |
| | |
| | | } |
| | | if (complete) { |
| | | // 出库订单重新整理明细 |
| | | DocType docType = docTypeService.selectById(order.getDocType()); |
| | | if (null != docType && docType.getPakout() == 1) { |
| | | if (!orderDetlService.delete(new EntityWrapper<OrderDetlPakout>().eq("order_id", order.getId()))) { |
| | | throw new CoolException("重整出库订单【orderNo = " + order.getOrderNo() + "】明细失败"); |
| | | } |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectAndLogByOrderNo(orderNo); |
| | | for (WrkDetl wrkDetl : wrkDetls) { |
| | | OrderDetlPakout orderDetl = new OrderDetlPakout(); |
| | | orderDetl.sync(wrkDetl); |
| | | orderDetl.setQty(orderDetl.getAnfme()); |
| | | orderDetl.setOrderId(order.getId()); |
| | | orderDetl.setOrderNo(orderNo); |
| | | orderDetl.setStatus(1); |
| | | orderDetl.setCreateTime(order.getCreateTime()); |
| | | orderDetl.setCreateBy(order.getCreateBy()); |
| | | orderDetl.setUpdateTime(order.getUpdateTime()); |
| | | orderDetl.setUpdateBy(order.getUpdateBy()); |
| | | if (!orderDetlService.insert(orderDetl)) { |
| | | throw new CoolException("重整出库订单【orderNo = " + order.getOrderNo() + "】明细失败"); |
| | | } |
| | | } |
| | | } |
| | | // DocType docType = docTypeService.selectById(order.getDocType()); |
| | | // if (null != docType && docType.getPakout() == 1) { |
| | | // if (!orderDetlService.delete(new EntityWrapper<OrderDetlPakout>().eq("order_id", order.getId()))) { |
| | | // throw new CoolException("重整出库订单【orderNo = " + order.getOrderNo() + "】明细失败"); |
| | | // } |
| | | // List<WrkDetl> wrkDetls = wrkDetlService.selectAndLogByOrderNo(orderNo); |
| | | // for (WrkDetl wrkDetl : wrkDetls) { |
| | | // OrderDetlPakout orderDetl = new OrderDetlPakout(); |
| | | // orderDetl.sync(wrkDetl); |
| | | // orderDetl.setQty(orderDetl.getAnfme()); |
| | | // orderDetl.setOrderId(order.getId()); |
| | | // orderDetl.setOrderNo(orderNo); |
| | | // orderDetl.setStatus(1); |
| | | // orderDetl.setCreateTime(order.getCreateTime()); |
| | | // orderDetl.setCreateBy(order.getCreateBy()); |
| | | // orderDetl.setUpdateTime(order.getUpdateTime()); |
| | | // orderDetl.setUpdateBy(order.getUpdateBy()); |
| | | // if (!orderDetlService.insert(orderDetl)) { |
| | | // throw new CoolException("重整出库订单【orderNo = " + order.getOrderNo() + "】明细失败"); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | if (!this.updateSettle(order.getId(), 4L, null)) { |
| | | throw new CoolException("修改订单【orderNo = " + order.getOrderNo() + "】状态为已完成失败"); |
| | |
| | | return this.baseMapper.selectToBeCompleteData(); |
| | | } |
| | | |
| | | @Override |
| | | public List<Task> selectToBeHistoryData() { |
| | | return this.baseMapper.selectToBeHistoryData(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | // 判断是否是盘点单 |
| | | String orderNo = taskDto.getLocDtos().get(0).getOrderNo(); |
| | | // OrderPakout orderPakout = orderPakOutService.selectByNo(orderNo); |
| | | CheckOrder checkOrder = checkOrderService.selectOne(new EntityWrapper<CheckOrder>().eq("order_no", orderNo)); |
| | | int ioType = checkOrder.getDocType() == 8 ? 107 : (taskDto.isAll() ? 101 : 103); |
| | | |
| | | int ioType = (taskDto.isAll() ? 101 : 103); |
| | | if(ioType == 101){ |
| | | boolean DiffQty = taskDto.getLocDtos().stream().allMatch(locDto -> |
| | | locDetlService.selectOne(new EntityWrapper<LocDetl>() |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.zy.asrs.entity.Task; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.service.TaskService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.WorkLogHandler; |
| | |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | |
| | | @Autowired |
| | | private TaskService taskService; |
| | | |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){ |
| | | List<WrkMast> wrkMasts = wrkMastService.selectToBeHistoryData(); |
| | |
| | | } |
| | | } |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void executeTask(){ |
| | | List<Task> taskList = taskService.selectToBeHistoryData(); |
| | | if (taskList.isEmpty()) { |
| | | return; |
| | | } |
| | | for (Task task : taskList) { |
| | | ReturnT<String> result = workLogHandler.AgvStart(task); |
| | | if (!result.isSuccess()) { |
| | | log.error("工作档[workNo={}]历史档处理失败", task.getWrkNo()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.WaitPakin; |
| | | import com.zy.asrs.entity.WrkDetl; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.utils.OrderInAndOutUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private WaitPakinLogService waitPakinLogService; |
| | | @Autowired |
| | | private OrderService orderService; |
| | | @Autowired |
| | | private TaskService taskService; |
| | | @Autowired |
| | | private TaskLogService taskLogService; |
| | | @Autowired |
| | | private TaskDetlService taskDetlService; |
| | | @Autowired |
| | | private TaskDetlLogService taskDetlLogService; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start(WrkMast wrkMast) { |
| | |
| | | return SUCCESS; |
| | | } |
| | | |
| | | public ReturnT<String> AgvStart(Task task) { |
| | | try { |
| | | List<TaskDetl> taskDetls = taskDetlService.selectList(new EntityWrapper<TaskDetl>().eq("wrk_no", task.getWrkNo())); |
| | | // 修改订单状态 作业中 ===>> 已完成 |
| | | if (!Cools.isEmpty(taskDetls)) { |
| | | Iterator<TaskDetl> iterator = taskDetls.iterator(); |
| | | while (iterator.hasNext()) { |
| | | TaskDetl taskDetl = iterator.next(); |
| | | if (!Cools.isEmpty(taskDetl.getOrderNo())) { |
| | | // orderService.checkComplete(wrkDetl.getOrderNo()); |
| | | if (task.getIoType() == 1 || task.getIoType() == 8 || task.getIoType() == 54 || task.getIoType() == 104){ |
| | | OrderInAndOutUtil.checkComplete(Boolean.TRUE,taskDetl.getOrderNo()); |
| | | } else { |
| | | OrderInAndOutUtil.checkComplete(Boolean.FALSE,taskDetl.getOrderNo()); |
| | | } |
| | | iterator.remove(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 入库 -------------------------------------------------------------------------------- |
| | | if (task.getWrkSts() == 5) { |
| | | // 全板入库 |
| | | if (task.getIoType() == 1) { |
| | | // 入库通知单 |
| | | if (!Cools.isEmpty(task.getBarcode())) { |
| | | // 保存入库通知档历史档 |
| | | if (!waitPakinLogService.save(task.getBarcode())) { |
| | | // exceptionHandle("保存入库通知档历史档[workNo={0}]失败", wrkMast.getWrkNo()); |
| | | } |
| | | // 删除入库通知档 |
| | | if (!waitPakinService.delete(new EntityWrapper<WaitPakin>().eq("zpallet", task.getBarcode()))) { |
| | | // exceptionHandle("删除入库通知档[workNo={0}]失败", wrkMast.getWrkNo()); |
| | | } |
| | | } |
| | | // // 手动入库生成单据 【 上报三方平台 】 |
| | | // if (!Cools.isEmpty(wrkDetls)) { |
| | | // if (!orderService.saveHandlerOrder(Boolean.TRUE, wrkMast, wrkDetls)) { |
| | | // exceptionHandle("生成手动入库单据[workNo={0}]失败", wrkMast.getWrkNo()); |
| | | // } |
| | | // } |
| | | // 拣料再入库 |
| | | } else if (task.getIoType() == 53) { |
| | | // if (!Cools.isEmpty(wrkDetls)) { |
| | | // if (!orderService.saveHandlerOrder(Boolean.FALSE, wrkMast, wrkDetls)) { |
| | | // exceptionHandle("生成手动出库单据[workNo={0}]失败", wrkMast.getWrkNo()); |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | // 出库 -------------------------------------------------------------------------------- |
| | | } else if (task.getWrkSts() == 15) { |
| | | // if (!Cools.isEmpty(wrkDetls)) { |
| | | // if (!orderService.saveHandlerOrder(Boolean.FALSE, wrkMast, wrkDetls)) { |
| | | // exceptionHandle("生成手动出库单据[workNo={0}]失败", wrkMast.getWrkNo()); |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | |
| | | |
| | | for (TaskDetl taskDetl :taskDetls){ |
| | | TaskDetlLog taskDetlLog = new TaskDetlLog(); |
| | | BeanUtils.copyProperties(taskDetl, taskDetlLog); |
| | | |
| | | // 保存工作明细档历史档 |
| | | if (!taskDetlLogService.insert(taskDetlLog)) { |
| | | exceptionHandle("保存工作明细历史档[workNo={0}]失败", task.getWrkNo()); |
| | | } |
| | | // 删除工作明细档 |
| | | if (!taskDetlService.deleteById(taskDetl)) { |
| | | exceptionHandle("删除工作明细档[workNo={0}]失败", task.getWrkNo()); |
| | | } |
| | | } |
| | | TaskLog taskLog = new TaskLog(); |
| | | BeanUtils.copyProperties(task, taskLog); |
| | | // 保存工作主档历史档 |
| | | if (!taskLogService.insert(taskLog)) { |
| | | exceptionHandle("保存AGV工作历史档[workNo={0}]失败", task.getWrkNo()); |
| | | } |
| | | |
| | | // 删除工作主档 |
| | | if (!taskService.deleteById(task)) { |
| | | exceptionHandle("删除工作主档[workNo={0}]失败", task.getWrkNo()); |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.Instant; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/8/27 |
| | |
| | | } |
| | | } |
| | | |
| | | public static boolean isValidFormat(String dateStr, String format) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat(format); |
| | | sdf.setLenient(false); // 严格模式,必须完全匹配格式 |
| | | try { |
| | | sdf.parse(dateStr); |
| | | return true; |
| | | } catch (ParseException e) { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | public static Date getFormateDate(String datestr) { |
| | | //字符串转日期 |
| | | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | LocalDateTime parse = LocalDateTime.parse(datestr, dateTimeFormatter); |
| | | Instant instant = parse.atZone(ZoneId.systemDefault()).toInstant(); |
| | | Date date = Date.from(instant); |
| | | return date; |
| | | } |
| | | |
| | | /** |
| | | * 判断是否为深库位 |
| | | */ |
| | |
| | | server: |
| | | port: 8080 |
| | | port: 8081 |
| | | servlet: |
| | | context-path: /@pom.build.finalName@ |
| | | |
| | |
| | | # global-config: |
| | | # field-strategy: 0 |
| | | configuration: |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | map-underscore-to-camel-case: true |
| | | cache-enabled: true |
| | | call-setters-on-nulls: true |
| | |
| | | |
| | | #License相关配置 |
| | | license: |
| | | subject: integrationasrs |
| | | subject: jsxsasrs |
| | | publicAlias: publicCert |
| | | storePass: public_zhongyang_123456789 |
| | | licensePath: license.lic |
| | |
| | | select * from agv_task where ((wrk_sts = 4 Or wrk_sts = 14 ) and io_type != 103 and io_type != 104 and io_type != 107 ) or (wrk_sts = 2 and io_type=6) order by upd_mk,error_time,io_time,wrk_no |
| | | </select> |
| | | |
| | | |
| | | <select id="selectToBeHistoryData" resultType="com.zy.asrs.entity.Task"> |
| | | select * from agv_task |
| | | where wrk_sts=5 or wrk_sts=15 |
| | | order by io_time,wrk_no asc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | ,{field: 'maktx', align: 'center',title: '商品名称(品名)', sort:true} |
| | | ,{field: 'anfme', 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: 'batch', align: 'center',title: '批号', sort:true} |
| | | ,{field: 'tag$', align: 'center',title: '零件类型', hide: false} |
| | | ,{field: 'threeCode', align: 'center',title: 'BS Code', hide: false} |
| | | ,{field: 'length', align: 'center',title: '重量', hide: false} |
| | | ,{field: 'volume', align: 'center',title: '尺寸', hide: false} |
| | | ,{field: 'frozen$', align: 'center',title: '冻结否',hide: true, |
| | | templet: function(d) { |
| | | // 根据条件判断字体颜色 |
| | |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false} |
| | | ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: false} |
| | | ,{field: 'threeCode', align: 'center',title: 'BS Code', hide: false} |
| | | ,{field: 'batch', align: 'center',title: '批号', sort:true} |
| | | ,{field: 'tag$', align: 'center',title: '零件类型', hide: false} |
| | | ,{field: 'batch', align: 'center',title: '批号', hide: true} |
| | | ,{field: 'anfme', align: 'center',title: '数量', hide: false} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码', hide: false} |
| | | ,{field: 'specs', align: 'center',title: '规格', hide: false} |
| | | ,{field: 'length', align: 'center',title: '重量', hide: false} |
| | | ,{field: 'volume', align: 'center',title: '尺寸', hide: false} |
| | | ,{field: 'modiTime$', align: 'center',title: '更新时间', hide: false} |
| | | ,{field: 'supp', 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: 'unit', align: 'center',title: '单位', hide: false} |
| | | ,{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: '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: 'supp', 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} |
| | |
| | | |
| | | // 初始化保存 |
| | | form.on('submit(initDo)', function (data) { |
| | | console.log(data.field) |
| | | $.ajax({ |
| | | url: baseUrl + "/locCache/init/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'orderNo', title: '单据编号', templet: '#orderNoTpl'}, |
| | | {field: 'docType$', align: 'center', title: '类型', minWidth: 160, width: 160}, |
| | | {align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160}, |
| | | {field: 'createTime$', title: '创建时间', minWidth: 200, width: 200}, |
| | | {field: 'settle$', align: 'center', title: '状态', templet: '#settleTpl', minWidth: 160, width: 160}, |
| | | {field: 'memo', align: 'center',title: '备注', hide: true}, |
| | | {align: 'center', title: '操作', toolbar: '#operate', width: 180} |
| | | // {type: 'numbers'}, |
| | | // {field: 'orderNo', title: '单据编号', templet: '#orderNoTpl'}, |
| | | // {field: 'docType$', align: 'center', title: '类型', minWidth: 160, width: 160}, |
| | | // {align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160}, |
| | | // {field: 'createTime$', title: '创建时间', minWidth: 200, width: 200}, |
| | | // {field: 'settle$', align: 'center', title: '状态', templet: '#settleTpl', minWidth: 160, width: 160}, |
| | | // {field: 'memo', align: 'center',title: '备注', hide: true}, |
| | | // {align: 'center', title: '操作', toolbar: '#operate', width: 180} |
| | | { type: 'numbers' }, |
| | | { field: 'orderNo', title: '单据编号', templet: '#orderNoTpl' , minWidth: 180}, |
| | | { field: 'defNumber', align: 'center', title: '流水号', minWidth: 160, width: 160 }, |
| | | { field: 'number', align: 'center', title: '派工单号', minWidth: 160, width: 160 }, |
| | | { field: 'cstmrName', align: 'center', title: '公司ID', minWidth: 160, width: 160 }, |
| | | { field: 'itemName', align: 'center', title: '箱号', minWidth: 160, width: 160 }, |
| | | { field: 'docType$', align: 'center', title: '类型', minWidth: 130}, |
| | | { field: 'orderTime', align: 'center', title: '派工时间', minWidth: 160, width: 160 }, |
| | | { field: 'createTime$', title: '创建时间', minWidth: 160, width: 160 }, |
| | | { field: 'settle$', align: 'center', title: '状态', templet: '#settleTpl', minWidth: 100, width: 100 }, |
| | | { align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160 }, |
| | | { align: 'center', title: '操作', toolbar: '#operate', width: 180 } |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | height: '450px;', |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | // { type: 'numbers' }, |
| | | // { field: 'matnr', title: '商品编码', width: 160 }, |
| | | // { field: 'maktx', title: '商品名称', width: 160 }, |
| | | // { field: 'standby1', title: '供应商编码', width: 160 }, |
| | | // { field: 'batch', title: '批号' }, |
| | | // { field: 'anfme', title: '待完结数量' }, |
| | | // { field: 'workQty', title: '待上报数量' }, |
| | | // { field: 'qty', title: '已完结数量', style: 'font-weight: bold' }, |
| | | // { field: 'specs', title: '规格' } |
| | | { type: 'numbers' }, |
| | | { field: 'matnr', title: '商品编码', width: 160 }, |
| | | { field: 'maktx', title: '商品名称', width: 160 }, |
| | | { field: 'standby1', title: '供应商编码', width: 160 }, |
| | | { field: 'batch', title: '批号' }, |
| | | { field: 'anfme', title: '待完结数量' }, |
| | | { field: 'workQty', title: '待上报数量' }, |
| | | { field: 'qty', title: '已完结数量', style: 'font-weight: bold' }, |
| | | { field: 'specs', title: '规格' } |
| | | {field: 'matnr', align: 'center',title: '商品编号(品号)', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称(品名)', sort:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量', hide: false} |
| | | ,{field: 'specs', align: 'center',title: '规格', hide: false} |
| | | ,{field: 'tag$', align: 'center',title: '零件类型', hide: false} |
| | | ,{field: 'threeCode', align: 'center',title: 'BS Code', hide: false} |
| | | ,{ field: 'anfme', title: '数量', align: 'center',hide: false} |
| | | ,{ field: 'workQty', title: '作业数量', align: 'center',hide: false } |
| | | ,{ field: 'qty', title: '完成数量' , align: 'center',hide: false} |
| | | ,{field: 'length', align: 'center',title: '重量', hide: false } |
| | | ,{field: 'volume', align: 'center',title: '尺寸', hide: false} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | {type: 'numbers', title: '#'}, |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | | {field: 'maktx', title: '商品名称', width: 200}, |
| | | {field: 'standby1', title: '供应商代码', edit: true}, |
| | | {field: 'batch', title: '批号', edit: true}, |
| | | {field: 'specs', title: '规格'}, |
| | | {field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | { type: 'numbers' }, |
| | | { field: 'orderNo', title: '单据编号', templet: '#orderNoTpl' }, |
| | | { field: 'docType$', align: 'center', title: '类型', minWidth: 160, width: 160 }, |
| | | { field: 'orderNo', title: '单据编号', templet: '#orderNoTpl' , minWidth: 180}, |
| | | { field: 'defNumber', align: 'center', title: '流水号', minWidth: 160, width: 160 }, |
| | | { field: 'number', align: 'center', title: '派工单号', minWidth: 160, width: 160 }, |
| | | { field: 'cstmrName', align: 'center', title: '公司ID', minWidth: 160, width: 160 }, |
| | | { field: 'itemName', align: 'center', title: '箱号', minWidth: 160, width: 160 }, |
| | | { field: 'docType$', align: 'center', title: '类型', minWidth: 130}, |
| | | { field: 'orderTime', align: 'center', title: '派工时间', minWidth: 160, width: 160 }, |
| | | { field: 'createTime$', title: '创建时间', minWidth: 160, width: 160 }, |
| | | { field: 'settle$', align: 'center', title: '状态', templet: '#settleTpl', minWidth: 100, width: 100 }, |
| | | { align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160 }, |
| | | { field: 'createTime$', title: '创建时间', minWidth: 200, width: 200 }, |
| | | { field: 'settle$', align: 'center', title: '状态', templet: '#settleTpl', minWidth: 160, width: 160 }, |
| | | { field: 'memo', align: 'center', title: '备注', hide: true }, |
| | | { align: 'center', title: '操作', toolbar: '#operate', width: 180 } |
| | | ]], |
| | | request: { |
| | |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | { type: 'numbers' }, |
| | | { field: 'matnr', title: '商品编码', width: 160 }, |
| | | { field: 'maktx', title: '商品名称', width: 160 }, |
| | | { field: 'standby1', title: '供应商编码', width: 160 }, |
| | | { field: 'batch', title: '批号' }, |
| | | { field: 'anfme', title: '数量' }, |
| | | { field: 'workQty', title: '作业数量' }, |
| | | { field: 'qty', title: '完成数量', style: 'font-weight: bold' }, |
| | | { field: 'specs', title: '规格' } |
| | | {field: 'matnr', align: 'center',title: '商品编号(品号)', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称(品名)', sort:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量', hide: false} |
| | | ,{field: 'specs', align: 'center',title: '规格', hide: false} |
| | | ,{field: 'tag$', align: 'center',title: '零件类型', hide: false} |
| | | ,{field: 'threeCode', align: 'center',title: 'BS Code', hide: false} |
| | | ,{ field: 'anfme', title: '数量', align: 'center',hide: false} |
| | | ,{ field: 'workQty', title: '作业数量', align: 'center',hide: false } |
| | | ,{ field: 'qty', title: '完成数量' , align: 'center',hide: false} |
| | | ,{field: 'length', align: 'center',title: '重量', hide: false } |
| | | ,{field: 'volume', align: 'center',title: '尺寸', hide: false} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'orderNo', title: '单据编号', templet: '#orderNoTpl'}, |
| | | {field: 'itemName$', align: 'center', title: '出库区域', minWidth: 160, width: 160}, |
| | | {field: 'docType$', align: 'center', title: '类型', minWidth: 160, width: 160}, |
| | | {align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160}, |
| | | {field: 'createTime$', title: '创建时间', minWidth: 200, width: 200}, |
| | | {field: 'settle$', align: 'center', title: '状态', templet: '#settleTpl', minWidth: 160, width: 160}, |
| | | {field: 'memo', align: 'center',title: '备注', hide: true}, |
| | | {align: 'center', title: '操作', toolbar: '#operate'} |
| | | { type: 'numbers' }, |
| | | { field: 'orderNo', title: '单据编号', templet: '#orderNoTpl' , minWidth: 180}, |
| | | { field: 'defNumber', align: 'center', title: '流水号', minWidth: 160, width: 160 }, |
| | | { field: 'number', align: 'center', title: '派工单号', minWidth: 160, width: 160 }, |
| | | { field: 'cstmrName', align: 'center', title: '公司ID', minWidth: 160, width: 160 }, |
| | | { field: 'itemName', align: 'center', title: '箱号', minWidth: 160, width: 160 }, |
| | | { field: 'docType$', align: 'center', title: '类型', minWidth: 130}, |
| | | { field: 'orderTime', align: 'center', title: '派工时间', minWidth: 160, width: 160 }, |
| | | { field: 'createTime$', title: '创建时间', minWidth: 160, width: 160 }, |
| | | { field: 'settle$', align: 'center', title: '状态', templet: '#settleTpl', minWidth: 100, width: 100 }, |
| | | { align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160 }, |
| | | { align: 'center', title: '操作', toolbar: '#operate', width: 180 } |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | page: true, |
| | | height: '450px;', |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | { type: 'numbers' }, |
| | | { field: 'matnr', title: '商品编码', width: 160 }, |
| | | { field: 'maktx', title: '商品名称', width: 160 }, |
| | | { field: 'standby1', title: '供应商编码', width: 160 }, |
| | | { field: 'batch', title: '批号' }, |
| | | { field: 'anfme', title: '数量' }, |
| | | { field: 'workQty', title: '作业数量' }, |
| | | { field: 'qty', title: '完成数量', style: 'font-weight: bold' }, |
| | | { field: 'specs', title: '规格' } |
| | | ]], |
| | | cols: [ |
| | | // [ |
| | | // { type: 'numbers' }, |
| | | // { field: 'matnr', title: '商品编码', width: 160 }, |
| | | // { field: 'maktx', title: '商品名称', width: 160 }, |
| | | // { field: 'standby1', title: '供应商编码', width: 160 }, |
| | | // { field: 'threeCode', title: 'BS Code', width: 160 }, |
| | | // { field: 'tag$', title: '物料种类' }, |
| | | // { field: 'anfme', title: '数量' }, |
| | | // { field: 'workQty', title: '作业数量' }, |
| | | // { field: 'qty', title: '完成数量', style: 'font-weight: bold' }, |
| | | // { field: 'specs', title: '规格' } |
| | | // ] |
| | | getCol() |
| | | |
| | | ], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | function getCol() { |
| | | var cols = []; |
| | | cols.push.apply(cols, cacheCols); |
| | | return cols; |
| | | } |
| | | |
| | | // 显示表单弹窗 |
| | | function showEditModel(expTpe) { |
| | |
| | | page: true, |
| | | height: '350px;', |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers', title: '#'}, |
| | | {field: 'matnr', title: '零件代码', width: 160}, |
| | | {field: 'maktx', title: '零件名称', width: 200}, |
| | | // {field: 'batch', title: '批号', edit: true}, |
| | | {field: 'standby1', title: '供应商代码', edit: true}, |
| | | {field: 'specs', title: '规格'}, |
| | | {field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | | {field: 'workQty', title: '作业数量', minWidth: 100, width: 100}, |
| | | // {field: 'unit', title: '单位', width: 80}, |
| | | {field: 'memo', title: '备注' , edit: true}, |
| | | {align: 'center', title: '操作', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'} |
| | | ]], |
| | | cols: [ |
| | | getCol() |
| | | // [ |
| | | // {type: 'numbers', title: '#'}, |
| | | // {field: 'matnr', title: '零件代码', width: 160}, |
| | | // {field: 'maktx', title: '零件名称', width: 200}, |
| | | // // {field: 'batch', title: '批号', edit: true}, |
| | | // {field: 'standby1', title: '供应商代码', edit: true}, |
| | | // {field: 'specs', title: '规格'}, |
| | | // {field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | | // {field: 'workQty', title: '作业数量', minWidth: 100, width: 100}, |
| | | // // {field: 'unit', title: '单位', width: 80}, |
| | | // {field: 'memo', title: '备注' , edit: true}, |
| | | // {align: 'center', title: '操作', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'} |
| | | // ] |
| | | ], |
| | | done: function (res) { |
| | | $(layero).find('.layui-table-view').css('margin', '0'); |
| | | }, |
| | |
| | | <option value="12">料箱</option> |
| | | <option value="13">笼框</option> |
| | | <option value="14">托盘</option> |
| | | <option value="3">台车</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <option value="12">料箱</option> |
| | | <option value="13">笼框</option> |
| | | <option value="14">托盘</option> |
| | | <option value="3">台车</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | var cols = [ |
| | | {field: 'locNo', align: 'center', title: '库位号'} |
| | | ]; |
| | | cols.push.apply(cols, cacheCols); |
| | | cols.push.apply(cols, detlCols); |
| | | return cols; |
| | | } |
| | | |
| | |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkMastLog/wrkMastLog.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/taskLog/taskLog.js" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |