Commit c225c241fa9c694ccb4e1b6e5b4d8d23ff1d746a
1 parent
e19a7edd
feat:关闭手动创建移库任务
Showing
13 changed files
with
222 additions
and
177 deletions
src/main/java/com/huaheng/api/wcs/controller/WarecellAllocation.java
@@ -42,26 +42,26 @@ public class WarecellAllocation extends BaseController { | @@ -42,26 +42,26 @@ public class WarecellAllocation extends BaseController { | ||
42 | return handleMultiProcess(() -> warecellAllocationService.warecellAllocation(warecellDomain)); | 42 | return handleMultiProcess(() -> warecellAllocationService.warecellAllocation(warecellDomain)); |
43 | } | 43 | } |
44 | 44 | ||
45 | - @Log(title = "wcs去向分配", action = BusinessType.INSERT) | ||
46 | - @PostMapping("/destinationAllocation") | ||
47 | - @ApiOperation(value = "wcs去向分配", notes = "wcs去向分配", httpMethod = "POST") | ||
48 | - @ResponseBody | ||
49 | - @ApiLogger(apiName = "去向分配", from = "WCS") | ||
50 | - public AjaxResult destinationAllocation(String taskNo, String length, String width, String height, String weight) { | ||
51 | - WcsTask wcsTask = new WcsTask(); | ||
52 | - wcsTask.setTaskNo(taskNo); | ||
53 | - wcsTask.setLength(length); | ||
54 | - wcsTask.setWidth(width); | ||
55 | - wcsTask.setHeight(height); | ||
56 | - wcsTask.setWeight(weight); | ||
57 | - AjaxResult ajaxResult = handleMultiProcess(new MultiProcessListener() { | ||
58 | - @Override | ||
59 | - public AjaxResult doProcess() { | ||
60 | - return warecellAllocationService.destinationAllocation(wcsTask); | ||
61 | - } | ||
62 | - }); | ||
63 | - return ajaxResult; | ||
64 | - } | 45 | + //@Log(title = "wcs去向分配", action = BusinessType.INSERT) |
46 | + //@PostMapping("/destinationAllocation") | ||
47 | + //@ApiOperation(value = "wcs去向分配", notes = "wcs去向分配", httpMethod = "POST") | ||
48 | + //@ResponseBody | ||
49 | + //@ApiLogger(apiName = "去向分配", from = "WCS") | ||
50 | + //public AjaxResult destinationAllocation(String taskNo, String length, String width, String height, String weight) { | ||
51 | + // WcsTask wcsTask = new WcsTask(); | ||
52 | + // wcsTask.setTaskNo(taskNo); | ||
53 | + // wcsTask.setLength(length); | ||
54 | + // wcsTask.setWidth(width); | ||
55 | + // wcsTask.setHeight(height); | ||
56 | + // wcsTask.setWeight(weight); | ||
57 | + // AjaxResult ajaxResult = handleMultiProcess(new MultiProcessListener() { | ||
58 | + // @Override | ||
59 | + // public AjaxResult doProcess() { | ||
60 | + // return warecellAllocationService.destinationAllocation(wcsTask); | ||
61 | + // } | ||
62 | + // }); | ||
63 | + // return ajaxResult; | ||
64 | + //} | ||
65 | 65 | ||
66 | 66 | ||
67 | } | 67 | } |
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationService.java
@@ -12,10 +12,10 @@ public interface WarecellAllocationService { | @@ -12,10 +12,10 @@ public interface WarecellAllocationService { | ||
12 | */ | 12 | */ |
13 | AjaxResult<?> warecellAllocation(WarecellDomain warecellDomain); | 13 | AjaxResult<?> warecellAllocation(WarecellDomain warecellDomain); |
14 | 14 | ||
15 | - String taskPositioning(); | 15 | + //String taskPositioning(); |
16 | 16 | ||
17 | //去向分配 | 17 | //去向分配 |
18 | - AjaxResult destinationAllocation(WcsTask wcsTask); | 18 | + //AjaxResult destinationAllocation(WcsTask wcsTask); |
19 | 19 | ||
20 | AjaxResult<?> verticalWarehouseAllocation(WarecellDomain warecellDomain); | 20 | AjaxResult<?> verticalWarehouseAllocation(WarecellDomain warecellDomain); |
21 | 21 |
src/main/java/com/huaheng/pc/config/location/service/LocationServiceImpl.java
@@ -13,6 +13,7 @@ import com.huaheng.common.utils.security.ShiroUtils; | @@ -13,6 +13,7 @@ import com.huaheng.common.utils.security.ShiroUtils; | ||
13 | import com.huaheng.framework.web.domain.AjaxResult; | 13 | import com.huaheng.framework.web.domain.AjaxResult; |
14 | import com.huaheng.framework.web.service.ConfigService; | 14 | import com.huaheng.framework.web.service.ConfigService; |
15 | import com.huaheng.framework.web.service.DictService; | 15 | import com.huaheng.framework.web.service.DictService; |
16 | +import com.huaheng.pc.config.container.domain.Container; | ||
16 | import com.huaheng.pc.config.location.domain.Location; | 17 | import com.huaheng.pc.config.location.domain.Location; |
17 | import com.huaheng.pc.config.location.domain.LocationInfo; | 18 | import com.huaheng.pc.config.location.domain.LocationInfo; |
18 | import com.huaheng.pc.config.location.domain.bo.LocationIdleBO; | 19 | import com.huaheng.pc.config.location.domain.bo.LocationIdleBO; |
@@ -461,7 +462,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | @@ -461,7 +462,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | ||
461 | /** | 462 | /** |
462 | * 根据库位编码查询库位信息 | 463 | * 根据库位编码查询库位信息 |
463 | * | 464 | * |
464 | - * @param code | 465 | + * @param |
465 | * @return | 466 | * @return |
466 | */ | 467 | */ |
467 | @Override | 468 | @Override |
@@ -753,4 +754,67 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | @@ -753,4 +754,67 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | ||
753 | iLocationIdleService.saveBatch(idleListBatch); | 754 | iLocationIdleService.saveBatch(idleListBatch); |
754 | return null; | 755 | return null; |
755 | } | 756 | } |
757 | + | ||
758 | + @Override | ||
759 | + public Location getRightEmptyLocation(Location location) { | ||
760 | + return locationService.getOne(new LambdaQueryWrapper<Location>() | ||
761 | + .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY) | ||
762 | + .eq(Location::getContainerCode, "") | ||
763 | + .eq(Location::getRoadway, "5") | ||
764 | + .eq(Location::getIRow, location.getIRow()) | ||
765 | + .eq(Location::getILayer, location.getILayer()) | ||
766 | + .eq(Location::getIColumn, location.getIColumn() + 1)); | ||
767 | + } | ||
768 | + | ||
769 | + @Override | ||
770 | + public Location getRightDisableLocation(Location location) { | ||
771 | + return locationService.getOne(new LambdaQueryWrapper<Location>() | ||
772 | + .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_DISABLE) | ||
773 | + .eq(Location::getContainerCode, "") | ||
774 | + .eq(Location::getRoadway, "5") | ||
775 | + .eq(Location::getIRow, location.getIRow()) | ||
776 | + .eq(Location::getILayer, location.getILayer()) | ||
777 | + .eq(Location::getIColumn, location.getIColumn() + 1)); | ||
778 | + } | ||
779 | + | ||
780 | + //解除右侧库位禁用状态和对应4个库位标记 | ||
781 | + //Container container = containerService.getContainerByCode(task.getContainerCode()); | ||
782 | + //locationService.unbanRightLocationAndUnmark(container.getContainerType(), locationCode); | ||
783 | + @Override | ||
784 | + public void unbanRightLocationAndUnmark(String containerType, String locationCode) { | ||
785 | + //解禁用右侧库位 | ||
786 | + Location location = locationService.getLocationByCode(locationCode, "CS0001"); | ||
787 | + if (("X".equals(containerType) || "W".equals(containerType)) && "5".equals(location.getRoadway())) { | ||
788 | + Location rightLocation = locationService.getRightDisableLocation(location); | ||
789 | + if (rightLocation != null) { | ||
790 | + int updateCount = locationService.updateStatusNew(rightLocation.getCode(), "CS0001", QuantityConstant.STATUS_LOCATION_EMPTY, QuantityConstant.STATUS_LOCATION_DISABLE); | ||
791 | + if (updateCount != 1) { | ||
792 | + throw new ServiceException("重复分配库位时,解锁禁用失败!"); | ||
793 | + } | ||
794 | + } | ||
795 | + } | ||
796 | + | ||
797 | + //清除库位的上下左右库位标记 | ||
798 | + if (location.getTemporaryType().equals("0")) { | ||
799 | + throw new ServiceException("库位未被标记异常!"); | ||
800 | + } | ||
801 | + List<Location> list = locationService.list(new LambdaQueryWrapper<Location>().eq(Location::getTemporaryType, location.getTemporaryType())); | ||
802 | + if (!list.isEmpty()) { | ||
803 | + boolean flat = true; | ||
804 | + for (Location l : list) { | ||
805 | + if (StringUtils.isNotEmpty(l.getContainerCode()) || !l.getStatus().equals(QuantityConstant.STATUS_LOCATION_EMPTY)) { | ||
806 | + flat = false; | ||
807 | + break; | ||
808 | + } | ||
809 | + } | ||
810 | + if (flat) { | ||
811 | + locationService.update(new LambdaUpdateWrapper<Location>() | ||
812 | + .set(Location::getTemporaryType, "0").in(Location::getCode, list.stream() | ||
813 | + .map(Location::getCode).collect(Collectors.toList()))); | ||
814 | + } | ||
815 | + } | ||
816 | + | ||
817 | + } | ||
818 | + | ||
819 | + | ||
756 | } | 820 | } |
src/main/java/com/huaheng/pc/config/locationType/controller/LocationTypeController.java
@@ -27,83 +27,78 @@ import java.util.List; | @@ -27,83 +27,78 @@ import java.util.List; | ||
27 | 27 | ||
28 | /** | 28 | /** |
29 | * 库位类型 信息操作处理 | 29 | * 库位类型 信息操作处理 |
30 | - * | 30 | + * |
31 | * @author ricard | 31 | * @author ricard |
32 | * @date 2019-08-12 | 32 | * @date 2019-08-12 |
33 | */ | 33 | */ |
34 | @Controller | 34 | @Controller |
35 | @RequestMapping("/config/locationType") | 35 | @RequestMapping("/config/locationType") |
36 | -public class LocationTypeController extends BaseController | ||
37 | -{ | 36 | +public class LocationTypeController extends BaseController { |
38 | private String prefix = "config/locationType"; | 37 | private String prefix = "config/locationType"; |
39 | - | ||
40 | - @Autowired | ||
41 | - private LocationTypeService locationTypeService; | ||
42 | - @Autowired | ||
43 | - private ZoneService zoneService; | ||
44 | - | ||
45 | - @RequiresPermissions("config:locationType:view") | ||
46 | - @GetMapping() | ||
47 | - public String locationType() | ||
48 | - { | ||
49 | - return prefix + "/locationType"; | ||
50 | - } | ||
51 | - | ||
52 | - /** | ||
53 | - * 查询库位类型列表 //todo: 胡海--添加保存区域代码 | ||
54 | - */ | ||
55 | - @RequiresPermissions("config:locationType:list") | ||
56 | - @Log(title = "配置-库存资料-库位类型设置", operating = "查看库位类型", action = BusinessType.GRANT) | ||
57 | - @PostMapping("/list") | ||
58 | - @ResponseBody | ||
59 | - public TableDataInfo list(LocationType locationType,String createdBegin, String createdEnd) | ||
60 | - { | ||
61 | - LambdaQueryWrapper<LocationType> lambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
62 | - PageDomain pageDomain = TableSupport.buildPageRequest(); | ||
63 | - Integer pageNum = pageDomain.getPageNum(); | ||
64 | - Integer pageSize = pageDomain.getPageSize(); | ||
65 | 38 | ||
66 | - lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin),LocationType::getCreated, createdBegin) | ||
67 | - .le(StringUtils.isNotEmpty(createdEnd), LocationType::getCreated, createdEnd) | ||
68 | - .eq(LocationType::getWarehouseCode,ShiroUtils.getWarehouseCode()) | ||
69 | - .eq(StringUtils.isNotEmpty(locationType.getCode()), LocationType::getCode, locationType.getCode()) | ||
70 | - .like(StringUtils.isNotEmpty(locationType.getName()), LocationType::getName, locationType.getName()) | ||
71 | - .orderByAsc(LocationType::getId); | 39 | + @Autowired |
40 | + private LocationTypeService locationTypeService; | ||
41 | + @Autowired | ||
42 | + private ZoneService zoneService; | ||
72 | 43 | ||
73 | - if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | ||
74 | - /** | ||
75 | - * 使用分页查询 | ||
76 | - */ | ||
77 | - Page<LocationType> page = new Page<>(pageNum, pageSize); | ||
78 | - IPage<LocationType> iPage = locationTypeService.page(page, lambdaQueryWrapper); | ||
79 | - return getMpDataTable(iPage.getRecords(),iPage.getTotal()); | ||
80 | - } else { | ||
81 | - List<LocationType> list = locationTypeService.list(lambdaQueryWrapper); | ||
82 | - return getDataTable(list); | ||
83 | - } | ||
84 | - } | ||
85 | - | ||
86 | - /** | ||
87 | - * 新增库位类型 | ||
88 | - */ | ||
89 | - @GetMapping("/add") | ||
90 | - public String add() | ||
91 | - { | ||
92 | - return prefix + "/add"; | ||
93 | - } | ||
94 | - | ||
95 | - /** | ||
96 | - * 新增保存库位类型 | ||
97 | - */ | ||
98 | - @RequiresPermissions("config:locationType:add") | ||
99 | - @Log(title = "配置-库存资料-库位类型设置", operating = "新增库位类型", action = BusinessType.INSERT) | ||
100 | - @PostMapping("/add") | ||
101 | - @ResponseBody | ||
102 | - public AjaxResult addSave(LocationType locationType) | ||
103 | - { | ||
104 | - if(StringUtils.isEmpty(locationType.getCode())){ | ||
105 | - return AjaxResult.error("库位类型为空"); | ||
106 | - } | 44 | + @RequiresPermissions("config:locationType:view") |
45 | + @GetMapping() | ||
46 | + public String locationType() { | ||
47 | + return prefix + "/locationType"; | ||
48 | + } | ||
49 | + | ||
50 | + /** | ||
51 | + * 查询库位类型列表 | ||
52 | + */ | ||
53 | + @RequiresPermissions("config:locationType:list") | ||
54 | + @Log(title = "配置-库存资料-库位类型设置", operating = "查看库位类型", action = BusinessType.GRANT) | ||
55 | + @PostMapping("/list") | ||
56 | + @ResponseBody | ||
57 | + public TableDataInfo list(LocationType locationType, String createdBegin, String createdEnd) { | ||
58 | + LambdaQueryWrapper<LocationType> lambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
59 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | ||
60 | + Integer pageNum = pageDomain.getPageNum(); | ||
61 | + Integer pageSize = pageDomain.getPageSize(); | ||
62 | + | ||
63 | + lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin), LocationType::getCreated, createdBegin) | ||
64 | + .le(StringUtils.isNotEmpty(createdEnd), LocationType::getCreated, createdEnd) | ||
65 | + .eq(LocationType::getWarehouseCode, ShiroUtils.getWarehouseCode()) | ||
66 | + .eq(StringUtils.isNotEmpty(locationType.getCode()), LocationType::getCode, locationType.getCode()) | ||
67 | + .like(StringUtils.isNotEmpty(locationType.getName()), LocationType::getName, locationType.getName()) | ||
68 | + .orderByAsc(LocationType::getId); | ||
69 | + | ||
70 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) { | ||
71 | + /** | ||
72 | + * 使用分页查询 | ||
73 | + */ | ||
74 | + Page<LocationType> page = new Page<>(pageNum, pageSize); | ||
75 | + IPage<LocationType> iPage = locationTypeService.page(page, lambdaQueryWrapper); | ||
76 | + return getMpDataTable(iPage.getRecords(), iPage.getTotal()); | ||
77 | + } else { | ||
78 | + List<LocationType> list = locationTypeService.list(lambdaQueryWrapper); | ||
79 | + return getDataTable(list); | ||
80 | + } | ||
81 | + } | ||
82 | + | ||
83 | + /** | ||
84 | + * 新增库位类型 | ||
85 | + */ | ||
86 | + @GetMapping("/add") | ||
87 | + public String add() { | ||
88 | + return prefix + "/add"; | ||
89 | + } | ||
90 | + | ||
91 | + /** | ||
92 | + * 新增保存库位类型 | ||
93 | + */ | ||
94 | + @RequiresPermissions("config:locationType:add") | ||
95 | + @Log(title = "配置-库存资料-库位类型设置", operating = "新增库位类型", action = BusinessType.INSERT) | ||
96 | + @PostMapping("/add") | ||
97 | + @ResponseBody | ||
98 | + public AjaxResult addSave(LocationType locationType) { | ||
99 | + if (StringUtils.isEmpty(locationType.getCode())) { | ||
100 | + return AjaxResult.error("库位类型为空"); | ||
101 | + } | ||
107 | // if(StringUtils.isEmpty(locationType.getZoneCode())){ | 102 | // if(StringUtils.isEmpty(locationType.getZoneCode())){ |
108 | // return AjaxResult.error("库位类型对应的区域为空"); | 103 | // return AjaxResult.error("库位类型对应的区域为空"); |
109 | // } | 104 | // } |
@@ -114,53 +109,49 @@ public class LocationTypeController extends BaseController | @@ -114,53 +109,49 @@ public class LocationTypeController extends BaseController | ||
114 | // return AjaxResult.error("库位类型对应的区域:"+locationType.getZoneCode()+" 不在系统管制范围,请核对"); | 109 | // return AjaxResult.error("库位类型对应的区域:"+locationType.getZoneCode()+" 不在系统管制范围,请核对"); |
115 | // } | 110 | // } |
116 | 111 | ||
117 | - locationType.setWarehouseCode(ShiroUtils.getWarehouseCode()); | ||
118 | - locationType.setCreatedBy(ShiroUtils.getName()); | ||
119 | - locationType.setLastUpdatedBy(ShiroUtils.getName()); | ||
120 | - return toAjax(locationTypeService.save(locationType)); | ||
121 | - } | 112 | + locationType.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
113 | + locationType.setCreatedBy(ShiroUtils.getName()); | ||
114 | + locationType.setLastUpdatedBy(ShiroUtils.getName()); | ||
115 | + return toAjax(locationTypeService.save(locationType)); | ||
116 | + } | ||
117 | + | ||
118 | + /** | ||
119 | + * 修改库位类型 | ||
120 | + */ | ||
121 | + @GetMapping("/edit/{id}") | ||
122 | + public String edit(@PathVariable("id") Integer id, ModelMap mmap) { | ||
123 | + LocationType locationType = locationTypeService.getById(id); | ||
124 | + mmap.put("locationType", locationType); | ||
125 | + return prefix + "/edit"; | ||
126 | + } | ||
127 | + | ||
128 | + /** | ||
129 | + * 修改保存库位类型 | ||
130 | + */ | ||
131 | + @RequiresPermissions("config:locationType:edit") | ||
132 | + @Log(title = "配置-库存资料-库位类型设置", operating = "修改库位类型", action = BusinessType.UPDATE) | ||
133 | + @PostMapping("/edit") | ||
134 | + @ResponseBody | ||
135 | + public AjaxResult editSave(LocationType locationType) { | ||
136 | + locationType.setLastUpdatedBy(ShiroUtils.getName()); | ||
137 | + return toAjax(locationTypeService.saveOrUpdate(locationType)); | ||
138 | + } | ||
122 | 139 | ||
123 | - /** | ||
124 | - * 修改库位类型 | ||
125 | - */ | ||
126 | - @GetMapping("/edit/{id}") | ||
127 | - public String edit(@PathVariable("id") Integer id, ModelMap mmap) | ||
128 | - { | ||
129 | - LocationType locationType = locationTypeService.getById(id); | ||
130 | - mmap.put("locationType", locationType); | ||
131 | - return prefix + "/edit"; | ||
132 | - } | ||
133 | - | ||
134 | - /** | ||
135 | - * 修改保存库位类型 | ||
136 | - */ | ||
137 | - @RequiresPermissions("config:locationType:edit") | ||
138 | - @Log(title = "配置-库存资料-库位类型设置", operating = "修改库位类型", action = BusinessType.UPDATE) | ||
139 | - @PostMapping("/edit") | ||
140 | - @ResponseBody | ||
141 | - public AjaxResult editSave(LocationType locationType) | ||
142 | - { | ||
143 | - locationType.setLastUpdatedBy(ShiroUtils.getName()); | ||
144 | - return toAjax(locationTypeService.saveOrUpdate(locationType)); | ||
145 | - } | ||
146 | - | ||
147 | - /** | ||
148 | - * 删除库位类型 | ||
149 | - */ | ||
150 | - @RequiresPermissions("config:locationType:remove") | ||
151 | - @Log(title = "配置-库存资料-库位类型设置", operating = "删除库位类型", action = BusinessType.DELETE) | ||
152 | - @PostMapping( "/remove") | ||
153 | - @ResponseBody | ||
154 | - public AjaxResult remove(String ids) | ||
155 | - { | ||
156 | - if (StringUtils.isEmpty(ids)) { | 140 | + /** |
141 | + * 删除库位类型 | ||
142 | + */ | ||
143 | + @RequiresPermissions("config:locationType:remove") | ||
144 | + @Log(title = "配置-库存资料-库位类型设置", operating = "删除库位类型", action = BusinessType.DELETE) | ||
145 | + @PostMapping("/remove") | ||
146 | + @ResponseBody | ||
147 | + public AjaxResult remove(String ids) { | ||
148 | + if (StringUtils.isEmpty(ids)) { | ||
157 | return AjaxResult.error("id不能为空"); | 149 | return AjaxResult.error("id不能为空"); |
158 | } | 150 | } |
159 | - for (Integer id : Convert.toIntArray(ids)) | ||
160 | - { | 151 | + for (Integer id : Convert.toIntArray(ids)) { |
161 | locationTypeService.removeById(id); | 152 | locationTypeService.removeById(id); |
162 | - } | ||
163 | - return AjaxResult.success("删除成功!"); | ||
164 | - } | ||
165 | - | 153 | + } |
154 | + return AjaxResult.success("删除成功!"); | ||
155 | + } | ||
156 | + | ||
166 | } | 157 | } |
src/main/java/com/huaheng/pc/config/materialMultiple/controller/MaterialMultipleController.java
@@ -49,12 +49,12 @@ public class MaterialMultipleController extends BaseController { | @@ -49,12 +49,12 @@ public class MaterialMultipleController extends BaseController { | ||
49 | /** | 49 | /** |
50 | * 查询单位转换列表 | 50 | * 查询单位转换列表 |
51 | */ | 51 | */ |
52 | - @ApiOperation(value="查看单位转换列表", notes="根据物料编码、名称、创建时间获取单位转换列表", httpMethod = "POST") | 52 | + @ApiOperation(value = "查看单位转换列表", notes = "根据物料编码、名称、创建时间获取单位转换列表", httpMethod = "POST") |
53 | @RequiresPermissions("config:materialMultiple:list") | 53 | @RequiresPermissions("config:materialMultiple:list") |
54 | - @Log(title = "配置-库存资料-单位转换",operating = "单位转换列表", action = BusinessType.GRANT) | 54 | + @Log(title = "配置-库存资料-单位转换", operating = "单位转换列表", action = BusinessType.GRANT) |
55 | @PostMapping("/list") | 55 | @PostMapping("/list") |
56 | @ResponseBody | 56 | @ResponseBody |
57 | - public TableDataInfo list(@ApiParam(name="receiptType",value="物料编码、名称") MaterialMultiple materialMultiple, | 57 | + public TableDataInfo list(@ApiParam(name = "receiptType", value = "物料编码、名称") MaterialMultiple materialMultiple, |
58 | @ApiParam(name = "createdBegin", value = "起止时间") String createdBegin, | 58 | @ApiParam(name = "createdBegin", value = "起止时间") String createdBegin, |
59 | @ApiParam(name = "createdEnd", value = "结束时间") String createdEnd) { | 59 | @ApiParam(name = "createdEnd", value = "结束时间") String createdEnd) { |
60 | LambdaQueryWrapper<MaterialMultiple> lambdaQueryWrapper = Wrappers.lambdaQuery(); | 60 | LambdaQueryWrapper<MaterialMultiple> lambdaQueryWrapper = Wrappers.lambdaQuery(); |
@@ -68,7 +68,7 @@ public class MaterialMultipleController extends BaseController { | @@ -68,7 +68,7 @@ public class MaterialMultipleController extends BaseController { | ||
68 | .in(MaterialMultiple::getCompanyCode, ShiroUtils.getCompanyCodeList()) | 68 | .in(MaterialMultiple::getCompanyCode, ShiroUtils.getCompanyCodeList()) |
69 | .eq(MaterialMultiple::getWarehouseCode, ShiroUtils.getWarehouseCode()); | 69 | .eq(MaterialMultiple::getWarehouseCode, ShiroUtils.getWarehouseCode()); |
70 | 70 | ||
71 | - if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | 71 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) { |
72 | /*使用分页查询*/ | 72 | /*使用分页查询*/ |
73 | Page<MaterialMultiple> page = new Page<>(pageNum, pageSize); | 73 | Page<MaterialMultiple> page = new Page<>(pageNum, pageSize); |
74 | IPage<MaterialMultiple> iPage = materialMultipleService.page(page, lambdaQueryWrapper); | 74 | IPage<MaterialMultiple> iPage = materialMultipleService.page(page, lambdaQueryWrapper); |
@@ -90,27 +90,26 @@ public class MaterialMultipleController extends BaseController { | @@ -90,27 +90,26 @@ public class MaterialMultipleController extends BaseController { | ||
90 | /** | 90 | /** |
91 | * 新增保存单位转换 | 91 | * 新增保存单位转换 |
92 | */ | 92 | */ |
93 | - @ApiOperation(value="新增单位转换", notes="新增单位转换", httpMethod = "POST") | 93 | + @ApiOperation(value = "新增单位转换", notes = "新增单位转换", httpMethod = "POST") |
94 | @RequiresPermissions("config:materialMultiple:add") | 94 | @RequiresPermissions("config:materialMultiple:add") |
95 | - @Log(title = "配置-库存资料-单位转换",operating = "新增单位转换", action = BusinessType.INSERT) | 95 | + @Log(title = "配置-库存资料-单位转换", operating = "新增单位转换", action = BusinessType.INSERT) |
96 | @PostMapping("/add") | 96 | @PostMapping("/add") |
97 | @ResponseBody | 97 | @ResponseBody |
98 | public AjaxResult addSave(MaterialMultiple materialMultiple) { | 98 | public AjaxResult addSave(MaterialMultiple materialMultiple) { |
99 | LambdaQueryWrapper<Material> lam = Wrappers.lambdaQuery(); | 99 | LambdaQueryWrapper<Material> lam = Wrappers.lambdaQuery(); |
100 | - lam.eq(Material::getCode,materialMultiple.getMaterialCode()) | ||
101 | - .eq(Material::getWarehouseCode,ShiroUtils.getWarehouseCode()); | 100 | + lam.eq(Material::getCode, materialMultiple.getMaterialCode()) |
101 | + .eq(Material::getWarehouseCode, ShiroUtils.getWarehouseCode()); | ||
102 | Material material = materialService.getOne(lam); | 102 | Material material = materialService.getOne(lam); |
103 | - if(material ==null){ | 103 | + if (material == null) { |
104 | return AjaxResult.error("物料编码错误,系统没有此物料"); | 104 | return AjaxResult.error("物料编码错误,系统没有此物料"); |
105 | } | 105 | } |
106 | - //todo:胡海-- 物料单位是否存在需要判断 只有系统有维护的单位才可以进行换算 | ||
107 | LambdaQueryWrapper<MaterialMultiple> lambda = Wrappers.lambdaQuery(); | 106 | LambdaQueryWrapper<MaterialMultiple> lambda = Wrappers.lambdaQuery(); |
108 | - lambda.eq(MaterialMultiple::getCompanyCode,materialMultiple.getCompanyCode()) | 107 | + lambda.eq(MaterialMultiple::getCompanyCode, materialMultiple.getCompanyCode()) |
109 | .eq(MaterialMultiple::getMaterialCode, materialMultiple) | 108 | .eq(MaterialMultiple::getMaterialCode, materialMultiple) |
110 | .eq(MaterialMultiple::getWarehouseCode, ShiroUtils.getWarehouseCode()) | 109 | .eq(MaterialMultiple::getWarehouseCode, ShiroUtils.getWarehouseCode()) |
111 | .eq(MaterialMultiple::getUnitId1, materialMultiple.getUnitId1()) | 110 | .eq(MaterialMultiple::getUnitId1, materialMultiple.getUnitId1()) |
112 | .eq(MaterialMultiple::getUnitId2, materialMultiple.getUnitId2()); | 111 | .eq(MaterialMultiple::getUnitId2, materialMultiple.getUnitId2()); |
113 | - if (!materialMultipleService.list(lambda).isEmpty()){ | 112 | + if (!materialMultipleService.list(lambda).isEmpty()) { |
114 | return AjaxResult.error("该信息已存在"); | 113 | return AjaxResult.error("该信息已存在"); |
115 | } | 114 | } |
116 | materialMultiple.setMaterialName(material.getName()); | 115 | materialMultiple.setMaterialName(material.getName()); |
@@ -134,9 +133,9 @@ public class MaterialMultipleController extends BaseController { | @@ -134,9 +133,9 @@ public class MaterialMultipleController extends BaseController { | ||
134 | /** | 133 | /** |
135 | * 修改保存单位转换 | 134 | * 修改保存单位转换 |
136 | */ | 135 | */ |
137 | - @ApiOperation(value="修改单位转换信息", notes="修改单位转换信息", httpMethod = "POST") | 136 | + @ApiOperation(value = "修改单位转换信息", notes = "修改单位转换信息", httpMethod = "POST") |
138 | @RequiresPermissions("config:materialMultiple:edit") | 137 | @RequiresPermissions("config:materialMultiple:edit") |
139 | - @Log(title = "配置-单位转换",operating = "修改单位转换", action = BusinessType.UPDATE) | 138 | + @Log(title = "配置-单位转换", operating = "修改单位转换", action = BusinessType.UPDATE) |
140 | @PostMapping("/edit") | 139 | @PostMapping("/edit") |
141 | @ResponseBody | 140 | @ResponseBody |
142 | public AjaxResult editSave(MaterialMultiple materialMultiple) { | 141 | public AjaxResult editSave(MaterialMultiple materialMultiple) { |
@@ -147,10 +146,10 @@ public class MaterialMultipleController extends BaseController { | @@ -147,10 +146,10 @@ public class MaterialMultipleController extends BaseController { | ||
147 | /** | 146 | /** |
148 | * 删除单位转换 | 147 | * 删除单位转换 |
149 | */ | 148 | */ |
150 | - @ApiOperation(value="删除单位转换", notes="单条删除或批量删除单位转换,示例1或1,2,3", httpMethod = "POST") | 149 | + @ApiOperation(value = "删除单位转换", notes = "单条删除或批量删除单位转换,示例1或1,2,3", httpMethod = "POST") |
151 | @RequiresPermissions("config:materialMultiple:remove") | 150 | @RequiresPermissions("config:materialMultiple:remove") |
152 | - @Log(title = "配置-单位转换",operating = "删除单位转换", action = BusinessType.DELETE) | ||
153 | - @PostMapping( "/remove") | 151 | + @Log(title = "配置-单位转换", operating = "删除单位转换", action = BusinessType.DELETE) |
152 | + @PostMapping("/remove") | ||
154 | @ResponseBody | 153 | @ResponseBody |
155 | public AjaxResult remove(String ids) { | 154 | public AjaxResult remove(String ids) { |
156 | if (StringUtils.isEmpty(ids)) { | 155 | if (StringUtils.isEmpty(ids)) { |
src/main/java/com/huaheng/pc/receipt/receiptDetail/domain/ReceiptDetail.java
@@ -445,6 +445,5 @@ public class ReceiptDetail implements Serializable { | @@ -445,6 +445,5 @@ public class ReceiptDetail implements Serializable { | ||
445 | * 物料颜色 | 445 | * 物料颜色 |
446 | */ | 446 | */ |
447 | @TableField(value = "materialColor") | 447 | @TableField(value = "materialColor") |
448 | - @ApiModelProperty(value = "物料颜色") | ||
449 | public String materialColor; | 448 | public String materialColor; |
450 | } | 449 | } |
src/main/java/com/huaheng/pc/receipt/receiptDetailHistory/domain/ReceiptDetailHistory.java
@@ -445,6 +445,5 @@ public class ReceiptDetailHistory implements Serializable { | @@ -445,6 +445,5 @@ public class ReceiptDetailHistory implements Serializable { | ||
445 | * 物料颜色 | 445 | * 物料颜色 |
446 | */ | 446 | */ |
447 | @TableField(value = "materialColor") | 447 | @TableField(value = "materialColor") |
448 | - @ApiModelProperty(value = "物料颜色") | ||
449 | public String materialColor; | 448 | public String materialColor; |
450 | } | 449 | } |
src/main/java/com/huaheng/pc/receipt/receiptHeader/service/ReceiptHeaderService.java
@@ -107,7 +107,6 @@ public class ReceiptHeaderService extends ServiceImpl<ReceiptHeaderMapper, Recei | @@ -107,7 +107,6 @@ public class ReceiptHeaderService extends ServiceImpl<ReceiptHeaderMapper, Recei | ||
107 | * @param receiptType | 107 | * @param receiptType |
108 | * @return | 108 | * @return |
109 | */ | 109 | */ |
110 | - //todo:huhai 单据生成规则,后续版本计划追加一个序列号生成规则表:统一设定前缀,填充位,流水码等 | ||
111 | public String createCode(String receiptType) { | 110 | public String createCode(String receiptType) { |
112 | String code = null; | 111 | String code = null; |
113 | int i = 1; | 112 | int i = 1; |
@@ -124,7 +123,6 @@ public class ReceiptHeaderService extends ServiceImpl<ReceiptHeaderMapper, Recei | @@ -124,7 +123,6 @@ public class ReceiptHeaderService extends ServiceImpl<ReceiptHeaderMapper, Recei | ||
124 | maxCode = this.getOne(lambda).getCode(); | 123 | maxCode = this.getOne(lambda).getCode(); |
125 | } | 124 | } |
126 | 125 | ||
127 | - //todo:隐藏了BUG,请修正。 修改好 去掉todo | ||
128 | 126 | ||
129 | while (i != 0) { | 127 | while (i != 0) { |
130 | LambdaQueryWrapper<ReceiptHeaderHistory> aa = Wrappers.lambdaQuery(); | 128 | LambdaQueryWrapper<ReceiptHeaderHistory> aa = Wrappers.lambdaQuery(); |
src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java
@@ -51,7 +51,7 @@ import java.util.stream.Collectors; | @@ -51,7 +51,7 @@ import java.util.stream.Collectors; | ||
51 | * @author mahua | 51 | * @author mahua |
52 | * @ClassName ReceivingService | 52 | * @ClassName ReceivingService |
53 | * @projectName huaheng | 53 | * @projectName huaheng |
54 | - * @description: TODO | 54 | + * @description: |
55 | * @date 2019/8/3123:09 | 55 | * @date 2019/8/3123:09 |
56 | */ | 56 | */ |
57 | @Service | 57 | @Service |
src/main/java/com/huaheng/pc/shipment/shipmentContainerHeader/service/ShipmentContainerHeaderServiceImpl.java
@@ -229,11 +229,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont | @@ -229,11 +229,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont | ||
229 | return list.get(0); | 229 | return list.get(0); |
230 | } else { | 230 | } else { |
231 | // 2.没有符合条件的组盘头,新建组盘头 | 231 | // 2.没有符合条件的组盘头,新建组盘头 |
232 | - //找到容器类型 | ||
233 | - LambdaQueryWrapper<Container> containerLam = Wrappers.lambdaQuery(); | ||
234 | - containerLam.eq(Container::getCode, location.getContainerCode()) | ||
235 | - .eq(Container::getWarehouseCode, ShiroUtils.getWarehouseCode()); | ||
236 | - Container container = containerService.getOne(containerLam); | 232 | + Container container = containerService.getContainerByCode(location.getContainerCode()); |
237 | if (container == null) { | 233 | if (container == null) { |
238 | throw new ServiceException("系统没有此容器编码"); | 234 | throw new ServiceException("系统没有此容器编码"); |
239 | } | 235 | } |
src/main/java/com/huaheng/pc/shipment/shippingCombination/controller/ShippingCombinationController.java
@@ -159,8 +159,8 @@ public class ShippingCombinationController extends BaseController { | @@ -159,8 +159,8 @@ public class ShippingCombinationController extends BaseController { | ||
159 | List<InventoryDetail> list = shippingCombinationService.getInventorys(shipmentDetail, false, false); | 159 | List<InventoryDetail> list = shippingCombinationService.getInventorys(shipmentDetail, false, false); |
160 | if (list.isEmpty()) { | 160 | if (list.isEmpty()) { |
161 | // 处理库存为0的明细 | 161 | // 处理库存为0的明细 |
162 | - handleDetail(shipmentHeader, shipmentDetail); | ||
163 | - throw new ServiceException("该物料没有库存或没有符合出库规则的库存"); | 162 | + //handleDetail(shipmentHeader, shipmentDetail); |
163 | + throw new ServiceException("该物料没有库存可能是原仓库不同"); | ||
164 | } | 164 | } |
165 | List<InventoryDetail> removeList = new ArrayList<>(); | 165 | List<InventoryDetail> removeList = new ArrayList<>(); |
166 | for (InventoryDetail item : list) { | 166 | for (InventoryDetail item : list) { |
src/main/java/com/huaheng/pc/task/taskHeader/service/CycleCountTaskService.java
@@ -330,7 +330,7 @@ public class CycleCountTaskService { | @@ -330,7 +330,7 @@ public class CycleCountTaskService { | ||
330 | .eq(InventoryDetail::getWarehouseCode, inventoryHeader.getWarehouseCode()) | 330 | .eq(InventoryDetail::getWarehouseCode, inventoryHeader.getWarehouseCode()) |
331 | .eq(InventoryDetail::getInventoryHeaderId, inventoryHeader.getId()); | 331 | .eq(InventoryDetail::getInventoryHeaderId, inventoryHeader.getId()); |
332 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetail); | 332 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetail); |
333 | - if (inventoryDetailList.size() < 1) { | 333 | + if (inventoryDetailList.isEmpty()) { |
334 | throw new ServiceException("盘点的库存明细错误!"); | 334 | throw new ServiceException("盘点的库存明细错误!"); |
335 | } | 335 | } |
336 | inventoryDetailList.forEach(i -> i.setLastCycleCountDate(new Date())); | 336 | inventoryDetailList.forEach(i -> i.setLastCycleCountDate(new Date())); |
@@ -357,8 +357,7 @@ public class CycleCountTaskService { | @@ -357,8 +357,7 @@ public class CycleCountTaskService { | ||
357 | //更新主单状态 | 357 | //更新主单状态 |
358 | cycleCountHeaderService.updataHeaderStatus(cycleCountDetail.getCycleCountHeadCode()); | 358 | cycleCountHeaderService.updataHeaderStatus(cycleCountDetail.getCycleCountHeadCode()); |
359 | //释放库位 | 359 | //释放库位 |
360 | - locationService.updateStatus(cycleCountDetail.getLocationCode(), | ||
361 | - QuantityConstant.STATUS_LOCATION_EMPTY, taskHeader.getWarehouseCode()); | 360 | + locationService.updateStatus(cycleCountDetail.getLocationCode(), QuantityConstant.STATUS_LOCATION_EMPTY, taskHeader.getWarehouseCode()); |
362 | 361 | ||
363 | return AjaxResult.success("完成盘点任务成功!"); | 362 | return AjaxResult.success("完成盘点任务成功!"); |
364 | 363 |
src/main/resources/templates/inventory/inventoryHeader/inventoryHeader.html
@@ -76,10 +76,10 @@ | @@ -76,10 +76,10 @@ | ||
76 | shiro:hasPermission="inventory:inventoryHeader:inventoryMerge"> | 76 | shiro:hasPermission="inventory:inventoryHeader:inventoryMerge"> |
77 | <i class="fa fa-exchange"></i> 库存合并 | 77 | <i class="fa fa-exchange"></i> 库存合并 |
78 | </a> | 78 | </a> |
79 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="transfer()" | ||
80 | - shiro:hasPermission="inventory:inventoryHeader:transfer"> | ||
81 | - <i class="fa fa-exchange"></i> 立库移库 | ||
82 | - </a> | 79 | + <!-- <a class="btn btn-outline btn-danger btn-rounded" onclick="transfer()"--> |
80 | + <!-- shiro:hasPermission="inventory:inventoryHeader:transfer">--> | ||
81 | + <!-- <i class="fa fa-exchange"></i> 立库移库--> | ||
82 | + <!-- </a>--> | ||
83 | <a class="btn btn-outline btn-primary btn-rounded" onclick="checkOut()" | 83 | <a class="btn btn-outline btn-primary btn-rounded" onclick="checkOut()" |
84 | shiro:hasPermission="inventory:inventoryHeader:seeOut"> | 84 | shiro:hasPermission="inventory:inventoryHeader:seeOut"> |
85 | <i class="fa fa-eye"></i> 出库查看 | 85 | <i class="fa fa-eye"></i> 出库查看 |
@@ -88,10 +88,10 @@ | @@ -88,10 +88,10 @@ | ||
88 | shiro:hasPermission="inventory:inventoryHeader:emptyIn"> | 88 | shiro:hasPermission="inventory:inventoryHeader:emptyIn"> |
89 | <i class="fa fa-level-down"></i> 空托入库 | 89 | <i class="fa fa-level-down"></i> 空托入库 |
90 | </a> | 90 | </a> |
91 | - <!-- <a class="btn btn-outline btn-info btn-rounded" onclick="batchEmptyIn()"--> | ||
92 | - <!-- shiro:hasPermission="inventory:inventoryHeader:emptyIn">--> | ||
93 | - <!-- <i class="fa fa-level-down"></i> 批量空托入库--> | ||
94 | - <!-- </a>--> | 91 | + <a class="btn btn-outline btn-info btn-rounded" onclick="batchEmptyIn()" |
92 | + shiro:hasPermission="inventory:inventoryHeader:emptyIn"> | ||
93 | + <i class="fa fa-level-down"></i> 批量空托入库 | ||
94 | + </a> | ||
95 | <a class="btn btn-outline btn-info btn-rounded" onclick="emptyOut()" | 95 | <a class="btn btn-outline btn-info btn-rounded" onclick="emptyOut()" |
96 | shiro:hasPermission="inventory:inventoryHeader:emptyOut"> | 96 | shiro:hasPermission="inventory:inventoryHeader:emptyOut"> |
97 | <i class="fa fa-level-up"></i> 空托出库 | 97 | <i class="fa fa-level-up"></i> 空托出库 |