| | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/agv") |
| | | public class AgvLocDetlController extends BaseController { |
| | | |
| | | @Autowired |
| | | private AgvLocDetlService agvLocDetlService; |
| | | |
| | | @RequestMapping(value = "/agvLocDetl/list/auth") |
| | | @RequestMapping(value = "/locDetl/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.AgvWaitPakin; |
| | | import com.zy.asrs.entity.AgvWrkDetl; |
| | | import com.zy.asrs.entity.AgvWrkMast; |
| | | import com.zy.asrs.entity.param.AgvTaskCallBackParam; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.web.BaseController; |
| | | import lombok.Setter; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.lang.reflect.InvocationTargetException; |
| | | import java.lang.reflect.Method; |
| | | import java.util.EnumSet; |
| | | |
| | | @RestController |
| | | @RequestMapping("/agv") |
| | | public class AgvOpenController extends BaseController { |
| | | |
| | | @Autowired |
| | | AgvWrkMastService agvWrkMastService; |
| | | |
| | | @PostMapping("/task/event/status") |
| | | public R taskEventStaus(@RequestBody AgvTaskCallBackParam param){ |
| | | |
| | | int wrkMastCount = agvWrkMastService.selectCount(new EntityWrapper<AgvWrkMast>().eq("wrk_no", param.getTaskCode())); |
| | | if(wrkMastCount < 1){ |
| | | return R.error("任务编号错误"); |
| | | } |
| | | |
| | | AgvTask agvTask = AgvTask.valueOf(param.getEventType()); |
| | | Class<AgvTask> clz = AgvTask.class; |
| | | try { |
| | | Method method = clz.getDeclaredMethod(param.getStatus(),AgvTaskCallBackParam.class); |
| | | method.invoke(agvTask,param); |
| | | } catch (NoSuchMethodException e) { |
| | | return R.error("任务状态status参数有误"); |
| | | } catch (InvocationTargetException e) { |
| | | e.printStackTrace(); |
| | | return R.error(); |
| | | } catch (IllegalAccessException e) { |
| | | e.printStackTrace(); |
| | | return R.error(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | |
| | | enum AgvTask{ |
| | | |
| | | /** |
| | | * 上报任务状态 |
| | | */ |
| | | task{ |
| | | @Transactional |
| | | public void success(AgvTaskCallBackParam param) { |
| | | int wrkNo = Integer.valueOf(param.getTaskCode()); |
| | | String barcode = agvWrkMastService.selectById(wrkNo).getBarcode(); |
| | | //生成AGV工作历史档 |
| | | agvWrkMastLogService.save(wrkNo); |
| | | //生成AGV工作明细历史档 |
| | | agvWrkDetlLogService.save(wrkNo); |
| | | //删除AGV工作档 |
| | | agvWrkMastService.deleteById(wrkNo); |
| | | //删除AGV工作明细档 |
| | | agvWrkDetlService.delete(new EntityWrapper<AgvWrkDetl>().eq("wrk_no",wrkNo)); |
| | | //生成入库通知历史档 |
| | | agvWaitPakinLogService.save(barcode); |
| | | //删除入库通知档 |
| | | agvWaitPakinService.delete(new EntityWrapper<AgvWaitPakin>().eq("zpallet",barcode)); |
| | | |
| | | } |
| | | |
| | | public void fail(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void cancel(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void suspend(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | }, |
| | | /** |
| | | * 上报任务分配给机器人 |
| | | */ |
| | | task_allocated{ |
| | | @Transactional |
| | | public void success(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void fail(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void cancel(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void suspend(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | }, |
| | | /** |
| | | * 上报取箱状态 |
| | | */ |
| | | tote_load{ |
| | | @Transactional |
| | | public void success(AgvTaskCallBackParam param) { |
| | | //修改源站点状态为O.空,以及解绑托盘条码 |
| | | agvBasDevpService.updateLocStsAndBarcodeByDevNo(param.getStationCode(),"O",""); |
| | | //修改AGV工作档的工作状态为2(设备上走) |
| | | agvWrkMastService.updateWrkStsByWrkNo(Integer.valueOf(param.getTaskCode()),2); |
| | | //修改AGV入库通知档状态 |
| | | agvWaitPakinService.updateIoStatus(Integer.valueOf(param.getTaskCode()),"Y"); |
| | | |
| | | } |
| | | |
| | | public void fail(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void cancel(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void suspend(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | }, |
| | | /** |
| | | * 上报放箱状态 |
| | | */ |
| | | tote_unload{ |
| | | @Transactional |
| | | public void success(AgvTaskCallBackParam param) { |
| | | int wrkNo = Integer.valueOf(param.getTaskCode()); |
| | | String barcode = agvWrkMastService.selectById(wrkNo).getBarcode(); |
| | | //修改目标库位状态为F.在库 |
| | | agvLocMastService.updateLocStsByLocNo(param.getLocationCode(),"F"); |
| | | //更新目标库位明细 |
| | | agvLocDetlService.addLocDetlInfo(param.getLocationCode(),wrkNo); |
| | | //修改工作档状态为14(入库完成) |
| | | agvWrkMastService.updateWrkStsByWrkNo(wrkNo,14); |
| | | } |
| | | |
| | | public void fail(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void cancel(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void suspend(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | }, |
| | | robot_reach{ |
| | | @Transactional |
| | | public void success(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void fail(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void cancel(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void suspend(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | }, |
| | | weight{ |
| | | @Transactional |
| | | public void success(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void fail(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void cancel(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void suspend(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | }, |
| | | rfid{ |
| | | @Transactional |
| | | public void success(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void fail(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void cancel(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | |
| | | public void suspend(AgvTaskCallBackParam param) { |
| | | |
| | | } |
| | | }; |
| | | |
| | | //任务状态为成功 |
| | | public abstract void success(AgvTaskCallBackParam param); |
| | | //任务状态为失败 |
| | | public abstract void fail(AgvTaskCallBackParam param); |
| | | //任务状态为取消 |
| | | public abstract void cancel(AgvTaskCallBackParam param); |
| | | //任务状态为挂起 |
| | | public abstract void suspend(AgvTaskCallBackParam param); |
| | | |
| | | @Setter |
| | | AgvBasDevpService agvBasDevpService; |
| | | @Setter |
| | | AgvLocMastService agvLocMastService; |
| | | @Setter |
| | | AgvLocDetlService agvLocDetlService; |
| | | @Setter |
| | | AgvWrkMastService agvWrkMastService; |
| | | @Setter |
| | | AgvWrkDetlService agvWrkDetlService; |
| | | @Setter |
| | | AgvWaitPakinService agvWaitPakinService; |
| | | @Setter |
| | | AgvWaitPakinLogService agvWaitPakinLogService; |
| | | @Setter |
| | | AgvWrkMastLogService agvWrkMastLogService; |
| | | @Setter |
| | | AgvWrkDetlLogService agvWrkDetlLogService; |
| | | |
| | | @Component |
| | | public static class ReportTypeServiceInjector { |
| | | @Autowired |
| | | AgvBasDevpService agvBasDevpService; |
| | | @Autowired |
| | | AgvLocMastService agvLocMastService; |
| | | @Autowired |
| | | AgvLocDetlService agvLocDetlService; |
| | | @Autowired |
| | | AgvWrkMastService agvWrkMastService; |
| | | @Autowired |
| | | AgvWrkDetlService agvWrkDetlService; |
| | | @Autowired |
| | | AgvWaitPakinService agvWaitPakinService; |
| | | @Autowired |
| | | AgvWaitPakinLogService agvWaitPakinLogService; |
| | | @Autowired |
| | | AgvWrkMastLogService agvWrkMastLogService; |
| | | @Autowired |
| | | AgvWrkDetlLogService agvWrkDetlLogService; |
| | | |
| | | @PostConstruct |
| | | public void postConstruct(){ |
| | | for(AgvTask task : EnumSet.allOf(AgvTask.class)){ |
| | | task.setAgvBasDevpService(agvBasDevpService); |
| | | task.setAgvLocDetlService(agvLocDetlService); |
| | | task.setAgvLocMastService(agvLocMastService); |
| | | task.setAgvWrkMastService(agvWrkMastService); |
| | | task.setAgvWaitPakinService(agvWaitPakinService); |
| | | task.setAgvWaitPakinLogService(agvWaitPakinLogService); |
| | | task.setAgvWrkMastLogService(agvWrkMastLogService); |
| | | task.setAgvWrkDetlLogService(agvWrkDetlLogService); |
| | | task.setAgvWrkDetlService(agvWrkDetlService); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.AgvWaitPakinLog; |
| | | import com.zy.asrs.entity.WaitPakinLog; |
| | | import com.zy.asrs.service.AgvWaitPakinLogService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/agv") |
| | | public class AgvWaitPakinLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private AgvWaitPakinLogService waitPakinLogService; |
| | | |
| | | @RequestMapping(value = "/waitPakinLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(waitPakinLogService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakinLog/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<AgvWaitPakinLog> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | else { |
| | | wrapper.orderBy("modi_time", false); |
| | | } |
| | | return R.ok(waitPakinLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakinLog/add/auth") |
| | | @ManagerAuth |
| | | public R add(AgvWaitPakinLog waitPakinLog) { |
| | | waitPakinLogService.insert(waitPakinLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakinLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(AgvWaitPakinLog waitPakinLog){ |
| | | if (Cools.isEmpty(waitPakinLog)){ |
| | | return R.error(); |
| | | } |
| | | waitPakinLogService.updateById(waitPakinLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakinLog/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam String param){ |
| | | List<AgvWaitPakinLog> list = JSONArray.parseArray(param, AgvWaitPakinLog.class); |
| | | if (Cools.isEmpty(list)){ |
| | | return R.error(); |
| | | } |
| | | for (AgvWaitPakinLog entity : list){ |
| | | waitPakinLogService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakinLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<AgvWaitPakinLog> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("waitPakinLog")); |
| | | convert(map, wrapper); |
| | | List<AgvWaitPakinLog> list = waitPakinLogService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakinLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<AgvWaitPakinLog> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<AgvWaitPakinLog> page = waitPakinLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (AgvWaitPakinLog waitPakinLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", waitPakinLog.getZpallet()); |
| | | map.put("value", waitPakinLog.getZpallet()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/waitPakinLog/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<AgvWaitPakinLog> wrapper = new EntityWrapper<AgvWaitPakinLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != waitPakinLogService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WaitPakinLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.AgvWrkDetlLog; |
| | | import com.zy.asrs.entity.WrkDetlLog; |
| | | import com.zy.asrs.service.AgvWrkDetlLogService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/agv") |
| | | public class AgvWrkDetlLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private AgvWrkDetlLogService wrkDetlLogService; |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(wrkDetlLogService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | /** |
| | | * 根据工作主档查看明细时,工作号过滤明细 |
| | | */ |
| | | @RequestMapping(value = "/wrkDetlLogByMast/list/auth") |
| | | @ManagerAuth |
| | | public R list1(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Integer wrk_no, |
| | | @RequestParam String ioTime){ |
| | | EntityWrapper<AgvWrkDetlLog> wrapper = new EntityWrapper<>(); |
| | | if(!Cools.isEmpty(wrk_no) && wrk_no != 0){ |
| | | wrapper.eq("wrk_no",wrk_no); |
| | | } |
| | | if(!Cools.isEmpty(ioTime)){ |
| | | wrapper.eq("io_time", DateUtils.convert(ioTime, DateUtils.yyyyMMddHHmmsssss_F)); |
| | | } |
| | | return R.ok(wrkDetlLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<AgvWrkDetlLog> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | else { |
| | | wrapper.orderBy("modi_time", false); |
| | | } |
| | | return R.ok(wrkDetlLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/add/auth") |
| | | @ManagerAuth |
| | | public R add(AgvWrkDetlLog wrkDetlLog) { |
| | | wrkDetlLogService.insert(wrkDetlLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(AgvWrkDetlLog wrkDetlLog){ |
| | | if (Cools.isEmpty(wrkDetlLog) || null==wrkDetlLog.getWrkNo()){ |
| | | return R.error(); |
| | | } |
| | | wrkDetlLogService.updateById(wrkDetlLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam String param){ |
| | | List<AgvWrkDetlLog> list = JSONArray.parseArray(param, AgvWrkDetlLog.class); |
| | | if (Cools.isEmpty(list)){ |
| | | return R.error(); |
| | | } |
| | | for (AgvWrkDetlLog entity : list){ |
| | | wrkDetlLogService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<AgvWrkDetlLog> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("wrkDetlLog")); |
| | | convert(map, wrapper); |
| | | List<AgvWrkDetlLog> list = wrkDetlLogService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<AgvWrkDetlLog> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<AgvWrkDetlLog> page = wrkDetlLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (AgvWrkDetlLog wrkDetlLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", wrkDetlLog.getWrkNo()); |
| | | map.put("value", wrkDetlLog.getWrkNo()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<AgvWrkDetlLog> wrapper = new EntityWrapper<AgvWrkDetlLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkDetlLogService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WrkDetlLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.AgvWrkMast; |
| | | import com.zy.asrs.entity.param.AgvTaskCreateParam; |
| | | import com.zy.asrs.entity.param.AgvTaskParam; |
| | | import com.zy.asrs.entity.param.AgvTaskkDescribeParam; |
| | | import com.zy.asrs.service.AgvWrkMastService; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @RestController |
| | | @RequestMapping("/agv") |
| | |
| | | |
| | | @RequestMapping(value = "/wrkMast/startWrk/auth") |
| | | @ManagerAuth(memo = "工作档开始任务") |
| | | public R startWrk(@RequestParam String param){ |
| | | public R startWrk(@RequestParam String param) throws IOException { |
| | | List<AgvWrkMast> agvWrkMastList = JSONArray.parseArray(param, AgvWrkMast.class); |
| | | if (Cools.isEmpty(agvWrkMastList)){ |
| | | return R.error(); |
| | | } |
| | | |
| | | AgvTaskCreateParam agvTaskCreateParam = new AgvTaskCreateParam(); |
| | | agvTaskCreateParam.setTaskType("putaway"); |
| | | |
| | | // agvWrkMastList.stream().map(agvWrkMast -> { |
| | | // AgvTaskParam agvTaskParam = new AgvTaskParam(); |
| | | // AgvTaskkDescribeParam agvTaskkDescribeParam = new AgvTaskkDescribeParam(); |
| | | // agvTaskParam.setTaskCode(agvWrkMast.getWrkNo().toString()); |
| | | // agvTaskParam.setTaskPriority(agvWrkMast.getIoPri().intValue()); |
| | | // agvTaskParam.setTaskkDescribe(agvTaskkDescribeParam); |
| | | // agvTaskkDescribeParam.setFromLocationCode(agvWrkMast.); |
| | | // }).collect(Collectors.toList()); |
| | | List<AgvTaskParam> agvTaskParamList = agvWrkMastList.stream().map(agvWrkMast -> { |
| | | AgvTaskParam agvTaskParam = new AgvTaskParam(); |
| | | AgvTaskkDescribeParam agvTaskkDescribeParam = new AgvTaskkDescribeParam(); |
| | | agvTaskParam.setTaskDescribe(agvTaskkDescribeParam); |
| | | //AgvTaskParam |
| | | agvTaskParam.setTaskCode(agvWrkMast.getWrkNo().toString()); |
| | | agvTaskParam.setTaskPriority(agvWrkMast.getIoPri().intValue()); |
| | | //AgvTaskkDescribeParam |
| | | agvTaskkDescribeParam.setFromLocationCode(agvWrkMast.getSourceLocNo()); |
| | | agvTaskkDescribeParam.setToLocationCode(agvWrkMast.getLocNo()); |
| | | agvTaskkDescribeParam.setContainerCode(agvWrkMast.getBarcode()); |
| | | return agvTaskParam; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | agvTaskCreateParam.setTasks(agvTaskParamList); |
| | | |
| | | String response = new HttpHandler.Builder() |
| | | .setUri("localhost:8080") |
| | | .setPath("test/task/create") |
| | | .setJson(JSONObject.toJSONString(agvTaskCreateParam)) |
| | | .build() |
| | | .doPost(); |
| | | |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | int code = (int) jsonObject.get("code"); |
| | | |
| | | System.out.println(response); |
| | | |
| | | if(code == 0){ |
| | | |
| | | } |
| | | |
| | | |
| | | return R.ok(); |
| | | } |
New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.AgvWrkMastLog; |
| | | import com.zy.asrs.entity.WrkMastLog; |
| | | import com.zy.asrs.service.AgvWrkMastLogService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/agv") |
| | | public class AgvWrkMastLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private AgvWrkMastLogService wrkMastLogService; |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(wrkMastLogService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | excludeTrash(param); |
| | | EntityWrapper<AgvWrkMastLog> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | allLike(AgvWrkMastLog.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){ |
| | | if (orderByField.endsWith("$")){ |
| | | orderByField = orderByField.substring(0, orderByField.length()-1); |
| | | } |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | }else { |
| | | wrapper.orderBy("modi_time", false); |
| | | } |
| | | return R.ok(wrkMastLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | if (entry.getKey().equals("manu_type")) { |
| | | wrapper.like(entry.getKey(), val); |
| | | } else { |
| | | wrapper.eq(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/add/auth") |
| | | @ManagerAuth(memo = "工作历史档添加") |
| | | public R add(AgvWrkMastLog wrkMastLog) { |
| | | wrkMastLogService.insert(wrkMastLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/update/auth") |
| | | @ManagerAuth(memo = "工作历史档修改") |
| | | public R update(AgvWrkMastLog wrkMastLog){ |
| | | if (Cools.isEmpty(wrkMastLog) || null==wrkMastLog.getId()){ |
| | | return R.error(); |
| | | } |
| | | wrkMastLogService.updateById(wrkMastLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/delete/auth") |
| | | @ManagerAuth(memo = "工作历史档删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<AgvWrkMastLog> list = JSONArray.parseArray(param, AgvWrkMastLog.class); |
| | | if (Cools.isEmpty(list)){ |
| | | return R.error(); |
| | | } |
| | | for (AgvWrkMastLog entity : list){ |
| | | wrkMastLogService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/export/auth") |
| | | @ManagerAuth(memo = "工作历史档导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<AgvWrkMastLog> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("wrkMastLog")); |
| | | convert(map, wrapper); |
| | | List<AgvWrkMastLog> list = wrkMastLogService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<AgvWrkMastLog> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<AgvWrkMastLog> page = wrkMastLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (AgvWrkMastLog wrkMastLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", wrkMastLog.getId()); |
| | | map.put("value", wrkMastLog.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<AgvWrkMastLog> wrapper = new EntityWrapper<AgvWrkMastLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkMastLogService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WrkMastLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("agv_cust_wait_pakin_log") |
| | | public class AgvWaitPakinLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "托盘条码") |
| | | private String zpallet; |
| | | |
| | | @ApiModelProperty(value= "数量") |
| | | private Double anfme; |
| | | |
| | | @ApiModelProperty(value= "库位号") |
| | | @TableField("loc_no") |
| | | private String locNo; |
| | | |
| | | @ApiModelProperty(value= "物料号") |
| | | private String matnr; |
| | | |
| | | @ApiModelProperty(value= "物料号") |
| | | private String maktx; |
| | | |
| | | @ApiModelProperty(value= "序列码") |
| | | private String batch; |
| | | |
| | | @ApiModelProperty(value= "单据编号") |
| | | @TableField("order_no") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value= "规格") |
| | | private String specs; |
| | | |
| | | @ApiModelProperty(value= "批次") |
| | | private String model; |
| | | |
| | | @ApiModelProperty(value= "颜色") |
| | | private String color; |
| | | |
| | | @ApiModelProperty(value= "品牌") |
| | | private String brand; |
| | | |
| | | @ApiModelProperty(value= "单位") |
| | | private String unit; |
| | | |
| | | @ApiModelProperty(value= "单价") |
| | | private Double price; |
| | | |
| | | @ApiModelProperty(value= "sku") |
| | | private String sku; |
| | | |
| | | @ApiModelProperty(value= "包数") |
| | | private Double units; |
| | | |
| | | @ApiModelProperty(value= "条码") |
| | | private String barcode; |
| | | |
| | | @ApiModelProperty(value= "物料状态") |
| | | private String origin; |
| | | |
| | | @ApiModelProperty(value= "厂家") |
| | | private String manu; |
| | | |
| | | @ApiModelProperty(value= "单据时间") |
| | | @TableField("manu_date") |
| | | private String manuDate; |
| | | |
| | | @ApiModelProperty(value= "品项数") |
| | | @TableField("item_num") |
| | | private String itemNum; |
| | | |
| | | @ApiModelProperty(value= "安全库存量") |
| | | @TableField("safe_qty") |
| | | private Double safeQty; |
| | | |
| | | @ApiModelProperty(value= "重量") |
| | | private Double weight; |
| | | |
| | | @ApiModelProperty(value= "长度") |
| | | private Double length; |
| | | |
| | | @ApiModelProperty(value= "体积") |
| | | private Double volume; |
| | | |
| | | @ApiModelProperty(value= "三方编码") |
| | | @TableField("three_code") |
| | | private String threeCode; |
| | | |
| | | @ApiModelProperty(value= "供应商") |
| | | private String supp; |
| | | |
| | | @ApiModelProperty(value= "供应商编码") |
| | | @TableField("supp_code") |
| | | private String suppCode; |
| | | |
| | | @ApiModelProperty(value= "是否批次 1: 是 0: 否 ") |
| | | @TableField("be_batch") |
| | | private Integer beBatch; |
| | | |
| | | @ApiModelProperty(value= "保质期") |
| | | @TableField("dead_time") |
| | | private String deadTime; |
| | | |
| | | @ApiModelProperty(value= "预警天数") |
| | | @TableField("dead_warn") |
| | | private Integer deadWarn; |
| | | |
| | | @ApiModelProperty(value= "制购 1: 制造 2: 采购 3: 外协 ") |
| | | private Integer source; |
| | | |
| | | @ApiModelProperty(value= "要求检验 1: 是 0: 否 ") |
| | | private Integer inspect; |
| | | |
| | | @ApiModelProperty(value= "危险品 1: 是 0: 否 ") |
| | | private Integer danger; |
| | | |
| | | @ApiModelProperty(value= "状态") |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value= "入出状态") |
| | | @TableField("io_status") |
| | | private String ioStatus; |
| | | |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | @ApiModelProperty(value= "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public String getBeBatch$(){ |
| | | if (null == this.beBatch){ return null; } |
| | | switch (this.beBatch){ |
| | | case 1: |
| | | return "是"; |
| | | case 0: |
| | | return "否"; |
| | | default: |
| | | return String.valueOf(this.beBatch); |
| | | } |
| | | } |
| | | |
| | | public String getSource$(){ |
| | | if (null == this.source){ return null; } |
| | | switch (this.source){ |
| | | case 1: |
| | | return "制造"; |
| | | case 2: |
| | | return "采购"; |
| | | case 3: |
| | | return "外协"; |
| | | default: |
| | | return String.valueOf(this.source); |
| | | } |
| | | } |
| | | |
| | | public String getInspect$(){ |
| | | if (null == this.inspect){ return null; } |
| | | switch (this.inspect){ |
| | | case 1: |
| | | return "是"; |
| | | case 0: |
| | | return "否"; |
| | | default: |
| | | return String.valueOf(this.inspect); |
| | | } |
| | | } |
| | | |
| | | public String getDanger$(){ |
| | | if (null == this.danger){ return null; } |
| | | switch (this.danger){ |
| | | case 1: |
| | | return "是"; |
| | | case 0: |
| | | return "否"; |
| | | default: |
| | | return String.valueOf(this.danger); |
| | | } |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("agv_wrk_detl_log") |
| | | public class AgvWrkDetlLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 工作时间 |
| | | */ |
| | | @ApiModelProperty(value= "工作时间") |
| | | @TableField("io_time") |
| | | private Date ioTime; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 托盘条码 |
| | | */ |
| | | @ApiModelProperty(value= "托盘条码") |
| | | private String zpallet; |
| | | |
| | | /** |
| | | * 物料 |
| | | */ |
| | | @ApiModelProperty(value= "物料号") |
| | | private String matnr; |
| | | |
| | | /** |
| | | * 物料描述 |
| | | */ |
| | | @ApiModelProperty(value= "物料号") |
| | | private String maktx; |
| | | |
| | | /** |
| | | * 序列码 |
| | | */ |
| | | @ApiModelProperty(value= "序列码") |
| | | private String batch; |
| | | |
| | | /** |
| | | * 单据编号 |
| | | */ |
| | | @ApiModelProperty(value= "单据编号") |
| | | @TableField("order_no") |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 规格 |
| | | */ |
| | | @ApiModelProperty(value= "规格") |
| | | private String specs; |
| | | |
| | | /** |
| | | * 批次 |
| | | */ |
| | | @ApiModelProperty(value= "批次") |
| | | private String model; |
| | | |
| | | /** |
| | | * 颜色 |
| | | */ |
| | | @ApiModelProperty(value= "颜色") |
| | | private String color; |
| | | |
| | | /** |
| | | * 品牌 |
| | | */ |
| | | @ApiModelProperty(value= "品牌") |
| | | private String brand; |
| | | |
| | | /** |
| | | * 单位 |
| | | */ |
| | | @ApiModelProperty(value= "单位") |
| | | private String unit; |
| | | |
| | | /** |
| | | * 单价 |
| | | */ |
| | | @ApiModelProperty(value= "单价") |
| | | private Double price; |
| | | |
| | | /** |
| | | * sku |
| | | */ |
| | | @ApiModelProperty(value= "sku") |
| | | private String sku; |
| | | |
| | | /** |
| | | * 包数 |
| | | */ |
| | | @ApiModelProperty(value= "包数") |
| | | private Double units; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 物料状态 |
| | | */ |
| | | @ApiModelProperty(value= "物料状态") |
| | | private String origin; |
| | | |
| | | /** |
| | | * 厂家 |
| | | */ |
| | | @ApiModelProperty(value= "厂家") |
| | | private String manu; |
| | | |
| | | /** |
| | | * 单据时间 |
| | | */ |
| | | @ApiModelProperty(value= "单据时间") |
| | | @TableField("manu_date") |
| | | private String manuDate; |
| | | |
| | | /** |
| | | * 品项数 |
| | | */ |
| | | @ApiModelProperty(value= "品项数") |
| | | @TableField("item_num") |
| | | private String itemNum; |
| | | |
| | | /** |
| | | * 安全库存量 |
| | | */ |
| | | @ApiModelProperty(value= "安全库存量") |
| | | @TableField("safe_qty") |
| | | private Double safeQty; |
| | | |
| | | /** |
| | | * 重量 |
| | | */ |
| | | @ApiModelProperty(value= "重量") |
| | | private Double weight; |
| | | |
| | | /** |
| | | * 长度 |
| | | */ |
| | | @ApiModelProperty(value= "长度") |
| | | private Double length; |
| | | |
| | | /** |
| | | * 体积 |
| | | */ |
| | | @ApiModelProperty(value= "体积") |
| | | private Double volume; |
| | | |
| | | /** |
| | | * 三方编码 |
| | | */ |
| | | @ApiModelProperty(value= "三方编码") |
| | | @TableField("three_code") |
| | | private String threeCode; |
| | | |
| | | /** |
| | | * 供应商 |
| | | */ |
| | | @ApiModelProperty(value= "供应商") |
| | | private String supp; |
| | | |
| | | /** |
| | | * 供应商编码 |
| | | */ |
| | | @ApiModelProperty(value= "供应商编码") |
| | | @TableField("supp_code") |
| | | private String suppCode; |
| | | |
| | | /** |
| | | * 是否批次 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否批次 1: 是 0: 否 ") |
| | | @TableField("be_batch") |
| | | private Integer beBatch; |
| | | |
| | | /** |
| | | * 保质期 |
| | | */ |
| | | @ApiModelProperty(value= "保质期") |
| | | @TableField("dead_time") |
| | | private String deadTime; |
| | | |
| | | /** |
| | | * 预警天数 |
| | | */ |
| | | @ApiModelProperty(value= "预警天数") |
| | | @TableField("dead_warn") |
| | | private Integer deadWarn; |
| | | |
| | | /** |
| | | * 制购 1: 制造 2: 采购 3: 外协 |
| | | */ |
| | | @ApiModelProperty(value= "制购 1: 制造 2: 采购 3: 外协 ") |
| | | private Integer source; |
| | | |
| | | /** |
| | | * 要求检验 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "要求检验 1: 是 0: 否 ") |
| | | private Integer inspect; |
| | | |
| | | /** |
| | | * 危险品 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "危险品 1: 是 0: 否 ") |
| | | private Integer danger; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); |
| | | } |
| | | |
| | | public String getBeBatch$(){ |
| | | if (null == this.beBatch){ return null; } |
| | | switch (this.beBatch){ |
| | | case 1: |
| | | return "是"; |
| | | case 0: |
| | | return "否"; |
| | | default: |
| | | return String.valueOf(this.beBatch); |
| | | } |
| | | } |
| | | |
| | | public String getSource$(){ |
| | | if (null == this.source){ return null; } |
| | | switch (this.source){ |
| | | case 1: |
| | | return "制造"; |
| | | case 2: |
| | | return "采购"; |
| | | case 3: |
| | | return "外协"; |
| | | default: |
| | | return String.valueOf(this.source); |
| | | } |
| | | } |
| | | |
| | | public String getInspect$(){ |
| | | if (null == this.inspect){ return null; } |
| | | switch (this.inspect){ |
| | | case 1: |
| | | return "是"; |
| | | case 0: |
| | | return "否"; |
| | | default: |
| | | return String.valueOf(this.inspect); |
| | | } |
| | | } |
| | | |
| | | public String getDanger$(){ |
| | | if (null == this.danger){ return null; } |
| | | switch (this.danger){ |
| | | case 1: |
| | | return "是"; |
| | | case 0: |
| | | return "否"; |
| | | default: |
| | | return String.valueOf(this.danger); |
| | | } |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("agv_wrk_mast_log") |
| | | public class AgvWrkMastLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("inv_wh") |
| | | private String invWh; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private Date ymd; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private String mk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("whs_type") |
| | | private Integer whsType; |
| | | |
| | | /** |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value= "工作状态") |
| | | @TableField("wrk_sts") |
| | | private Long wrkSts; |
| | | |
| | | /** |
| | | * 入出库类型 |
| | | */ |
| | | @ApiModelProperty(value= "入出库类型") |
| | | @TableField("io_type") |
| | | private Integer ioType; |
| | | |
| | | /** |
| | | * 堆垛机号 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机号") |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * 穿梭车 |
| | | */ |
| | | @ApiModelProperty(value= "穿梭车") |
| | | @TableField("ste_no") |
| | | private Integer steNo; |
| | | |
| | | /** |
| | | * 边缘库位 |
| | | */ |
| | | @ApiModelProperty(value= "边缘库位") |
| | | @TableField("out_most") |
| | | private Integer outMost; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("sheet_no") |
| | | private String sheetNo; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @ApiModelProperty(value= "优先级") |
| | | @TableField("io_pri") |
| | | private Double ioPri; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("wrk_date") |
| | | private Date wrkDate; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | @TableField("loc_no") |
| | | private String locNo; |
| | | |
| | | /** |
| | | * 目标站 |
| | | */ |
| | | @ApiModelProperty(value= "目标站") |
| | | @TableField("sta_no") |
| | | private Integer staNo; |
| | | |
| | | /** |
| | | * 源站 |
| | | */ |
| | | @ApiModelProperty(value= "源站") |
| | | @TableField("source_sta_no") |
| | | private Integer sourceStaNo; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | @ApiModelProperty(value= "源库位") |
| | | @TableField("source_loc_no") |
| | | private String sourceLocNo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("loc_sts") |
| | | private String locSts; |
| | | |
| | | /** |
| | | * 拣料 |
| | | */ |
| | | @ApiModelProperty(value= "拣料") |
| | | private String picking; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("link_mis") |
| | | private String linkMis; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("online_yn") |
| | | private String onlineYn; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("upd_mk") |
| | | private String updMk; |
| | | |
| | | /** |
| | | * 退出 |
| | | */ |
| | | @ApiModelProperty(value= "退出") |
| | | @TableField("exit_mk") |
| | | private String exitMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("plt_type") |
| | | private Integer pltType; |
| | | |
| | | /** |
| | | * 空板 |
| | | */ |
| | | @ApiModelProperty(value= "空板") |
| | | @TableField("empty_mk") |
| | | private String emptyMk; |
| | | |
| | | /** |
| | | * 工作时间 |
| | | */ |
| | | @ApiModelProperty(value= "工作时间") |
| | | @TableField("io_time") |
| | | private Date ioTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("ctn_type") |
| | | private Integer ctnType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private String packed; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("ove_mk") |
| | | private String oveMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("mtn_type") |
| | | private Double mtnType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("user_no") |
| | | private String userNo; |
| | | |
| | | /** |
| | | * 堆垛机启动时间 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机启动时间") |
| | | @TableField("crn_str_time") |
| | | private Date crnStrTime; |
| | | |
| | | /** |
| | | * 堆垛机停止时间 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机停止时间") |
| | | @TableField("crn_end_time") |
| | | private Date crnEndTime; |
| | | |
| | | /** |
| | | * 拣料时间 |
| | | */ |
| | | @ApiModelProperty(value= "拣料时间") |
| | | @TableField("plc_str_time") |
| | | private Date plcStrTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("crn_pos_time") |
| | | private Date crnPosTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("load_time") |
| | | private Double loadTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("exp_time") |
| | | private Double expTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("ref_wrkno") |
| | | private Double refWrkno; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("ref_iotime") |
| | | private Date refIotime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("pause_mk") |
| | | private String pauseMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("error_time") |
| | | private Date errorTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("error_memo") |
| | | private String errorMemo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("ctn_kind") |
| | | private Integer ctnKind; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("manu_type") |
| | | private String manuType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("memo_m") |
| | | private String memoM; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("sc_weight") |
| | | private Double scWeight; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("log_mk") |
| | | private String logMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("log_err_time") |
| | | private Date logErrTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("log_err_memo") |
| | | private String logErrMemo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | private String barcode; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("Pdc_type") |
| | | private String PdcType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("ctn_no") |
| | | private String ctnNo; |
| | | |
| | | /** |
| | | * 满板 |
| | | */ |
| | | @ApiModelProperty(value= "满板") |
| | | @TableField("full_plt") |
| | | private String fullPlt; |
| | | |
| | | /** |
| | | * 先入品 / 双重入库 |
| | | */ |
| | | @ApiModelProperty(value= "先入品") |
| | | @TableField("pre_have") |
| | | private String preHave; |
| | | |
| | | /** |
| | | * 空操作 / 取货无箱 |
| | | */ |
| | | @ApiModelProperty(value= "空操作") |
| | | @TableField("take_none") |
| | | private String takeNone; |
| | | |
| | | public AgvWrkMastLog() {} |
| | | |
| | | public String getWrkNo$(){ |
| | | WrkMastService service = SpringUtils.getBean(WrkMastService.class); |
| | | WrkMast wrkMast = service.selectById(this.wrkNo); |
| | | if (!Cools.isEmpty(wrkMast)){ |
| | | return String.valueOf(wrkMast.getWrkNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getYmd$(){ |
| | | if (Cools.isEmpty(this.ymd)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ymd); |
| | | } |
| | | |
| | | public String getWrkSts$(){ |
| | | BasWrkStatusService service = SpringUtils.getBean(BasWrkStatusService.class); |
| | | BasWrkStatus basWrkStatus = service.selectById(this.wrkSts); |
| | | if (!Cools.isEmpty(basWrkStatus)){ |
| | | return String.valueOf(basWrkStatus.getWrkDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getIoType$(){ |
| | | BasWrkIotypeService service = SpringUtils.getBean(BasWrkIotypeService.class); |
| | | BasWrkIotype basWrkIotype = service.selectById(this.ioType); |
| | | if (!Cools.isEmpty(basWrkIotype)){ |
| | | return String.valueOf(basWrkIotype.getIoDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCrnNo$(){ |
| | | BasCrnpService service = SpringUtils.getBean(BasCrnpService.class); |
| | | BasCrnp basCrnp = service.selectById(this.crnNo); |
| | | if (!Cools.isEmpty(basCrnp)){ |
| | | return String.valueOf(basCrnp.getCrnNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getWrkDate$(){ |
| | | if (Cools.isEmpty(this.wrkDate)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.wrkDate); |
| | | } |
| | | |
| | | public String getLocNo$(){ |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.locNo); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getStaNo$(){ |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(this.staNo); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getSourceStaNo$(){ |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(this.sourceStaNo); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getSourceLocNo$(){ |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.sourceLocNo); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); |
| | | } |
| | | |
| | | public String getCrnStrTime$(){ |
| | | if (Cools.isEmpty(this.crnStrTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.crnStrTime); |
| | | } |
| | | |
| | | public String getCrnEndTime$(){ |
| | | if (Cools.isEmpty(this.crnEndTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.crnEndTime); |
| | | } |
| | | |
| | | public String getPlcStrTime$(){ |
| | | if (Cools.isEmpty(this.plcStrTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.plcStrTime); |
| | | } |
| | | |
| | | public String getCrnPosTime$(){ |
| | | if (Cools.isEmpty(this.crnPosTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.crnPosTime); |
| | | } |
| | | |
| | | |
| | | public String getRefIotime$(){ |
| | | if (Cools.isEmpty(this.refIotime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.refIotime); |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public String getErrorTime$(){ |
| | | if (Cools.isEmpty(this.errorTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.errorTime); |
| | | } |
| | | |
| | | public String getLogErrTime$(){ |
| | | if (Cools.isEmpty(this.logErrTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.logErrTime); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class AgvTaskCallBackParam implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | //业务任务号 |
| | | private String taskCode; |
| | | |
| | | //上报事件类型 |
| | | private String eventType; |
| | | |
| | | //任务状态 |
| | | private String status; |
| | | |
| | | //机器人编码 |
| | | private String robotCode; |
| | | |
| | | //容器编码 |
| | | private String containerCode; |
| | | |
| | | //工作位编码 |
| | | private String locationCode; |
| | | |
| | | //工作站编码 |
| | | private String stationCode; |
| | | |
| | | //描述信息,描述异常原因/挂起原因等 |
| | | private String message; |
| | | |
| | | //库位是否有容器,盘点任务才会返回该值 |
| | | private boolean isLocationHasContainer; |
| | | |
| | | //背篓层号,从 0 层开始,从下往上编号。64 表示放在了货叉上 |
| | | private int trayLevel; |
| | | |
| | | //重量,单位为 g,仅限于重量盘点 |
| | | private int weight; |
| | | |
| | | //rfid 盘点信息,仅限于 rfid 盘点 |
| | | private List<String> rfidInfo; |
| | | } |
| | |
| | | //任务优先级 |
| | | private int taskPriority; |
| | | //任务描述 |
| | | private AgvTaskkDescribeParam taskkDescribe; |
| | | private AgvTaskkDescribeParam taskDescribe; |
| | | } |
| | |
| | | public void updateLocType2(@Param("locType2") int locType2, @Param("startRow")int startRow, @Param("endRow")int endRow, @Param("startBay")int startBay, @Param("endBay")int endBay, @Param("startLev")int startLev, @Param("endLev")int endLev, @Param("floor")int floor); |
| | | |
| | | List<AgvLocMast> queryFreeLocMast2(Short locType1, Integer rowBeg, Integer rowEnd, Integer bayBeg, Integer bayEnd, Integer levBeg, Integer levEnd); |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.AgvWaitPakinLog; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface AgvWaitPakinLogMapper extends BaseMapper<AgvWaitPakinLog> { |
| | | |
| | | @Insert("insert into agv_cust_wait_pakin_log select * from agv_cust_wait_pakin where zpallet=#{zpallet}") |
| | | int save(String zpallet); |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.AgvWrkDetlLog; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface AgvWrkDetlLogMapper extends BaseMapper<AgvWrkDetlLog> { |
| | | |
| | | @Insert("insert into agv_wrk_detl_log select * from agv_wrk_detl where wrk_no=#{workNo}") |
| | | int save(Integer workNo); |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.AgvWrkMastLog; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface AgvWrkMastLogMapper extends BaseMapper<AgvWrkMastLog> { |
| | | |
| | | @Insert("insert into agv_wrk_mast_log select * from agv_wrk_mast where wrk_no=#{workNo}") |
| | | int save(Integer workNo); |
| | | |
| | | } |
| | |
| | | |
| | | @Mapper |
| | | public interface AgvWrkMastMapper extends BaseMapper<AgvWrkMast> { |
| | | |
| | | } |
| | |
| | | public void clearBasDevp(); |
| | | |
| | | public void initBasDevp(); |
| | | |
| | | public void updateLocStsAndBarcodeByDevNo(String devNo, String locSts, String barcode); |
| | | } |
| | |
| | | |
| | | public interface AgvLocDetlService extends IService<AgvLocDetl> { |
| | | |
| | | public void addLocDetlInfo(String locNo, int taskCode); |
| | | |
| | | } |
| | |
| | | List<AgvLocMast> queryFreeLocMast2(Short locType1, Integer rowBeg, Integer rowEnd, Integer bayBeg, Integer bayEnd, Integer levBeg, Integer levEnd); |
| | | |
| | | void updateLocType2ByRBL(Integer locType2, AgvLocRule locRule); |
| | | |
| | | public void updateLocStsByLocNo(String locNo, String locSts); |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.AgvWaitPakinLog; |
| | | |
| | | public interface AgvWaitPakinLogService extends IService<AgvWaitPakinLog> { |
| | | |
| | | boolean save(String zpallet); |
| | | |
| | | } |
| | |
| | | |
| | | public interface AgvWaitPakinService extends IService<AgvWaitPakin> { |
| | | |
| | | public void updateIoStatus(int wrkNo, String ioStatus); |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.AgvWrkDetlLog; |
| | | |
| | | public interface AgvWrkDetlLogService extends IService<AgvWrkDetlLog> { |
| | | |
| | | boolean save(Integer workNo); |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.AgvWrkMastLog; |
| | | |
| | | public interface AgvWrkMastLogService extends IService<AgvWrkMastLog> { |
| | | |
| | | boolean save(Integer workNo); |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.entity.AgvWrkMast; |
| | | |
| | | public interface AgvWrkMastService extends IService<AgvWrkMast> { |
| | | |
| | | public void updateWrkStsByWrkNo(int wrkNo, long wrkSts); |
| | | } |
| | |
| | | for(int row=rowIndex; row<=rowMax; row++){ |
| | | for(int bay=bayIndex; bay<=bayMax; bay++){ |
| | | for(int lev=levIndex; lev<=levMax; lev++){ |
| | | // AgvBasDevp agvBasDevp = new AgvBasDevp(); |
| | | // String devNo = "CS-" + floor + "0" + row + "-00" + bay + "-0" + lev + "@" + floor; |
| | | // String stationCode = "CS-" + floor + "0" + row; |
| | | // agvBasDevp.setDevNo(devNo); |
| | | // agvBasDevp.setStationCode(stationCode); |
| | | // agvBasDevp.setLocSts("O"); |
| | | // agvBasDevp.setCacheShelves("Y"); |
| | | // agvBasDevp.setFloor(floor); |
| | | // agvBasDevp.setModiTime(now); |
| | | // agvBasDevp.setAppeTime(now); |
| | | agvBasDevpList.add(getAgvBasDevp(row,bay,lev,floor,"Y",now)); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | return agvBasDevp; |
| | | } |
| | | |
| | | public void updateLocStsAndBarcodeByDevNo(String devNo, String locSts, String barcode){ |
| | | |
| | | AgvBasDevp agvBasDevp = this.selectById(devNo); |
| | | agvBasDevp.setLocSts(locSts); |
| | | agvBasDevp.setBarcode(barcode); |
| | | this.updateById(agvBasDevp); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.AgvLocDetl; |
| | | import com.zy.asrs.entity.AgvWrkDetl; |
| | | import com.zy.asrs.mapper.AgvLocDetlMapper; |
| | | import com.zy.asrs.service.AgvLocDetlService; |
| | | import com.zy.asrs.service.AgvWrkDetlService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | public class AgvLocDetlServiceImpl extends ServiceImpl<AgvLocDetlMapper, AgvLocDetl> implements AgvLocDetlService { |
| | | |
| | | @Autowired |
| | | AgvWrkDetlService agvWrkDetlService; |
| | | |
| | | public void addLocDetlInfo(String locNo, int taskCode) { |
| | | List<AgvWrkDetl> agvWrkDetls = agvWrkDetlService.selectList(new EntityWrapper<AgvWrkDetl>().eq("wrk_no", taskCode)); |
| | | List<AgvLocDetl> agvLocDetlList = agvWrkDetls.stream().map(agvWrkDetl -> { |
| | | AgvLocDetl agvLocDetl = new AgvLocDetl(); |
| | | BeanUtils.copyProperties(agvWrkDetl, agvLocDetl); |
| | | agvLocDetl.setLocNo(locNo); |
| | | return agvLocDetl; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | this.insertBatch(agvLocDetlList); |
| | | |
| | | } |
| | | } |
| | |
| | | this.baseMapper.updateLocType2(locType2,locRule.getRowBeg(),locRule.getRowEnd(),locRule.getBayBeg(),locRule.getBayEnd(),locRule.getLevBeg(),locRule.getLevEnd(),locRule.getFloor()); |
| | | } |
| | | |
| | | public void updateLocStsByLocNo(String locNo, String locSts) { |
| | | AgvLocMast agvLocMast = this.selectById(locNo); |
| | | agvLocMast.setLocSts(locSts); |
| | | this.updateById(agvLocMast); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | public List<AgvBasDevp> getAgvBasDevpByFloor(int floor) { |
| | | EntityWrapper<AgvBasDevp> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("floor",floor).eq("cache_shelves","Y"); |
| | | wrapper.eq("floor",floor).eq("cache_shelves","Y").eq("sts_loc","F"); |
| | | return agvBasDevpService.selectList(wrapper); |
| | | } |
| | | |
New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.AgvWaitPakinLog; |
| | | import com.zy.asrs.mapper.AgvWaitPakinLogMapper; |
| | | import com.zy.asrs.service.AgvWaitPakinLogService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class AgvWaitPakinLogServiceImpl extends ServiceImpl<AgvWaitPakinLogMapper, AgvWaitPakinLog> implements AgvWaitPakinLogService { |
| | | |
| | | @Override |
| | | public boolean save(String zpallet) { |
| | | return this.baseMapper.save(zpallet) > 0; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.AgvWaitPakin; |
| | | import com.zy.asrs.entity.AgvWrkMast; |
| | | import com.zy.asrs.mapper.AgvWaitPakinMapper; |
| | | import com.zy.asrs.service.AgvWaitPakinService; |
| | | import com.zy.asrs.service.AgvWrkMastService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class AgvWaitPakinServiceImpl extends ServiceImpl<AgvWaitPakinMapper, AgvWaitPakin> implements AgvWaitPakinService { |
| | | |
| | | @Autowired |
| | | AgvWrkMastService agvWrkMastService; |
| | | |
| | | public void updateIoStatus(int wrkNo, String ioStatus) { |
| | | AgvWrkMast agvWrkMast = agvWrkMastService.selectById(wrkNo); |
| | | List<AgvWaitPakin> agvWaitPakinList = this.selectList(new EntityWrapper<AgvWaitPakin>().eq("zpallet", agvWrkMast.getBarcode())); |
| | | agvWaitPakinList.stream().forEach(agvWaitPakin -> { |
| | | agvWaitPakin.setIoStatus("Y"); |
| | | this.update(agvWaitPakin,new EntityWrapper<AgvWaitPakin>().eq("zpallet",agvWaitPakin.getZpallet())); |
| | | }); |
| | | } |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.AgvWrkDetlLog; |
| | | import com.zy.asrs.mapper.AgvWrkDetlLogMapper; |
| | | import com.zy.asrs.service.AgvWrkDetlLogService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class AgvWrkDetlLogServiceImpl extends ServiceImpl<AgvWrkDetlLogMapper, AgvWrkDetlLog> implements AgvWrkDetlLogService { |
| | | |
| | | @Override |
| | | public boolean save(Integer workNo) { |
| | | return this.baseMapper.save(workNo)>0; |
| | | } |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.AgvWrkMastLog; |
| | | import com.zy.asrs.mapper.AgvWrkMastLogMapper; |
| | | import com.zy.asrs.service.AgvWrkMastLogService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class AgvWrkMastLogServiceImpl extends ServiceImpl<AgvWrkMastLogMapper, AgvWrkMastLog> implements AgvWrkMastLogService { |
| | | |
| | | @Override |
| | | public boolean save(Integer workNo) { |
| | | return this.baseMapper.save(workNo) > 0; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.entity.AgvWrkMast; |
| | | import com.zy.asrs.mapper.AgvWrkMastMapper; |
| | | import com.zy.asrs.service.AgvWrkMastService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class AgvWrkMastServiceImp extends ServiceImpl<AgvWrkMastMapper, AgvWrkMast> implements AgvWrkMastService { |
| | | |
| | | @Autowired |
| | | AgvWrkMastMapper agvWrkMastMapper; |
| | | |
| | | public void updateWrkStsByWrkNo(int wrkNo, long wrkSts) { |
| | | AgvWrkMast agvWrkMast = this.selectById(wrkNo); |
| | | agvWrkMast.setWrkSts(wrkSts); |
| | | this.updateById(agvWrkMast); |
| | | } |
| | | } |
| | |
| | | var tableData; |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'locNo$', align: 'center',title: '库位号'}, |
| | | {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} |
| | |
| | | tableIns = table.render({ |
| | | elem: '#agvLocDetl', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/agvLocDetl/list/auth', |
| | | url: baseUrl+'/agv/locDetl/list/auth', |
| | | page: true, |
| | | limit: 20, |
| | | where:{ |
| | |
| | | } else { |
| | | layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/locDetl/delete/auth", |
| | | url: baseUrl+"/agv/locDetl/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: JSON.stringify(data)}, |
| | | method: 'POST', |
| | |
| | | }; |
| | | var loadIndex = layer.msg('正在导出...', {icon: 16, shade: 0.01, time: false}); |
| | | $.ajax({ |
| | | url: baseUrl+"/locDetl/export/auth", |
| | | url: baseUrl+"/agv/locDetl/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | |
| | | content: '../locMast/locMast_detail.html', |
| | | success: function(layero, index){ |
| | | $.ajax({ |
| | | url: baseUrl+"/locMast/"+ param +"/auth", |
| | | url: baseUrl+"/agv/locMast/"+ param +"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | |
| | | |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/locDetl/"+name+"/auth", |
| | | url: baseUrl+"/agv/locDetl/"+name+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(data), |
| | | method: 'POST', |
| | |
| | | let index = obj.othis.parents('tr').attr("data-index"); |
| | | let data = tableData[index]; |
| | | data[this.stockFreeze] = obj.elem.checked?1:0; |
| | | http.post(baseUrl + "/locDetl/updateStockFreeze/auth", { |
| | | http.post(baseUrl + "/agv/locDetl/updateStockFreeze/auth", { |
| | | locNo: data.locNo, |
| | | matnr: data.matnr, |
| | | stockFreeze: data[this.stockFreeze] |
| | |
| | | // iframe物料详情 |
| | | function locDetlToLayer(val) { |
| | | locNo = val; |
| | | url = '/agv/locDetl/list/auth'; |
| | | layer.open({ |
| | | type: 2, |
| | | title: '库存明细', |
New file |
| | |
| | | var pageCurr; |
| | | function getCol() { |
| | | var cols = [ |
| | | ]; |
| | | cols.push.apply(cols, detlCols); |
| | | cols.push({field: 'status', align: 'center',title: '数据状态', templet:function(row){ |
| | | var html = "<input value='status' type='checkbox' lay-skin='switch' lay-text='正常|锁定' lay-filter='tableCheckbox' disabled='disabled' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | if(row.status === 'Y'){html += " checked ";} |
| | | html += ">"; |
| | | return html; |
| | | }} |
| | | ,{field: 'ioStatus', align: 'center',title: '入出状态', templet:function(row){ |
| | | var html = "<input value='ioStatus' type='checkbox' lay-skin='switch' lay-text='已完成|未处理' lay-filter='tableCheckbox' disabled='disabled' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | if(row.ioStatus === 'Y'){html += " checked ";} |
| | | html += ">"; |
| | | return html; |
| | | }} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true}) |
| | | return cols; |
| | | } |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#waitPakinLog', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/agv/waitPakinLog/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [getCol()], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | form.on('checkbox(tableCheckbox)', function (data) { |
| | | var _index = $(data.elem).attr('table-index')||0; |
| | | if(data.elem.checked){ |
| | | res.data[_index][data.value] = 'Y'; |
| | | }else{ |
| | | res.data[_index][data.value] = 'N'; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(locMast)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: 1 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(waitPakinLog)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '新增', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | content: 'waitPakinLog_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#data-detail-submit-edit', index).hide(); |
| | | clearFormVal(layer.getChildFrame('#detail', index)); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | } |
| | | }); |
| | | break; |
| | | case 'deleteData': |
| | | var data = checkStatus.data; |
| | | if (data.length === 0){ |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/agv/waitPakinLog/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: JSON.stringify(data)}, |
| | | method: 'POST', |
| | | traditional:true, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | tableReload(false); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | break; |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'waitPakinLog': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/agv/waitPakinLog/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(waitPakinLog)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 详情 |
| | | case 'detail': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'waitPakinLog_detail.html', |
| | | success: function(layero, index){ |
| | | setFormVal(layer.getChildFrame('#detail', index), data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } |
| | | }); |
| | | break; |
| | | // 编辑 |
| | | case 'edit': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '修改', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | content: 'waitPakinLog_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#data-detail-submit-save', index).hide(); |
| | | setFormVal(layer.getChildFrame('#detail', index), data, false); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false); |
| | | top.convertDisabled(layer.getChildFrame('#id', index), true); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } |
| | | }); |
| | | break; |
| | | case 'modiUser': |
| | | var param = top.reObject(data).modiUser; |
| | | if (param === undefined) { |
| | | layer.msg("无数据"); |
| | | } else { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '修改人员详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: '../user/user_detail.html', |
| | | success: function(layero, index){ |
| | | $.ajax({ |
| | | url: "baseUrl+/user/"+ param +"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | setFormVal(layer.getChildFrame('#detail', index), res.data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | break; |
| | | case 'appeUser': |
| | | var param = top.reObject(data).appeUser; |
| | | if (param === undefined) { |
| | | layer.msg("无数据"); |
| | | } else { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '创建者详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: '../user/user_detail.html', |
| | | success: function(layero, index){ |
| | | $.ajax({ |
| | | url: "baseUrl+/user/"+ param +"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | setFormVal(layer.getChildFrame('#detail', index), res.data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | break; |
| | | |
| | | } |
| | | }); |
| | | |
| | | // 数据保存动作 |
| | | form.on('submit(save)', function () { |
| | | if (banMsg != null){ |
| | | layer.msg(banMsg); |
| | | return; |
| | | } |
| | | method("add"); |
| | | }); |
| | | |
| | | // 数据修改动作 |
| | | form.on('submit(edit)', function () { |
| | | method("update") |
| | | }); |
| | | |
| | | function method(name){ |
| | | var index = layer.load(1, { |
| | | shade: [0.5,'#000'] //0.1透明度的背景 |
| | | }); |
| | | var data = { |
| | | // id: $('#id').val(), |
| | | id: $('#id').val(), |
| | | pakinId: $('#pakinId').val(), |
| | | barcode: $('#barcode').val(), |
| | | matnr: $('#matnr').val(), |
| | | maktx: $('#maktx').val(), |
| | | anfme: $('#anfme').val(), |
| | | unit: $('#unit').val(), |
| | | status: $('#status').val(), |
| | | memo: $('#memo').val(), |
| | | modiTime: top.strToDate($('#modiTime\\$').val()), |
| | | modiUser: $('#modiUser').val(), |
| | | appeTime: top.strToDate($('#appeTime\\$').val()), |
| | | appeUser: $('#appeUser').val(), |
| | | |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/agv/waitPakinLog/"+name+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(data), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | parent.layer.closeAll(); |
| | | parent.$(".layui-laypage-btn")[0].click(); |
| | | $("#data-detail :input").each(function () { |
| | | $(this).val(""); |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | layer.close(index); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 复选框事件 |
| | | form.on('checkbox(detailCheckbox)', function (data) { |
| | | var el = data.elem; |
| | | if (el.checked) { |
| | | $(el).val('Y'); |
| | | } else { |
| | | $(el).val('N'); |
| | | } |
| | | }); |
| | | |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 搜索栏重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr-1 |
| | | } |
| | | }); |
| | | pageCurr -= 1; |
| | | } |
| | | limit(child); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function setFormVal(el, data, showImg) { |
| | | for (var val in data) { |
| | | var find = el.find(":input[id='" + val + "']"); |
| | | if (find[0]!=null){ |
| | | if (find[0].type === 'checkbox'){ |
| | | if (data[val]==='Y'){ |
| | | find.attr("checked","checked"); |
| | | find.val('Y'); |
| | | } else { |
| | | find.remove("checked"); |
| | | find.val('N'); |
| | | } |
| | | continue; |
| | | } |
| | | } |
| | | find.val(data[val]); |
| | | if (showImg){ |
| | | var next = find.next(); |
| | | if (next.get(0)){ |
| | | if (next.get(0).localName === "img") { |
| | | find.hide(); |
| | | next.attr("src", data[val]); |
| | | next.show(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | function clearFormVal(el) { |
| | | $(':input', el) |
| | | .val('') |
| | | .removeAttr('checked') |
| | | .removeAttr('selected'); |
| | | } |
| | | |
| | | function detailScreen(index) { |
| | | var detail = layer.getChildFrame('#data-detail', index); |
| | | var height = detail.height()+60; |
| | | if (height > ($(window).height()*0.9)) { |
| | | height = ($(window).height()*0.8); |
| | | } |
| | | layer.style(index, { |
| | | // top: (($(window).height()-height)/3)+"px", |
| | | height: height+'px' |
| | | }); |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
New file |
| | |
| | | var pageCurr; |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'wrkNo', align: 'center',title: '工作号'} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间'} |
| | | ]; |
| | | cols.push.apply(cols, detlCols); |
| | | cols.push({field: 'modiUser$', align: 'center',title: '修改人员',hide: true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间',hide: true} |
| | | ) |
| | | return cols; |
| | | } |
| | | |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#wrkDetlLog', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/agv/wrkDetlLog/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [getCol()], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | form.on('checkbox(tableCheckbox)', function (data) { |
| | | var _index = $(data.elem).attr('table-index')||0; |
| | | if(data.elem.checked){ |
| | | res.data[_index][data.value] = 'Y'; |
| | | }else{ |
| | | res.data[_index][data.value] = 'N'; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(locMast)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: 1 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(wrkDetlLog)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '新增', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | content: 'wrkDetlLog_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#data-detail-submit-edit', index).hide(); |
| | | clearFormVal(layer.getChildFrame('#detail', index)); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | } |
| | | }); |
| | | break; |
| | | case 'deleteData': |
| | | var data = checkStatus.data; |
| | | if (data.length === 0){ |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/agv/wrkDetlLog/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: JSON.stringify(data)}, |
| | | method: 'POST', |
| | | traditional:true, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | tableReload(false); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | break; |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'wrkDetlLog': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/agv/wrkDetlLog/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(wrkDetlLog)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 详情 |
| | | case 'detail': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'wrkDetlLog_detail.html', |
| | | success: function(layero, index){ |
| | | setFormVal(layer.getChildFrame('#detail', index), data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } |
| | | }); |
| | | break; |
| | | // 编辑 |
| | | case 'edit': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '修改', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | content: 'wrkDetlLog_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#data-detail-submit-save', index).hide(); |
| | | setFormVal(layer.getChildFrame('#detail', index), data, false); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false); |
| | | top.convertDisabled(layer.getChildFrame('', index), true); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } |
| | | }); |
| | | break; |
| | | case 'modiUser': |
| | | var param = top.reObject(data).modiUser; |
| | | if (param === undefined) { |
| | | layer.msg("无数据"); |
| | | } else { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '修改人员详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: '../user/user_detail.html', |
| | | success: function(layero, index){ |
| | | $.ajax({ |
| | | url: "baseUrl+/user/"+ param +"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | setFormVal(layer.getChildFrame('#detail', index), res.data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | break; |
| | | case 'appeUser': |
| | | var param = top.reObject(data).appeUser; |
| | | if (param === undefined) { |
| | | layer.msg("无数据"); |
| | | } else { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '创建者详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: '../user/user_detail.html', |
| | | success: function(layero, index){ |
| | | $.ajax({ |
| | | url: "baseUrl+/user/"+ param +"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | setFormVal(layer.getChildFrame('#detail', index), res.data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | break; |
| | | |
| | | } |
| | | }); |
| | | |
| | | // 数据保存动作 |
| | | form.on('submit(save)', function () { |
| | | if (banMsg != null){ |
| | | layer.msg(banMsg); |
| | | return; |
| | | } |
| | | method("add"); |
| | | }); |
| | | |
| | | // 数据修改动作 |
| | | form.on('submit(edit)', function () { |
| | | method("update") |
| | | }); |
| | | |
| | | function method(name){ |
| | | var index = layer.load(1, { |
| | | shade: [0.5,'#000'] //0.1透明度的背景 |
| | | }); |
| | | var data = { |
| | | // id: $('#id').val(), |
| | | wrkNo: $('#wrkNo').val(), |
| | | ioTime: top.strToDate($('#ioTime\\$').val()), |
| | | matnr: $('#matnr').val(), |
| | | lgnum: $('#lgnum').val(), |
| | | tbnum: $('#tbnum').val(), |
| | | tbpos: $('#tbpos').val(), |
| | | zmatid: $('#zmatid').val(), |
| | | maktx: $('#maktx').val(), |
| | | werks: $('#werks').val(), |
| | | anfme: $('#anfme').val(), |
| | | altme: $('#altme').val(), |
| | | zpallet: $('#zpallet').val(), |
| | | bname: $('#bname').val(), |
| | | memo: $('#memo').val(), |
| | | modiUser: $('#modiUser').val(), |
| | | modiTime: top.strToDate($('#modiTime\\$').val()), |
| | | appeUser: $('#appeUser').val(), |
| | | appeTime: top.strToDate($('#appeTime\\$').val()), |
| | | nista: $('#nista').val(), |
| | | |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/agv/wrkDetlLog/"+name+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(data), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | parent.layer.closeAll(); |
| | | parent.$(".layui-laypage-btn")[0].click(); |
| | | $("#data-detail :input").each(function () { |
| | | $(this).val(""); |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | layer.close(index); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 复选框事件 |
| | | form.on('checkbox(detailCheckbox)', function (data) { |
| | | var el = data.elem; |
| | | if (el.checked) { |
| | | $(el).val('Y'); |
| | | } else { |
| | | $(el).val('N'); |
| | | } |
| | | }); |
| | | |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 搜索栏重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | layDate.render({ |
| | | elem: '#ioTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr-1 |
| | | } |
| | | }); |
| | | pageCurr -= 1; |
| | | } |
| | | limit(child); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function setFormVal(el, data, showImg) { |
| | | for (var val in data) { |
| | | var find = el.find(":input[id='" + val + "']"); |
| | | if (find[0]!=null){ |
| | | if (find[0].type === 'checkbox'){ |
| | | if (data[val]==='Y'){ |
| | | find.attr("checked","checked"); |
| | | find.val('Y'); |
| | | } else { |
| | | find.remove("checked"); |
| | | find.val('N'); |
| | | } |
| | | continue; |
| | | } |
| | | } |
| | | find.val(data[val]); |
| | | if (showImg){ |
| | | var next = find.next(); |
| | | if (next.get(0)){ |
| | | if (next.get(0).localName === "img") { |
| | | find.hide(); |
| | | next.attr("src", data[val]); |
| | | next.show(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | function clearFormVal(el) { |
| | | $(':input', el) |
| | | .val('') |
| | | .removeAttr('checked') |
| | | .removeAttr('selected'); |
| | | } |
| | | |
| | | function detailScreen(index) { |
| | | var detail = layer.getChildFrame('#data-detail', index); |
| | | var height = detail.height()+60; |
| | | if (height > ($(window).height()*0.9)) { |
| | | height = ($(window).height()*0.8); |
| | | } |
| | | layer.style(index, { |
| | | // top: (($(window).height()-height)/3)+"px", |
| | | height: height+'px' |
| | | }); |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
| | |
| | | } else { |
| | | layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/agv/wrkMast/delete/auth", |
| | | url: baseUrl+"/agv/wrkMast/startWrk/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: JSON.stringify(data)}, |
| | | method: 'POST', |
New file |
| | |
| | | var pageCurr; |
| | | var wrkNo; |
| | | var ioTime; |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#wrkMastLog', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/agv/wrkMastLog/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | // {type: 'checkbox'} |
| | | // ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} |
| | | // ,{field: 'id', align: 'center',title: '编号'} |
| | | {field: 'wrkNo', align: 'center',title: '工作号',event: 'wrkNo', sort: true} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间', width:160, sort: true} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态', width:160} |
| | | ,{field: 'ioType$', align: 'center',title: '入出库类型', width:160} |
| | | ,{field: 'ioPri', align: 'center',title: '优先级'} |
| | | ,{field: 'crnNo$', align: 'center',title: '堆垛机号'} |
| | | ,{field: 'sourceStaNo$', align: 'center',title: '源站'} |
| | | ,{field: 'staNo$', align: 'center',title: '目标站'} |
| | | ,{field: 'sourceLocNo$', align: 'center',title: '源库位'} |
| | | ,{field: 'locNo$', align: 'center',title: '目标库位'} |
| | | // ,{field: 'picking', align: 'center',title: '拣料', templet:function(row){ |
| | | // var html = "<input value='picking' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.picking === 'Y'){html += " checked ";} |
| | | // html += ">"; |
| | | // return html; |
| | | // }} |
| | | // ,{field: 'exitMk', align: 'center',title: '退出', templet:function(row){ |
| | | // var html = "<input value='exitMk' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.exitMk === 'Y'){html += " checked ";} |
| | | // html += ">"; |
| | | // return html; |
| | | // }} |
| | | // ,{field: 'emptyMk', align: 'center',title: '空板', templet:function(row){ |
| | | // var html = "<input value='emptyMk' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.emptyMk === 'Y'){html += " checked ";} |
| | | // html += ">"; |
| | | // return html; |
| | | // }} |
| | | // |
| | | // ,{field: 'crnStrTime$', align: 'center',title: '堆垛机启动时间'} |
| | | // ,{field: 'crnEndTime$', align: 'center',title: '堆垛机停止时间'} |
| | | // ,{field: 'plcStrTime$', align: 'center',title: '拣料时间'} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true} |
| | | // ,{field: 'appeUser$', align: 'center',title: '创建者',event: 'appeUser', style: 'cursor:pointer'} |
| | | // ,{field: 'appeTime$', align: 'center',title: '添加时间'} |
| | | ,{field: 'barcode', align: 'center',title: '条码'} |
| | | // ,{field: 'fullPlt', align: 'center',title: '满板', templet:function(row){ |
| | | // var html = "<input value='fullPlt' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.fullPlt === 'Y'){html += " checked ";} |
| | | // html += ">"; |
| | | // return html; |
| | | // }} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 80} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | form.on('checkbox(tableCheckbox)', function (data) { |
| | | var _index = $(data.elem).attr('table-index')||0; |
| | | if(data.elem.checked){ |
| | | res.data[_index][data.value] = 'Y'; |
| | | }else{ |
| | | res.data[_index][data.value] = 'N'; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(wrkMastLog)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: 1 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(wrkMastLog)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '新增', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'wrkMastLog_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#data-detail-submit-edit', index).hide(); |
| | | clearFormVal(layer.getChildFrame('#detail', index)); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | } |
| | | }); |
| | | break; |
| | | case 'refreshData': |
| | | tableIns.reload({ |
| | | page: { |
| | | curr: pageCurr |
| | | } |
| | | }); |
| | | limit(); |
| | | break; |
| | | case 'deleteData': |
| | | var data = checkStatus.data; |
| | | if (data.length === 0){ |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/agv/wrkMastLog/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: JSON.stringify(data)}, |
| | | method: 'POST', |
| | | traditional:true, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | tableReload(false); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | break; |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'wrkMastLog': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/agv/wrkMastLog/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(wrkMastLog)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 明细展示 |
| | | case 'detlShow': |
| | | wrkNo = data.wrkNo; |
| | | ioTime = data.ioTime; |
| | | // 表格下方显示 |
| | | // locDetl(data.wrkNo); |
| | | // 弹层显示 |
| | | layer.open({ |
| | | type: 2, |
| | | title: '工作明细历史档', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'wrkDetlLog.html', |
| | | success: function(layero, index){ |
| | | } |
| | | }); |
| | | break; |
| | | // 详情 |
| | | case 'detail': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'wrkMastLog_detail.html', |
| | | success: function(layero, index){ |
| | | setFormVal(layer.getChildFrame('#detail', index), data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide(); |
| | | layer.getChildFrame('##dealDownLine', index).hide(); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | |
| | | } |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 数据保存动作 |
| | | form.on('submit(save)', function () { |
| | | if (banMsg != null){ |
| | | layer.msg(banMsg); |
| | | return; |
| | | } |
| | | method("add"); |
| | | }); |
| | | |
| | | // 数据修改动作 |
| | | form.on('submit(edit)', function () { |
| | | method("update") |
| | | }); |
| | | |
| | | function method(name){ |
| | | var index = layer.load(1, { |
| | | shade: [0.5,'#000'] //0.1透明度的背景 |
| | | }); |
| | | var data = { |
| | | // id: $('#id').val(), |
| | | id: $('#id').val(), |
| | | wrkNo: $('#wrkNo').val(), |
| | | invWh: $('#invWh').val(), |
| | | ymd: top.strToDate($('#ymd\\$').val()), |
| | | mk: $('#mk').val(), |
| | | whsType: $('#whsType').val(), |
| | | wrkSts: $('#wrkSts').val(), |
| | | ioType: $('#ioType').val(), |
| | | crnNo: $('#crnNo').val(), |
| | | sheetNo: $('#sheetNo').val(), |
| | | ioPri: $('#ioPri').val(), |
| | | wrkDate: top.strToDate($('#wrkDate\\$').val()), |
| | | locNo: $('#locNo').val(), |
| | | staNo: $('#staNo').val(), |
| | | sourceStaNo: $('#sourceStaNo').val(), |
| | | sourceLocNo: $('#sourceLocNo').val(), |
| | | locSts: $('#locSts').val(), |
| | | picking: $('#picking').val(), |
| | | linkMis: $('#linkMis').val(), |
| | | onlineYn: $('#onlineYn').val(), |
| | | updMk: $('#updMk').val(), |
| | | exitMk: $('#exitMk').val(), |
| | | pltType: $('#pltType').val(), |
| | | emptyMk: $('#emptyMk').val(), |
| | | ioTime: top.strToDate($('#ioTime\\$').val()), |
| | | ctnType: $('#ctnType').val(), |
| | | packed: $('#packed').val(), |
| | | oveMk: $('#oveMk').val(), |
| | | mtnType: $('#mtnType').val(), |
| | | userNo: $('#userNo').val(), |
| | | crnStrTime: top.strToDate($('#crnStrTime\\$').val()), |
| | | crnEndTime: top.strToDate($('#crnEndTime\\$').val()), |
| | | plcStrTime: top.strToDate($('#plcStrTime\\$').val()), |
| | | crnPosTime: top.strToDate($('#crnPosTime\\$').val()), |
| | | loadTime: $('#loadTime').val(), |
| | | expTime: $('#expTime').val(), |
| | | refWrkno: $('#refWrkno').val(), |
| | | refIotime: top.strToDate($('#refIotime\\$').val()), |
| | | modiUser: $('#modiUser').val(), |
| | | modiTime: top.strToDate($('#modiTime\\$').val()), |
| | | appeUser: $('#appeUser').val(), |
| | | appeTime: top.strToDate($('#appeTime\\$').val()), |
| | | pauseMk: $('#pauseMk').val(), |
| | | errorTime: top.strToDate($('#errorTime\\$').val()), |
| | | errorMemo: $('#errorMemo').val(), |
| | | ctnKind: $('#ctnKind').val(), |
| | | manuType: $('#manuType').val(), |
| | | memoM: $('#memoM').val(), |
| | | scWeight: $('#scWeight').val(), |
| | | logMk: $('#logMk').val(), |
| | | logErrTime: top.strToDate($('#logErrTime\\$').val()), |
| | | logErrMemo: $('#logErrMemo').val(), |
| | | barcode: $('#barcode').val(), |
| | | PdcType: $('#PdcType').val(), |
| | | ctnNo: $('#ctnNo').val(), |
| | | fullPlt: $('#fullPlt').val(), |
| | | |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/agv/wrkMastLog/"+name+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(data), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | parent.layer.closeAll(); |
| | | parent.$(".layui-laypage-btn")[0].click(); |
| | | $("#data-detail :input").each(function () { |
| | | $(this).val(""); |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | layer.close(index); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 复选框事件 |
| | | form.on('checkbox(detailCheckbox)', function (data) { |
| | | var el = data.elem; |
| | | if (el.checked) { |
| | | $(el).val('Y'); |
| | | } else { |
| | | $(el).val('N'); |
| | | } |
| | | }); |
| | | |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 搜索栏重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | layDate.render({ |
| | | elem: '#ymd\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#wrkDate\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#ioTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnStrTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnEndTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#plcStrTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnPosTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#refIotime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#errorTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#logErrTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr-1 |
| | | } |
| | | }); |
| | | pageCurr -= 1; |
| | | } |
| | | limit(child); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function setFormVal(el, data, showImg) { |
| | | for (var val in data) { |
| | | var find = el.find(":input[id='" + val + "']"); |
| | | if (find[0]!=null){ |
| | | if (find[0].type === 'checkbox'){ |
| | | if (data[val]==='Y'){ |
| | | find.attr("checked","checked"); |
| | | find.val('Y'); |
| | | } else { |
| | | find.remove("checked"); |
| | | find.val('N'); |
| | | } |
| | | continue; |
| | | } |
| | | } |
| | | find.val(data[val]); |
| | | if (showImg){ |
| | | var next = find.next(); |
| | | if (next.get(0)){ |
| | | if (next.get(0).localName === "img") { |
| | | find.hide(); |
| | | next.attr("src", data[val]); |
| | | next.show(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | function clearFormVal(el) { |
| | | $(':input', el) |
| | | .val('') |
| | | .removeAttr('checked') |
| | | .removeAttr('selected'); |
| | | } |
| | | |
| | | function detailScreen(index) { |
| | | var detail = layer.getChildFrame('#data-detail', index); |
| | | var height = detail.height()+60; |
| | | if (height > ($(window).height()*0.9)) { |
| | | height = ($(window).height()*0.8); |
| | | } |
| | | layer.style(index, { |
| | | // top: (($(window).height()-height)/3)+"px", |
| | | height: height+'px' |
| | | }); |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
| | |
| | | <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/waitPakinLog/waitPakinLog.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/agvWaitPakinLog/waitPakinLog.js" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | |
| | | <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/waitPakinLog/waitPakinLog.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/agvWaitPakinLog/waitPakinLog.js" charset="utf-8"></script> |
| | | </html> |
| | | |
| | |
| | | <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/wrkDetlLog/wrkDetlLog.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/agvWrkDetlLog/wrkDetlLog.js" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | |
| | | <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/wrkDetlLog/wrkDetlLog.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/agvWrkDetlLog/wrkDetlLog.js" charset="utf-8"></script> |
| | | </html> |
| | | |
| | |
| | | <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/locMast/locMast.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/agvLocMast/locMast.js" charset="utf-8"></script> |
| | | <script type="text/javascript"> |
| | | var pageCur; |
| | | function getCol() { |
| | |
| | | tableIns1 = table.render({ |
| | | elem: '#wrkDetlLogByMast', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/wrkDetlLogByMast/list/auth', |
| | | url: baseUrl+'/agv/wrkDetlLogByMast/list/auth', |
| | | where: {wrk_no: parent.wrkNo,ioTime: top.dateToStr(parent.ioTime, true)}, |
| | | page: true, |
| | | limit: 16, |
| | |
| | | <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/agvWrkMastLog/wrkMastLog.js" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | |
| | | <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/agvWrkMastLog/wrkMastLog.js" charset="utf-8"></script> |
| | | </html> |
| | | |
| | |
| | | <!-- 模板3 --> |
| | | <script type="text/template" id="templatePreview3" class="template-qrcode"> |
| | | {{#each data}} |
| | | <table class="contain" width="400px" style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | <table class="contain" width="400px" style="overflow: hidden;font-size: xx-small;table-layout: fixed; color:#000;"> |
| | | <tr style="height: 74px;font-size: 18px; font-weight: 400" > |
| | | <td width="50px" align="center" scope="col" colspan="1">商品</td> |
| | | <td width="170px" align="center" scope="col" colspan="1">{{this.maktx}}</td> |
| | |
| | | var cols = [ |
| | | {field: 'locNo$', align: 'center',title: '库位号'} |
| | | ]; |
| | | if(parent.url != null){ |
| | | cols = [ |
| | | {field: 'locNo', align: 'center',title: '库位号'} |
| | | ]; |
| | | } |
| | | cols.push.apply(cols, detlCols); |
| | | return cols; |
| | | } |
| | |
| | | $('#locNo').val(tmp); |
| | | } |
| | | |
| | | var url = '/locDetl/list/auth'; |
| | | if(parent.url != null){ |
| | | var url = '/agv/locDetl/list/auth'; |
| | | } |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#locDetlByMap', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/locDetl/list/auth', |
| | | url: baseUrl+url, |
| | | page: true, |
| | | limit: 20, |
| | | skin: 'line', |