Commit a3f18d143f5f53987ab190a61bb9f817aff16fe1
1 parent
c7b3407f
fix:1.生产指示书对于内部,无法查看生产科单价。
2.业务研发利润表中的包装费用表,添加跟单提成。 3.业务研发底下的四个表添加未完成状态筛选。
Showing
10 changed files
with
180 additions
and
36 deletions
src/main/java/com/order/erp/common/utils/EasyPdfUtils.java
@@ -420,8 +420,13 @@ public class EasyPdfUtils { | @@ -420,8 +420,13 @@ public class EasyPdfUtils { | ||
420 | } | 420 | } |
421 | dataCellList.add(createCell(productionDepartmentConsignTime, 110F)); | 421 | dataCellList.add(createCell(productionDepartmentConsignTime, 110F)); |
422 | dataCellList.add(createCell(StringUtils.isNotEmpty(producePdfVO.getPacketType()) ? producePdfVO.getPacketType() : "", 80F)); | 422 | dataCellList.add(createCell(StringUtils.isNotEmpty(producePdfVO.getPacketType()) ? producePdfVO.getPacketType() : "", 80F)); |
423 | - dataCellList.add(createCell(Objects.nonNull(producePdfVO.getProductionDepartmentPrice()) ? "" + "¥"+producePdfVO.getProductionDepartmentPrice() : "", 110F)); | ||
424 | - dataCellList.add(createCell(Objects.nonNull(producePdfVO.getProductionDepartmentTotalPrice()) ? "" + "¥"+producePdfVO.getProductionDepartmentTotalPrice() : "", 110F)); | 423 | + if(!"内部".equals(producePdfVO.getProductionDepartment())){ |
424 | + dataCellList.add(createCell(Objects.nonNull(producePdfVO.getProductionDepartmentPrice()) ? "" + "¥"+producePdfVO.getProductionDepartmentPrice() : "", 110F)); | ||
425 | + dataCellList.add(createCell(Objects.nonNull(producePdfVO.getProductionDepartmentTotalPrice()) ? "" + "¥"+producePdfVO.getProductionDepartmentTotalPrice() : "", 110F)); | ||
426 | + }else{ | ||
427 | + dataCellList.add(createCell( "无权限", 110F)); | ||
428 | + dataCellList.add(createCell( "无权限", 110F)); | ||
429 | + } | ||
425 | rowList.add(XEasyPdfHandler.Table.Row.build(dataCellList)); | 430 | rowList.add(XEasyPdfHandler.Table.Row.build(dataCellList)); |
426 | } | 431 | } |
427 | 432 | ||
@@ -442,7 +447,11 @@ public class EasyPdfUtils { | @@ -442,7 +447,11 @@ public class EasyPdfUtils { | ||
442 | endCellList.add(createCell("", 110F)); | 447 | endCellList.add(createCell("", 110F)); |
443 | endCellList.add(createCell("", 80F)); | 448 | endCellList.add(createCell("", 80F)); |
444 | endCellList.add(createCell("", 110F)); | 449 | endCellList.add(createCell("", 110F)); |
450 | + if("内部".equals(pdfVOList.get(0).getProductionDepartment())){ | ||
451 | + endCellList.add(createCell("无权限" , 110F, 16F)); | ||
452 | + }else{ | ||
445 | endCellList.add(createCell("¥" + totalPrice, 110F, 16F)); | 453 | endCellList.add(createCell("¥" + totalPrice, 110F, 16F)); |
454 | + } | ||
446 | rowList.add(XEasyPdfHandler.Table.Row.build(endCellList)); | 455 | rowList.add(XEasyPdfHandler.Table.Row.build(endCellList)); |
447 | } | 456 | } |
448 | 457 |
src/main/java/com/order/erp/domain/dto/order/OrderCostInfoDO.java
@@ -41,6 +41,8 @@ public class OrderCostInfoDO extends BaseDO implements Serializable { | @@ -41,6 +41,8 @@ public class OrderCostInfoDO extends BaseDO implements Serializable { | ||
41 | private BigDecimal productionDepartmentPredictPrice; | 41 | private BigDecimal productionDepartmentPredictPrice; |
42 | 42 | ||
43 | private BigDecimal productionActualPrice; | 43 | private BigDecimal productionActualPrice; |
44 | + //包装费用明细表中的跟单评分。 (1-100分) | ||
45 | + private Integer orderScore; | ||
44 | 46 | ||
45 | private BigDecimal packetActualRmbTotalPrice; | 47 | private BigDecimal packetActualRmbTotalPrice; |
46 | //生产科预算单价 | 48 | //生产科预算单价 |
src/main/java/com/order/erp/domain/vo/order/BusinessProfitDetailVO.java
@@ -87,6 +87,16 @@ public class BusinessProfitDetailVO implements Serializable { | @@ -87,6 +87,16 @@ public class BusinessProfitDetailVO implements Serializable { | ||
87 | */ | 87 | */ |
88 | @ApiModelProperty(value = "包装费用实际金额(人民币)") | 88 | @ApiModelProperty(value = "包装费用实际金额(人民币)") |
89 | private BigDecimal packetActualRmbTotalPrice; | 89 | private BigDecimal packetActualRmbTotalPrice; |
90 | + /** | ||
91 | + * 跟单评分 | ||
92 | + * */ | ||
93 | + @ApiModelProperty(value = "跟单评分") | ||
94 | + private Integer orderScore; | ||
95 | + /** | ||
96 | + * 跟单金额。 | ||
97 | + * */ | ||
98 | + @ApiModelProperty(value = "跟单提成(人民币)") | ||
99 | + private BigDecimal copyCommission; | ||
90 | 100 | ||
91 | /** | 101 | /** |
92 | * 实际跟单单价¥ | 102 | * 实际跟单单价¥ |
src/main/java/com/order/erp/domain/vo/order/OrderBaseInfoQueryVO.java
@@ -26,6 +26,10 @@ public class OrderBaseInfoQueryVO extends BasePageVO implements Serializable { | @@ -26,6 +26,10 @@ public class OrderBaseInfoQueryVO extends BasePageVO implements Serializable { | ||
26 | private List<Long> ids; | 26 | private List<Long> ids; |
27 | 27 | ||
28 | private Set<Long> orderIds; | 28 | private Set<Long> orderIds; |
29 | + /** | ||
30 | + * 查询不通过的订单。 | ||
31 | + * */ | ||
32 | + private Set<Long> notInOrderIds; | ||
29 | 33 | ||
30 | 34 | ||
31 | private Long id; | 35 | private Long id; |
@@ -232,5 +236,10 @@ public class OrderBaseInfoQueryVO extends BasePageVO implements Serializable { | @@ -232,5 +236,10 @@ public class OrderBaseInfoQueryVO extends BasePageVO implements Serializable { | ||
232 | * 业务研发以及内部生产表中的前缀项目号 | 236 | * 业务研发以及内部生产表中的前缀项目号 |
233 | * */ | 237 | * */ |
234 | private Set<String> projectNoPrefixSet; | 238 | private Set<String> projectNoPrefixSet; |
239 | + | ||
240 | + /** | ||
241 | + * 控制mapper.xml文件中查询分支的判断依据。 | ||
242 | + * */ | ||
243 | + private Boolean isFinish; | ||
235 | } | 244 | } |
236 | 245 |
src/main/java/com/order/erp/domain/vo/order/OrderCostInfoVO.java
@@ -45,7 +45,8 @@ public class OrderCostInfoVO implements Serializable { | @@ -45,7 +45,8 @@ public class OrderCostInfoVO implements Serializable { | ||
45 | private Integer orderCount; | 45 | private Integer orderCount; |
46 | //单价 之前前端是传递productionDepartmentPredictPrice,现在改为传递单价,所以传递productionDepartmentPredictUnitPrice。 | 46 | //单价 之前前端是传递productionDepartmentPredictPrice,现在改为传递单价,所以传递productionDepartmentPredictUnitPrice。 |
47 | private BigDecimal productionDepartmentPredictUnitPrice; | 47 | private BigDecimal productionDepartmentPredictUnitPrice; |
48 | - | 48 | + //包装费用明细表中的跟单评分。 (1-100分) |
49 | + private Integer orderScore; | ||
49 | //内部生产费用明细表状态。 | 50 | //内部生产费用明细表状态。 |
50 | private Integer innerProduceStatus; | 51 | private Integer innerProduceStatus; |
51 | //包装费用费用明细表状态。 | 52 | //包装费用费用明细表状态。 |
src/main/java/com/order/erp/domain/vo/order/OrderCostInfolockFieldVO.java
@@ -41,6 +41,10 @@ public class OrderCostInfolockFieldVO implements Serializable { | @@ -41,6 +41,10 @@ public class OrderCostInfolockFieldVO implements Serializable { | ||
41 | 41 | ||
42 | private String packetActualRmbTotalPrice; | 42 | private String packetActualRmbTotalPrice; |
43 | /** | 43 | /** |
44 | + * 跟单评分 | ||
45 | + * */ | ||
46 | + private String orderScore; | ||
47 | + /** | ||
44 | * 生产科预算单价。 | 48 | * 生产科预算单价。 |
45 | * */ | 49 | * */ |
46 | private String productionDepartmentPredictUnitPrice; | 50 | private String productionDepartmentPredictUnitPrice; |
src/main/java/com/order/erp/service/order/impl/OrderBaseInfoServiceImpl.java
@@ -1607,6 +1607,7 @@ end | @@ -1607,6 +1607,7 @@ end | ||
1607 | .ge(StringUtils.isNotBlank(queryVO.getOrderHodStartTime()), OrderBaseInfoDO::getOrderHodTime, queryVO.getOrderHodStartTime()) | 1607 | .ge(StringUtils.isNotBlank(queryVO.getOrderHodStartTime()), OrderBaseInfoDO::getOrderHodTime, queryVO.getOrderHodStartTime()) |
1608 | .le(StringUtils.isNotBlank(queryVO.getOrderHodEndTime()), OrderBaseInfoDO::getOrderHodTime, queryVO.getOrderHodEndTime()) | 1608 | .le(StringUtils.isNotBlank(queryVO.getOrderHodEndTime()), OrderBaseInfoDO::getOrderHodTime, queryVO.getOrderHodEndTime()) |
1609 | .in(CollectionUtils.isNotEmpty(queryVO.getOrderIds()), OrderBaseInfoDO::getId, queryVO.getOrderIds()) | 1609 | .in(CollectionUtils.isNotEmpty(queryVO.getOrderIds()), OrderBaseInfoDO::getId, queryVO.getOrderIds()) |
1610 | + .notIn(CollectionUtils.isNotEmpty(queryVO.getNotInOrderIds()), OrderBaseInfoDO::getId, queryVO.getNotInOrderIds()) | ||
1610 | .in(CollectionUtils.isNotEmpty(queryVO.getInvoiceNo()),OrderBaseInfoDO::getInvoiceNo,queryVO.getInvoiceNo()) | 1611 | .in(CollectionUtils.isNotEmpty(queryVO.getInvoiceNo()),OrderBaseInfoDO::getInvoiceNo,queryVO.getInvoiceNo()) |
1611 | .in(CollectionUtils.isNotEmpty(queryVO.getCheckNo()),OrderBaseInfoDO::getCheckNo,queryVO.getCheckNo()) | 1612 | .in(CollectionUtils.isNotEmpty(queryVO.getCheckNo()),OrderBaseInfoDO::getCheckNo,queryVO.getCheckNo()) |
1612 | .eq(Objects.nonNull(queryVO.getInvoiceStatus()), OrderBaseInfoDO::getInvoiceStatus, queryVO.getInvoiceStatus()) | 1613 | .eq(Objects.nonNull(queryVO.getInvoiceStatus()), OrderBaseInfoDO::getInvoiceStatus, queryVO.getInvoiceStatus()) |
src/main/java/com/order/erp/service/order/impl/OrderCostInfoServiceImpl.java
@@ -21,6 +21,7 @@ import com.order.erp.common.utils.*; | @@ -21,6 +21,7 @@ import com.order.erp.common.utils.*; | ||
21 | import com.order.erp.config.DataScope; | 21 | import com.order.erp.config.DataScope; |
22 | import com.order.erp.domain.*; | 22 | import com.order.erp.domain.*; |
23 | import com.order.erp.domain.dto.BaseDO; | 23 | import com.order.erp.domain.dto.BaseDO; |
24 | +import com.order.erp.domain.dto.SystemSettingDO; | ||
24 | import com.order.erp.domain.dto.order.OrderBaseInfoDO; | 25 | import com.order.erp.domain.dto.order.OrderBaseInfoDO; |
25 | import com.order.erp.domain.dto.order.OrderCostDetailedOptLogDO; | 26 | import com.order.erp.domain.dto.order.OrderCostDetailedOptLogDO; |
26 | import com.order.erp.domain.dto.order.OrderCostInfoDO; | 27 | import com.order.erp.domain.dto.order.OrderCostInfoDO; |
@@ -115,6 +116,7 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | @@ -115,6 +116,7 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | ||
115 | OrderCostInfolockFieldVO originOrderCostInfolockFieldVO = JSONObject.parseObject(Optional.ofNullable(orderCostFieldLockRecord.getFields()).orElse("{}"), OrderCostInfolockFieldVO.class); | 116 | OrderCostInfolockFieldVO originOrderCostInfolockFieldVO = JSONObject.parseObject(Optional.ofNullable(orderCostFieldLockRecord.getFields()).orElse("{}"), OrderCostInfolockFieldVO.class); |
116 | if(Objects.nonNull(vo.getPacketActualRmbTotalPrice())){ | 117 | if(Objects.nonNull(vo.getPacketActualRmbTotalPrice())){ |
117 | originOrderCostInfolockFieldVO.setPacketActualRmbTotalPrice(OrderLockFieldEnum.LOCKED.name()); | 118 | originOrderCostInfolockFieldVO.setPacketActualRmbTotalPrice(OrderLockFieldEnum.LOCKED.name()); |
119 | + originOrderCostInfolockFieldVO.setOrderScore(OrderLockFieldEnum.LOCKED.name()); | ||
118 | type=ProjectOptTypeEnum.PACKAGING_COST_TYPE.getType(); | 120 | type=ProjectOptTypeEnum.PACKAGING_COST_TYPE.getType(); |
119 | operationDesc = isUpdate | 121 | operationDesc = isUpdate |
120 | ? OrderOptTypeEnum.PROJECT_COST_EDIT.getDesc() | 122 | ? OrderOptTypeEnum.PROJECT_COST_EDIT.getDesc() |
@@ -122,7 +124,9 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | @@ -122,7 +124,9 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | ||
122 | //编辑包装费用实际金额之后状态为待审核 | 124 | //编辑包装费用实际金额之后状态为待审核 |
123 | /*需要考虑一个问题,假如状态为已通过,但是没有进行任何的修改而点击了确认,那么它的状态会由已审核变为待审核,所以需要进行判断一下,此次传递来的数据是否与上一次的数据一致,如果不一致则需要进行状态设置*/ | 125 | /*需要考虑一个问题,假如状态为已通过,但是没有进行任何的修改而点击了确认,那么它的状态会由已审核变为待审核,所以需要进行判断一下,此次传递来的数据是否与上一次的数据一致,如果不一致则需要进行状态设置*/ |
124 | if(isUpdate && ProfitStatusEnum.APPROVED.getStatus().equals(oldOrderCostInfoDO.getPackStatus()) | 126 | if(isUpdate && ProfitStatusEnum.APPROVED.getStatus().equals(oldOrderCostInfoDO.getPackStatus()) |
125 | - && vo.getPacketActualRmbTotalPrice().compareTo(oldOrderCostInfoDO.getPacketActualRmbTotalPrice()) == 0){ | 127 | + && vo.getPacketActualRmbTotalPrice().compareTo(oldOrderCostInfoDO.getPacketActualRmbTotalPrice()) == 0 |
128 | + && ( vo.getOrderScore().equals(oldOrderCostInfoDO.getOrderScore())) | ||
129 | + ){ | ||
126 | }else{ | 130 | }else{ |
127 | orderCostInfoDO.setPackStatus(ProfitStatusEnum.PENDING_APPROVAL.getStatus()); | 131 | orderCostInfoDO.setPackStatus(ProfitStatusEnum.PENDING_APPROVAL.getStatus()); |
128 | } | 132 | } |
@@ -167,6 +171,7 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | @@ -167,6 +171,7 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | ||
167 | } | 171 | } |
168 | OrderCostInfolockFieldVO lockField = OrderCostInfolockFieldVO.builder() | 172 | OrderCostInfolockFieldVO lockField = OrderCostInfolockFieldVO.builder() |
169 | .packetActualRmbTotalPrice(vo.getPacketActualRmbTotalPrice()) | 173 | .packetActualRmbTotalPrice(vo.getPacketActualRmbTotalPrice()) |
174 | + .orderScore(vo.getOrderScore()) | ||
170 | .productionActualPrice(vo.getProductionActualPrice()) | 175 | .productionActualPrice(vo.getProductionActualPrice()) |
171 | .productionDepartmentPredictPrice(vo.getProductionDepartmentPredictPrice()) | 176 | .productionDepartmentPredictPrice(vo.getProductionDepartmentPredictPrice()) |
172 | .productionDepartmentPredictUnitPrice(vo.getProductionDepartmentPredictUnitPrice()) | 177 | .productionDepartmentPredictUnitPrice(vo.getProductionDepartmentPredictUnitPrice()) |
@@ -196,10 +201,18 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | @@ -196,10 +201,18 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | ||
196 | @Override | 201 | @Override |
197 | public ServerResult<Page<InnerProfitDetailVO>> listInnerProfitDetailByPage(OrderBaseInfoQueryVO queryVO) { | 202 | public ServerResult<Page<InnerProfitDetailVO>> listInnerProfitDetailByPage(OrderBaseInfoQueryVO queryVO) { |
198 | Set<Long> orderIds = null; | 203 | Set<Long> orderIds = null; |
204 | + Long loginUserId = dataScope.getLoginUserId(); | ||
199 | if(Objects.nonNull(queryVO.getInnerProduceStatus())){ | 205 | if(Objects.nonNull(queryVO.getInnerProduceStatus())){ |
200 | - List<OrderCostInfoDO> list = list(new LambdaQueryWrapper<OrderCostInfoDO>() | ||
201 | - .select(OrderCostInfoDO::getOrderId).eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN) | ||
202 | - .eq(OrderCostInfoDO::getInnerProduceStatus, queryVO.getInnerProduceStatus())); | 206 | + List<OrderCostInfoDO> list; |
207 | + if(ProfitStatusEnum.Not_COMPLETED.getStatus().equals(queryVO.getInnerProduceStatus())){ | ||
208 | + list = list(new LambdaQueryWrapper<OrderCostInfoDO>() | ||
209 | + .select(OrderCostInfoDO::getOrderId).eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN) | ||
210 | + .in(OrderCostInfoDO::getInnerProduceStatus, ProfitStatusEnum.PENDING_APPROVAL.getStatus(), ProfitStatusEnum.APPROVED.getStatus())); | ||
211 | + }else{ | ||
212 | + list = list(new LambdaQueryWrapper<OrderCostInfoDO>() | ||
213 | + .select(OrderCostInfoDO::getOrderId).eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN) | ||
214 | + .eq(OrderCostInfoDO::getInnerProduceStatus, queryVO.getInnerProduceStatus())); | ||
215 | + } | ||
203 | orderIds = CollectionUtils.isEmpty(list) | 216 | orderIds = CollectionUtils.isEmpty(list) |
204 | ? new HashSet<>() | 217 | ? new HashSet<>() |
205 | : list.stream() | 218 | : list.stream() |
@@ -208,7 +221,11 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | @@ -208,7 +221,11 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | ||
208 | .collect(Collectors.toSet()); | 221 | .collect(Collectors.toSet()); |
209 | } | 222 | } |
210 | if(CollectionUtils.isNotEmpty(orderIds)){ | 223 | if(CollectionUtils.isNotEmpty(orderIds)){ |
211 | - queryVO.setOrderIds(orderIds); | 224 | + if(ProfitStatusEnum.Not_COMPLETED.getStatus().equals(queryVO.getInnerProduceStatus())){ |
225 | + queryVO.setNotInOrderIds(orderIds); | ||
226 | + }else{ | ||
227 | + queryVO.setOrderIds(orderIds); | ||
228 | + } | ||
212 | } | 229 | } |
213 | ServerResult serverResult = orderBaseInfoService.listByPage(queryVO); | 230 | ServerResult serverResult = orderBaseInfoService.listByPage(queryVO); |
214 | Page<OrderInfoResultVO> page = (Page<OrderInfoResultVO>) serverResult.getData(); | 231 | Page<OrderInfoResultVO> page = (Page<OrderInfoResultVO>) serverResult.getData(); |
@@ -219,7 +236,7 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | @@ -219,7 +236,7 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | ||
219 | Set<Long> collect = records.stream().map(OrderInfoResultVO::getId).collect(Collectors.toSet()); | 236 | Set<Long> collect = records.stream().map(OrderInfoResultVO::getId).collect(Collectors.toSet()); |
220 | if (CollUtil.isNotEmpty(collect)) { | 237 | if (CollUtil.isNotEmpty(collect)) { |
221 | query.in(OrderCostFieldLockRecord::getOrderId, collect); | 238 | query.in(OrderCostFieldLockRecord::getOrderId, collect); |
222 | - | 239 | + query.eq(OrderCostFieldLockRecord::getUserId, loginUserId); |
223 | } else { | 240 | } else { |
224 | query.apply("1!=1"); | 241 | query.apply("1!=1"); |
225 | } | 242 | } |
@@ -232,7 +249,7 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | @@ -232,7 +249,7 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | ||
232 | } catch (JsonProcessingException e) { | 249 | } catch (JsonProcessingException e) { |
233 | throw new RuntimeException(e); | 250 | throw new RuntimeException(e); |
234 | } | 251 | } |
235 | - })); | 252 | + },(v1, v2) -> v2)); |
236 | List<InnerProfitDetailVO> innerProfitRatioResultVOs = records.stream().map(record -> { | 253 | List<InnerProfitDetailVO> innerProfitRatioResultVOs = records.stream().map(record -> { |
237 | OrderCostInfoVO orderCostInfo = record.getOrderCostInfo(); | 254 | OrderCostInfoVO orderCostInfo = record.getOrderCostInfo(); |
238 | OrderCostInfolockFieldVO lockFields = Optional.ofNullable(orderId2fieldMapMap.get(record.getId())) | 255 | OrderCostInfolockFieldVO lockFields = Optional.ofNullable(orderId2fieldMapMap.get(record.getId())) |
@@ -317,11 +334,19 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | @@ -317,11 +334,19 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | ||
317 | 334 | ||
318 | @Override | 335 | @Override |
319 | public ServerResult<Page<BusinessProfitDetailVO>> listBusinessProfitDetailByPage(OrderBaseInfoQueryVO queryVO) { | 336 | public ServerResult<Page<BusinessProfitDetailVO>> listBusinessProfitDetailByPage(OrderBaseInfoQueryVO queryVO) { |
337 | + Long loginUserId = dataScope.getLoginUserId(); | ||
320 | Set<Long> orderIds=null; | 338 | Set<Long> orderIds=null; |
321 | if(Objects.nonNull(queryVO.getPackStatus())){ | 339 | if(Objects.nonNull(queryVO.getPackStatus())){ |
322 | - List<OrderCostInfoDO> list = list(new LambdaQueryWrapper<OrderCostInfoDO>().select(OrderCostInfoDO::getOrderId) | ||
323 | - .eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN) | ||
324 | - .eq(OrderCostInfoDO::getPackStatus, queryVO.getPackStatus())); | 340 | + List<OrderCostInfoDO> list; |
341 | + if(ProfitStatusEnum.Not_COMPLETED.getStatus().equals(queryVO.getPackStatus())){ | ||
342 | + list = list(new LambdaQueryWrapper<OrderCostInfoDO>().select(OrderCostInfoDO::getOrderId) | ||
343 | + .eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN) | ||
344 | + .in(OrderCostInfoDO::getPackStatus, ProfitStatusEnum.PENDING_APPROVAL.getStatus(), ProfitStatusEnum.APPROVED.getStatus())); | ||
345 | + }else{ | ||
346 | + list = list(new LambdaQueryWrapper<OrderCostInfoDO>().select(OrderCostInfoDO::getOrderId) | ||
347 | + .eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN) | ||
348 | + .eq(OrderCostInfoDO::getPackStatus, queryVO.getPackStatus())); | ||
349 | + } | ||
325 | orderIds = CollectionUtils.isEmpty(list) | 350 | orderIds = CollectionUtils.isEmpty(list) |
326 | ? new HashSet<>() | 351 | ? new HashSet<>() |
327 | : list.stream() | 352 | : list.stream() |
@@ -330,7 +355,11 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | @@ -330,7 +355,11 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | ||
330 | .collect(Collectors.toSet()); | 355 | .collect(Collectors.toSet()); |
331 | } | 356 | } |
332 | if(CollectionUtils.isNotEmpty(orderIds)){ | 357 | if(CollectionUtils.isNotEmpty(orderIds)){ |
333 | - queryVO.setOrderIds(orderIds); | 358 | + if(ProfitStatusEnum.Not_COMPLETED.getStatus().equals(queryVO.getPackStatus())){ |
359 | + queryVO.setNotInOrderIds(orderIds); | ||
360 | + }else{ | ||
361 | + queryVO.setOrderIds(orderIds); | ||
362 | + } | ||
334 | } | 363 | } |
335 | ServerResult serverResult = orderBaseInfoService.listByPage(queryVO); | 364 | ServerResult serverResult = orderBaseInfoService.listByPage(queryVO); |
336 | Page<OrderInfoResultVO> page = (Page<OrderInfoResultVO>) serverResult.getData(); | 365 | Page<OrderInfoResultVO> page = (Page<OrderInfoResultVO>) serverResult.getData(); |
@@ -341,6 +370,7 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | @@ -341,6 +370,7 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | ||
341 | Set<Long> collect = records.stream().map(OrderInfoResultVO::getId).collect(Collectors.toSet()); | 370 | Set<Long> collect = records.stream().map(OrderInfoResultVO::getId).collect(Collectors.toSet()); |
342 | if (CollUtil.isNotEmpty(collect)) { | 371 | if (CollUtil.isNotEmpty(collect)) { |
343 | query.in(OrderCostFieldLockRecord::getOrderId, collect); | 372 | query.in(OrderCostFieldLockRecord::getOrderId, collect); |
373 | + query.eq(OrderCostFieldLockRecord::getUserId, loginUserId); | ||
344 | 374 | ||
345 | } else { | 375 | } else { |
346 | query.apply("1!=1"); | 376 | query.apply("1!=1"); |
@@ -354,9 +384,13 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | @@ -354,9 +384,13 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | ||
354 | } catch (JsonProcessingException e) { | 384 | } catch (JsonProcessingException e) { |
355 | throw new RuntimeException(e); | 385 | throw new RuntimeException(e); |
356 | } | 386 | } |
357 | - })); | 387 | + },(v1, v2) -> v2)); |
358 | BigDecimal exchangeRate = systemSettingService.getExchangeRate(); | 388 | BigDecimal exchangeRate = systemSettingService.getExchangeRate(); |
359 | - | 389 | + //获取所有的客户提成提成配置。 |
390 | + List<SystemSettingDO> systemSettingDOS = systemSettingService.list(new LambdaQueryWrapper<SystemSettingDO>() | ||
391 | + .eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN) | ||
392 | + .eq(SystemSettingDO::getRelationCode, "costSettingItem")); | ||
393 | + Map<String, List<SystemSettingDO>> systemSettingDOSMap = systemSettingDOS.stream().collect(Collectors.groupingBy(SystemSettingDO::getSettingValue)); | ||
360 | List<BusinessProfitDetailVO> innerProfitRatioResultVOs = records.stream().map(record -> { | 394 | List<BusinessProfitDetailVO> innerProfitRatioResultVOs = records.stream().map(record -> { |
361 | OrderCostInfoVO orderCostInfo = record.getOrderCostInfo(); | 395 | OrderCostInfoVO orderCostInfo = record.getOrderCostInfo(); |
362 | OrderCostInfolockFieldVO lockFields = Optional.ofNullable(orderId2fieldMapMap.get(record.getId())).orElse( | 396 | OrderCostInfolockFieldVO lockFields = Optional.ofNullable(orderId2fieldMapMap.get(record.getId())).orElse( |
@@ -366,6 +400,11 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | @@ -366,6 +400,11 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | ||
366 | if(Objects.isNull(lockFields.getPacketActualRmbTotalPrice())){ | 400 | if(Objects.isNull(lockFields.getPacketActualRmbTotalPrice())){ |
367 | lockFields.setPacketActualRmbTotalPrice(Objects.isNull(orderCostInfo) || Objects.isNull(orderCostInfo.getPacketActualRmbTotalPrice()) ? OrderLockFieldEnum.UN_LOCKED.name() : OrderLockFieldEnum.LOCKED.name()); | 401 | lockFields.setPacketActualRmbTotalPrice(Objects.isNull(orderCostInfo) || Objects.isNull(orderCostInfo.getPacketActualRmbTotalPrice()) ? OrderLockFieldEnum.UN_LOCKED.name() : OrderLockFieldEnum.LOCKED.name()); |
368 | } | 402 | } |
403 | + //跟单评分。 | ||
404 | + if(Objects.isNull(lockFields.getOrderScore())){ | ||
405 | + lockFields.setOrderScore(Objects.isNull(orderCostInfo) || Objects.isNull(orderCostInfo.getOrderScore()) ? OrderLockFieldEnum.UN_LOCKED.name() : OrderLockFieldEnum.LOCKED.name()); | ||
406 | + | ||
407 | + } | ||
369 | if(Objects.isNull(lockFields.getProductionActualPrice())){ | 408 | if(Objects.isNull(lockFields.getProductionActualPrice())){ |
370 | lockFields.setProductionActualPrice(Objects.isNull(orderCostInfo) || Objects.isNull(orderCostInfo.getProductionActualPrice()) ? OrderLockFieldEnum.UN_LOCKED.name() : OrderLockFieldEnum.LOCKED.name()); | 409 | lockFields.setProductionActualPrice(Objects.isNull(orderCostInfo) || Objects.isNull(orderCostInfo.getProductionActualPrice()) ? OrderLockFieldEnum.UN_LOCKED.name() : OrderLockFieldEnum.LOCKED.name()); |
371 | } | 410 | } |
@@ -376,6 +415,7 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | @@ -376,6 +415,7 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | ||
376 | lockFields.setPacketActualRmbTotalPrice(OrderLockFieldEnum.UN_LOCKED.name()); | 415 | lockFields.setPacketActualRmbTotalPrice(OrderLockFieldEnum.UN_LOCKED.name()); |
377 | lockFields.setProductionActualPrice(OrderLockFieldEnum.UN_LOCKED.name()); | 416 | lockFields.setProductionActualPrice(OrderLockFieldEnum.UN_LOCKED.name()); |
378 | lockFields.setProductionDepartmentPredictPrice(OrderLockFieldEnum.UN_LOCKED.name()); | 417 | lockFields.setProductionDepartmentPredictPrice(OrderLockFieldEnum.UN_LOCKED.name()); |
418 | + lockFields.setOrderScore(OrderLockFieldEnum.UN_LOCKED.name()); | ||
379 | } | 419 | } |
380 | BusinessProfitDetailVO vo = BusinessProfitDetailVO.builder() | 420 | BusinessProfitDetailVO vo = BusinessProfitDetailVO.builder() |
381 | .orderId(record.getId()) | 421 | .orderId(record.getId()) |
@@ -409,6 +449,35 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | @@ -409,6 +449,35 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | ||
409 | //包装费用净利润率 = 包装费用收益/包装费用合计 | 449 | //包装费用净利润率 = 包装费用收益/包装费用合计 |
410 | vo.setPacketProfitRate(vo.getPacketProfitRmbPrice().divide(BigDecimal.valueOf(vo.getPacketRmbTotalPrice()), 4, RoundingMode.HALF_UP)); | 450 | vo.setPacketProfitRate(vo.getPacketProfitRmbPrice().divide(BigDecimal.valueOf(vo.getPacketRmbTotalPrice()), 4, RoundingMode.HALF_UP)); |
411 | } | 451 | } |
452 | + if(Objects.nonNull(orderCostInfo) && Objects.nonNull(orderCostInfo.getOrderScore())){ | ||
453 | + vo.setOrderScore(orderCostInfo.getOrderScore()); | ||
454 | + String projectFix = ProjectNoUtils.extractProjectNoPrefix(record.getProjectNo()); | ||
455 | + String substring = projectFix.substring(projectFix.lastIndexOf("-") + 1).substring(0, 2); | ||
456 | + Optional<SystemSettingDO> optionalSetting = systemSettingDOSMap.values().stream() | ||
457 | + .flatMap(List::stream) | ||
458 | + .filter(setting -> setting.getSettingValue().equals(record.getCustomerCode())) | ||
459 | + .filter(setting -> setting.getRelationName().substring(2, 4).equals(substring)) | ||
460 | + .findFirst(); | ||
461 | + if(optionalSetting.isPresent()){ | ||
462 | + SystemSettingDO systemSettingDO = optionalSetting.get(); | ||
463 | + List<Map<String,String>> relations=null; | ||
464 | + try { | ||
465 | + relations= objectMapper.readValue(systemSettingDO.getRelationValue(),objectMapper.getTypeFactory().constructType(List.class, Map.class)); | ||
466 | + } catch (JsonProcessingException e) { | ||
467 | + throw new RuntimeException(e); | ||
468 | + } | ||
469 | + String copyCommission= null; | ||
470 | + for(Map<String,String> relation:relations){ | ||
471 | + if("copyCommission".equals(relation.get("relationCode"))){ | ||
472 | + copyCommission = relation.get("relationValue"); | ||
473 | + } | ||
474 | + } | ||
475 | + if(StringUtils.isNotBlank(copyCommission)){ | ||
476 | + //提成金额 = 跟单评分 * 跟单提成计算。 | ||
477 | + vo.setCopyCommission(new BigDecimal(copyCommission) .multiply(BigDecimal.valueOf(orderCostInfo.getOrderScore()).divide(BigDecimal.valueOf(100))).setScale(2, RoundingMode.HALF_UP)); | ||
478 | + } | ||
479 | + } | ||
480 | + } | ||
412 | return vo; | 481 | return vo; |
413 | }).collect(Collectors.toList()); | 482 | }).collect(Collectors.toList()); |
414 | Page<BusinessProfitDetailVO> webVOPage = new Page<>(); | 483 | Page<BusinessProfitDetailVO> webVOPage = new Page<>(); |
@@ -611,6 +680,8 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | @@ -611,6 +680,8 @@ public class OrderCostInfoServiceImpl extends ServiceImpl<OrderCostInfoMapper, O | ||
611 | map.put("实际跟单单价¥",Objects.nonNull(vo.getPacketActualRmbPrice()) ? vo.getPacketActualRmbPrice().setScale(2, RoundingMode.HALF_UP).toPlainString() : ""); | 680 | map.put("实际跟单单价¥",Objects.nonNull(vo.getPacketActualRmbPrice()) ? vo.getPacketActualRmbPrice().setScale(2, RoundingMode.HALF_UP).toPlainString() : ""); |
612 | map.put("实际跟单单价$",Objects.nonNull(vo.getPacketActualPrice()) ? vo.getPacketActualPrice().setScale(2, RoundingMode.HALF_UP).toPlainString() : ""); | 681 | map.put("实际跟单单价$",Objects.nonNull(vo.getPacketActualPrice()) ? vo.getPacketActualPrice().setScale(2, RoundingMode.HALF_UP).toPlainString() : ""); |
613 | map.put("包装费用净利润率",Objects.nonNull(vo.getPacketProfitRate()) ? vo.getPacketProfitRate().multiply(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP) + "%" : ""); | 682 | map.put("包装费用净利润率",Objects.nonNull(vo.getPacketProfitRate()) ? vo.getPacketProfitRate().multiply(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP) + "%" : ""); |
683 | + map.put("跟单评分",Objects.nonNull(vo.getOrderScore()) ? vo.getOrderScore() : ""); | ||
684 | + map.put("跟单提成¥",Objects.nonNull(vo.getCopyCommission()) ? vo.getCopyCommission().setScale(2, RoundingMode.HALF_UP).toPlainString() : ""); | ||
614 | // if(StringUtils.isNotBlank(queryVO.getBusinessCostExportSelect().getPacketPrice()) && | 685 | // if(StringUtils.isNotBlank(queryVO.getBusinessCostExportSelect().getPacketPrice()) && |
615 | // OrderLockFieldEnum.SELECTED.name().equals(queryVO.getBusinessCostExportSelect().getPacketPrice())){ | 686 | // OrderLockFieldEnum.SELECTED.name().equals(queryVO.getBusinessCostExportSelect().getPacketPrice())){ |
616 | // | 687 | // |
src/main/java/com/order/erp/service/order/impl/ProjectBaseInfoServiceImpl.java
@@ -290,10 +290,20 @@ public class ProjectBaseInfoServiceImpl extends ServiceImpl<ProjectBaseInfoMappe | @@ -290,10 +290,20 @@ public class ProjectBaseInfoServiceImpl extends ServiceImpl<ProjectBaseInfoMappe | ||
290 | Set<String> projectNoPrefix = null; | 290 | Set<String> projectNoPrefix = null; |
291 | //如果有状态则先查询有状态的数据。 | 291 | //如果有状态则先查询有状态的数据。 |
292 | if(Objects.nonNull(queryVO.getInnerProductionStatus())){ | 292 | if(Objects.nonNull(queryVO.getInnerProductionStatus())){ |
293 | - List<ProjectBaseInfoDO> list = list(new LambdaQueryWrapper<ProjectBaseInfoDO>() | ||
294 | - .select(ProjectBaseInfoDO::getProjectNoPrefix) | ||
295 | - .eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN) | ||
296 | - .eq(ProjectBaseInfoDO::getInnerProductionStatus, queryVO.getInnerProductionStatus())); | 293 | + List<ProjectBaseInfoDO> list; |
294 | + if(ProfitStatusEnum.Not_COMPLETED.getStatus().equals(queryVO.getInnerProductionStatus())){ | ||
295 | + list = list(new LambdaQueryWrapper<ProjectBaseInfoDO>() | ||
296 | + .select(ProjectBaseInfoDO::getProjectNoPrefix) | ||
297 | + .eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN) | ||
298 | + .in(ProjectBaseInfoDO::getInnerProductionStatus, ProfitStatusEnum.APPROVED.getStatus(),ProfitStatusEnum.PENDING_APPROVAL.getStatus())); | ||
299 | + queryVO.setIsFinish(false); | ||
300 | + }else{ | ||
301 | + list = list(new LambdaQueryWrapper<ProjectBaseInfoDO>() | ||
302 | + .select(ProjectBaseInfoDO::getProjectNoPrefix) | ||
303 | + .eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN) | ||
304 | + .eq(ProjectBaseInfoDO::getInnerProductionStatus, queryVO.getInnerProductionStatus())); | ||
305 | + queryVO.setIsFinish(true); | ||
306 | + } | ||
297 | projectNoPrefix = CollectionUtils.isEmpty(list) | 307 | projectNoPrefix = CollectionUtils.isEmpty(list) |
298 | ? new HashSet<>() | 308 | ? new HashSet<>() |
299 | : list.stream() | 309 | : list.stream() |
@@ -316,10 +326,22 @@ public class ProjectBaseInfoServiceImpl extends ServiceImpl<ProjectBaseInfoMappe | @@ -316,10 +326,22 @@ public class ProjectBaseInfoServiceImpl extends ServiceImpl<ProjectBaseInfoMappe | ||
316 | Set<String> projectNoPrefix = null; | 326 | Set<String> projectNoPrefix = null; |
317 | //如果有状态则先查询有状态的数据。 | 327 | //如果有状态则先查询有状态的数据。 |
318 | if(Objects.nonNull(queryVO.getDevelopmentStatus())){ | 328 | if(Objects.nonNull(queryVO.getDevelopmentStatus())){ |
319 | - List<ProjectBaseInfoDO> list = list(new LambdaQueryWrapper<ProjectBaseInfoDO>() | ||
320 | - .select(ProjectBaseInfoDO::getProjectNoPrefix) | ||
321 | - .eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN) | ||
322 | - .eq(ProjectBaseInfoDO::getDevelopmentStatus, queryVO.getDevelopmentStatus())); | 329 | + List<ProjectBaseInfoDO> list; |
330 | + if(ProfitStatusEnum.Not_COMPLETED.getStatus().equals(queryVO.getDevelopmentStatus())){ | ||
331 | + //查询业务研发未创建的单子 | ||
332 | + list = list(new LambdaQueryWrapper<ProjectBaseInfoDO>() | ||
333 | + .select(ProjectBaseInfoDO::getProjectNoPrefix) | ||
334 | + .eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN) | ||
335 | + .in(ProjectBaseInfoDO::getDevelopmentStatus, ProfitStatusEnum.PENDING_APPROVAL.getStatus(), ProfitStatusEnum.APPROVED.getStatus())); | ||
336 | + queryVO.setIsFinish(false); | ||
337 | + }else{ | ||
338 | + //查询业务研发待审核和审核通过的单子。 | ||
339 | + list = list(new LambdaQueryWrapper<ProjectBaseInfoDO>() | ||
340 | + .select(ProjectBaseInfoDO::getProjectNoPrefix) | ||
341 | + .eq(BaseDO::getEnableFlag, Constant.ENABLE_TEN) | ||
342 | + .eq(ProjectBaseInfoDO::getDevelopmentStatus, queryVO.getDevelopmentStatus())); | ||
343 | + queryVO.setIsFinish(true); | ||
344 | + } | ||
323 | projectNoPrefix = CollectionUtils.isEmpty(list) | 345 | projectNoPrefix = CollectionUtils.isEmpty(list) |
324 | ? new HashSet<>() | 346 | ? new HashSet<>() |
325 | : list.stream() | 347 | : list.stream() |
@@ -504,7 +526,7 @@ public class ProjectBaseInfoServiceImpl extends ServiceImpl<ProjectBaseInfoMappe | @@ -504,7 +526,7 @@ public class ProjectBaseInfoServiceImpl extends ServiceImpl<ProjectBaseInfoMappe | ||
504 | } catch (JsonProcessingException e) { | 526 | } catch (JsonProcessingException e) { |
505 | throw new RuntimeException(e); | 527 | throw new RuntimeException(e); |
506 | } | 528 | } |
507 | - })); | 529 | + },(v1, v2) -> v2)); |
508 | //查询永久已保存的配置。 | 530 | //查询永久已保存的配置。 |
509 | List<ProjectBaseAfterReviewSettingDO> projectBaseAfterReviewSettingDOS = projectBaseAfterReviewSettingService.list(new LambdaQueryWrapper<ProjectBaseAfterReviewSettingDO>() | 531 | List<ProjectBaseAfterReviewSettingDO> projectBaseAfterReviewSettingDOS = projectBaseAfterReviewSettingService.list(new LambdaQueryWrapper<ProjectBaseAfterReviewSettingDO>() |
510 | .eq(ProjectBaseAfterReviewSettingDO::getType, ProjectBaseSettingTypeEnum.FIXED_COST_OF_PRODUCTION_DEPARTMENT.getType()) | 532 | .eq(ProjectBaseAfterReviewSettingDO::getType, ProjectBaseSettingTypeEnum.FIXED_COST_OF_PRODUCTION_DEPARTMENT.getType()) |
@@ -770,7 +792,7 @@ public class ProjectBaseInfoServiceImpl extends ServiceImpl<ProjectBaseInfoMappe | @@ -770,7 +792,7 @@ public class ProjectBaseInfoServiceImpl extends ServiceImpl<ProjectBaseInfoMappe | ||
770 | } catch (JsonProcessingException e) { | 792 | } catch (JsonProcessingException e) { |
771 | throw new RuntimeException(e); | 793 | throw new RuntimeException(e); |
772 | } | 794 | } |
773 | - })); | 795 | + },(v1 ,v2) -> v2)); |
774 | BigDecimal exchangeRate = systemSettingService.getExchangeRate(); | 796 | BigDecimal exchangeRate = systemSettingService.getExchangeRate(); |
775 | //查询永久已保存的配置。 如果永久保存配置没有,就去查询系统配置进行显示。 | 797 | //查询永久已保存的配置。 如果永久保存配置没有,就去查询系统配置进行显示。 |
776 | List<ProjectBaseAfterReviewSettingDO> projectBaseAfterReviewSettingDOS = projectBaseAfterReviewSettingService.list(new LambdaQueryWrapper<ProjectBaseAfterReviewSettingDO>() | 798 | List<ProjectBaseAfterReviewSettingDO> projectBaseAfterReviewSettingDOS = projectBaseAfterReviewSettingService.list(new LambdaQueryWrapper<ProjectBaseAfterReviewSettingDO>() |
src/main/resources/mapper/ProjectBaseInfoMapper.xml
@@ -22,9 +22,16 @@ | @@ -22,9 +22,16 @@ | ||
22 | </if> | 22 | </if> |
23 | <if test="queryVO.projectNoPrefixSet != null and queryVO.projectNoPrefixSet.size() > 0"> | 23 | <if test="queryVO.projectNoPrefixSet != null and queryVO.projectNoPrefixSet.size() > 0"> |
24 | AND ( | 24 | AND ( |
25 | - <foreach collection="queryVO.projectNoPrefixSet" item="proj" separator="OR"> | ||
26 | - project_no LIKE CONCAT(#{proj}, '%') | ||
27 | - </foreach> | 25 | + <if test="queryVO.isFinish"> |
26 | + <foreach collection="queryVO.projectNoPrefixSet" item="proj" separator="OR"> | ||
27 | + project_no LIKE CONCAT(#{proj}, '%') | ||
28 | + </foreach> | ||
29 | + </if> | ||
30 | + <if test="!queryVO.isFinish"> | ||
31 | + <foreach collection="queryVO.projectNoPrefixSet" item="proj" separator="AND"> | ||
32 | + project_no NOT LIKE CONCAT(#{proj}, '%') | ||
33 | + </foreach> | ||
34 | + </if> | ||
28 | ) | 35 | ) |
29 | </if> | 36 | </if> |
30 | </where> | 37 | </where> |
@@ -47,13 +54,6 @@ | @@ -47,13 +54,6 @@ | ||
47 | #{proj} | 54 | #{proj} |
48 | </foreach> | 55 | </foreach> |
49 | </if> | 56 | </if> |
50 | - <if test="queryVO.projectNoPrefixSet != null and queryVO.projectNoPrefixSet.size() > 0"> | ||
51 | - AND project_no IN | ||
52 | - <foreach collection="queryVO.projectNoPrefixSet" item="proj" open="(" separator="," close=")"> | ||
53 | - #{proj} | ||
54 | - </foreach> | ||
55 | - | ||
56 | - </if> | ||
57 | <if test="queryVO.ProductionDepartment !=null and queryVO.ProductionDepartment.size() > 0"> | 57 | <if test="queryVO.ProductionDepartment !=null and queryVO.ProductionDepartment.size() > 0"> |
58 | AND production_department | 58 | AND production_department |
59 | IN | 59 | IN |
@@ -61,6 +61,21 @@ | @@ -61,6 +61,21 @@ | ||
61 | #{department} | 61 | #{department} |
62 | </foreach> | 62 | </foreach> |
63 | </if> | 63 | </if> |
64 | + <if test="queryVO.projectNoPrefixSet != null and queryVO.projectNoPrefixSet.size() > 0"> | ||
65 | + <if test="queryVO.isFinish"> | ||
66 | + AND project_no IN | ||
67 | + <foreach collection="queryVO.projectNoPrefixSet" item="proj" open="(" separator="," close=")"> | ||
68 | + #{proj} | ||
69 | + </foreach> | ||
70 | + </if> | ||
71 | + <if test="!queryVO.isFinish"> | ||
72 | + AND project_no NOT IN | ||
73 | + <foreach collection="queryVO.projectNoPrefixSet" item="proj" open="(" separator="," close=")"> | ||
74 | + #{proj} | ||
75 | + </foreach> | ||
76 | + </if> | ||
77 | + </if> | ||
78 | + | ||
64 | <if test="queryVO.projectNoLikeRight != null and queryVO.projectNoLikeRight != ''"> | 79 | <if test="queryVO.projectNoLikeRight != null and queryVO.projectNoLikeRight != ''"> |
65 | AND project_no LIKE #{queryVO.projectNoLikeRight} | 80 | AND project_no LIKE #{queryVO.projectNoLikeRight} |
66 | </if> | 81 | </if> |