Commit 4d82933e329bc12358609a014c54fae97a4d17ca
Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop
Showing
12 changed files
with
248 additions
and
117 deletions
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/controller/CycleCountDetailController.java
... | ... | @@ -78,12 +78,12 @@ public class CycleCountDetailController extends BaseController { |
78 | 78 | Integer pageNum = pageDomain.getPageNum(); |
79 | 79 | Integer pageSize = pageDomain.getPageSize(); |
80 | 80 | //没有主单ID传入则直接返回空list |
81 | - if(cycleCountDetail.getCycleCountHeadId() != null){ | |
81 | + if(cycleCountDetail.getCycleCountHeadCode() != null){ | |
82 | 82 | lambdaQueryWrapper.ge( |
83 | 83 | StringUtils.isNotEmpty(createdBegin), CycleCountDetail::getCreated, createdBegin) |
84 | 84 | .le(StringUtils.isNotEmpty(createdEnd), CycleCountDetail::getCreated, createdEnd)//创建时间范围 |
85 | 85 | .eq(CycleCountDetail::getWarehouseCode, ShiroUtils.getWarehouseCode()) //仓库 |
86 | - .eq(cycleCountDetail.getCycleCountHeadId() != null ,CycleCountDetail::getCycleCountHeadId,cycleCountDetail.getCycleCountHeadId())//盘点主单 | |
86 | + .eq(cycleCountDetail.getCycleCountHeadCode() != null ,CycleCountDetail::getCycleCountHeadCode,cycleCountDetail.getCycleCountHeadCode())//盘点主单 | |
87 | 87 | .eq(StringUtils.isNotEmpty(cycleCountDetail.getCompanyCode()),CycleCountDetail::getCompanyCode, cycleCountDetail.getCompanyCode())//货主 |
88 | 88 | .eq(StringUtils.isNotEmpty(cycleCountDetail.getLocationCode()), CycleCountDetail::getLocationCode, cycleCountDetail.getLocationCode()) //库位 |
89 | 89 | .eq(StringUtils.isNotEmpty(cycleCountDetail.getContainerCode()), CycleCountDetail::getContainerCode,cycleCountDetail.getContainerCode()) //容器 |
... | ... | @@ -142,9 +142,9 @@ public class CycleCountDetailController extends BaseController { |
142 | 142 | @Log(title = "库存-盘点", operating = "新增盘点补货明细", action = BusinessType.INSERT) |
143 | 143 | @PostMapping("/add") |
144 | 144 | @ResponseBody |
145 | - public AjaxResult addSave(Integer cycleCountHeadId, Integer[] inventoryDetailIdIds) | |
145 | + public AjaxResult addSave(String cycleCountHeadCode, Integer[] inventoryDetailIdIds) | |
146 | 146 | { |
147 | - return cycleCountDetailService.addDetails(cycleCountHeadId,inventoryDetailIdIds); | |
147 | + return cycleCountDetailService.addDetails(cycleCountHeadCode,inventoryDetailIdIds); | |
148 | 148 | } |
149 | 149 | |
150 | 150 | /** |
... | ... | @@ -160,7 +160,11 @@ public class CycleCountDetailController extends BaseController { |
160 | 160 | return AjaxResult.error("删除的明细id不能为空"); |
161 | 161 | Integer[] detailsIds = Convert.toIntArray(ids); |
162 | 162 | CycleCountDetail cyclecountDetail = cycleCountDetailService.getById(detailsIds[0]); |
163 | - CycleCountHeader cyclecountHeader = cycleCountHeaderService.getById(cyclecountDetail.getCycleCountHeadId()); | |
163 | + String masterCode = cyclecountDetail.getCycleCountHeadCode(); | |
164 | + CycleCountHeader ch = new CycleCountHeader(); | |
165 | + ch.setMasterCode(masterCode); | |
166 | + LambdaQueryWrapper<CycleCountHeader> la = Wrappers.lambdaQuery(ch); | |
167 | + CycleCountHeader cyclecountHeader = cycleCountHeaderService.getOne(la); | |
164 | 168 | if(cyclecountHeader==null){ |
165 | 169 | return AjaxResult.error("主单据不存在"); |
166 | 170 | } |
... | ... | @@ -183,11 +187,11 @@ public class CycleCountDetailController extends BaseController { |
183 | 187 | //@RequiresPermissions("inventory:cyclecountDetail:createTask") |
184 | 188 | @PostMapping("/createCycleCountTaskByHeadId") |
185 | 189 | @ResponseBody |
186 | - public AjaxResult createCycleCountTaskByHeadId(Integer cycleCountHeadId){ | |
187 | - if(cycleCountHeadId ==null){ | |
190 | + public AjaxResult createCycleCountTaskByHeadId(String cycleCountHeadCode){ | |
191 | + if(cycleCountHeadCode ==null){ | |
188 | 192 | return AjaxResult.error("生成盘点任务时盘点明细ID不能为空!"); |
189 | 193 | } |
190 | - return cycleCountDetailService.createCycleCountTaskByHeadId(cycleCountHeadId); | |
194 | + return cycleCountDetailService.createCycleCountTaskByHeadId(cycleCountHeadCode); | |
191 | 195 | } |
192 | 196 | |
193 | 197 | /**生成单条盘点任务*/ |
... | ... |
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/domain/CycleCountDetail.java
... | ... | @@ -283,9 +283,9 @@ public class CycleCountDetail implements Serializable { |
283 | 283 | /** |
284 | 284 | * 盘点主单号 |
285 | 285 | * */ |
286 | - @TableField(value = "cycleCountHeadId") | |
286 | + @TableField(value = "cycleCountHeadCode") | |
287 | 287 | @ApiModelProperty(value = "盘点主单号") |
288 | - private Integer cycleCountHeadId; | |
288 | + private String cycleCountHeadCode; | |
289 | 289 | |
290 | 290 | |
291 | 291 | |
... | ... | @@ -947,11 +947,11 @@ public class CycleCountDetail implements Serializable { |
947 | 947 | this.projectNo = projectNo; |
948 | 948 | } |
949 | 949 | |
950 | - public Integer getCycleCountHeadId() { | |
951 | - return cycleCountHeadId; | |
950 | + public String getCycleCountHeadCode() { | |
951 | + return cycleCountHeadCode; | |
952 | 952 | } |
953 | 953 | |
954 | - public void setCycleCountHeadId(Integer cycleCountHeadId) { | |
955 | - this.cycleCountHeadId = cycleCountHeadId; | |
954 | + public void setCycleCountHeadCode(String cycleCountHeadCode) { | |
955 | + this.cycleCountHeadCode = cycleCountHeadCode; | |
956 | 956 | } |
957 | 957 | } |
958 | 958 | \ No newline at end of file |
... | ... |
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/service/CycleCountDetailService.java
... | ... | @@ -9,9 +9,9 @@ import com.huaheng.pc.inventory.cycleCountDetail.domain.CycleCountDetail; |
9 | 9 | public interface CycleCountDetailService extends IService<CycleCountDetail> { |
10 | 10 | |
11 | 11 | |
12 | - AjaxResult addDetails(Integer cycleCountHeadId, Integer[] inventoryDetailIdIds); | |
12 | + AjaxResult addDetails(String cycleCountHeadId, Integer[] inventoryDetailIdIds); | |
13 | 13 | |
14 | - AjaxResult createCycleCountTaskByHeadId(Integer cycleCountHeadId); | |
14 | + AjaxResult createCycleCountTaskByHeadId(String cycleCountHeadCode); | |
15 | 15 | |
16 | 16 | AjaxResult createCycleCoutTaskByDetailId(Integer cycleCoutdetailId); |
17 | 17 | |
... | ... |
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/service/CycleCountDetailServiceImpl.java
... | ... | @@ -53,9 +53,12 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
53 | 53 | * */ |
54 | 54 | @Override |
55 | 55 | @Transactional |
56 | - public AjaxResult addDetails(Integer cycleCountHeadId, Integer[] inventoryDetailIdIds) { | |
56 | + public AjaxResult addDetails(String cycleCountHeadCode, Integer[] inventoryDetailIdIds) { | |
57 | 57 | |
58 | - CycleCountHeader cyclecountHeader = cycleCountHeaderService.getById(cycleCountHeadId); | |
58 | + CycleCountHeader cyclecountHeader =new CycleCountHeader(); | |
59 | + cyclecountHeader.setMasterCode(cycleCountHeadCode); | |
60 | + LambdaQueryWrapper<CycleCountHeader> ch = Wrappers.lambdaQuery(cyclecountHeader); | |
61 | + cyclecountHeader = cycleCountHeaderService.getOne(ch); | |
59 | 62 | //可能存在并发删除的情况 |
60 | 63 | if(cyclecountHeader==null){ |
61 | 64 | return AjaxResult.error("盘点主单据不存在"); |
... | ... | @@ -67,7 +70,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
67 | 70 | CycleCountDetail cycleCountDetail = new CycleCountDetail(); |
68 | 71 | cycleCountDetail.setWarehouseCode(cyclecountHeader.getWarehouseCode()); |
69 | 72 | cycleCountDetail.setCompanyCode(cyclecountHeader.getCompanyCode()); |
70 | - cycleCountDetail.setCycleCountHeadId(cycleCountHeadId); | |
73 | + cycleCountDetail.setCycleCountHeadCode(cyclecountHeader.getMasterCode()); | |
71 | 74 | LambdaQueryWrapper<CycleCountDetail> cycleCountDetailLambd = Wrappers.lambdaQuery(cycleCountDetail); |
72 | 75 | List<CycleCountDetail> cyclecountDetailList = this.list(cycleCountDetailLambd); |
73 | 76 | if(cyclecountDetailList == null){ |
... | ... | @@ -83,13 +86,13 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
83 | 86 | |
84 | 87 | //写入盘点明细 |
85 | 88 | CycleCountDetail ccd = new CycleCountDetail(); |
86 | - ccd.setCycleCountHeadId(cycleCountHeadId); | |
89 | + ccd.setCycleCountHeadCode(cyclecountHeader.getMasterCode()); | |
87 | 90 | ccd.setInventoryDetailId(inventoryDetailId); |
88 | 91 | ccd.setWarehouseCode(inventoryDetail.getWarehouseCode()); |
89 | 92 | ccd.setCompanyCode(inventoryDetail.getCompanyCode()); |
90 | 93 | ccd.setInventorySts(inventoryDetail.getInventorySts()); |
91 | 94 | ccd.setCountId(inventoryDetail.getId()); |
92 | - ccd.setEnableStatus(1); | |
95 | + ccd.setEnableStatus(5); | |
93 | 96 | ccd.setLocationCode(inventoryDetail.getLocationCode()); |
94 | 97 | ccd.setContainerCode(inventoryDetail.getContainerCode()); |
95 | 98 | ccd.setMaterialCode(inventoryDetail.getMaterialCode()); |
... | ... | @@ -107,7 +110,9 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
107 | 110 | ccd.setLastUpdated(new Date()); |
108 | 111 | ccd.setLastUpdatedBy(ShiroUtils.getLoginName()); |
109 | 112 | this.save(ccd); |
110 | - | |
113 | + //更新库存锁 | |
114 | + inventoryDetail.setLockCode("cyclecount"); | |
115 | + inventoryDetailService.saveOrUpdate(inventoryDetail); | |
111 | 116 | } |
112 | 117 | return AjaxResult.success("生成盘点明细成功"); |
113 | 118 | } |
... | ... | @@ -115,19 +120,21 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
115 | 120 | |
116 | 121 | /** |
117 | 122 | * 生成全部盘点任务 |
118 | - * @param cycleCountHeadId | |
123 | + * @param cycleCountHeadCode | |
119 | 124 | * @return |
120 | 125 | */ |
121 | 126 | @Override |
122 | 127 | @Transactional |
123 | - public AjaxResult createCycleCountTaskByHeadId(Integer cycleCountHeadId) { | |
124 | - | |
125 | - CycleCountHeader cyclecountHeader = cycleCountHeaderService.getById(cycleCountHeadId); | |
128 | + public AjaxResult createCycleCountTaskByHeadId(String cycleCountHeadCode) { | |
129 | + CycleCountHeader cyclecountHeader =new CycleCountHeader(); | |
130 | + cyclecountHeader.setMasterCode(cycleCountHeadCode); | |
131 | + LambdaQueryWrapper<CycleCountHeader> cych = Wrappers.lambdaQuery(cyclecountHeader); | |
132 | + cyclecountHeader = cycleCountHeaderService.getById(cych); | |
126 | 133 | if(cyclecountHeader == null){ |
127 | 134 | return AjaxResult.error("盘点单不存在"); |
128 | 135 | } |
129 | 136 | CycleCountDetail temp = new CycleCountDetail(); |
130 | - temp.setCycleCountHeadId(cycleCountHeadId); | |
137 | + temp.setCycleCountHeadCode(cyclecountHeader.getMasterCode()); | |
131 | 138 | temp.setWarehouseCode(cyclecountHeader.getWarehouseCode()); |
132 | 139 | temp.setCompanyCode(cyclecountHeader.getCompanyCode()); |
133 | 140 | LambdaQueryWrapper<CycleCountDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(temp); |
... | ... | @@ -139,7 +146,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
139 | 146 | int count = 0; |
140 | 147 | int countErr = 0; |
141 | 148 | for(CycleCountDetail item:list){ |
142 | - if(item.getEnableStatus() < 1 && item.getTaskHeaderId() == null){ | |
149 | + if(item.getEnableStatus() < 5 && item.getTaskHeaderId() == null){ | |
143 | 150 | AjaxResult result = this.createCycleCoutTaskByDetailId(item.getId()); |
144 | 151 | if(result.getCode()==200){ |
145 | 152 | count++; |
... | ... | @@ -184,11 +191,10 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
184 | 191 | return AjaxResult.error(cycleCountDetail.getLocationCode()+"没有托盘,操作失败"); |
185 | 192 | } |
186 | 193 | TaskHeader task = new TaskHeader(); |
187 | - | |
188 | 194 | task.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
189 | 195 | task.setCompanyCode(cycleCountDetail.getCompanyCode()); |
190 | 196 | task.setInternalTaskType(700); |
191 | - task.setTaskType(900); | |
197 | + task.setTaskType(700); | |
192 | 198 | task.setContainerCode(cycleCountDetail.getContainerCode()); |
193 | 199 | task.setStatus(0); |
194 | 200 | task.setFromLocation(cycleCountDetail.getLocationCode()); |
... | ... | @@ -207,6 +213,16 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
207 | 213 | TaskDetail taskDetail = new TaskDetail(); |
208 | 214 | taskDetail.setTaskId(task.getId());//主单ID |
209 | 215 | taskDetail.setTaskType(task.getTaskType()); |
216 | + taskDetail.setBillCode(cycleCountDetail.getCycleCountHeadCode()); | |
217 | + taskDetail.setBillDetailId(taskDetail.getId()); | |
218 | + taskDetail.setMaterialCode(cycleCountDetail.getMaterialCode()); | |
219 | + taskDetail.setMaterialName(cycleCountDetail.getMaterialName()); | |
220 | + taskDetail.setMaterialSpec(cycleCountDetail.getMaterialSpec()); | |
221 | + taskDetail.setMaterialUnit(cycleCountDetail.getMaterialUnit()); | |
222 | + taskDetail.setBatch(cycleCountDetail.getBatch()); | |
223 | + taskDetail.setFromInventoryId(cycleCountDetail.getInventoryDetailId()); | |
224 | + taskDetail.setLot(cycleCountDetail.getLot()); | |
225 | + taskDetail.setProjectNo(cycleCountDetail.getProjectNo()); | |
210 | 226 | taskDetail.setInternalTaskType(task.getTaskType()); |
211 | 227 | taskDetail.setWarehouseCode(task.getWarehouseCode()); |
212 | 228 | taskDetail.setCompanyCode(cycleCountDetail.getCompanyCode()); |
... | ... | @@ -225,7 +241,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
225 | 241 | cycleCountDetail.setTaskHeaderId(task.getId()); |
226 | 242 | cycleCountDetail.setLastUpdated(new Date()); |
227 | 243 | cycleCountDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); |
228 | - cycleCountDetail.setEnableStatus(1); | |
244 | + cycleCountDetail.setEnableStatus(5); | |
229 | 245 | this.saveOrUpdate(cycleCountDetail); |
230 | 246 | return AjaxResult.success("盘点任务生成成功"); |
231 | 247 | } |
... | ... |
src/main/java/com/huaheng/pc/inventory/cycleCountHeader/controller/CycleCountHeaderController.java
... | ... | @@ -195,7 +195,7 @@ public class CycleCountHeaderController extends BaseController { |
195 | 195 | mmap.put("cyclecountHeader", cyclecountHeader); |
196 | 196 | |
197 | 197 | CycleCountDetail condition = new CycleCountDetail(); |
198 | - condition.setCycleCountHeadId(id); | |
198 | + condition.setCycleCountHeadCode(cyclecountHeader.getMasterCode()); | |
199 | 199 | condition.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
200 | 200 | LambdaQueryWrapper lambda = Wrappers.lambdaQuery(condition); |
201 | 201 | List<CycleCountDetail> details = cycleCountDetailService.list(lambda); |
... | ... |
src/main/java/com/huaheng/pc/inventory/cycleCountHeader/service/CycleCountHeaderServiceImpl.java
... | ... | @@ -88,7 +88,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap |
88 | 88 | //批量删除子单据 |
89 | 89 | CycleCountDetail temp = new CycleCountDetail(); |
90 | 90 | temp.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
91 | - temp.setCycleCountHeadId(cyclecountHeader.getId()); | |
91 | + temp.setCycleCountHeadCode(cyclecountHeader.getMasterCode()); | |
92 | 92 | LambdaQueryWrapper lm = Wrappers.lambdaQuery(temp); |
93 | 93 | cycleCountDetailService.remove(lm); |
94 | 94 | cycleCountHeaderMapper.deleteById(id); |
... | ... | @@ -128,7 +128,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap |
128 | 128 | |
129 | 129 | //根据盘点单查询明细并写入调整单 |
130 | 130 | CycleCountDetail cycleCountDetail = new CycleCountDetail(); |
131 | - cycleCountDetail.setCycleCountHeadId(id); | |
131 | + cycleCountDetail.setCycleCountHeadCode(cyclecountHeader.getMasterCode()); | |
132 | 132 | cycleCountDetail.setWarehouseCode(cyclecountHeader.getWarehouseCode()); |
133 | 133 | LambdaQueryWrapper lam = Wrappers.lambdaQuery(cycleCountDetail); |
134 | 134 | List<CycleCountDetail> cycleCountDetailList = cycleCountDetailService.list(lam); |
... | ... | @@ -167,7 +167,6 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap |
167 | 167 | } |
168 | 168 | |
169 | 169 | //修改盘点主单状态为已生成差异单 |
170 | - | |
171 | 170 | cyclecountHeader.setStatusCyc(35); |
172 | 171 | this.saveOrUpdate(cyclecountHeader); |
173 | 172 | |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryDetail/controller/InventoryDetailController.java
... | ... | @@ -38,10 +38,9 @@ public class InventoryDetailController extends BaseController |
38 | 38 | { |
39 | 39 | private String prefix = "inventory/inventoryDetail"; |
40 | 40 | |
41 | - @Resource | |
42 | - private MaterialServiceImpl materialService; | |
43 | - @Resource | |
44 | - private InventoryHeaderService inventoryHeaderService; | |
41 | + | |
42 | + | |
43 | + | |
45 | 44 | @Resource |
46 | 45 | private InventoryDetailService inventoryDetailService; |
47 | 46 | |
... | ... | @@ -86,6 +85,7 @@ public class InventoryDetailController extends BaseController |
86 | 85 | .eq(inventoryDetail.getReceiptDetailId() != null,InventoryDetail::getReceiptDetailId,inventoryDetail.getReceiptDetailId()) // 入库单明细ID |
87 | 86 | .eq(StringUtils.isNotEmpty(inventoryDetail.getReferCode()),InventoryDetail::getReferCode,inventoryDetail.getReferCode())//上游单号 |
88 | 87 | .eq(StringUtils.isNotEmpty(inventoryDetail.getReferDetailId()),InventoryDetail::getReferDetailId,inventoryDetail.getReferDetailId())//上游行号 |
88 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getLockCode()),InventoryDetail::getLockCode,inventoryDetail.getLockCode())//库存锁 | |
89 | 89 | .orderByDesc(InventoryDetail::getId); |
90 | 90 | |
91 | 91 | if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ |
... | ... | @@ -99,6 +99,54 @@ public class InventoryDetailController extends BaseController |
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
102 | + /** | |
103 | + * 盘点查询库存明细列表 | |
104 | + */ | |
105 | + //@RequiresPermissions("inventory:inventoryDetail:list") | |
106 | + @Log(title = "库存-盘点库存明细查看",operating = "盘点查看库存明细列表", action = BusinessType.GRANT) | |
107 | + @PostMapping("/inventoryCycleCountLook") | |
108 | + @ResponseBody | |
109 | + public TableDataInfo CycleCountLook(InventoryDetail inventoryDetail, String createdBegin, String createdEnd) | |
110 | + { | |
111 | + LambdaQueryWrapper<InventoryDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
112 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | |
113 | + Integer pageNum = pageDomain.getPageNum(); | |
114 | + Integer pageSize = pageDomain.getPageSize(); | |
115 | + | |
116 | + lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin),InventoryDetail::getCreated, createdBegin) | |
117 | + .le(StringUtils.isNotEmpty(createdEnd), InventoryDetail::getCreated, createdEnd)//创建时间范围 | |
118 | + .eq(InventoryDetail::getWarehouseCode, ShiroUtils.getWarehouseCode())//仓库 | |
119 | + .eq(inventoryDetail.getInventoryHeaderId() != null,InventoryDetail::getInventoryHeaderId,inventoryDetail.getInventoryHeaderId()) //ID | |
120 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getLocationCode()),InventoryDetail::getLocationCode,inventoryDetail.getLocationCode()) //库位 | |
121 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getContainerCode()),InventoryDetail::getContainerCode,inventoryDetail.getContainerCode())//容器 | |
122 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getCompanyCode()),InventoryDetail::getCompanyCode,inventoryDetail.getCompanyCode())//货主 | |
123 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getSupplierCode()),InventoryDetail::getSupplierCode,inventoryDetail.getSupplierCode())//供应商 | |
124 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getMaterialCode()),InventoryDetail::getMaterialCode,inventoryDetail.getMaterialCode())//物料编码 | |
125 | + .like(StringUtils.isNotEmpty(inventoryDetail.getMaterialName()),InventoryDetail::getMaterialName,inventoryDetail.getMaterialName())//物料名称 | |
126 | + .like(StringUtils.isNotEmpty(inventoryDetail.getMaterialSpec()),InventoryDetail::getMaterialSpec,inventoryDetail.getMaterialSpec())//物料规格 | |
127 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getInventorySts()),InventoryDetail::getInventorySts,inventoryDetail.getInventorySts())//库存状态 | |
128 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getBatch()),InventoryDetail::getBatch,inventoryDetail.getBatch())//批次 | |
129 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getProjectNo()),InventoryDetail::getProjectNo,inventoryDetail.getProjectNo())//项目号 | |
130 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getLot()),InventoryDetail::getLot,inventoryDetail.getLot())//批号 | |
131 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getReceiptCode()),InventoryDetail::getReceiptCode,inventoryDetail.getReceiptCode())//入库单编码 | |
132 | + .eq(inventoryDetail.getReceiptDetailId() != null,InventoryDetail::getReceiptDetailId,inventoryDetail.getReceiptDetailId()) // 入库单明细ID | |
133 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getReferCode()),InventoryDetail::getReferCode,inventoryDetail.getReferCode())//上游单号 | |
134 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getReferDetailId()),InventoryDetail::getReferDetailId,inventoryDetail.getReferDetailId())//上游行号 | |
135 | + //默认库存锁为空,当有盘点锁时不显示 | |
136 | + .ne(InventoryDetail::getLockCode,"cyclecount")//库存锁 ,ne不等于 | |
137 | + .orderByDesc(InventoryDetail::getId); | |
138 | + | |
139 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | |
140 | + //分页查询 | |
141 | + Page<InventoryDetail> page = new Page<>(pageNum, pageSize); | |
142 | + IPage<InventoryDetail> iPage = inventoryDetailService.page(page, lambdaQueryWrapper); | |
143 | + return getMpDataTable(iPage.getRecords(),iPage.getTotal()); | |
144 | + } else { | |
145 | + List<InventoryDetail> list = inventoryDetailService.list(lambdaQueryWrapper); | |
146 | + return getDataTable(list); | |
147 | + } | |
148 | + } | |
149 | + | |
102 | 150 | /**库存明细出库查看*/ |
103 | 151 | //@RequiresPermissions("inventory:inventoryHeader:seeOut") |
104 | 152 | @PostMapping("/detailcreateCheckOutTask") |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -12,6 +12,8 @@ import com.huaheng.pc.config.container.domain.Container; |
12 | 12 | import com.huaheng.pc.config.container.service.ContainerService; |
13 | 13 | import com.huaheng.pc.config.location.domain.Location; |
14 | 14 | import com.huaheng.pc.config.location.service.LocationService; |
15 | +import com.huaheng.pc.inventory.cycleCountDetail.domain.CycleCountDetail; | |
16 | +import com.huaheng.pc.inventory.cycleCountDetail.service.CycleCountDetailService; | |
15 | 17 | import com.huaheng.pc.inventory.cycleCountHeader.domain.CycleCountHeader; |
16 | 18 | import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; |
17 | 19 | import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService; |
... | ... | @@ -38,6 +40,7 @@ import com.huaheng.pc.shipment.shipmentHeader.service.ShipmentHeaderService; |
38 | 40 | import com.huaheng.pc.task.taskDetail.domain.TaskDetail; |
39 | 41 | import com.huaheng.pc.task.taskDetail.service.TaskDetailService; |
40 | 42 | import com.huaheng.pc.task.taskHeader.domain.ShipmentTaskCreateModel; |
43 | +import org.apache.poi.ss.formula.functions.T; | |
41 | 44 | import org.jsoup.helper.DataUtil; |
42 | 45 | import org.springframework.stereotype.Service; |
43 | 46 | import java.math.BigDecimal; |
... | ... | @@ -87,8 +90,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
87 | 90 | private ShipmentHeaderService shipmentHeaderService; |
88 | 91 | @Resource |
89 | 92 | private ShipmentDetailService shipmentDetailService; |
90 | - | |
91 | - | |
93 | + @Resource | |
94 | + private CycleCountDetailService cycleCountDetailService; | |
92 | 95 | @Resource |
93 | 96 | private ReceiptContainerHeaderService receiptContainerHeaderService; |
94 | 97 | @Resource |
... | ... | @@ -104,11 +107,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
104 | 107 | return taskHeaderMapper.UncompleteCount(ContainerCode, ShiroUtils.getWarehouseCode()); |
105 | 108 | } |
106 | 109 | |
107 | - | |
108 | 110 | /** |
109 | 111 | * 取消任务 |
110 | 112 | * */ |
111 | - | |
112 | 113 | @Override |
113 | 114 | @Transactional |
114 | 115 | public AjaxResult cancelTask(Integer[] taskIds) { |
... | ... | @@ -120,6 +121,17 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
120 | 121 | if(taskHeader.getStatus() > 9){ |
121 | 122 | return AjaxResult.error("存在任务"+taskHeader.getId()+"已下发或执行,操作中止"); |
122 | 123 | } |
124 | + //查出任务明细 | |
125 | + TaskDetail taskDetail1 = new TaskDetail(); | |
126 | + taskDetail1.setTaskId(taskHeader.getId()); | |
127 | + taskDetail1.setWarehouseCode(taskHeader.getWarehouseCode()); | |
128 | + taskDetail1.setCompanyCode(taskHeader.getCompanyCode()); | |
129 | + LambdaQueryWrapper<TaskDetail> td = Wrappers.lambdaQuery(taskDetail1); | |
130 | + List<TaskDetail> taskDetailList = taskDetailService.list(td); | |
131 | + TaskDetail taskDetail = taskDetailList.get(0); | |
132 | + if(taskDetail == null){ | |
133 | + throw new ServiceException("任务明细条目错误"); | |
134 | + } | |
123 | 135 | //删除子任务 |
124 | 136 | LambdaQueryWrapper<TaskDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); |
125 | 137 | lambdaQueryWrapper.eq(TaskDetail::getTaskId,taskHeader.getId()); |
... | ... | @@ -142,13 +154,28 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
142 | 154 | shipmentContainerHeader.setStatus(0); |
143 | 155 | shipmentContainerHeaderService.updateById(shipmentContainerHeader); |
144 | 156 | } |
145 | -// if(taskHeader.getInternalTaskType() == 700) { | |
146 | -// CycleCountHeader cycleCountHeader = new CycleCountHeader(); | |
147 | -// cycleCountHeader.setId(task.getAllocationHeadId()); | |
148 | -// cycleCountHeader.setLastUpdated(new Date()); | |
149 | -// cycleCountHeader.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
150 | -// cyclecountDetailService.updateByModel(cyclecountDetail); | |
151 | -// } | |
157 | + //盘点取消任务,恢复明细状态为1 | |
158 | + if(taskHeader.getInternalTaskType() == 700) { | |
159 | + | |
160 | + CycleCountDetail cycleCountDetail = new CycleCountDetail(); | |
161 | + cycleCountDetail.setCompanyCode(taskDetail.getCompanyCode()); | |
162 | + cycleCountDetail.setWarehouseCode(taskDetail.getWarehouseCode()); | |
163 | + cycleCountDetail.setLocationCode(taskDetail.getFromLocation()); | |
164 | + cycleCountDetail.setContainerCode(taskDetail.getContainerCode()); | |
165 | + cycleCountDetail.setCycleCountHeadCode(taskDetail.getBillCode());//盘点单Code | |
166 | + cycleCountDetail.setId(taskDetail.getBillDetailId());//盘点细单ID | |
167 | + LambdaQueryWrapper<CycleCountDetail> lam = Wrappers.lambdaQuery(cycleCountDetail); | |
168 | + List<CycleCountDetail> cycleCountDetailList = cycleCountDetailService.list(lam);// | |
169 | + for(CycleCountDetail item:cycleCountDetailList){ | |
170 | + item.setTaskHeaderId(null); | |
171 | + item.setTaskHeaderId(null); | |
172 | + item.setLastUpdated(new Date()); | |
173 | + item.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
174 | + item.setEnableStatus(1); | |
175 | + cycleCountDetailService.saveOrUpdate(item); | |
176 | + } | |
177 | + | |
178 | + } | |
152 | 179 | if(taskHeader.getInternalTaskType()==100||taskHeader.getInternalTaskType()==200){ |
153 | 180 | if(taskHeader.getToLocation()!=null){ |
154 | 181 | //更新托盘、库位状态 |
... | ... | @@ -682,7 +709,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
682 | 709 | * @param task |
683 | 710 | */ |
684 | 711 | @Transactional |
685 | - private void completeTransferTask(TaskHeader task) { | |
712 | + public void completeTransferTask(TaskHeader task) { | |
686 | 713 | //找到任务明细 |
687 | 714 | TaskDetail taskDetail = new TaskDetail(); |
688 | 715 | taskDetail.setTaskId(task.getId()); |
... | ... | @@ -899,13 +926,14 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
899 | 926 | if (taskDetailService.saveOrUpdateBatch(taskDetailList) == false || taskHeaderService.saveOrUpdate(taskHeader) == false) { |
900 | 927 | throw new ServiceException("任务单据状态更新失败!"); |
901 | 928 | } |
902 | - //盘点完成时,修改盘点详细中的状态为100,容器恢复为空 | |
929 | + //盘点完成时,修改盘点详细中的状态为100,容器恢复为空,库存解锁 | |
903 | 930 | if (taskHeader.getTaskType() == 700) { |
904 | 931 | /*CyclecountDetail cyclecountDetai = cyclecountDetailService.selectEntityById( |
905 | 932 | task.getAllocationHeadId()); |
906 | 933 | cyclecountDetai.setStatus(40); |
907 | 934 | cyclecountDetailService.updateByModel(cyclecountDetai); |
908 | 935 | containerService.updateStatus(task.getContainerCode(),"empty");*/ |
936 | + | |
909 | 937 | } |
910 | 938 | //释放库位状态 |
911 | 939 | locationService.updateStatus(taskHeader.getFromLocation(), "empty"); |
... | ... | @@ -1061,11 +1089,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1061 | 1089 | return AjaxResult.success("生成上架任务成功!"); |
1062 | 1090 | } |
1063 | 1091 | |
1064 | - | |
1065 | - | |
1066 | - | |
1067 | - | |
1068 | - | |
1069 | 1092 | /** |
1070 | 1093 | * |
1071 | 1094 | * 完成出库任务 |
... | ... | @@ -1216,4 +1239,19 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1216 | 1239 | } |
1217 | 1240 | |
1218 | 1241 | |
1242 | + | |
1243 | + | |
1244 | + | |
1245 | + | |
1246 | + | |
1247 | + | |
1248 | + | |
1249 | + | |
1250 | + | |
1251 | + | |
1252 | + | |
1253 | + | |
1254 | + | |
1255 | + | |
1256 | + | |
1219 | 1257 | } |
... | ... |
src/main/resources/mybatis/inventory/CycleCountDetailMapper.xml
... | ... | @@ -4,6 +4,7 @@ |
4 | 4 | <resultMap id="BaseResultMap" type="com.huaheng.pc.inventory.cycleCountDetail.domain.CycleCountDetail"> |
5 | 5 | <!--@mbg.generated--> |
6 | 6 | <id column="id" jdbcType="INTEGER" property="id" /> |
7 | + <result column="cycleCountHeadCode" jdbcType="VARCHAR" property="cycleCountHeadCode" /> | |
7 | 8 | <result column="countId" jdbcType="INTEGER" property="countId" /> |
8 | 9 | <result column="round" jdbcType="INTEGER" property="round" /> |
9 | 10 | <result column="taskHeaderId" jdbcType="INTEGER" property="taskHeaderId" /> |
... | ... | @@ -44,7 +45,7 @@ |
44 | 45 | </resultMap> |
45 | 46 | <sql id="Base_Column_List"> |
46 | 47 | <!--@mbg.generated--> |
47 | - id, countId, round, taskHeaderId, taskDetailId, warehouseCode, inventoryDetailId, | |
48 | + id, countId, cycleCountHeadCode, round, taskHeaderId, taskDetailId, warehouseCode, inventoryDetailId, | |
48 | 49 | locationCode, containerCode, materialCode, materialName, materialSpec, materialUnit, |
49 | 50 | companyCode, inventorySts, systemQty, countedQty, gapQty, rejectionNote, countedBy, |
50 | 51 | countedAt, assignedTo, assignedAt, completedBy, completedAt, enableStatus, created, |
... | ... |
src/main/resources/templates/inventory/cycleCountDetail/add.html
... | ... | @@ -11,45 +11,70 @@ |
11 | 11 | <input type="hidden" id="cycleCountHeadId" name="cycleCountHeadId" th:value="${cycleCountHeadId}"> |
12 | 12 | <div class="select-list"> |
13 | 13 | <ul> |
14 | - <li> | |
15 | - 货主编码:<input type="text" id="companyCode" name="companyCode" th:value="${companyCode}" readonly="readonly"/> | |
16 | - </li> | |
17 | - <li> | |
18 | - 库位编码:<input type="text" id="locationCode" name="locationCode"/> | |
19 | - </li> | |
20 | - <li> | |
21 | - 容器编号:<input type="text" id="containerCode" name="containerCode"/> | |
22 | - </li> | |
23 | - <li> | |
24 | - 存货编码:<input type="text" id="materialCode" name="materialCode"/> | |
25 | - </li> | |
26 | - <li> | |
27 | - 物料名称:<input type="text" id="materialName" name="materialName"/> | |
28 | - </li> | |
29 | - <!--<li> | |
30 | - 物料规格:<input type="text" name="materialSpec"/> | |
31 | - </li>--> | |
14 | + <ul> | |
15 | + <li> | |
16 | + 库存头ID:<input id="inventoryHeaderId" type="text" name="inventoryHeaderId"/> | |
17 | + </li> | |
18 | + <li> | |
19 | + 库位编号:<input id="locationCode" type="text" name="locationCode"/> | |
20 | + </li> | |
21 | + <li> | |
22 | + 容器编号:<input id="containerCode" type="text" name="containerCode"/> | |
23 | + </li> | |
24 | + <li> | |
25 | + 物料编码:<input type="text" name="materialCode"/> | |
26 | + </li> | |
27 | + <li> | |
28 | + 物料名称:<input type="text" name="materialName"/> | |
29 | + </li> | |
30 | + <li> | |
31 | + 物料规格:<input type="text" name="materialSpec"/> | |
32 | + </li> | |
33 | + <li> | |
34 | + 库存状态: | |
35 | + <select name="inventorySts" th:with="inventoryStatus=${@dict.getType('inventoryStatus')}"> | |
36 | + <option value="">所有</option> | |
37 | + <option th:each="e : ${inventoryStatus}" th:text="${e['dictLabel']}" | |
38 | + th:value="${e['dictValue']}"></option> | |
39 | + </select> | |
40 | + </li> | |
41 | + <li> | |
42 | + 供应商编码:<input type="text" name="supplierCode"/> | |
43 | + </li> | |
44 | + <li> | |
45 | + 货主编码:<input type="text" name="companyCode"/> | |
46 | + </li> | |
47 | + <li> | |
48 | + 上游单号:<input type="text" name="referCode"/> | |
49 | + </li> | |
50 | + <li> | |
51 | + 上游行号:<input type="text" name="referDetailId"/> | |
52 | + </li> | |
53 | + <li> | |
54 | + 入库编码:<input type="text" name="receiptCode"/> | |
55 | + </li> | |
56 | + <li> | |
57 | + 入库明细ID:<input type="text" name="receiptDetailId"/> | |
58 | + </li> | |
32 | 59 | |
60 | + <li> | |
61 | + 项 目 号:<input type="text" name="projectNo"/> | |
62 | + </li> | |
63 | + <li> | |
64 | + 批 次:<input type="text" name="batch"/> | |
65 | + </li> | |
66 | + <li> | |
67 | + 批 号:<input type="text" name="lot"/> | |
68 | + </li> | |
33 | 69 | |
34 | - <li> | |
35 | - 供 应 商:<input type="text" name="supplierCode"/> | |
36 | - </li> | |
37 | - <!--<li> | |
38 | - 库存状态: | |
39 | - <select id="status" name="status" th:with="inventoryStatus=${@dict.getType('inventoryStatus')}"> | |
40 | - <option value="">所有</option> | |
41 | - <option th:each="e : ${inventoryStatus}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option> | |
42 | - </select> | |
43 | - </li>--> | |
44 | - <li> | |
45 | - 项 目 号:<input type="text" id="project" name="project"/> | |
46 | - </li> | |
47 | - <li class="time"> | |
48 | - <label>创建时间: </label> | |
49 | - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/> | |
50 | - <span>-</span> | |
51 | - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/> | |
52 | - </li> | |
70 | + <li class="time" style="height:30px"> | |
71 | + <label>创建时间: </label> | |
72 | + <input type="text" class="time-input" id="startTime" placeholder="开始时间" | |
73 | + name="params[createdBegin]"/> | |
74 | + <span>-</span> | |
75 | + <input type="text" class="time-input" id="endTime" placeholder="结束时间" | |
76 | + name="params[createdEnd]"/> | |
77 | + </li> | |
53 | 78 | <li> |
54 | 79 | <a id="search" class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
55 | 80 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="general:inventoryHeader:export"><i class="fa fa-download"></i> 导出</a>--> |
... | ... | @@ -76,7 +101,7 @@ |
76 | 101 | var inventoryStatus=[[${@dict.getType('inventoryStatus')}]]; |
77 | 102 | $(function() { |
78 | 103 | $("#bootstrap-table").bootstrapTable({ |
79 | - url: prefix + "/inventoryDetailLook", | |
104 | + url: prefix + "/inventoryCycleCountLook", | |
80 | 105 | method:"post", |
81 | 106 | contentType: "application/x-www-form-urlencoded", |
82 | 107 | cache: false, // 是否使用缓存 |
... | ... | @@ -323,7 +348,7 @@ |
323 | 348 | success : function(data) { |
324 | 349 | if(data.code=="200"){ |
325 | 350 | $.modal.alertSuccess("成功"); |
326 | - parent.update(); | |
351 | + parent.$.table.refresh(); | |
327 | 352 | }else{ |
328 | 353 | $.modal.alertError(data.msg) |
329 | 354 | } |
... | ... |
src/main/resources/templates/inventory/cycleCountDetail/cycleCountDetail.html
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 | <ul> |
11 | 11 | <li> |
12 | 12 | <form id="cycleHeader-form"> |
13 | - 盘点主ID:<input type="text" id="cycleCountHeadId" name="cycleCountHeadId" readonly="readonly" /> | |
13 | + 盘点主ID:<input type="text" id="cycleCountHeadCode" name="cycleCountHeadCode" readonly="readonly" /> | |
14 | 14 | </form> |
15 | 15 | </li> |
16 | 16 | <li> |
... | ... | @@ -88,17 +88,17 @@ |
88 | 88 | shiro:hasPermission="inventory:cycleCountDetail:add"> |
89 | 89 | <i class="fa fa-plus"></i> 新增 |
90 | 90 | </a> |
91 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="createCyclecountWithGapQty()" | |
91 | + <!--<a class="btn btn-outline btn-danger btn-rounded" onclick="createCyclecountWithGapQty()" | |
92 | 92 | shiro:hasPermission="inventory:cyclecountDetail:cyclecountRepeat"> |
93 | 93 | <i class="fa fa-vcard"></i> 差异复盘 |
94 | - </a> | |
94 | + </a>--> | |
95 | 95 | <a class="btn btn-outline btn-danger btn-rounded" onclick="outcheckAll()" |
96 | 96 | shiro:hasPermission="inventory:cyclecountDetail:createTask"> |
97 | 97 | <i class="fa fa-vcard"></i> 生成全部盘点任务 |
98 | 98 | </a> |
99 | 99 | <a class="btn btn-outline btn-danger btn-rounded" onclick="batRemove()" |
100 | 100 | shiro:hasPermission="inventory:cyclecountDetail:remove"> |
101 | - <i class="fa fa-trash-o"></i> 删除 | |
101 | + <i class="fa fa-trash-o"></i> 批量删除 | |
102 | 102 | </a> |
103 | 103 | <a class="btn btn-outline btn-success btn-rounded" onclick="$.table.refresh()"> |
104 | 104 | <i class="fa fa-refresh"></i> 刷新 |
... | ... | @@ -147,8 +147,8 @@ |
147 | 147 | sortable:true |
148 | 148 | }, |
149 | 149 | { |
150 | - field: 'cycleCountHeadId', | |
151 | - title: '盘点主单ID', | |
150 | + field: 'cycleCountHeadCode', | |
151 | + title: '盘点主单编码', | |
152 | 152 | }, |
153 | 153 | { |
154 | 154 | field: 'warehouseCode', |
... | ... | @@ -330,11 +330,11 @@ |
330 | 330 | },url = location.search; //获取url中"?"符后的字串 |
331 | 331 | if (url.indexOf("?") != -1) { //判断是否有参数 |
332 | 332 | let strs = url.substr(1).split("="); |
333 | - $("#cycleCountHeadId").val(strs[1]); | |
333 | + $("#cycleCountHeadCode").val(strs[1]); | |
334 | 334 | options.queryParams=function(params) { |
335 | 335 | return { |
336 | 336 | // 传递参数查询参数 |
337 | - cycleCountHeadId:strs[1], | |
337 | + cycleCountHeadCode:strs[1], | |
338 | 338 | pageSize: params.limit, |
339 | 339 | pageNum: params.offset / params.limit + 1, |
340 | 340 | searchValue: params.search, |
... | ... | @@ -349,10 +349,10 @@ |
349 | 349 | } |
350 | 350 | } |
351 | 351 | function add() { |
352 | - var cycleCountHeadId = $('#cycleCountHeadId').val(); | |
353 | - var companyCode = $('#companyCode').val(); | |
354 | - if(cycleCountHeadId !=null && cycleCountHeadId!="" && cycleCountHeadId!=undefined){ | |
355 | - open("添加盘点明细", prefix+"/add?cycleCountHeadId=" + cycleCountHeadId); | |
352 | + var cycleCountHeadCode = $('#cycleCountHeadCode').val(); | |
353 | + //var companyCode = $('#companyCode').val(); | |
354 | + if(cycleCountHeadCode !=null && cycleCountHeadCode!="" && cycleCountHeadCode!=undefined){ | |
355 | + open("添加盘点明细", prefix+"/add?cycleCountHeadCode=" + cycleCountHeadCode); | |
356 | 356 | } |
357 | 357 | } |
358 | 358 | function remove(id) { |
... | ... | @@ -538,7 +538,7 @@ |
538 | 538 | function comfirmAllWithNoGapQty() { |
539 | 539 | $.modal.confirm("确认全部无差异登记么?注意这会覆盖先前登记的信息。", function() { |
540 | 540 | var url = prefix + "/comfirmAllWithNoGapQty"; |
541 | - var data = { "cycleCountHeadId": $('#cycleCountHeadId').val() }; | |
541 | + var data = { "cycleCountHeadCode": $('#cycleCountHeadCode').val() }; | |
542 | 542 | postInner(url, data); |
543 | 543 | }); |
544 | 544 | } |
... | ... | @@ -549,7 +549,7 @@ |
549 | 549 | /* function comfirmRemainWithNoGapQty() { |
550 | 550 | $.modal.confirm("确认剩余无差异登记么?", function() { |
551 | 551 | var url = prefix + "/comfirmRemainWithNoGapQty"; |
552 | - var data = { "cycleCountHeadId": $('#cycleCountHeadId').val() }; | |
552 | + var data = { "cycleCountHeadCode": $('#cycleCountHeadCode').val() }; | |
553 | 553 | postInner(url, data); |
554 | 554 | }); |
555 | 555 | }*/ |
... | ... | @@ -560,7 +560,7 @@ |
560 | 560 | function createCyclecountWithGapQty() { |
561 | 561 | $.modal.confirm("确认进行差异复盘么?该操作会将有差异的明细重新生成一个新的盘点单。", function() { |
562 | 562 | var url = prefix + "/createCyclecountWithGapQty"; |
563 | - var data = { "cycleCountHeadId": $('#cycleCountHeadId').val() }; | |
563 | + var data = { "cycleCountHeadCode": $('#cycleCountHeadCode').val() }; | |
564 | 564 | postInner(url, data); |
565 | 565 | }); |
566 | 566 | } |
... | ... | @@ -569,7 +569,7 @@ |
569 | 569 | /* function adjust() { |
570 | 570 | $.modal.confirm("注意:该操作将更改库存,当实盘数量为0且库位上只剩空容器时,请手动执行空托出库任务,容器上有货则无需其他操作!", function() { |
571 | 571 | var url = prefix + "/adjust"; |
572 | - var data = { "cycleCountHeadId": $('#cycleCountHeadId').val() }; | |
572 | + var data = { "cycleCountHeadCode": $('#cycleCountHeadCode').val() }; | |
573 | 573 | postInner(url,data); |
574 | 574 | }); |
575 | 575 | }*/ |
... | ... | @@ -603,7 +603,7 @@ |
603 | 603 | function outcheckAll() { |
604 | 604 | $.modal.confirm("确认进行盘点任务生成么?注意,这将会使未生成盘点任务的明细生成盘点任务!", function() { |
605 | 605 | var url = prefix + "/createCycleCountTaskByHeadId"; |
606 | - var data = { "cycleCountHeadId": $('#cycleCountHeadId').val() }; | |
606 | + var data = { "cycleCountHeadCode": $('#cycleCountHeadCode').val() }; | |
607 | 607 | postInner(url,data); |
608 | 608 | }); |
609 | 609 | } |
... | ... |
src/main/resources/templates/task/taskHeader/taskHeader.html