From c945a29f5be6b38dd5fb0b398abf3ca3e937dd56 Mon Sep 17 00:00:00 2001 From: mrzhssss <pro6@qq.com> Date: 星期六, 19 三月 2022 09:39:34 +0800 Subject: [PATCH] # --- src/main/resources/mapper/OrderMapper.xml | 6 src/main/webapp/static/js/pickoutDetl/pickoutDetl.js | 284 +++++++ src/main/webapp/views/pickout/pickout.html | 130 +++ src/main/java/zy/cloud/wms/manager/entity/Pickout.java | 214 +++++ src/main/webapp/static/js/wave/wave.js | 107 ++ src/main/webapp/views/pickoutDetl/pickoutDetl.html | 220 +++++ src/main/java/zy/cloud/wms/common/CodeBuilder.java | 2 src/main/java/zy/cloud/wms/manager/entity/PickoutDetl.java | 498 ++++++++++++ src/main/resources/mapper/PickoutDetlMapper.xml | 36 src/main/java/zy/cloud/wms/manager/controller/PickoutController.java | 123 +++ src/main/webapp/views/order/order.html | 4 src/main/java/zy/cloud/wms/manager/controller/WaveController.java | 46 + src/main/java/zy/cloud/wms/manager/service/impl/PickoutServiceImpl.java | 12 src/main/java/zy/cloud/wms/manager/service/PickoutDetlService.java | 8 src/main/java/zy/cloud/wms/manager/service/WaveService.java | 1 src/main/java/zy/cloud/wms/manager/service/impl/OrderServiceImpl.java | 11 src/main/java/zy/cloud/wms/manager/controller/OrderController.java | 32 src/main/java/zy/cloud/wms/manager/mapper/PickoutDetlMapper.java | 12 src/main/java/zy/cloud/wms/manager/service/impl/PickoutDetlServiceImpl.java | 12 src/main/java/zy/cloud/wms/manager/service/PickoutService.java | 8 src/main/java/zy/cloud/wms/manager/service/impl/WaveServiceImpl.java | 55 + src/main/java/zy/cloud/wms/manager/service/OrderService.java | 3 src/main/java/zy/cloud/wms/manager/controller/PickoutDetlController.java | 123 +++ src/main/java/pickoutDetl.sql | 18 src/main/java/zy/cloud/wms/manager/mapper/PickoutMapper.java | 12 src/main/resources/mapper/PickoutMapper.xml | 21 src/main/webapp/static/js/order/order.js | 3 src/main/java/pickout.sql | 18 src/main/webapp/views/wave/wave.html | 17 src/main/java/zy/cloud/wms/manager/mapper/OrderMapper.java | 3 src/main/webapp/static/js/pickout/pickout.js | 257 ++++++ 31 files changed, 2,273 insertions(+), 23 deletions(-) diff --git a/src/main/java/pickout.sql b/src/main/java/pickout.sql new file mode 100644 index 0000000..9b42b89 --- /dev/null +++ b/src/main/java/pickout.sql @@ -0,0 +1,18 @@ +-- save pickout record +-- mysql +insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'pickout/pickout.html', 'pickout绠$悊', null , '2', null , '1'); + +insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'pickout#view', '鏌ヨ', '', '3', '0', '1'); +insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'pickout#btn-add', '鏂板', '', '3', '1', '1'); +insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'pickout#btn-edit', '缂栬緫', '', '3', '2', '1'); +insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'pickout#btn-delete', '鍒犻櫎', '', '3', '3', '1'); +insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'pickout#btn-export', '瀵煎嚭', '', '3', '4', '1'); + +-- sqlserver +insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickout/pickout.html', N'pickout绠$悊', null, '2', null, '1'); + +insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickout#view', N'鏌ヨ', '30564', '3', '0', '1'); +insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickout#btn-add', N'鏂板', '30564', '3', '1', '1'); +insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickout#btn-edit', N'缂栬緫', '30564', '3', '2', '1'); +insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickout#btn-delete', N'鍒犻櫎', '30564', '3', '3', '1'); +insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickout#btn-export', N'瀵煎嚭', '30564', '3', '4', '1'); diff --git a/src/main/java/pickoutDetl.sql b/src/main/java/pickoutDetl.sql new file mode 100644 index 0000000..f49f864 --- /dev/null +++ b/src/main/java/pickoutDetl.sql @@ -0,0 +1,18 @@ +-- save pickoutDetl record +-- mysql +insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'pickoutDetl/pickoutDetl.html', 'pickoutDetl绠$悊', null , '2', null , '1'); + +insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'pickoutDetl#view', '鏌ヨ', '', '3', '0', '1'); +insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'pickoutDetl#btn-add', '鏂板', '', '3', '1', '1'); +insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'pickoutDetl#btn-edit', '缂栬緫', '', '3', '2', '1'); +insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'pickoutDetl#btn-delete', '鍒犻櫎', '', '3', '3', '1'); +insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'pickoutDetl#btn-export', '瀵煎嚭', '', '3', '4', '1'); + +-- sqlserver +insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickoutDetl/pickoutDetl.html', N'pickoutDetl绠$悊', null, '2', null, '1'); + +insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickoutDetl#view', N'鏌ヨ', '30570', '3', '0', '1'); +insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickoutDetl#btn-add', N'鏂板', '30570', '3', '1', '1'); +insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickoutDetl#btn-edit', N'缂栬緫', '30570', '3', '2', '1'); +insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickoutDetl#btn-delete', N'鍒犻櫎', '30570', '3', '3', '1'); +insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'pickoutDetl#btn-export', N'瀵煎嚭', '30570', '3', '4', '1'); diff --git a/src/main/java/zy/cloud/wms/common/CodeBuilder.java b/src/main/java/zy/cloud/wms/common/CodeBuilder.java index 0544f03..895531f 100644 --- a/src/main/java/zy/cloud/wms/common/CodeBuilder.java +++ b/src/main/java/zy/cloud/wms/common/CodeBuilder.java @@ -23,7 +23,7 @@ generator.url="192.168.4.15:1433;databasename=wms_saas"; generator.username="sa"; generator.password="sa@123"; - generator.table="man_wave_detl"; + generator.table="man_pickout_detl"; generator.packagePath="zy.cloud.wms.manager"; generator.sqlOsType = SqlOsType.SQL_SERVER; // generator.js = false; diff --git a/src/main/java/zy/cloud/wms/manager/controller/OrderController.java b/src/main/java/zy/cloud/wms/manager/controller/OrderController.java index 65907ce..b4cc123 100644 --- a/src/main/java/zy/cloud/wms/manager/controller/OrderController.java +++ b/src/main/java/zy/cloud/wms/manager/controller/OrderController.java @@ -117,6 +117,17 @@ @ManagerAuth @Transactional public R deleteBatch(@RequestParam(value = "ids[]") Long[] ids){ + /*** + * 鎺х + */ + for (Long id : ids) { + Order target = orderService.selectOne(new EntityWrapper<Order>() + .eq("id", id)); + if (target.getSettle() != 0 || target.getSettle() != 1) { + throw new CoolException("浠呭厑璁稿垹闄�'鍒濆鍖�','寰呭鐞�'鐘舵�佺殑璁㈠崟"); + } + + } if (Cools.isEmpty((Object) ids)){ return R.error(); } @@ -206,6 +217,7 @@ } } + /** * 鐢熸垚娉㈡琛ㄥご */ @@ -214,7 +226,7 @@ wave.setHostId(getHostId()); String s = UUID.randomUUID().toString().replace("-",""); wave.setUuid(s); - String waveNo = "wave-" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()); + String waveNo = "WAVE-" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()); wave.setWaveNo(waveNo); wave.setOrdersQty(orders.size()); wave.setStatus((short) 0); @@ -228,6 +240,7 @@ List<OrderDetl> allOrderDetls = orderDetlService.selectBatchByOrderNo(orders); for (OrderDetl allOrderDetl : allOrderDetls) { WaveDetl checkWaveDetl = waveDetlService.selectOne(new EntityWrapper<WaveDetl>() + .eq("wave_id",wave.getId()) .eq("matnr", allOrderDetl.getMatnr()) .eq("batch", allOrderDetl.getBatch())); if (Cools.isEmpty(checkWaveDetl)) { @@ -242,6 +255,9 @@ waveDetl.setAnfme(allOrderDetl.getAnfme()); waveDetl.setMatnr(allOrderDetl.getMatnr()); waveDetl.setMaktx(allOrderDetl.getMaktx()); + waveDetl.setSpecs(allOrderDetl.getSpecs()); + waveDetl.setModel(allOrderDetl.getModel()); + waveDetl.setUnit(allOrderDetl.getUnit()); waveDetl.setStatus(0); waveDetl.setBatch(allOrderDetl.getBatch()); waveDetl.setCreateBy(getUserId()); @@ -249,14 +265,22 @@ waveDetlService.insert(waveDetl); }else { checkWaveDetl.setOrderQty(checkWaveDetl.getOrderQty()+1); - checkWaveDetl.setOrderNos(checkWaveDetl.getOrderNos() + "-split-" +allOrderDetl.getOrderNo()); + checkWaveDetl.setOrderNos(checkWaveDetl.getOrderNos() + "," +allOrderDetl.getOrderNo()); checkWaveDetl.setAnfme(checkWaveDetl.getAnfme() + allOrderDetl.getAnfme()); waveDetlService.update(checkWaveDetl,new EntityWrapper<WaveDetl>() .eq("id",checkWaveDetl.getId())); } } - System.out.println("done"); - return null; + /** + * 鍙嶅啓鍑哄簱鍗曡〃澶� + */ + for (Order order : orders) { + order.setWaveNo(wave.getWaveNo()); + order.setSettle(11L); + orderService.update(order,new EntityWrapper<Order>() + .eq("id",order.getId())); + } + return R.ok("宸茬敓鎴愭尝娆�"); } } diff --git a/src/main/java/zy/cloud/wms/manager/controller/PickoutController.java b/src/main/java/zy/cloud/wms/manager/controller/PickoutController.java new file mode 100644 index 0000000..3878bea --- /dev/null +++ b/src/main/java/zy/cloud/wms/manager/controller/PickoutController.java @@ -0,0 +1,123 @@ +package zy.cloud.wms.manager.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.common.DateUtils; +import zy.cloud.wms.manager.entity.Pickout; +import zy.cloud.wms.manager.service.PickoutService; +import com.core.annotations.ManagerAuth; +import com.core.common.BaseRes; +import com.core.common.Cools; +import com.core.common.R; +import zy.cloud.wms.common.web.BaseController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.*; + +@RestController +public class PickoutController extends BaseController { + + @Autowired + private PickoutService pickoutService; + + @RequestMapping(value = "/pickout/{id}/auth") + @ManagerAuth + public R get(@PathVariable("id") String id) { + return R.ok(pickoutService.selectById(String.valueOf(id))); + } + + @RequestMapping(value = "/pickout/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<Pickout> wrapper = new EntityWrapper<>(); + excludeTrash(param); + convert(param, wrapper); + if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} + return R.ok(pickoutService.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 = "/pickout/add/auth") + @ManagerAuth + public R add(Pickout pickout) { + pickoutService.insert(pickout); + return R.ok(); + } + + @RequestMapping(value = "/pickout/update/auth") + @ManagerAuth + public R update(Pickout pickout){ + if (Cools.isEmpty(pickout) || null==pickout.getId()){ + return R.error(); + } + pickoutService.updateById(pickout); + return R.ok(); + } + + @RequestMapping(value = "/pickout/delete/auth") + @ManagerAuth + public R delete(@RequestParam(value="ids[]") Long[] ids){ + for (Long id : ids){ + pickoutService.deleteById(id); + } + return R.ok(); + } + + @RequestMapping(value = "/pickout/export/auth") + @ManagerAuth + public R export(@RequestBody JSONObject param){ + EntityWrapper<Pickout> wrapper = new EntityWrapper<>(); + List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); + Map<String, Object> map = excludeTrash(param.getJSONObject("pickout")); + convert(map, wrapper); + List<Pickout> list = pickoutService.selectList(wrapper); + return R.ok(exportSupport(list, fields)); + } + + @RequestMapping(value = "/pickoutQuery/auth") + @ManagerAuth + public R query(String condition) { + EntityWrapper<Pickout> wrapper = new EntityWrapper<>(); + wrapper.like("id", condition); + Page<Pickout> page = pickoutService.selectPage(new Page<>(0, 10), wrapper); + List<Map<String, Object>> result = new ArrayList<>(); + for (Pickout pickout : page.getRecords()){ + Map<String, Object> map = new HashMap<>(); + map.put("id", pickout.getId()); + map.put("value", pickout.getId()); + result.add(map); + } + return R.ok(result); + } + + @RequestMapping(value = "/pickout/check/column/auth") + @ManagerAuth + public R query(@RequestBody JSONObject param) { + Wrapper<Pickout> wrapper = new EntityWrapper<Pickout>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); + if (null != pickoutService.selectOne(wrapper)){ + return R.parse(BaseRes.REPEAT).add(getComment(Pickout.class, String.valueOf(param.get("key")))); + } + return R.ok(); + } + +} diff --git a/src/main/java/zy/cloud/wms/manager/controller/PickoutDetlController.java b/src/main/java/zy/cloud/wms/manager/controller/PickoutDetlController.java new file mode 100644 index 0000000..0a70ffc --- /dev/null +++ b/src/main/java/zy/cloud/wms/manager/controller/PickoutDetlController.java @@ -0,0 +1,123 @@ +package zy.cloud.wms.manager.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.common.DateUtils; +import zy.cloud.wms.manager.entity.PickoutDetl; +import zy.cloud.wms.manager.service.PickoutDetlService; +import com.core.annotations.ManagerAuth; +import com.core.common.BaseRes; +import com.core.common.Cools; +import com.core.common.R; +import zy.cloud.wms.common.web.BaseController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.*; + +@RestController +public class PickoutDetlController extends BaseController { + + @Autowired + private PickoutDetlService pickoutDetlService; + + @RequestMapping(value = "/pickoutDetl/{id}/auth") + @ManagerAuth + public R get(@PathVariable("id") String id) { + return R.ok(pickoutDetlService.selectById(String.valueOf(id))); + } + + @RequestMapping(value = "/pickoutDetl/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<PickoutDetl> wrapper = new EntityWrapper<>(); + excludeTrash(param); + convert(param, wrapper); + if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} + return R.ok(pickoutDetlService.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 = "/pickoutDetl/add/auth") + @ManagerAuth + public R add(PickoutDetl pickoutDetl) { + pickoutDetlService.insert(pickoutDetl); + return R.ok(); + } + + @RequestMapping(value = "/pickoutDetl/update/auth") + @ManagerAuth + public R update(PickoutDetl pickoutDetl){ + if (Cools.isEmpty(pickoutDetl) || null==pickoutDetl.getId()){ + return R.error(); + } + pickoutDetlService.updateById(pickoutDetl); + return R.ok(); + } + + @RequestMapping(value = "/pickoutDetl/delete/auth") + @ManagerAuth + public R delete(@RequestParam(value="ids[]") Long[] ids){ + for (Long id : ids){ + pickoutDetlService.deleteById(id); + } + return R.ok(); + } + + @RequestMapping(value = "/pickoutDetl/export/auth") + @ManagerAuth + public R export(@RequestBody JSONObject param){ + EntityWrapper<PickoutDetl> wrapper = new EntityWrapper<>(); + List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); + Map<String, Object> map = excludeTrash(param.getJSONObject("pickoutDetl")); + convert(map, wrapper); + List<PickoutDetl> list = pickoutDetlService.selectList(wrapper); + return R.ok(exportSupport(list, fields)); + } + + @RequestMapping(value = "/pickoutDetlQuery/auth") + @ManagerAuth + public R query(String condition) { + EntityWrapper<PickoutDetl> wrapper = new EntityWrapper<>(); + wrapper.like("id", condition); + Page<PickoutDetl> page = pickoutDetlService.selectPage(new Page<>(0, 10), wrapper); + List<Map<String, Object>> result = new ArrayList<>(); + for (PickoutDetl pickoutDetl : page.getRecords()){ + Map<String, Object> map = new HashMap<>(); + map.put("id", pickoutDetl.getId()); + map.put("value", pickoutDetl.getId()); + result.add(map); + } + return R.ok(result); + } + + @RequestMapping(value = "/pickoutDetl/check/column/auth") + @ManagerAuth + public R query(@RequestBody JSONObject param) { + Wrapper<PickoutDetl> wrapper = new EntityWrapper<PickoutDetl>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); + if (null != pickoutDetlService.selectOne(wrapper)){ + return R.parse(BaseRes.REPEAT).add(getComment(PickoutDetl.class, String.valueOf(param.get("key")))); + } + return R.ok(); + } + +} diff --git a/src/main/java/zy/cloud/wms/manager/controller/WaveController.java b/src/main/java/zy/cloud/wms/manager/controller/WaveController.java index f3eba6a..2f34179 100644 --- a/src/main/java/zy/cloud/wms/manager/controller/WaveController.java +++ b/src/main/java/zy/cloud/wms/manager/controller/WaveController.java @@ -7,6 +7,9 @@ import com.baomidou.mybatisplus.plugins.Page; import com.core.common.DateUtils; import zy.cloud.wms.manager.entity.Wave; +import zy.cloud.wms.manager.entity.WaveDetl; +import zy.cloud.wms.manager.service.OrderService; +import zy.cloud.wms.manager.service.WaveDetlService; import zy.cloud.wms.manager.service.WaveService; import com.core.annotations.ManagerAuth; import com.core.common.BaseRes; @@ -23,6 +26,10 @@ @Autowired private WaveService waveService; + @Autowired + private WaveDetlService waveDetlService; + @Autowired + private OrderService orderService; @RequestMapping(value = "/wave/{id}/auth") @ManagerAuth @@ -77,9 +84,37 @@ @RequestMapping(value = "/wave/delete/auth") @ManagerAuth public R delete(@RequestParam(value="ids[]") Long[] ids){ - for (Long id : ids){ - waveService.deleteById(id); + HashSet<String> orders = new HashSet<>(); + for (Long id : ids){ + List<WaveDetl> waveDetls = waveDetlService.selectList(new EntityWrapper<WaveDetl>() + .eq("wave_id", id)); + for (WaveDetl waveDetl : waveDetls) { + + String orderNos = waveDetl.getOrderNos(); + String[] split = orderNos.split(","); + for (String s : split) { + orders.add(s); + } + } + + /** + * 鍒犻櫎娉㈡琛ㄨ韩 + */ + waveDetlService.delete(new EntityWrapper<WaveDetl>() + .eq("wave_id",id)); + /** + * 鍒犻櫎娉㈡琛ㄥご + */ + waveService.deleteById(id); + /** + * 鏇存敼鍑哄簱鍗曠姸鎬� + */ + for (String order : orders) { + orderService.updateStatus(order); + } + } + return R.ok(); } @@ -120,4 +155,11 @@ return R.ok(); } + @RequestMapping("/wave/createOut") + @ManagerAuth + public R createWaveOut(@RequestBody Wave wave){ + waveService.createOut(wave,getUserId(),getHostId()); + return R.ok(); + } + } diff --git a/src/main/java/zy/cloud/wms/manager/entity/Pickout.java b/src/main/java/zy/cloud/wms/manager/entity/Pickout.java new file mode 100644 index 0000000..a5ec084 --- /dev/null +++ b/src/main/java/zy/cloud/wms/manager/entity/Pickout.java @@ -0,0 +1,214 @@ +package zy.cloud.wms.manager.entity; + +import com.baomidou.mybatisplus.annotations.TableId; +import com.baomidou.mybatisplus.enums.IdType; +import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import com.baomidou.mybatisplus.annotations.TableField; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import java.text.SimpleDateFormat; +import java.util.Date; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; +import io.swagger.annotations.ApiModelProperty; +import java.text.SimpleDateFormat; +import java.util.Date; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; + +import com.baomidou.mybatisplus.annotations.TableName; +import java.io.Serializable; + +@TableName("man_pickout") +@Data +public class Pickout implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 鍞竴ID + */ + @ApiModelProperty(value= "鍞竴ID") + @TableId(value = "id",type = IdType.AUTO) + private Long id; + + /** + * 鍟嗘埛ID + */ + @ApiModelProperty(value= "鍟嗘埛ID") + @TableField("host_id") + private Long hostId; + + /** + * 鐢ㄦ埛ID + */ + @ApiModelProperty(value= "鐢ㄦ埛ID") + @TableField("user_id") + private Long userId; + + /** + * 宸ヤ綔鍙� + */ + @ApiModelProperty(value= "宸ヤ綔鍙�") + @TableField("wrk_no") + private String wrkNo; + + /** + * 宸ヤ綔鐘舵�� + */ + @ApiModelProperty(value= "宸ヤ綔鐘舵��") + @TableField("wrk_sts") + private Long wrkSts; + + /** + * 鏉″舰鐮� + */ + @ApiModelProperty(value= "鏉″舰鐮�") + private String zpallet; + + @ApiModelProperty(value= "") + @TableField("create_time") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date createTime; + + @ApiModelProperty(value= "") + @TableField("create_by") + private Integer createBy; + + @ApiModelProperty(value= "") + @TableField("update_time") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + @ApiModelProperty(value= "") + @TableField("update_by") + private Integer updateBy; + + @ApiModelProperty(value= "") + private String memo; + + public Pickout() {} + + +// Pickout pickout = new Pickout( +// null, // 鍟嗘埛ID +// null, // 鐢ㄦ埛ID +// null, // 宸ヤ綔鍙� +// null, // 宸ヤ綔鐘舵�� +// null, // 鏉″舰鐮� +// null, // +// null, // +// null, // +// null, // +// null // +// ); + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getHostId() { + return hostId; + } + + public void setHostId(Long hostId) { + this.hostId = hostId; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getWrkNo() { + return wrkNo; + } + + public void setWrkNo(String wrkNo) { + this.wrkNo = wrkNo; + } + + public Long getWrkSts() { + return wrkSts; + } + + public void setWrkSts(Long wrkSts) { + this.wrkSts = wrkSts; + } + + public String getZpallet() { + return zpallet; + } + + public void setZpallet(String zpallet) { + this.zpallet = zpallet; + } + + public Date getCreateTime() { + return createTime; + } + + public String getCreateTime$(){ + if (Cools.isEmpty(this.createTime)){ + return ""; + } + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getCreateBy() { + return createBy; + } + + public void setCreateBy(Integer createBy) { + this.createBy = createBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public String getUpdateTime$(){ + if (Cools.isEmpty(this.updateTime)){ + return ""; + } + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public Integer getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(Integer updateBy) { + this.updateBy = updateBy; + } + + public String getMemo() { + return memo; + } + + public void setMemo(String memo) { + this.memo = memo; + } + + +} diff --git a/src/main/java/zy/cloud/wms/manager/entity/PickoutDetl.java b/src/main/java/zy/cloud/wms/manager/entity/PickoutDetl.java new file mode 100644 index 0000000..8939674 --- /dev/null +++ b/src/main/java/zy/cloud/wms/manager/entity/PickoutDetl.java @@ -0,0 +1,498 @@ +package zy.cloud.wms.manager.entity; + +import com.baomidou.mybatisplus.annotations.TableId; +import com.baomidou.mybatisplus.enums.IdType; +import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import com.baomidou.mybatisplus.annotations.TableField; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import java.text.SimpleDateFormat; +import java.util.Date; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import io.swagger.annotations.ApiModelProperty; +import java.text.SimpleDateFormat; +import java.util.Date; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; +import java.text.SimpleDateFormat; +import java.util.Date; +import io.swagger.annotations.ApiModelProperty; +import java.text.SimpleDateFormat; +import java.util.Date; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiModelProperty; + +import com.baomidou.mybatisplus.annotations.TableName; +import java.io.Serializable; + +@Data +@TableName("man_pickout_detl") +public class PickoutDetl implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 鍞竴ID + */ + @ApiModelProperty(value= "鍞竴ID") + @TableId(value = "id",type = IdType.AUTO) + private Long id; + + /** + * 琛ㄥごID + */ + @ApiModelProperty(value= "琛ㄥごID") + @TableField("head_id") + private Long headId; + + /** + * 搴撲綅ID + */ + @ApiModelProperty(value= "搴撲綅ID") + @TableField("node_id") + private Long nodeId; + + /** + * 搴撲綅鍚嶇О + */ + @ApiModelProperty(value= "搴撲綅鍚嶇О") + @TableField("node_name") + private String nodeName; + + /** + * 鏁伴噺 + */ + @ApiModelProperty(value= "鏁伴噺") + private Double anfme; + + /** + * 鍟嗗搧缂栫爜 + */ + @ApiModelProperty(value= "鍟嗗搧缂栫爜") + private String matnr; + + /** + * 鍟嗗搧鍚嶇О + */ + @ApiModelProperty(value= "鍟嗗搧鍚嶇О") + private String maktx; + + /** + * 鍚嶇О + */ + @ApiModelProperty(value= "鍚嶇О") + private String name; + + /** + * 瑙勬牸 + */ + @ApiModelProperty(value= "瑙勬牸") + private String specs; + + /** + * 鍨嬪彿 + */ + @ApiModelProperty(value= "鍨嬪彿") + private String model; + + /** + * 鎵瑰彿 + */ + @ApiModelProperty(value= "鎵瑰彿") + private String batch; + + /** + * 鍗曚綅 + */ + @ApiModelProperty(value= "鍗曚綅") + private String unit; + + /** + * 鎵樼洏鐮� + */ + @ApiModelProperty(value= "鎵樼洏鐮�") + private String barcode; + + /** + * 鍗曟嵁绫诲瀷 + */ + @ApiModelProperty(value= "鍗曟嵁绫诲瀷") + @TableField("doc_type") + private Long docType; + + /** + * 鍗曟嵁缂栧彿 + */ + @ApiModelProperty(value= "鍗曟嵁缂栧彿") + @TableField("doc_id") + private String docId; + + /** + * 浠锋牸 + */ + @ApiModelProperty(value= "浠锋牸") + private Double price; + + /** + * 閲嶉噺 + */ + @ApiModelProperty(value= "閲嶉噺") + private Double weight; + + /** + * 鐘舵�� + */ + @ApiModelProperty(value= "鐘舵��") + private Integer status; + + /** + * 鎷h揣鍛業D + */ + @ApiModelProperty(value= "鎷h揣鍛業D") + @TableField("pick_staff") + private Long pickStaff; + + /** + * 鎷h揣寮�濮嬫椂闂� + */ + @ApiModelProperty(value= "鎷h揣寮�濮嬫椂闂�") + @TableField("pick_start") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date pickStart; + + /** + * 鎷h揣缁撴潫鏃堕棿 + */ + @ApiModelProperty(value= "鎷h揣缁撴潫鏃堕棿") + @TableField("pick_end") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date pickEnd; + + /** + * 鍒涘缓鏃堕棿 + */ + @ApiModelProperty(value= "鍒涘缓鏃堕棿") + @TableField("create_time") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date createTime; + + /** + * 鍒涘缓浜哄憳ID + */ + @ApiModelProperty(value= "鍒涘缓浜哄憳ID") + @TableField("create_by") + private Integer createBy; + + /** + * 淇敼鏃堕棿 + */ + @ApiModelProperty(value= "淇敼鏃堕棿") + @TableField("update_time") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + /** + * 淇敼浜哄憳ID + */ + @ApiModelProperty(value= "淇敼浜哄憳ID") + @TableField("update_by") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date updateBy; + + /** + * 澶囨敞 + */ + @ApiModelProperty(value= "澶囨敞") + private String memo; + + public PickoutDetl() {} + + + +// PickoutDetl pickoutDetl = new PickoutDetl( +// null, // 琛ㄥごID +// null, // 搴撲綅ID +// null, // 搴撲綅鍚嶇О +// null, // 鏁伴噺 +// null, // 鍟嗗搧缂栫爜 +// null, // 鍟嗗搧鍚嶇О +// null, // 鍚嶇О +// null, // 瑙勬牸 +// null, // 鍨嬪彿 +// null, // 鎵瑰彿 +// null, // 鍗曚綅 +// null, // 鎵樼洏鐮� +// null, // 鍗曟嵁绫诲瀷 +// null, // 鍗曟嵁缂栧彿 +// null, // 浠锋牸 +// null, // 閲嶉噺 +// null, // 鐘舵�� +// null, // 鎷h揣鍛業D +// null, // 鎷h揣寮�濮嬫椂闂� +// null, // 鎷h揣缁撴潫鏃堕棿 +// null, // 鍒涘缓鏃堕棿 +// null, // 鍒涘缓浜哄憳ID +// null, // 淇敼鏃堕棿 +// null, // 淇敼浜哄憳ID +// null // 澶囨敞 +// ); + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getHeadId() { + return headId; + } + + public void setHeadId(Long headId) { + this.headId = headId; + } + + + + public String getNodeName() { + return nodeName; + } + + public void setNodeName(String nodeName) { + this.nodeName = nodeName; + } + + public Double getAnfme() { + return anfme; + } + + public void setAnfme(Double anfme) { + this.anfme = anfme; + } + + public String getMatnr() { + return matnr; + } + + public void setMatnr(String matnr) { + this.matnr = matnr; + } + + public String getMaktx() { + return maktx; + } + + public void setMaktx(String maktx) { + this.maktx = maktx; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getSpecs() { + return specs; + } + + public void setSpecs(String specs) { + this.specs = specs; + } + + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + + public String getBatch() { + return batch; + } + + public void setBatch(String batch) { + this.batch = batch; + } + + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; + } + + public String getBarcode() { + return barcode; + } + + public void setBarcode(String barcode) { + this.barcode = barcode; + } + + public Long getDocType() { + return docType; + } + + public void setDocType(Long docType) { + this.docType = docType; + } + + public String getDocId() { + return docId; + } + + public void setDocId(String docId) { + this.docId = docId; + } + + public Double getPrice() { + return price; + } + + public void setPrice(Double price) { + this.price = price; + } + + public Double getWeight() { + return weight; + } + + public void setWeight(Double weight) { + this.weight = weight; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Long getPickStaff() { + return pickStaff; + } + + public void setPickStaff(Long pickStaff) { + this.pickStaff = pickStaff; + } + + public Date getPickStart() { + return pickStart; + } + + public String getPickStart$(){ + if (Cools.isEmpty(this.pickStart)){ + return ""; + } + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.pickStart); + } + + public void setPickStart(Date pickStart) { + this.pickStart = pickStart; + } + + public Date getPickEnd() { + return pickEnd; + } + + public String getPickEnd$(){ + if (Cools.isEmpty(this.pickEnd)){ + return ""; + } + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.pickEnd); + } + + public void setPickEnd(Date pickEnd) { + this.pickEnd = pickEnd; + } + + public Date getCreateTime() { + return createTime; + } + + public String getCreateTime$(){ + if (Cools.isEmpty(this.createTime)){ + return ""; + } + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getCreateBy() { + return createBy; + } + + public void setCreateBy(Integer createBy) { + this.createBy = createBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public String getUpdateTime$(){ + if (Cools.isEmpty(this.updateTime)){ + return ""; + } + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public Date getUpdateBy() { + return updateBy; + } + + public String getUpdateBy$(){ + if (Cools.isEmpty(this.updateBy)){ + return ""; + } + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateBy); + } + + public void setUpdateBy(Date updateBy) { + this.updateBy = updateBy; + } + + public String getMemo() { + return memo; + } + + public void setMemo(String memo) { + this.memo = memo; + } + + +} diff --git a/src/main/java/zy/cloud/wms/manager/mapper/OrderMapper.java b/src/main/java/zy/cloud/wms/manager/mapper/OrderMapper.java index ff47191..095c175 100644 --- a/src/main/java/zy/cloud/wms/manager/mapper/OrderMapper.java +++ b/src/main/java/zy/cloud/wms/manager/mapper/OrderMapper.java @@ -19,4 +19,7 @@ Integer getPageCount(Map<String, Object> map); + void updateStatus(@Param("orderNo") String order); + + void changeSettleTo12(@Param("orderNo") String orderIds); } diff --git a/src/main/java/zy/cloud/wms/manager/mapper/PickoutDetlMapper.java b/src/main/java/zy/cloud/wms/manager/mapper/PickoutDetlMapper.java new file mode 100644 index 0000000..5f44056 --- /dev/null +++ b/src/main/java/zy/cloud/wms/manager/mapper/PickoutDetlMapper.java @@ -0,0 +1,12 @@ +package zy.cloud.wms.manager.mapper; + +import zy.cloud.wms.manager.entity.PickoutDetl; +import com.baomidou.mybatisplus.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +@Mapper +@Repository +public interface PickoutDetlMapper extends BaseMapper<PickoutDetl> { + +} diff --git a/src/main/java/zy/cloud/wms/manager/mapper/PickoutMapper.java b/src/main/java/zy/cloud/wms/manager/mapper/PickoutMapper.java new file mode 100644 index 0000000..071d83a --- /dev/null +++ b/src/main/java/zy/cloud/wms/manager/mapper/PickoutMapper.java @@ -0,0 +1,12 @@ +package zy.cloud.wms.manager.mapper; + +import zy.cloud.wms.manager.entity.Pickout; +import com.baomidou.mybatisplus.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +@Mapper +@Repository +public interface PickoutMapper extends BaseMapper<Pickout> { + +} diff --git a/src/main/java/zy/cloud/wms/manager/service/OrderService.java b/src/main/java/zy/cloud/wms/manager/service/OrderService.java index 1065b93..92af9fd 100644 --- a/src/main/java/zy/cloud/wms/manager/service/OrderService.java +++ b/src/main/java/zy/cloud/wms/manager/service/OrderService.java @@ -20,4 +20,7 @@ Page<Order> getPage(Page<Order> page); + void updateStatus(String order); + + void changeSettleTo12(String orderIds); } diff --git a/src/main/java/zy/cloud/wms/manager/service/PickoutDetlService.java b/src/main/java/zy/cloud/wms/manager/service/PickoutDetlService.java new file mode 100644 index 0000000..88044fc --- /dev/null +++ b/src/main/java/zy/cloud/wms/manager/service/PickoutDetlService.java @@ -0,0 +1,8 @@ +package zy.cloud.wms.manager.service; + +import zy.cloud.wms.manager.entity.PickoutDetl; +import com.baomidou.mybatisplus.service.IService; + +public interface PickoutDetlService extends IService<PickoutDetl> { + +} diff --git a/src/main/java/zy/cloud/wms/manager/service/PickoutService.java b/src/main/java/zy/cloud/wms/manager/service/PickoutService.java new file mode 100644 index 0000000..8191757 --- /dev/null +++ b/src/main/java/zy/cloud/wms/manager/service/PickoutService.java @@ -0,0 +1,8 @@ +package zy.cloud.wms.manager.service; + +import zy.cloud.wms.manager.entity.Pickout; +import com.baomidou.mybatisplus.service.IService; + +public interface PickoutService extends IService<Pickout> { + +} diff --git a/src/main/java/zy/cloud/wms/manager/service/WaveService.java b/src/main/java/zy/cloud/wms/manager/service/WaveService.java index 952f012..9030a70 100644 --- a/src/main/java/zy/cloud/wms/manager/service/WaveService.java +++ b/src/main/java/zy/cloud/wms/manager/service/WaveService.java @@ -5,4 +5,5 @@ public interface WaveService extends IService<Wave> { + void createOut(Wave wave, Long userId, Long hostId); } diff --git a/src/main/java/zy/cloud/wms/manager/service/impl/OrderServiceImpl.java b/src/main/java/zy/cloud/wms/manager/service/impl/OrderServiceImpl.java index 7aeff71..39ffe94 100644 --- a/src/main/java/zy/cloud/wms/manager/service/impl/OrderServiceImpl.java +++ b/src/main/java/zy/cloud/wms/manager/service/impl/OrderServiceImpl.java @@ -52,4 +52,15 @@ return page; } + @Override + public void updateStatus(String order) { + this.baseMapper.updateStatus(order); + } + + @Override + public void changeSettleTo12(String orderIds) { + this.baseMapper.changeSettleTo12(orderIds); + } + + } diff --git a/src/main/java/zy/cloud/wms/manager/service/impl/PickoutDetlServiceImpl.java b/src/main/java/zy/cloud/wms/manager/service/impl/PickoutDetlServiceImpl.java new file mode 100644 index 0000000..87da027 --- /dev/null +++ b/src/main/java/zy/cloud/wms/manager/service/impl/PickoutDetlServiceImpl.java @@ -0,0 +1,12 @@ +package zy.cloud.wms.manager.service.impl; + +import zy.cloud.wms.manager.mapper.PickoutDetlMapper; +import zy.cloud.wms.manager.entity.PickoutDetl; +import zy.cloud.wms.manager.service.PickoutDetlService; +import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +@Service("pickoutDetlService") +public class PickoutDetlServiceImpl extends ServiceImpl<PickoutDetlMapper, PickoutDetl> implements PickoutDetlService { + +} diff --git a/src/main/java/zy/cloud/wms/manager/service/impl/PickoutServiceImpl.java b/src/main/java/zy/cloud/wms/manager/service/impl/PickoutServiceImpl.java new file mode 100644 index 0000000..2394c74 --- /dev/null +++ b/src/main/java/zy/cloud/wms/manager/service/impl/PickoutServiceImpl.java @@ -0,0 +1,12 @@ +package zy.cloud.wms.manager.service.impl; + +import zy.cloud.wms.manager.mapper.PickoutMapper; +import zy.cloud.wms.manager.entity.Pickout; +import zy.cloud.wms.manager.service.PickoutService; +import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +@Service("pickoutService") +public class PickoutServiceImpl extends ServiceImpl<PickoutMapper, Pickout> implements PickoutService { + +} diff --git a/src/main/java/zy/cloud/wms/manager/service/impl/WaveServiceImpl.java b/src/main/java/zy/cloud/wms/manager/service/impl/WaveServiceImpl.java index 724cbb7..841a1cb 100644 --- a/src/main/java/zy/cloud/wms/manager/service/impl/WaveServiceImpl.java +++ b/src/main/java/zy/cloud/wms/manager/service/impl/WaveServiceImpl.java @@ -1,12 +1,67 @@ package zy.cloud.wms.manager.service.impl; +import com.baomidou.mybatisplus.mapper.EntityWrapper; +import com.core.common.Cools; +import com.core.exception.CoolException; +import org.springframework.beans.factory.annotation.Autowired; +import zy.cloud.wms.manager.entity.WaveDetl; import zy.cloud.wms.manager.mapper.WaveMapper; import zy.cloud.wms.manager.entity.Wave; +import zy.cloud.wms.manager.service.OrderService; +import zy.cloud.wms.manager.service.WaveDetlService; import zy.cloud.wms.manager.service.WaveService; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; + @Service("waveService") public class WaveServiceImpl extends ServiceImpl<WaveMapper, Wave> implements WaveService { + @Autowired + private WaveDetlService waveDetlService; + @Autowired + private OrderService orderService; + @Autowired + private WaveService waveService; + /** + * 閫氳繃娉㈡鐢熸垚鎷h揣鍗� + * @param wave + * @param userId + * @param hostId + */ + @Override + public void createOut(Wave wave, Long userId, Long hostId) { + HashSet<String> orderIds = new HashSet<>(); + /** + * 鎺х + */ + List<WaveDetl> waveDetls = waveDetlService.selectList(new EntityWrapper<WaveDetl>() + .eq("wave_id", wave.getId())); + if (Cools.isEmpty(waveDetls)) { + throw new CoolException("鎵句笉鍒拌娉㈡鍗曠殑璇︽儏,璇疯仈绯荤鐞嗗憳"); + } + + /** + * 鏇存敼鍑哄簱鍗曠姸鎬�,浠�"鐢熸垚娉㈡"鍒�"娉㈡鎷h揣涓�" + */ + for (WaveDetl waveDetl : waveDetls) { + String orderNos = waveDetl.getOrderNos(); + String[] split = orderNos.split(","); + for (String s : split) { + orderIds.add(s); + } + } + for (String s : new ArrayList<String>(orderIds)) { + orderService.changeSettleTo12(s); + } + /** + * 鏇存敼娉㈡鍗曠姸鎬�,浠�"寰呭鐞�"鍒�"澶勭悊涓�" + */ + wave.setStatus((short) 1); + waveService.update(wave,new EntityWrapper<Wave>() + .eq("id",wave.getId())); + } } diff --git a/src/main/resources/mapper/OrderMapper.xml b/src/main/resources/mapper/OrderMapper.xml index 4e365e3..e714517 100644 --- a/src/main/resources/mapper/OrderMapper.xml +++ b/src/main/resources/mapper/OrderMapper.xml @@ -46,6 +46,12 @@ <update id="updateSettle"> update man_receive set settle = #{settle} where 1=1 and order_no = #{orderNo} and host_id = #{hostId} </update> + <update id="updateStatus"> + UPDATE man_order set settle = 2, wave_no = null WHERE order_no = #{orderNo} + </update> + <update id="changeSettleTo12"> + UPDATE man_order set settle = 12 Where 1 = 1 and order_no = #{orderNo} + </update> <select id="getPage" resultMap="BaseResultMap"> select * from diff --git a/src/main/resources/mapper/PickoutDetlMapper.xml b/src/main/resources/mapper/PickoutDetlMapper.xml new file mode 100644 index 0000000..e5a3f3a --- /dev/null +++ b/src/main/resources/mapper/PickoutDetlMapper.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="zy.cloud.wms.manager.mapper.PickoutDetlMapper"> + + <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> + <resultMap id="BaseResultMap" type="zy.cloud.wms.manager.entity.PickoutDetl"> + <id column="id" property="id" /> + <result column="head_id" property="headId" /> + <result column="node_id" property="nodeId" /> + <result column="node_name" property="nodeName" /> + <result column="anfme" property="anfme" /> + <result column="matnr" property="matnr" /> + <result column="maktx" property="maktx" /> + <result column="name" property="name" /> + <result column="specs" property="specs" /> + <result column="model" property="model" /> + <result column="batch" property="batch" /> + <result column="unit" property="unit" /> + <result column="barcode" property="barcode" /> + <result column="doc_type" property="docType" /> + <result column="doc_id" property="docId" /> + <result column="price" property="price" /> + <result column="weight" property="weight" /> + <result column="status" property="status" /> + <result column="pick_staff" property="pickStaff" /> + <result column="pick_start" property="pickStart" /> + <result column="pick_end" property="pickEnd" /> + <result column="create_time" property="createTime" /> + <result column="create_by" property="createBy" /> + <result column="update_time" property="updateTime" /> + <result column="update_by" property="updateBy" /> + <result column="memo" property="memo" /> + + </resultMap> + +</mapper> diff --git a/src/main/resources/mapper/PickoutMapper.xml b/src/main/resources/mapper/PickoutMapper.xml new file mode 100644 index 0000000..b0765dd --- /dev/null +++ b/src/main/resources/mapper/PickoutMapper.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="zy.cloud.wms.manager.mapper.PickoutMapper"> + + <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> + <resultMap id="BaseResultMap" type="zy.cloud.wms.manager.entity.Pickout"> + <id column="id" property="id" /> + <result column="host_id" property="hostId" /> + <result column="user_id" property="userId" /> + <result column="wrk_no" property="wrkNo" /> + <result column="wrk_sts" property="wrkSts" /> + <result column="zpallet" property="zpallet" /> + <result column="create_time" property="createTime" /> + <result column="create_by" property="createBy" /> + <result column="update_time" property="updateTime" /> + <result column="update_by" property="updateBy" /> + <result column="memo" property="memo" /> + + </resultMap> + +</mapper> diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js index 67732d5..e473fef 100644 --- a/src/main/webapp/static/js/order/order.js +++ b/src/main/webapp/static/js/order/order.js @@ -180,6 +180,7 @@ ,{field: 'defNumber', align: 'center',title: '鍒濆绁ㄦ嵁鍙�', hide: true} ,{field: 'number', align: 'center',title: '绁ㄦ嵁鍙�', hide: true} ,{field: 'cstmrName', align: 'center',title: '瀹㈡埛'} + ,{field: 'waveNo', align: 'center', title: '娉㈡缂栧彿'} ,{align: 'center', title: '鏄庣粏', toolbar: '#tbLook', minWidth: 140, width: 140} ,{field: 'tel', align: 'center',title: '鑱旂郴鏂瑰紡', hide: true} ,{field: 'operMemb', align: 'center',title: '鎿嶄綔浜哄憳', hide: true} @@ -197,7 +198,7 @@ ,{field: 'sendTime$', align: 'center',title: '鍙戣揣鏃堕棿', hide: true} ,{field: 'shipName', align: 'center',title: '鐗╂祦鍚嶇О', hide: true} ,{field: 'shipCode', align: 'center',title: '鐗╂祦鍗曞彿', hide: true} - ,{field: 'settle$', align: 'center',title: '璁㈠崟鐘舵��', templet: '#settleTpl', width: 100} + ,{field: 'settle$', align: 'center',title: '璁㈠崟鐘舵��', templet: '#settleTpl', width: 105} ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width: 120} ]], request: { diff --git a/src/main/webapp/static/js/pickout/pickout.js b/src/main/webapp/static/js/pickout/pickout.js new file mode 100644 index 0000000..6503c88 --- /dev/null +++ b/src/main/webapp/static/js/pickout/pickout.js @@ -0,0 +1,257 @@ +var pageCurr; +layui.config({ + base: baseUrl + "/static/layui/lay/modules/" +}).use(['table','laydate', 'form', 'admin'], function(){ + var table = layui.table; + var $ = layui.jquery; + var layer = layui.layer; + var layDate = layui.laydate; + var form = layui.form; + var admin = layui.admin; + + // 鏁版嵁娓叉煋 + tableIns = table.render({ + elem: '#pickout', + headers: {token: localStorage.getItem('token')}, + url: baseUrl+'/pickout/list/auth', + page: true, + limit: 16, + limits: [16, 30, 50, 100, 200, 500], + toolbar: '#toolbar', + cellMinWidth: 50, + cols: [[ + {type: 'checkbox'} + ,{field: 'id', align: 'center',title: '鍞竴ID'} + ,{field: 'hostId', align: 'center',title: '鍟嗘埛ID'} + ,{field: 'userId', align: 'center',title: '鐢ㄦ埛ID'} + ,{field: 'wrkNo', align: 'center',title: '宸ヤ綔鍙�'} + ,{field: 'wrkSts', align: 'center',title: '宸ヤ綔鐘舵��'} + ,{field: 'zpallet', align: 'center',title: '鏉″舰鐮�'} + ,{field: 'createTime$', align: 'center',title: ''} + ,{field: 'createBy', align: 'center',title: ''} + ,{field: 'updateTime$', align: 'center',title: ''} + ,{field: 'updateBy', align: 'center',title: ''} + ,{field: 'memo', align: 'center',title: ''} + + ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150} + ]], + 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(); + } + }); + + // 鐩戝惉鎺掑簭浜嬩欢 + table.on('sort(pickout)', 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} + }); + }); + + // 鐩戝惉澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(pickout)', function (obj) { + var checkStatus = table.checkStatus(obj.config.id).data; + switch(obj.event) { + case 'addData': + showEditModel(); + break; + case 'deleteData': + if (checkStatus.length === 0) { + layer.msg('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁', {icon: 2}); + return; + } + var ids = checkStatus.map(function (d) { + return d.id; + }); + del(ids); + 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 = { + 'pickout': exportData, + 'fields': fields + }; + $.ajax({ + url: baseUrl+"/pickout/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, {icon: 2}) + } + } + }); + }); + break; + } + }); + + // 鐩戝惉琛屽伐鍏蜂簨浠� + table.on('tool(pickout)', function(obj){ + var data = obj.data; + switch (obj.event) { + case 'edit': + showEditModel(data); + break; + case "del": + var ids = [data.id]; + del(ids); + break; + } + }); + + /* 寮圭獥 - 鏂板銆佷慨鏀� */ + function showEditModel(mData) { + admin.open({ + type: 1, + area: '600px', + title: (mData ? '淇敼' : '娣诲姞') + '璁㈠崟鐘舵��', + content: $('#editDialog').html(), + success: function (layero, dIndex) { + layDateRender(); + form.val('detail', mData); + form.on('submit(editSubmit)', function (data) { + var loadIndex = layer.load(2); + $.ajax({ + url: baseUrl+"/pickout/"+(mData?'update':'add')+"/auth", + headers: {'token': localStorage.getItem('token')}, + data: data.field, + method: 'POST', + success: function (res) { + layer.close(loadIndex); + if (res.code === 200){ + layer.close(dIndex); + layer.msg(res.msg, {icon: 1}); + tableReload(); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + }else { + layer.msg(res.msg, {icon: 2}); + } + } + }) + return false; + }); + $(layero).children('.layui-layer-content').css('overflow', 'visible'); + layui.form.render('select'); + } + }); + } + + /* 鍒犻櫎 */ + function del(ids) { + layer.confirm('纭畾瑕佸垹闄ら�変腑鏁版嵁鍚楋紵', { + skin: 'layui-layer-admin', + shade: .1 + }, function (i) { + layer.close(i); + var loadIndex = layer.load(2); + $.ajax({ + url: baseUrl+"/pickout/delete/auth", + headers: {'token': localStorage.getItem('token')}, + data: {ids: ids}, + method: 'POST', + success: function (res) { + layer.close(loadIndex); + if (res.code === 200){ + layer.msg(res.msg, {icon: 1}); + tableReload(); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg, {icon: 2}); + } + } + }) + }); + } + + // 鎼滅储 + form.on('submit(search)', function (data) { + pageCurr = 1; + tableReload(false); + }); + + // 閲嶇疆 + form.on('submit(reset)', function (data) { + pageCurr = 1; + clearFormVal($('#search-box')); + tableReload(false); + }); + + // 鏃堕棿閫夋嫨鍣� + function layDateRender() { + layDate.render({ + elem: '#createTime\\$', + type: 'datetime' + }); + layDate.render({ + elem: '#updateTime\\$', + type: 'datetime' + }); + + } + layDateRender(); + +}); + +// 鍏抽棴鍔ㄤ綔 +$(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; + }); + tableIns.reload({ + where: searchData, + page: {curr: pageCurr} + }); +} diff --git a/src/main/webapp/static/js/pickoutDetl/pickoutDetl.js b/src/main/webapp/static/js/pickoutDetl/pickoutDetl.js new file mode 100644 index 0000000..00a5090 --- /dev/null +++ b/src/main/webapp/static/js/pickoutDetl/pickoutDetl.js @@ -0,0 +1,284 @@ +var pageCurr; +layui.config({ + base: baseUrl + "/static/layui/lay/modules/" +}).use(['table','laydate', 'form', 'admin'], function(){ + var table = layui.table; + var $ = layui.jquery; + var layer = layui.layer; + var layDate = layui.laydate; + var form = layui.form; + var admin = layui.admin; + + // 鏁版嵁娓叉煋 + tableIns = table.render({ + elem: '#pickoutDetl', + headers: {token: localStorage.getItem('token')}, + url: baseUrl+'/pickoutDetl/list/auth', + page: true, + limit: 16, + limits: [16, 30, 50, 100, 200, 500], + toolbar: '#toolbar', + cellMinWidth: 50, + cols: [[ + {type: 'checkbox'} + ,{field: 'id', align: 'center',title: '鍞竴ID'} + ,{field: 'headId', align: 'center',title: '琛ㄥごID'} + ,{field: 'nodeId', align: 'center',title: '搴撲綅ID'} + ,{field: 'nodeName', align: 'center',title: '搴撲綅鍚嶇О'} + ,{field: 'anfme', align: 'center',title: '鏁伴噺'} + ,{field: 'matnr', align: 'center',title: '鍟嗗搧缂栫爜'} + ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О'} + ,{field: 'name', align: 'center',title: '鍚嶇О'} + ,{field: 'specs', align: 'center',title: '瑙勬牸'} + ,{field: 'model', align: 'center',title: '鍨嬪彿'} + ,{field: 'batch', align: 'center',title: '鎵瑰彿'} + ,{field: 'unit', align: 'center',title: '鍗曚綅'} + ,{field: 'barcode', align: 'center',title: '鎵樼洏鐮�'} + ,{field: 'docType', align: 'center',title: '鍗曟嵁绫诲瀷'} + ,{field: 'docId', align: 'center',title: '鍗曟嵁缂栧彿'} + ,{field: 'price', align: 'center',title: '浠锋牸'} + ,{field: 'weight', align: 'center',title: '閲嶉噺'} + ,{field: 'status', align: 'center',title: '鐘舵��'} + ,{field: 'pickStaff', align: 'center',title: '鎷h揣鍛業D'} + ,{field: 'pickStart$', align: 'center',title: '鎷h揣寮�濮嬫椂闂�'} + ,{field: 'pickEnd$', align: 'center',title: '鎷h揣缁撴潫鏃堕棿'} + ,{field: 'createTime$', align: 'center',title: '鍒涘缓鏃堕棿'} + ,{field: 'createBy', align: 'center',title: '鍒涘缓浜哄憳ID'} + ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿'} + ,{field: 'updateBy$', align: 'center',title: '淇敼浜哄憳ID'} + ,{field: 'memo', align: 'center',title: '澶囨敞'} + + ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150} + ]], + 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(); + } + }); + + // 鐩戝惉鎺掑簭浜嬩欢 + table.on('sort(pickoutDetl)', 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} + }); + }); + + // 鐩戝惉澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(pickoutDetl)', function (obj) { + var checkStatus = table.checkStatus(obj.config.id).data; + switch(obj.event) { + case 'addData': + showEditModel(); + break; + case 'deleteData': + if (checkStatus.length === 0) { + layer.msg('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁', {icon: 2}); + return; + } + var ids = checkStatus.map(function (d) { + return d.id; + }); + del(ids); + 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 = { + 'pickoutDetl': exportData, + 'fields': fields + }; + $.ajax({ + url: baseUrl+"/pickoutDetl/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, {icon: 2}) + } + } + }); + }); + break; + } + }); + + // 鐩戝惉琛屽伐鍏蜂簨浠� + table.on('tool(pickoutDetl)', function(obj){ + var data = obj.data; + switch (obj.event) { + case 'edit': + showEditModel(data); + break; + case "del": + var ids = [data.id]; + del(ids); + break; + } + }); + + /* 寮圭獥 - 鏂板銆佷慨鏀� */ + function showEditModel(mData) { + admin.open({ + type: 1, + area: '600px', + title: (mData ? '淇敼' : '娣诲姞') + '璁㈠崟鐘舵��', + content: $('#editDialog').html(), + success: function (layero, dIndex) { + layDateRender(); + form.val('detail', mData); + form.on('submit(editSubmit)', function (data) { + var loadIndex = layer.load(2); + $.ajax({ + url: baseUrl+"/pickoutDetl/"+(mData?'update':'add')+"/auth", + headers: {'token': localStorage.getItem('token')}, + data: data.field, + method: 'POST', + success: function (res) { + layer.close(loadIndex); + if (res.code === 200){ + layer.close(dIndex); + layer.msg(res.msg, {icon: 1}); + tableReload(); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + }else { + layer.msg(res.msg, {icon: 2}); + } + } + }) + return false; + }); + $(layero).children('.layui-layer-content').css('overflow', 'visible'); + layui.form.render('select'); + } + }); + } + + /* 鍒犻櫎 */ + function del(ids) { + layer.confirm('纭畾瑕佸垹闄ら�変腑鏁版嵁鍚楋紵', { + skin: 'layui-layer-admin', + shade: .1 + }, function (i) { + layer.close(i); + var loadIndex = layer.load(2); + $.ajax({ + url: baseUrl+"/pickoutDetl/delete/auth", + headers: {'token': localStorage.getItem('token')}, + data: {ids: ids}, + method: 'POST', + success: function (res) { + layer.close(loadIndex); + if (res.code === 200){ + layer.msg(res.msg, {icon: 1}); + tableReload(); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg, {icon: 2}); + } + } + }) + }); + } + + // 鎼滅储 + form.on('submit(search)', function (data) { + pageCurr = 1; + tableReload(false); + }); + + // 閲嶇疆 + form.on('submit(reset)', function (data) { + pageCurr = 1; + clearFormVal($('#search-box')); + tableReload(false); + }); + + // 鏃堕棿閫夋嫨鍣� + function layDateRender() { + layDate.render({ + elem: '#pickStart\\$', + type: 'datetime' + }); + layDate.render({ + elem: '#pickEnd\\$', + type: 'datetime' + }); + layDate.render({ + elem: '#createTime\\$', + type: 'datetime' + }); + layDate.render({ + elem: '#updateTime\\$', + type: 'datetime' + }); + layDate.render({ + elem: '#updateBy\\$', + type: 'datetime' + }); + + } + layDateRender(); + +}); + +// 鍏抽棴鍔ㄤ綔 +$(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; + }); + tableIns.reload({ + where: searchData, + page: {curr: pageCurr} + }); +} diff --git a/src/main/webapp/static/js/wave/wave.js b/src/main/webapp/static/js/wave/wave.js index 0f4d265..776afdc 100644 --- a/src/main/webapp/static/js/wave/wave.js +++ b/src/main/webapp/static/js/wave/wave.js @@ -20,19 +20,16 @@ toolbar: '#toolbar', cellMinWidth: 50, cols: [[ - {type: 'checkbox'} - ,{field: 'id', align: 'center',title: 'ID'} - ,{field: 'hostId', align: 'center',title: ''} - ,{field: 'uuid', align: 'center',title: '缂栧彿'} - ,{field: 'waveNo', align: 'center',title: '娉㈡鍙�'} - ,{field: 'ordersQty', align: 'center',title: '璁㈠崟鏁伴噺'} + {field: 'waveNo', align: 'center',title: '娉㈡缂栧彿'} + ,{field: 'ordersQty', align: 'center',title: '鍚堝苟璁㈠崟鏁伴噺'} ,{field: 'status$', align: 'center',title: '瀹℃牳鐘舵��'} + ,{align: 'center', title: '鏄庣粏', toolbar: '#tbLook', minWidth: 140, width: 140} ,{field: 'memo', align: 'center',title: '澶囨敞'} - ,{field: 'createBy', align: 'center',title: '娣诲姞浜哄憳'} - ,{field: 'createTime$', align: 'center',title: '娣诲姞鏃堕棿'} - ,{field: 'updateBy', align: 'center',title: '淇敼浜哄憳'} - ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿'} + ,{field: 'createBy', align: 'center',title: '娣诲姞浜哄憳',hide:true} + ,{field: 'createTime$', align: 'center',title: '娣诲姞鏃堕棿',hide:true} + ,{field: 'updateBy', align: 'center',title: '淇敼浜哄憳',hide:true} + ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿',hide:true} ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150} ]], request: { @@ -131,17 +128,107 @@ } }); + function createWaveOut(mData) { + layer.confirm('纭畾鐢熸垚璇ユ尝娆$殑鎷h揣鍗曪紵', { + skin: 'layui-layer-admin', + shade: .1 + }, function (i) { + layer.close(i); + var loadIndex = layer.load(2); + $.ajax({ + url: baseUrl+"/wave/createOut", + headers: {'token': localStorage.getItem('token')}, + data: JSON.stringify(mData), + method: 'POST', + contentType: 'application/json;charset=UTF-8', + success: function (res) { + layer.close(loadIndex); + if (res.code === 200){ + layer.msg(res.msg, {icon: 1}); + tableReload(); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg, {icon: 2}); + } + } + }) + }); + + } // 鐩戝惉琛屽伐鍏蜂簨浠� table.on('tool(wave)', function(obj){ var data = obj.data; + + + switch (obj.event) { case 'edit': showEditModel(data); break; + case 'waveOut': + createWaveOut(data); + break; case "del": var ids = [data.id]; del(ids); break; + case "look": + var $a = $(obj.tr).find('a[lay-event="look"]'); + var offset = $a.offset(); + layer.open({ + type: 1, + title: false, + area: '700px', + offset: [offset.top + 'px', (offset.left - 530 + $a.outerWidth()) + 'px'], + shade: .01, + shadeClose: true, + fixed: false, + content: '<table id="lookSSXMTable" lay-filter="lookSSXMTable"></table>', + success: function (layero) { + table.render({ + elem: '#lookSSXMTable', + headers: {token: localStorage.getItem('token')}, + url: baseUrl+'/waveDetl/list/auth', + where: { + wave_id: data.id + }, + limit: 5, + page: true, + cellMinWidth: 100, + cols: [[ + {type: 'numbers'}, + {field: 'seqNo', align:'center',title: '琛屽彿'}, + {field: 'matnr', align:'center',title: '鍟嗗搧缂栧彿'}, + {field: 'matnr', align:'center',title: '鍟嗗搧缂栧彿'}, + {field: 'maktx', align:'center',title: '鍟嗗搧鍚嶇О', width: 200}, + {field: 'anfme', align:'center',title: '鏁伴噺', width: 70}, + {field: 'orderQty', align:'center',title: '鍚堝苟鏁伴噺', width: 70}, + {field: 'orderNos', align:'center',title: '鍚堝苟璁㈠崟', width: 70}, + ]], + 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 () { + $(layero).find('.layui-table-view').css('margin', '0'); + }, + size: '' + }); + } + }); + break; } }); diff --git a/src/main/webapp/views/order/order.html b/src/main/webapp/views/order/order.html index 3996f2d..1a10c8a 100644 --- a/src/main/webapp/views/order/order.html +++ b/src/main/webapp/views/order/order.html @@ -131,6 +131,10 @@ class="layui-badge layui-badge-gray" {{# } else if(d.settle === 4){ }} class="layui-badge layui-badge-green" + {{# } else if(d.settle === 11){ }} + class="layui-badge layui-badge-green" + {{# } else if(d.settle === 12){ }} + class="layui-badge layui-badge-blue" {{# } else { }} class="layui-badge layui-badge-gray" {{# } }} diff --git a/src/main/webapp/views/pickout/pickout.html b/src/main/webapp/views/pickout/pickout.html new file mode 100644 index 0000000..263db8c --- /dev/null +++ b/src/main/webapp/views/pickout/pickout.html @@ -0,0 +1,130 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title></title> + <meta name="renderer" content="webkit"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> + <link rel="stylesheet" href="../../static/css/cool.css" media="all"> + <link rel="stylesheet" href="../../static/css/common.css" media="all"> +</head> +<body> + +<!-- 鎼滅储鏍� --> +<div id="search-box" class="layui-form layui-card-header"> + <div class="layui-inline"> + <div class="layui-input-inline"> + <input class="layui-input" type="text" name="id" placeholder="缂栧彿" autocomplete="off"> + </div> + </div> + <!-- 寰呮坊鍔� --> + <div id="data-search-btn" class="layui-btn-container layui-form-item"> + <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">鎼滅储</button> + <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">閲嶇疆</button> + </div> +</div> + +<!-- 琛ㄦ牸 --> +<div class="layui-form"> + <table class="layui-hide" id="pickout" lay-filter="pickout"></table> +</div> +<script type="text/html" id="toolbar"> + <div class="layui-btn-container"> + <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">鏂板</button> + <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">鍒犻櫎</button> + <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">瀵煎嚭</button> + </div> +</script> + +<script type="text/html" id="operate"> + <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">淇敼</a> + <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">鍒犻櫎</a> +</script> + +<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> +<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/pickout/pickout.js" charset="utf-8"></script> +</body> +<!-- 琛ㄥ崟寮圭獥 --> +<script type="text/html" id="editDialog"> + <form id="detail" lay-filter="detail" class="layui-form admin-form"> + <input name="id" type="hidden"> + <div class="layui-row"> + <div class="layui-col-md12"> + <div class="layui-form-item"> + <label class="layui-form-label">鍟嗘埛ID: </label> + <div class="layui-input-block"> + <input class="layui-input" name="hostId" placeholder="璇疯緭鍏ュ晢鎴稩D"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鐢ㄦ埛ID: </label> + <div class="layui-input-block"> + <input class="layui-input" name="userId" placeholder="璇疯緭鍏ョ敤鎴稩D"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">宸ヤ綔鍙�: </label> + <div class="layui-input-block"> + <input class="layui-input" name="wrkNo" placeholder="璇疯緭鍏ュ伐浣滃彿"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">宸ヤ綔鐘舵��: </label> + <div class="layui-input-block"> + <input class="layui-input" name="wrkSts" placeholder="璇疯緭鍏ュ伐浣滅姸鎬�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鏉″舰鐮�: </label> + <div class="layui-input-block"> + <input class="layui-input" name="zpallet" placeholder="璇疯緭鍏ユ潯褰㈢爜"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">: </label> + <div class="layui-input-block"> + <input class="layui-input" name="createTime" id="createTime$" placeholder="璇疯緭鍏�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">: </label> + <div class="layui-input-block"> + <input class="layui-input" name="createBy" placeholder="璇疯緭鍏�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">: </label> + <div class="layui-input-block"> + <input class="layui-input" name="updateTime" id="updateTime$" placeholder="璇疯緭鍏�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">: </label> + <div class="layui-input-block"> + <input class="layui-input" name="updateBy" placeholder="璇疯緭鍏�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">: </label> + <div class="layui-input-block"> + <input class="layui-input" name="memo" placeholder="璇疯緭鍏�"> + </div> + </div> + + </div> + </div> + <hr class="layui-bg-gray"> + <div class="layui-form-item text-right"> + <button class="layui-btn" lay-filter="editSubmit" lay-submit="">淇濆瓨</button> + <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">鍙栨秷</button> + </div> + </form> +</script> +</html> + diff --git a/src/main/webapp/views/pickoutDetl/pickoutDetl.html b/src/main/webapp/views/pickoutDetl/pickoutDetl.html new file mode 100644 index 0000000..0a7f4c1 --- /dev/null +++ b/src/main/webapp/views/pickoutDetl/pickoutDetl.html @@ -0,0 +1,220 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title></title> + <meta name="renderer" content="webkit"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> + <link rel="stylesheet" href="../../static/css/cool.css" media="all"> + <link rel="stylesheet" href="../../static/css/common.css" media="all"> +</head> +<body> + +<!-- 鎼滅储鏍� --> +<div id="search-box" class="layui-form layui-card-header"> + <div class="layui-inline"> + <div class="layui-input-inline"> + <input class="layui-input" type="text" name="id" placeholder="缂栧彿" autocomplete="off"> + </div> + </div> + <!-- 寰呮坊鍔� --> + <div id="data-search-btn" class="layui-btn-container layui-form-item"> + <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">鎼滅储</button> + <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">閲嶇疆</button> + </div> +</div> + +<!-- 琛ㄦ牸 --> +<div class="layui-form"> + <table class="layui-hide" id="pickoutDetl" lay-filter="pickoutDetl"></table> +</div> +<script type="text/html" id="toolbar"> + <div class="layui-btn-container"> + <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">鏂板</button> + <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">鍒犻櫎</button> + <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">瀵煎嚭</button> + </div> +</script> + +<script type="text/html" id="operate"> + <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">淇敼</a> + <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">鍒犻櫎</a> +</script> + +<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> +<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/pickoutDetl/pickoutDetl.js" charset="utf-8"></script> +</body> +<!-- 琛ㄥ崟寮圭獥 --> +<script type="text/html" id="editDialog"> + <form id="detail" lay-filter="detail" class="layui-form admin-form"> + <input name="id" type="hidden"> + <div class="layui-row"> + <div class="layui-col-md12"> + <div class="layui-form-item"> + <label class="layui-form-label">琛ㄥごID: </label> + <div class="layui-input-block"> + <input class="layui-input" name="headId" placeholder="璇疯緭鍏ヨ〃澶碔D"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">搴撲綅ID: </label> + <div class="layui-input-block"> + <input class="layui-input" name="nodeId" placeholder="璇疯緭鍏ュ簱浣岻D"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">搴撲綅鍚嶇О: </label> + <div class="layui-input-block"> + <input class="layui-input" name="nodeName" placeholder="璇疯緭鍏ュ簱浣嶅悕绉�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鏁伴噺: </label> + <div class="layui-input-block"> + <input class="layui-input" name="anfme" placeholder="璇疯緭鍏ユ暟閲�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鍟嗗搧缂栫爜: </label> + <div class="layui-input-block"> + <input class="layui-input" name="matnr" placeholder="璇疯緭鍏ュ晢鍝佺紪鐮�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鍟嗗搧鍚嶇О: </label> + <div class="layui-input-block"> + <input class="layui-input" name="maktx" placeholder="璇疯緭鍏ュ晢鍝佸悕绉�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鍚嶇О: </label> + <div class="layui-input-block"> + <input class="layui-input" name="name" placeholder="璇疯緭鍏ュ悕绉�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">瑙勬牸: </label> + <div class="layui-input-block"> + <input class="layui-input" name="specs" placeholder="璇疯緭鍏ヨ鏍�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鍨嬪彿: </label> + <div class="layui-input-block"> + <input class="layui-input" name="model" placeholder="璇疯緭鍏ュ瀷鍙�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鎵瑰彿: </label> + <div class="layui-input-block"> + <input class="layui-input" name="batch" placeholder="璇疯緭鍏ユ壒鍙�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鍗曚綅: </label> + <div class="layui-input-block"> + <input class="layui-input" name="unit" placeholder="璇疯緭鍏ュ崟浣�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鎵樼洏鐮�: </label> + <div class="layui-input-block"> + <input class="layui-input" name="barcode" placeholder="璇疯緭鍏ユ墭鐩樼爜"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鍗曟嵁绫诲瀷: </label> + <div class="layui-input-block"> + <input class="layui-input" name="docType" placeholder="璇疯緭鍏ュ崟鎹被鍨�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鍗曟嵁缂栧彿: </label> + <div class="layui-input-block"> + <input class="layui-input" name="docId" placeholder="璇疯緭鍏ュ崟鎹紪鍙�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">浠锋牸: </label> + <div class="layui-input-block"> + <input class="layui-input" name="price" placeholder="璇疯緭鍏ヤ环鏍�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">閲嶉噺: </label> + <div class="layui-input-block"> + <input class="layui-input" name="weight" placeholder="璇疯緭鍏ラ噸閲�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鐘舵��: </label> + <div class="layui-input-block"> + <input class="layui-input" name="status" placeholder="璇疯緭鍏ョ姸鎬�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鎷h揣鍛業D: </label> + <div class="layui-input-block"> + <input class="layui-input" name="pickStaff" placeholder="璇疯緭鍏ユ嫞璐у憳ID"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鎷h揣寮�濮嬫椂闂�: </label> + <div class="layui-input-block"> + <input class="layui-input" name="pickStart" id="pickStart$" placeholder="璇疯緭鍏ユ嫞璐у紑濮嬫椂闂�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鎷h揣缁撴潫鏃堕棿: </label> + <div class="layui-input-block"> + <input class="layui-input" name="pickEnd" id="pickEnd$" placeholder="璇疯緭鍏ユ嫞璐х粨鏉熸椂闂�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鍒涘缓鏃堕棿: </label> + <div class="layui-input-block"> + <input class="layui-input" name="createTime" id="createTime$" placeholder="璇疯緭鍏ュ垱寤烘椂闂�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鍒涘缓浜哄憳ID: </label> + <div class="layui-input-block"> + <input class="layui-input" name="createBy" placeholder="璇疯緭鍏ュ垱寤轰汉鍛業D"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">淇敼鏃堕棿: </label> + <div class="layui-input-block"> + <input class="layui-input" name="updateTime" id="updateTime$" placeholder="璇疯緭鍏ヤ慨鏀规椂闂�"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">淇敼浜哄憳ID: </label> + <div class="layui-input-block"> + <input class="layui-input" name="updateBy" id="updateBy$" placeholder="璇疯緭鍏ヤ慨鏀逛汉鍛業D"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">澶囨敞: </label> + <div class="layui-input-block"> + <input class="layui-input" name="memo" placeholder="璇疯緭鍏ュ娉�"> + </div> + </div> + + </div> + </div> + <hr class="layui-bg-gray"> + <div class="layui-form-item text-right"> + <button class="layui-btn" lay-filter="editSubmit" lay-submit="">淇濆瓨</button> + <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">鍙栨秷</button> + </div> + </form> +</script> +</html> + diff --git a/src/main/webapp/views/wave/wave.html b/src/main/webapp/views/wave/wave.html index 4e8877f..c59091c 100644 --- a/src/main/webapp/views/wave/wave.html +++ b/src/main/webapp/views/wave/wave.html @@ -33,15 +33,22 @@ </div> <script type="text/html" id="toolbar"> <div class="layui-btn-container"> - <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">鏂板</button> - <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">鍒犻櫎</button> +<!-- <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData" >鏂板</button>--> +<!-- <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">鍒犻櫎</button>--> <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">瀵煎嚭</button> </div> </script> - +<!-- 琛ㄦ牸鎿嶄綔鍒� --> +<script type="text/html" id="tbLook"> + <span class="layui-text"> + <a href="javascript:;" lay-event="look"> + <i class="layui-icon" style="font-size: 12px;"></i> 鏌ョ湅鏄庣粏 + </a> + </span> +</script> <script type="text/html" id="operate"> - <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">淇敼</a> - <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">鍒犻櫎</a> + <a class="layui-btn layui-btn-normal layui-btn-xs btn-edit" lay-event="waveOut">鐢熸垚鎷h揣鍗�</a> + <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">鎾ら攢</a> </script> <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> -- Gitblit v1.9.1