Showing
10 changed files
with
59 additions
and
37 deletions
| ... | ... | @@ -1460,3 +1460,5 @@ VALUES('全部', 2, '6', 99, 'order', 'id', NULL, NULL); |
| 1460 | 1460 | |
| 1461 | 1461 | ALTER TABLE tbl_contract_distributor_standard |
| 1462 | 1462 | ADD COLUMN foreign_destination varchar(200) COMMENT '目的地(外贸+加工合同)'; |
| 1463 | + | |
| 1464 | +ALTER TABLE tbl_purchase_order_line ADD COLUMN production_process text COMMENT '生产工艺'; | ... | ... |
| ... | ... | @@ -159,6 +159,12 @@ public class GetPurchaseOrderLineBo extends BaseBo<PurchaseOrderLine> { |
| 159 | 159 | @ApiModelProperty("是否为试样订单") |
| 160 | 160 | private boolean sampleOrder; |
| 161 | 161 | |
| 162 | + /** | |
| 163 | + * 生产工艺 | |
| 164 | + */ | |
| 165 | + @ApiModelProperty("生产工艺") | |
| 166 | + private String productionProcess; | |
| 167 | + | |
| 162 | 168 | public GetPurchaseOrderLineBo() { |
| 163 | 169 | |
| 164 | 170 | } | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/order/PurchaseOrderInfoController.java
| ... | ... | @@ -541,9 +541,11 @@ public class PurchaseOrderInfoController extends DefaultBaseController { |
| 541 | 541 | |
| 542 | 542 | @ApiOperation("获取历史生产工艺") |
| 543 | 543 | @GetMapping("/getHistoryProductionProcess") |
| 544 | - public InvokeResult<String> getHistoryProductionProcess(@NotBlank(message = "id不能为空") String id) { | |
| 545 | - String productionProcess = purchaseOrderInfoService.getHistoryProductionProcess(id); | |
| 546 | - return InvokeResultBuilder.success(productionProcess); | |
| 544 | + public InvokeResult<GetPurchaseOrderInfoBo> getHistoryProductionProcess(@NotBlank(message = "id不能为空") String id) { | |
| 545 | + | |
| 546 | + PurchaseOrderInfo data = purchaseOrderInfoService.getHistoryProductionProcess(id); | |
| 547 | + GetPurchaseOrderInfoBo result = new GetPurchaseOrderInfoBo(data); | |
| 548 | + return InvokeResultBuilder.success(result); | |
| 547 | 549 | } |
| 548 | 550 | |
| 549 | 551 | ... | ... |
| ... | ... | @@ -275,6 +275,11 @@ public class PurchaseOrderLine extends BaseEntity implements BaseDto { |
| 275 | 275 | private Boolean sampleOrder; |
| 276 | 276 | |
| 277 | 277 | /** |
| 278 | + * 生产工艺 | |
| 279 | + */ | |
| 280 | + private String productionProcess; | |
| 281 | + | |
| 282 | + /** | |
| 278 | 283 | * 新增/删除/变更 |
| 279 | 284 | */ |
| 280 | 285 | @TableField(exist = false) | ... | ... |
| ... | ... | @@ -875,11 +875,11 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde |
| 875 | 875 | } |
| 876 | 876 | |
| 877 | 877 | @Override |
| 878 | - public String getHistoryProductionProcess(String orderId) { | |
| 878 | + public PurchaseOrderInfo getHistoryProductionProcess(String orderId) { | |
| 879 | 879 | if (StringUtils.isBlank(orderId)) { |
| 880 | - return ""; | |
| 880 | + throw new DefaultClientException("订货单ID为空!"); | |
| 881 | 881 | } |
| 882 | - PurchaseOrderInfo orderInfo = getById(orderId); | |
| 882 | + PurchaseOrderInfo orderInfo = getBaseMapper().findById(orderId); | |
| 883 | 883 | if (orderInfo == null) { |
| 884 | 884 | throw new DefaultClientException("订货单信息不存在!"); |
| 885 | 885 | } |
| ... | ... | @@ -887,7 +887,6 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde |
| 887 | 887 | if (CollectionUtils.isEmpty(orderLineList)) { |
| 888 | 888 | throw new DefaultClientException("订货单物料行数据不存在!"); |
| 889 | 889 | } |
| 890 | - List<String> proProcessList = new ArrayList<>(); | |
| 891 | 890 | String orderingUnit = orderInfo.getOrderingUnit(); |
| 892 | 891 | String workshopId = orderInfo.getWorkshopId(); |
| 893 | 892 | for (PurchaseOrderLine orderLine : orderLineList) { |
| ... | ... | @@ -898,8 +897,8 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde |
| 898 | 897 | BigDecimal thicknessTolNeg = orderLine.getThicknessTolNeg(); |
| 899 | 898 | BigDecimal thicknessTolPos = orderLine.getThicknessTolPos(); |
| 900 | 899 | BigDecimal width = orderLine.getWidth(); |
| 901 | - BigDecimal widthTolNeg = orderLine.getWidthTolNeg(); | |
| 902 | - BigDecimal widthTolPos = orderLine.getWidthTolPos(); | |
| 900 | +// BigDecimal widthTolNeg = orderLine.getWidthTolNeg(); | |
| 901 | +// BigDecimal widthTolPos = orderLine.getWidthTolPos(); | |
| 903 | 902 | |
| 904 | 903 | Map<String, Object> params = new HashMap<>(); |
| 905 | 904 | params.put("orderId", orderId); |
| ... | ... | @@ -912,18 +911,17 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde |
| 912 | 911 | params.put("thicknessTolNeg", thicknessTolNeg); |
| 913 | 912 | params.put("thicknessTolPos", thicknessTolPos); |
| 914 | 913 | params.put("width", width); |
| 915 | - params.put("widthTolNeg", widthTolNeg); | |
| 916 | - params.put("widthTolPos", widthTolPos); | |
| 914 | +// params.put("widthTolNeg", widthTolNeg); | |
| 915 | +// params.put("widthTolPos", widthTolPos); | |
| 917 | 916 | |
| 918 | 917 | String proProcess = getBaseMapper().queryHisProProcess(params); |
| 919 | - if (StringUtils.isNotBlank(proProcess) && !proProcessList.contains(proProcess)) { | |
| 920 | - proProcessList.add(proProcess); | |
| 918 | + if (StringUtils.isNotBlank(proProcess)) { | |
| 919 | + orderLine.setProductionProcess(proProcess); | |
| 921 | 920 | } |
| 922 | 921 | } |
| 923 | - if (CollectionUtils.isEmpty(proProcessList)) { | |
| 924 | - return ""; | |
| 925 | - } | |
| 926 | - return String.join("\n\n", proProcessList); | |
| 922 | + orderInfo.setPurchaseOrderLineList(orderLineList); | |
| 923 | + | |
| 924 | + return orderInfo; | |
| 927 | 925 | } |
| 928 | 926 | |
| 929 | 927 | ... | ... |
| ... | ... | @@ -173,6 +173,7 @@ public class PurchaseOrderLineServiceImpl extends BaseMpServiceImpl<PurchaseOrde |
| 173 | 173 | .set(PurchaseOrderLine::getAssessmentExceedsAgreement, StringUtil.isBlank(vo.getAssessmentExceedsAgreement()) ? null : vo.getAssessmentExceedsAgreement()) |
| 174 | 174 | .set(PurchaseOrderLine::getPackagingFee, vo.getPackagingFee() == null ? null : vo.getPackagingFee()) |
| 175 | 175 | .set(PurchaseOrderLine::getSampleOrder, vo.isSampleOrder()) |
| 176 | + .set(PurchaseOrderLine::getProductionProcess, vo.getProductionProcess()) | |
| 176 | 177 | .eq(PurchaseOrderLine::getId, vo.getId()); |
| 177 | 178 | |
| 178 | 179 | getBaseMapper().update(updateWrapper); | ... | ... |
| ... | ... | @@ -169,5 +169,5 @@ public interface PurchaseOrderInfoService extends BaseMpService<PurchaseOrderInf |
| 169 | 169 | * @param orderId 订货单ID |
| 170 | 170 | * @return String |
| 171 | 171 | */ |
| 172 | - String getHistoryProductionProcess(String orderId); | |
| 172 | + PurchaseOrderInfo getHistoryProductionProcess(String orderId); | |
| 173 | 173 | } | ... | ... |
| ... | ... | @@ -182,4 +182,10 @@ public class UpdatePurchaseOrderLineVo implements BaseVo, Serializable { |
| 182 | 182 | @ApiModelProperty("是否为试样订单") |
| 183 | 183 | private boolean sampleOrder; |
| 184 | 184 | |
| 185 | + /** | |
| 186 | + * 生产工艺 | |
| 187 | + */ | |
| 188 | + @ApiModelProperty("生产工艺") | |
| 189 | + private String productionProcess; | |
| 190 | + | |
| 185 | 191 | } | ... | ... |
| ... | ... | @@ -293,11 +293,11 @@ |
| 293 | 293 | </select> |
| 294 | 294 | |
| 295 | 295 | <select id="queryHisProProcess" resultType="java.lang.String"> |
| 296 | - select o.production_process | |
| 296 | + select ol.production_process | |
| 297 | 297 | from purchase_order_info o |
| 298 | 298 | inner join tbl_purchase_order_line ol on o.id = ol.purchase_order_id |
| 299 | 299 | where o.ordering_unit = #{params.orderingUnit} and o.workshop_id = #{params.workshopId} |
| 300 | - and o.production_process is not null | |
| 300 | + and ol.production_process is not null | |
| 301 | 301 | <choose> |
| 302 | 302 | <when test="params.industry != null and params.industry != ''"> |
| 303 | 303 | and ol.industry = #{params.industry} |
| ... | ... | @@ -354,23 +354,23 @@ |
| 354 | 354 | and ol.width is null |
| 355 | 355 | </otherwise> |
| 356 | 356 | </choose> |
| 357 | - <choose> | |
| 358 | - <when test="params.widthTolNeg != null"> | |
| 359 | - and ol.width_tol_neg = #{params.widthTolNeg} | |
| 360 | - </when> | |
| 361 | - <otherwise> | |
| 362 | - and ol.width_tol_neg is null | |
| 363 | - </otherwise> | |
| 364 | - </choose> | |
| 365 | - <choose> | |
| 366 | - <when test="params.widthTolPos != null"> | |
| 367 | - and ol.width_tol_pos = #{params.widthTolPos} | |
| 368 | - </when> | |
| 369 | - <otherwise> | |
| 370 | - and ol.width_tol_pos is null | |
| 371 | - </otherwise> | |
| 372 | - </choose> | |
| 373 | - order by o.update_time desc | |
| 357 | +<!-- <choose>--> | |
| 358 | +<!-- <when test="params.widthTolNeg != null">--> | |
| 359 | +<!-- and ol.width_tol_neg = #{params.widthTolNeg}--> | |
| 360 | +<!-- </when>--> | |
| 361 | +<!-- <otherwise>--> | |
| 362 | +<!-- and ol.width_tol_neg is null--> | |
| 363 | +<!-- </otherwise>--> | |
| 364 | +<!-- </choose>--> | |
| 365 | +<!-- <choose>--> | |
| 366 | +<!-- <when test="params.widthTolPos != null">--> | |
| 367 | +<!-- and ol.width_tol_pos = #{params.widthTolPos}--> | |
| 368 | +<!-- </when>--> | |
| 369 | +<!-- <otherwise>--> | |
| 370 | +<!-- and ol.width_tol_pos is null--> | |
| 371 | +<!-- </otherwise>--> | |
| 372 | +<!-- </choose>--> | |
| 373 | + order by ol.update_time desc | |
| 374 | 374 | limit 1 |
| 375 | 375 | </select> |
| 376 | 376 | </mapper> | ... | ... |
| ... | ... | @@ -28,6 +28,7 @@ |
| 28 | 28 | <result column="shipment" property="shipment"/> |
| 29 | 29 | <result column="contract_distributor_line_id" property="contractDistributorLineId"/> |
| 30 | 30 | <result column="sample_order" property="sampleOrder"/> |
| 31 | + <result column="production_process" property="productionProcess"/> | |
| 31 | 32 | <result column="create_by_id" property="createById"/> |
| 32 | 33 | <result column="create_by" property="createBy"/> |
| 33 | 34 | <result column="update_by_id" property="updateById"/> |
| ... | ... | @@ -63,6 +64,7 @@ |
| 63 | 64 | tb.shipment, |
| 64 | 65 | tb.contract_distributor_line_id, |
| 65 | 66 | tb.sample_order, |
| 67 | + tb.production_process, | |
| 66 | 68 | tb.create_by_id, |
| 67 | 69 | tb.create_by, |
| 68 | 70 | tb.update_by_id, | ... | ... |