From b8b5b799e8770d29ac0a5b8530c468d74173c487 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期五, 03 一月 2025 23:22:53 +0800
Subject: [PATCH] 1、手动生成李赛克文件功能已完成、待联调 2、对接除膜机,调整对应的交互 3、中空两条线新增空闲信号,优先李赛克线优先 4、fixbug:指定工程后增加版图id排序,优先炉号从小到大,版序从小到大
---
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassRelationInfoMapper.java | 2
hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/templates/hollowGlass.ftl | 6
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassOutRelationInfoMapper.java | 3
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java | 167 ++++++++++++++++++
hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml | 5
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/OpcHollowRemoveTask.java | 4
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/dto/LisecHollowGlassDetails.java | 2
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassOutRelationInfoService.java | 3
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java | 79 -------
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/HollowFormulaDetails.java | 24 +-
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java | 7
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java | 2
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java | 6
hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/mapper/HollowGlassOutRelationInfoMapper.xml | 13 +
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/dto/OrderDTO.java | 185 ++++++++++++++++++++
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassOutRelationInfoController.java | 7
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassRelationInfoService.java | 4
17 files changed, 421 insertions(+), 98 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java
index 699aae0..a176f0f 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java
@@ -288,7 +288,7 @@
//鏄惁鏈夋鍦ㄩ挗鍖栫殑鐜荤拑:閽㈠寲灏忕墖琛ㄥ叧鑱斿巻鍙蹭换鍔¤〃锛岀瓫閫夋湭鍑虹鐨勭幓鐠冧俊鎭�
// 鑾峰彇褰撳墠閽㈠寲浠诲姟鏈畬鎴愬嚭鐗囩殑鐜荤拑淇℃伅
List<TemperingGlassInfo> unFinishTemperingGlassInfoList = temperingGlassInfoService.list(new LambdaQueryWrapper<TemperingGlassInfo>()
- .eq(TemperingGlassInfo::getState, Const.TEMPERING_NEW).orderByAsc(TemperingGlassInfo::getTemperingFeedSequence));
+ .eq(TemperingGlassInfo::getState, Const.TEMPERING_NEW).orderByAsc(TemperingGlassInfo::getTemperingLayoutId).orderByAsc(TemperingGlassInfo::getTemperingFeedSequence));
if (CollectionUtil.isNotEmpty(unFinishTemperingGlassInfoList)) {
log.info("鏈夋鍦ㄥ嚭鐗囩殑閽㈠寲浠诲姟");
computeOutGlassInfoByVirtualSlot(unFinishTemperingGlassInfoList, "big_storage_cage_out_one_task", temperingOutTargetPosition, Const.GLASS_STATE_OUT_ING, Const.BIG_STORAGE_BEFORE_OUT);
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassOutRelationInfoController.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassOutRelationInfoController.java
index 4bea64d..3460b35 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassOutRelationInfoController.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassOutRelationInfoController.java
@@ -13,6 +13,7 @@
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
+import java.io.IOException;
import java.util.List;
/**
@@ -93,5 +94,11 @@
return Result.build(200, "淇敼鎴愬姛", hollowGlassOutRelationInfoService.dispatchHollowSwitch(flag));
}
+ @ApiOperation("鎵嬪姩鐢熸垚鏉庤禌鍏嬫枃浠�")
+ @PostMapping("/generateHollowLisecFile")
+ public Result<String> generateHollowLisecFile(String flowCardId, int cell, int isForce) throws IOException {
+ return Result.build(200, "淇敼鎴愬姛", hollowGlassOutRelationInfoService.generateHollowLisecFile(flowCardId, cell, isForce));
+ }
+
}
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/HollowFormulaDetails.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/HollowFormulaDetails.java
index 5f6cf81..46d723c 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/HollowFormulaDetails.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/HollowFormulaDetails.java
@@ -34,29 +34,29 @@
* 鍒嗗壊绾�
*/
@ApiModelProperty(value = "闂撮殧鏉�1浠g爜 930涓撶敤")
- private Integer frameOne;
+ private String frameOne;
@ApiModelProperty(value = "闂撮殧鏉�2浠g爜 930涓撶敤")
- private Integer frameTwo;
+ private String frameTwo;
@ApiModelProperty(value = "闂撮殧鏉�3浠g爜 930涓撶敤")
- private Integer frameThree;
+ private String frameThree;
@ApiModelProperty(value = "闂撮殧鏉�4浠g爜 930涓撶敤")
- private Integer frameFour;
+ private String frameFour;
@ApiModelProperty(value = "瀵嗗皝宓屽叆 930涓撶敤")
- private Integer sealInsert;
+ private String sealInsert;
@ApiModelProperty(value = "姘斾綋1(0鏃� 1鏈�) 930涓撶敤")
- private Integer casOne;
+ private String casOne;
@ApiModelProperty(value = "姘斾綋2(0鏃� 1鏈�) 930涓撶敤")
- private Integer casTwo;
+ private String casTwo;
@ApiModelProperty(value = "姘斾綋3(0鏃� 1鏈�) 930涓撶敤")
- private Integer casThree;
+ private String casThree;
@ApiModelProperty(value = "姘斾綋4(0鏃� 1鏈�) 930涓撶敤")
- private Integer casFour;
+ private String casFour;
@ApiModelProperty(value = "闂撮殧妗嗙被鍨嬶紙tps鑳朵负05 閾濋棿闅旀潯01锛� 930涓撶敤")
- private Integer intervalFrameType;
+ private String intervalFrameType;
@ApiModelProperty(value = "闂撮殧妗嗗搴� 930涓撶敤")
- private Integer intervalFrameWidth;
+ private String intervalFrameWidth;
@ApiModelProperty(value = "闂撮殧妗嗛珮搴� 930涓撶敤")
- private Integer intervalFrameHeight;
+ private String intervalFrameHeight;
/**
* 鍒涘缓鏃堕棿
*/
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/dto/LisecHollowGlassDetails.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/dto/LisecHollowGlassDetails.java
index 3c5a34e..a5c9d89 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/dto/LisecHollowGlassDetails.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/dto/LisecHollowGlassDetails.java
@@ -14,7 +14,7 @@
//椤圭洰鏁伴噺鎸囨暟锛堝鏋滄墍鏈夎褰曠浉鍚岋紝鍒欎负0锛� 鐢�0濉厖鍗冲彲
private String itemInx = "0";
//鐜荤拑鎻忚堪 浠绘剰瀛楃濉厖
- private String descript = "0";
+ private String descript = "8-0";
//鐜荤拑琛ㄩ潰绫诲瀷锛�0娴姩 1杞秱灞� 2鍥炬 3纭秱灞傦級 涓庣幓鐠冭〃闈㈢被鍨嬫湁鍏筹紝濉�0-5涔嬮棿鐨勫父鏁� 鐢�0濉厖鍗冲彲
private String surface = "0";
//鍘氬害 mm*10
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/dto/OrderDTO.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/dto/OrderDTO.java
new file mode 100644
index 0000000..3fb9134
--- /dev/null
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/dto/OrderDTO.java
@@ -0,0 +1,185 @@
+package com.mes.hollow.entity.dto;
+
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @Author : zhoush
+ * @Date: 2025/1/3 9:36
+ * @Description:
+ */
+@Data
+public class OrderDTO {
+
+ /**
+ * <璁㈠崟琛�>
+ */
+ private Integer id;
+ /**
+ * 璁㈠崟Id
+ */
+ private String orderId;
+ /**
+ * 椤圭洰鍚嶇О
+ */
+ private String project;
+ /**
+ * 瀹㈡埛Id
+ */
+ private Long customerId;
+ /**
+ * 瀹㈡埛鍚嶇О
+ */
+ private String customerName;
+ /**
+ * 璁㈠崟绫诲瀷
+ */
+ private String orderType;
+ /**
+ * 璁㈠崟鍒嗙被
+ */
+ private String orderClassify;
+ /**
+ * 鍟嗘爣閫夐」
+ */
+ private String icon;
+ /**
+ * 鍖呰鏂瑰紡
+ */
+ private String packType;
+ /**
+ * 閫佽揣鏃堕棿
+ */
+ private Date deliveryDate;
+ /**
+ * 鎵规
+ */
+ private String batch;
+ /**
+ * 璁$畻鏂瑰紡
+ */
+ private Integer calculateType;
+ /**
+ * 閿�鍞汉鍛業d
+ */
+ private String salesmanId;
+ /**
+ * 閿�鍞汉
+ */
+ private String salesman;
+ /**
+ * 閾濇潯鏂瑰紡
+ */
+ private String alType;
+ /**
+ * 閲戦
+ */
+ private Double money;
+ /**
+ * 鍚堝悓缂栧彿
+ */
+ private String contractId;
+ /**
+ * 瀹㈡埛鎵规
+ */
+ private String customerBatch;
+ /**
+ * 鑱旂郴浜�
+ */
+ private String contacts;
+ /**
+ * 鑱旂郴鐢佃瘽
+ */
+ private String contactNumber;
+ /**
+ * 閫佽揣鍦板潃
+ */
+ private String deliveryAddress;
+ /**
+ * 鍏朵粬閲戦
+ */
+ private Double otherMoney;
+ /**
+ * 鍏朵粬閲戦澶囨敞
+ */
+ private String otherMoneyRemarks;
+ /**
+ * 璁㈠崟鍔犲伐澶囨敞
+ */
+ private String processingNote;
+ /**
+ * 鍏朵粬澶囨敞
+ */
+ private String otherRemarks;
+ /**
+ * 闈㈢Н
+ */
+ private Double area;
+ /**
+ * 鏁伴噺
+ */
+ private Long quantity;
+ /**
+ * 鍛ㄩ暱
+ */
+ private String perimeter;
+ /**
+ * 瀹℃牳浜篿d
+ */
+ private String verifierId;
+ /**
+ * 瀹℃牳浜�
+ */
+ private String verifier;
+ /**
+ * 鍒涘缓浜篿d
+ */
+ private String creatorId;
+ /**
+ * 鍒涘缓浜�
+ */
+ private String creator;
+ /**
+ * 涓嬪崟
+ */
+ private Integer createOrder;
+ /**
+ * 宸ヨ壓瀹℃牳
+ */
+ private Integer processReview;
+ /**
+ * 璁㈠崟瀹℃牳
+ */
+ private Integer orderReview;
+ /**
+ * 鐢熶骇璁㈠崟
+ */
+ private Integer productionOrder;
+ /**
+ * 娴佺▼鍗�
+ */
+ private Integer processingCard;
+ /**
+ * 鍏ュ簱
+ * 鏈叆搴撶姸鎬�0锛屾湭瀹屽叏鍏ュ簱鐘舵��1锛屽畬鍏ㄥ叆搴撶姸鎬�2
+ */
+ private Integer warehousing;
+ /**
+ * 鍙戣揣
+ */
+ private Integer delivery;
+ /**
+ * 鎵撳嵃娆℃暟
+ */
+ private Integer printingNumber;
+ /**
+ * 鍒涘缓鏃ユ湡
+ */
+ private Date createTime;
+ /**
+ * 淇敼鏃堕棿
+ */
+ private Date updateTime;
+
+}
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassOutRelationInfoMapper.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassOutRelationInfoMapper.java
index 4b542cb..e53bfa6 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassOutRelationInfoMapper.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassOutRelationInfoMapper.java
@@ -2,6 +2,8 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mes.hollow.entity.HollowGlassOutRelationInfo;
+import com.mes.hollow.entity.dto.OrderDTO;
+import org.apache.ibatis.annotations.Param;
/**
* (HollowGlassOutRelationInfo)琛ㄦ暟鎹簱璁块棶灞�
@@ -11,5 +13,6 @@
*/
public interface HollowGlassOutRelationInfoMapper extends BaseMapper<HollowGlassOutRelationInfo> {
+ OrderDTO queryOrderByFlowCardId(@Param("flowCardId") String flowCardId);
}
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassRelationInfoMapper.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassRelationInfoMapper.java
index 639ce9e..46c874d 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassRelationInfoMapper.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassRelationInfoMapper.java
@@ -23,5 +23,7 @@
List<HollowGlassDetailsDTO> queryFlowCardIdLayerGlassInfo(@Param("flowCardId") String flowCardId, @Param("totalLayer") int totalLayer, @Param("layer") int layer);
List<LackDetailsDTO> queryLackByFlowCard(String flowCardId);
+
+ int queryLayerByFlowCardId(@Param("flowCardId") String flowCardId);
}
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassOutRelationInfoService.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassOutRelationInfoService.java
index 6cd97b3..24a785e 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassOutRelationInfoService.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassOutRelationInfoService.java
@@ -5,6 +5,7 @@
import com.mes.hollow.entity.request.HollowTaskRequest;
import com.mes.hollowqueue.entity.HollowGlassQueueInfo;
+import java.io.IOException;
import java.util.List;
/**
@@ -32,5 +33,7 @@
Boolean finishTask(String flowCardId, int cell);
Boolean deleteHollowTaskDetails(String flowCardId, int cell);
+
+ String generateHollowLisecFile(String flowCardId, int cell, int isForce) throws IOException;
}
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassRelationInfoService.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassRelationInfoService.java
index e01ff99..b2a3218 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassRelationInfoService.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassRelationInfoService.java
@@ -31,7 +31,9 @@
Map<String, List<FlowCardGlassInfoDTO>> queryHollowAllFlowCard(HollowBigStorageDetailsQueryVO query);
- Map<Integer, List<LackDetailsDTO>> queryLackByFlowCard(String flowCardId);
+ Map<Integer, List<LackDetailsDTO>> queryLackByFlowCard(String flowCardId);
+
+ int queryLayerByFlowCardId(String flowCardId);
// List<LackDetailsDTO> queryLackByFlowCard(String flowCardId);
}
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
index 17e9a24..4360c22 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
@@ -7,23 +7,34 @@
import com.mes.common.config.Const;
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.glassinfo.service.GlassInfoService;
+import com.mes.hollow.controller.HollowBigStorageCageController;
import com.mes.hollow.entity.HollowBigStorageCageDetails;
+import com.mes.hollow.entity.HollowFormulaDetails;
import com.mes.hollow.entity.HollowGlassOutRelationInfo;
+import com.mes.hollow.entity.HollowGlassRelationInfo;
+import com.mes.hollow.entity.dto.*;
import com.mes.hollow.entity.request.HollowTaskRequest;
import com.mes.hollow.mapper.HollowGlassOutRelationInfoMapper;
import com.mes.hollow.service.HollowBigStorageCageDetailsService;
+import com.mes.hollow.service.HollowFormulaDetailsService;
import com.mes.hollow.service.HollowGlassOutRelationInfoService;
+import com.mes.hollow.service.HollowGlassRelationInfoService;
import com.mes.hollowqueue.entity.HollowGlassQueueInfo;
import com.mes.hollowqueue.service.HollowGlassQueueInfoService;
+import com.mes.utils.Blank;
import com.mes.utils.RedisUtil;
+import freemarker.template.Configuration;
+import freemarker.template.Template;
+import freemarker.template.TemplateException;
+import freemarker.template.Version;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.io.*;
+import java.text.SimpleDateFormat;
+import java.util.*;
import java.util.stream.Collectors;
/**
@@ -42,9 +53,15 @@
HollowBigStorageCageDetailsService hollowBigStorageCageDetailsService;
@Resource
HollowGlassQueueInfoService hollowGlassQueueInfoService;
+ @Resource
+ HollowFormulaDetailsService hollowFormulaDetailsService;
+ @Resource
+ HollowGlassRelationInfoService hollowGlassRelationInfoService;
@Resource
RedisUtil redisUtil;
+
+ private static final int ID_RATIO = 10;
@Override
public HollowGlassOutRelationInfo receiveTask(HollowTaskRequest request) {
@@ -135,6 +152,143 @@
return Boolean.TRUE;
}
+ @Override
+ public String generateHollowLisecFile(String flowCardId, int cell, int isForce) throws IOException {
+ List<HollowGlassOutRelationInfo> outRelationList = this.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
+ .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_NEW, Const.HOLLOW_FLOW_CARD_START, Const.HOLLOW_FLOW_CARD_PAUSE)
+ .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId)
+ .eq(HollowGlassOutRelationInfo::getCell, cell));
+ if (CollectionUtil.isEmpty(outRelationList) || outRelationList.size() != 1) {
+ return "鏈潯绾夸笉瀛樺湪璇ユ祦绋嬩换鍔℃垨鑰呭悓娴佺▼鍗′换鍔℃暟澶т簬1";
+ }
+ HollowGlassOutRelationInfo relationInfo = outRelationList.get(0);
+ if (relationInfo.getTotalLayer() < 2) {
+ return "浠诲姟鎬诲眰鏁板皬浜�2锛屼笉鐢熸垚鏉庤禌鍏嬫枃浠�";
+ }
+ //鑾峰彇璁㈠崟鐩稿叧淇℃伅
+ OrderDTO order = baseMapper.queryOrderByFlowCardId(flowCardId);
+ if (null == order) {
+ return "鐢熸垚澶辫触锛岀浉鍏宠鍗曚俊鎭笉瀛樺湪";
+ }
+ //鑾峰彇閰嶆柟鐩稿叧淇℃伅
+ HollowFormulaDetails formulaDetails = hollowFormulaDetailsService.getById(relationInfo.getFormulaId());
+ if (null == formulaDetails) {
+ return "鐢熸垚澶辫触锛岀浉鍏抽厤鏂逛俊鎭笉瀛樺湪";
+ }
+ //鎬诲眰鏁版槸鍚︿笌杩涚鍏崇郴琛ㄥ唴灞傛暟鏁伴噺鐩稿悓锛屽眰鏁扮浉鍚岀敓鎴愮户缁紝涓嶅悓缁撴潫
+ int layerCount = hollowGlassRelationInfoService.queryLayerByFlowCardId(flowCardId);
+ if (layerCount != relationInfo.getTotalLayer() && isForce == 0) {
+ return "鐢熸垚澶辫触锛岃娴佺▼鍗″唴灞傛暟涓庤繘绗煎叧绯昏〃鍐呭眰鏁版暟閲忎笉鐩稿悓";
+ }
+ //璁剧疆鏂囦欢鐨勪富浣撳唴瀹�
+ LisecHollowDetails details = new LisecHollowDetails();
+ String randomNumber = "" + (int) (Math.random() * 100000 + 100000);
+ details.setBcdStart(randomNumber);
+ details.setBatchNo(randomNumber);
+ details.setOrd(relationInfo.getFlowCardId().substring(2, 9));
+ details.setCustNum(order.getCustomerId() + "");
+ details.setCustNam(order.getCustomerName());
+ details.setProDate((new SimpleDateFormat("dd/MM/yyyy").format(new Date())));
+ details.setDelDate(new SimpleDateFormat("dd/MM/yyyy").format(order.getDeliveryDate()));
+
+ //璁剧疆鏂囦欢绗竴灞傚垪琛ㄦ暟鎹�
+ //鏆傛椂鐢熸垚绗煎唴鎵�鏈夌殑鐜荤拑淇℃伅锛堝凡閰嶅鍜屾湭閰嶅鐨勶級
+ List<HollowGlassRelationInfo> hollowGlassRelationInfos = hollowGlassRelationInfoService.list(new LambdaQueryWrapper<HollowGlassRelationInfo>()
+ .eq(HollowGlassRelationInfo::getFlowCardId, flowCardId).orderByAsc(HollowGlassRelationInfo::getHollowSequence));
+ Map<Integer, List<HollowGlassRelationInfo>> listMap = hollowGlassRelationInfos.stream().collect(Collectors.groupingBy(HollowGlassRelationInfo::getHollowSequence));
+
+ //璁剧疆闂撮殧鏉挎暟鎹叡鎵�鏈夐厤瀵圭幓鐠冧娇鐢�
+ List<LisecHollowFrameDetails> frameList = new ArrayList<>();
+ for (int i = 1; i < relationInfo.getTotalLayer(); i++) {
+ LisecHollowFrameDetails frameDetails = new LisecHollowFrameDetails();
+ frameDetails.setRecType("<FR" + i + ">");
+ frameDetails.setType(formulaDetails.getIntervalFrameType());
+ frameDetails.setWidth(formulaDetails.getIntervalFrameWidth());
+ frameDetails.setHeight(formulaDetails.getIntervalFrameHeight());
+ frameList.add(frameDetails);
+ }
+ List<LisecHollowGlassAndFrameDetails> glassAndFrameList = new ArrayList<>();
+ listMap.forEach((e, v) -> {
+ LisecHollowGlassAndFrameDetails glassAndFrame = new LisecHollowGlassAndFrameDetails();
+ List<LisecHollowGlassDetails> glassList = new ArrayList<>();
+ for (int i = 1; i <= v.size(); i++) {
+ LisecHollowGlassDetails hollowGlassDetails = new LisecHollowGlassDetails();
+ hollowGlassDetails.setRecType("<GL" + i + ">");
+ hollowGlassDetails.setThickness((int) (v.get(i - 1).getThickness() * 10) + "");
+ hollowGlassDetails.setPaneBcd(randomNumber + "" + (e * ID_RATIO + i));
+ glassList.add(hollowGlassDetails);
+ }
+ glassAndFrame.setGlassList(glassList);
+ glassAndFrame.setFrameList(frameList);
+ glassAndFrame.setItemNum(e + "");
+ glassAndFrame.setIdNum(e + "");
+ glassAndFrame.setBarcode(randomNumber.substring(randomNumber.length() - 3));
+ glassAndFrame.setWidth((int) (v.get(0).getWidth() * 10) + "");
+ glassAndFrame.setHeight((int) (v.get(0).getHeight() * 10) + "");
+ glassAndFrame.setGlass1(e * ID_RATIO + 1 + "");
+ glassAndFrame.setFrame1(formulaDetails.getFrameOne());
+ glassAndFrame.setGasCode1(formulaDetails.getCasOne());
+ if (relationInfo.getTotalLayer() == 2) {
+ glassAndFrame.setGlass2(e * ID_RATIO + 2 + "");
+ } else if (relationInfo.getTotalLayer() == 3) {
+ glassAndFrame.setGlass2(e * ID_RATIO + 2 + "");
+ glassAndFrame.setFrame2(formulaDetails.getFrameTwo());
+ glassAndFrame.setGasCode2(formulaDetails.getCasTwo());
+ glassAndFrame.setGlass3(e * ID_RATIO + 3 + "");
+ } else if (relationInfo.getTotalLayer() == 4) {
+ glassAndFrame.setGlass2(e * ID_RATIO + 2 + "");
+ glassAndFrame.setFrame2(formulaDetails.getFrameTwo());
+ glassAndFrame.setGasCode2(formulaDetails.getCasTwo());
+ glassAndFrame.setGlass3(e * ID_RATIO + 3 + "");
+ glassAndFrame.setFrame3(formulaDetails.getFrameThree());
+ glassAndFrame.setGasCode3(formulaDetails.getCasThree());
+ glassAndFrame.setGlass4(e * ID_RATIO + 4 + "");
+ } else {
+ glassAndFrame.setGlass2(e * ID_RATIO + 2 + "");
+ glassAndFrame.setFrame2(formulaDetails.getFrameTwo());
+ glassAndFrame.setGasCode2(formulaDetails.getCasTwo());
+ glassAndFrame.setGlass3(e * ID_RATIO + 3 + "");
+ glassAndFrame.setFrame3(formulaDetails.getFrameThree());
+ glassAndFrame.setGasCode3(formulaDetails.getCasThree());
+ glassAndFrame.setGlass4(e * ID_RATIO + 4 + "");
+ glassAndFrame.setFrame3(formulaDetails.getFrameFour());
+ glassAndFrame.setGasCode4(formulaDetails.getCasFour());
+ glassAndFrame.setGlass4(e * ID_RATIO + 5 + "");
+ }
+ glassAndFrame.setInset(formulaDetails.getSealInsert());
+ glassAndFrameList.add(glassAndFrame);
+ });
+ details.setGlassAndFrameList(glassAndFrameList);
+
+
+ Configuration cfg = new Configuration(new Version("2.3.29"));
+ cfg.setClassForTemplateLoading(HollowBigStorageCageController.class, "/templates/");
+ // 鍒涘缓Calculator瀹炰緥
+ Blank blank = new Blank();
+
+ // 鍒涘缓鏁版嵁妯″瀷
+ Map<String, Object> root = new HashMap<>();
+ root.put("blank", blank);
+
+ root.put("details", details);
+
+ // 鑾峰彇妯℃澘
+ Template temp = cfg.getTemplate("hollowGlass.ftl");
+
+
+ // 灏嗙敓鎴愮殑鏂囦欢瀛樺叆鎸囧畾璺緞
+ //璁$畻鐢熸垚鏉庤禌鍏嬮渶瑕佺殑鏁版嵁缁欏埌姣忎釜灞炴��
+ StringWriter out = new StringWriter();
+ File file = new File("D:\\temp", relationInfo.getFlowCardId() + randomNumber.substring(randomNumber.length() - 3) + ".trf");
+ try (BufferedWriter writer = new BufferedWriter(new FileWriter(file))) {
+ temp.process(root, out);
+ writer.write(out.toString());
+ } catch (TemplateException | IOException e) {
+ e.printStackTrace();
+ }
+ return "success";
+ }
+
private HollowGlassOutRelationInfo childrenTask(HollowTaskRequest request, int isForce) {
GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getFlowCardId, request.getFlowCardId()).last("limit 1"));
@@ -183,6 +337,13 @@
}
}
hollowGlassQueueInfoService.saveBatch(hollowQueues);
+ try {
+ if (request.getCell() == 930) {
+ generateHollowLisecFile(request.getFlowCardId(), 930, isForce);
+ }
+ } catch (Exception e) {
+ log.info("鐢熸垚鏉庤禌鍏嬫枃浠舵椂鍙戠敓寮傚父锛屾祦绋嬪崱鍙蜂负{}", request.getFlowCardId());
+ }
return info;
}
}
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java
index 4aa8a57..b0a212b 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java
@@ -287,7 +287,12 @@
Map<Integer, List<LackDetailsDTO>> listMap = lackDetailsList.stream().collect(Collectors.groupingBy(LackDetailsDTO::getLayer));
return listMap;
}
-// @Override
+
+ @Override
+ public int queryLayerByFlowCardId(String flowCardId) {
+ return baseMapper.queryLayerByFlowCardId(flowCardId);
+ }
+ // @Override
// public List<LackDetailsDTO> queryLackByFlowCard(String flowCardId) {
// List<LackDetailsDTO> lackDetailsList = this.baseMapper.queryLackByFlowCard(flowCardId);
// return lackDetailsList;
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/OpcHollowRemoveTask.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/OpcHollowRemoveTask.java
index 3209e5b..26cd748 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/OpcHollowRemoveTask.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/OpcHollowRemoveTask.java
@@ -73,12 +73,12 @@
if (detailsVO.getFilmRemove() == 0) {
// 10111011
- int sendId = request & 273;
+ int sendId = request & 63;
sendId = sendId + 4;
wordlist.add(opcPlcStorageCageHollowTask.generateReadWriteEntity(cell + "mesControl", sendId));
} else {
// 鍏堝皢瀵瑰簲鐨勪綅缃负0锛岃幏寰楄姹傜殑鐜荤拑鏁版嵁锛� 鐒跺悗灏嗗搴斾綅鍊� 110111011
- int sendId = request & 273;
+ int sendId = request & 63;
sendId = sendId + 4 + 64;
wordlist.add(opcPlcStorageCageHollowTask.generateReadWriteEntity(cell + "mesControl", sendId));
ualist.add(opcPlcStorageCageHollowTask.generateReadWriteEntity(cell + "glassTop", detailsVO.getTopRemove()));
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java
index 5fa3e66..55e15b0 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java
@@ -285,12 +285,11 @@
}
//鑾峰彇绌洪棽涓旈鍙栦换鍔$殑鏁版嵁淇℃伅锛屾病鏈変换鍔$洿鎺ヨ蛋鐜荤拑璋冨害
- ReadWriteEntity oneEntity = miloService.readFromOpcUa("DLP2B.DLP2B.outOneRequest");
- ReadWriteEntity twoEntity = miloService.readFromOpcUa("DLP2B.DLP2B.outTwoRequest");
- ReadWriteEntity threeEntity = miloService.readFromOpcUa("DLP2B.DLP2B.outThreeRequest");
- int cell = -1;
+ ReadWriteEntity oneEntity = miloService.readFromOpcUa("CMJ1.CMJ1.isFree");
HollowGlassOutRelationInfo hollowGlassOutRelationInfo = null;
- if ("1".equals(oneEntity.getValue() + "")) {
+ int cell = -1;
+ //鏉庤禌鍏嬬嚎闇�瑕佽幏鍙栭煩姹焢lc鐨勭嚎璺┖闂茬姸鎬侊細10000000绗�8浣嶄负 1琛ㄧず蹇欑 0琛ㄧず绌洪棽
+ if (null != oneEntity.getValue() && "1".equals(oneEntity.getValue() + "")) {
cell = 930;
hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService
.getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
@@ -298,7 +297,9 @@
.eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
);
}
- if (1 == 1 || null == hollowGlassOutRelationInfo && "1".equals(twoEntity.getValue() + "")) {
+
+ ReadWriteEntity twoEntity = miloService.readFromOpcUa("ZKQ2.ZKQ2.isFree");
+ if (null == hollowGlassOutRelationInfo && null != twoEntity.getValue() && Boolean.parseBoolean(twoEntity.getValue() + "")) {
cell = 931;
hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService
.getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
@@ -306,14 +307,7 @@
.eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
);
}
- if (null == hollowGlassOutRelationInfo && "1".equals(threeEntity.getValue() + "")) {
- cell = 932;
- hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService
- .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
- .eq(HollowGlassOutRelationInfo::getCell, cell)
- .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
- );
- }
+
if (null != hollowGlassOutRelationInfo) {
//鏄惁鍏佽涓┖
//鏄惁鏈夋鍦ㄤ腑绌虹殑鐜荤拑:涓┖灏忕墖琛ㄧ瓫閫夋湭鍑虹鐨勭幓鐠冧俊鎭�
@@ -337,63 +331,6 @@
.eq(HollowGlassOutRelationInfo::getCell, hollowGlassOutRelationInfo.getCell())
.set(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_SUCCESS));
}
-// if (redisUtil.getCacheObject("hollowSwitch")) {
-// List<HollowGlassOutRelationInfo> HollowGlassOutRelationInfoList = hollowGlassOutRelationInfoService
-// .list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
-// .eq(HollowGlassOutRelationInfo::getCell, cell)
-// .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_NEW));
-// for (HollowGlassOutRelationInfo e : HollowGlassOutRelationInfoList) {
-// //涓┖浼樺厛锛氳幏鍙栫悊鐗囩 鐜荤拑灏忕墖 鐮存崯琛� 鏁伴噺 鍒ゆ柇绗煎唴鐗堝浘鏄惁鍒伴綈
-// List<FlowCardGlassInfoDTO> flowCardGlassInfoDTO = hollowBigStorageCageDetailsService.hollowIsAll(e.getFlowCardId(), e.getTotalLayer(), Boolean.TRUE);
-// if (CollectionUtil.isNotEmpty(flowCardGlassInfoDTO)) {
-// //鐜荤拑鍒伴綈鍖呮嫭宸插嚭鐗囩殑
-// //鍒伴綈锛屽皢鐜荤拑灏忕墖鏁版嵁瀛樺叆涓┖灏忕墖琛紝閫昏緫鐢熸垚鍑虹墖浠诲姟 缁撴潫
-// for (FlowCardGlassInfoDTO item : flowCardGlassInfoDTO) {
-// List<HollowBigStorageCageDetails> hollowBigStorageCageDetailsList = hollowBigStorageCageDetailsService.queryOutGlassList(item.getFlowCardId(), cell);
-// int finalCell = cell;
-// List<HollowGlassQueueInfo> hollowQueues = hollowBigStorageCageDetailsList.stream().map(queue -> {
-// HollowGlassQueueInfo queueInfo = new HollowGlassQueueInfo();
-// BeanUtils.copyProperties(queue, queueInfo);
-// queueInfo.setState(Const.TEMPERING_NEW);
-// queueInfo.setCell(finalCell);
-// return queueInfo;
-// }).collect(Collectors.toList());
-//
-// List<HollowBigStorageCageDetails> hollowBigStorageCageDetailsList = hollowBigStorageCageDetailsService.queryOutGlassList(flowCardId, cell);
-// int isPairCount = glassInfo.getTotalLayer() * e.getTotalLayer();
-// List<HollowGlassQueueInfo> hollowQueues = new ArrayList<>();
-// loop:
-// for (HollowBigStorageCageDetails queue : hollowBigStorageCageDetailsList) {
-// HollowGlassQueueInfo queueInfo = new HollowGlassQueueInfo();
-// BeanUtils.copyProperties(queue, queueInfo);
-// queueInfo.setState(Const.TEMPERING_NEW);
-// queueInfo.setCell(cell);
-// hollowQueues.add(queueInfo);
-// if (queue.getIsPair() == 1){
-// isPairCount -=1;
-// if (isPairCount == 0){
-// break loop;
-// }
-// }
-// }
-//
-// if (CollectionUtil.isNotEmpty(hollowQueues)) {
-// hollowGlassQueueInfoService.saveBatch(hollowQueues);
-// Integer isPair = hollowQueues.get(0).getIsPair();
-// hollowOutGlassByIsPair(hollowQueues, cell, isPair, e.getTotalLayer());
-// //灏嗕腑绌轰换鍔$姸鎬佹敼涓哄紑濮�
-// hollowGlassOutRelationInfoService.update(new LambdaUpdateWrapper<HollowGlassOutRelationInfo>()
-// .eq(HollowGlassOutRelationInfo::getFlowCardId, e.getFlowCardId())
-// .eq(HollowGlassOutRelationInfo::getCell, cell)
-// .set(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START));
-// Date endDate = new Date();
-// log.info("澶х悊鐗囩鍑虹墖浠诲姟缁撴潫鏃堕棿锛歿}锛屽叡鑰楁椂锛歿}ms,缁撴潫鎵爜浠诲姟", endDate, endDate.getTime() - startDate.getTime());
-// return;
-// }
-// }
-// }
-// }
-// }
}
// redisUtil.setCacheObject("dispatchHollowSwitch",true);
//鏄惁瀛樺湪闇�瑕佸唴閮ㄨ皟搴︾殑鏍煎瓙:鎵ц鍐呴儴璋冨害浠诲姟
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
index d180015..1695cb5 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
@@ -56,13 +56,13 @@
@Scheduled(fixedDelay = 1000)
public void hollowGlassTask() {
List<HollowGlassOutRelationInfo> taskList = hollowGlassOutRelationInfoService.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
- .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START, Const.HOLLOW_FLOW_CARD_PAUSE));
+ .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START));
if (CollectionUtil.isEmpty(taskList)) {
return;
}
JSONObject jsonObject = new JSONObject();
- List<String> flowCardIdList = taskList.stream().map(HollowGlassOutRelationInfo::getFlowCardId).collect(Collectors.toList());
- List<HollowGlassQueueInfo> list = hollowGlassQueueInfoService.list(new LambdaQueryWrapper<HollowGlassQueueInfo>().in(HollowGlassQueueInfo::getFlowCardId, flowCardIdList));
+ List<Long> taskIdList = taskList.stream().map(HollowGlassOutRelationInfo::getId).collect(Collectors.toList());
+ List<HollowGlassQueueInfo> list = hollowGlassQueueInfoService.list(new LambdaQueryWrapper<HollowGlassQueueInfo>().in(HollowGlassQueueInfo::getRelationId, taskIdList));
Map<Integer, List<HollowGlassQueueInfo>> listMap = list.stream().collect(Collectors.groupingBy(HollowGlassQueueInfo::getCell));
jsonObject.append("930", listMap.get(930));
jsonObject.append("931", listMap.get(931));
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/mapper/HollowGlassOutRelationInfoMapper.xml b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/mapper/HollowGlassOutRelationInfoMapper.xml
new file mode 100644
index 0000000..3d15d30
--- /dev/null
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/mapper/HollowGlassOutRelationInfoMapper.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.mes.hollow.mapper.HollowGlassOutRelationInfoMapper">
+
+
+ <select id="queryOrderByFlowCardId" resultType="com.mes.hollow.entity.dto.OrderDTO">
+ select t1.*
+ from pp.flow_card t
+ inner join sd.order t1 on t.order_id = t1.order_id
+ where t.process_id = #{flowCardId}
+ limit 1
+ </select>
+</mapper>
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml
index 292e3cc..1fe646c 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml
@@ -124,4 +124,9 @@
from relation_length
group by flow_card_id, layer, films_id, first_length, second_Length, thickness
</select>
+ <select id="queryLayerByFlowCardId" resultType="java.lang.Integer">
+ select count(distinct layer)
+ from hollow_glass_relation_info
+ where flow_card_id = #{flowCardId}
+ </select>
</mapper>
\ No newline at end of file
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/templates/hollowGlass.ftl b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/templates/hollowGlass.ftl
index f215f92..0964704 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/templates/hollowGlass.ftl
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/templates/hollowGlass.ftl
@@ -1,12 +1,12 @@
${details.relRecType}|${details.relNumber}|${blank.computeBlank(details.relInfo,40)}
-${details.bthRecType}|${blank.computeBlank(details.bathInfo,10)}|${blank.computeBlank(details.bcdStart,6)}|${blank.computeBlank(details.batchNo,8)}
-${details.ordRecType}|${blank.computeBlank(details.ord,10)}|${blank.computeBlank(details.custNum,10)}|${blank.computeBlank(details.custNam,40)}|${blank.computeBlank(details.text1,40)}|${blank.computeBlank(details.text2,40)}|${blank.computeBlank(details.text3,40)}|${blank.computeBlank(details.text4,40)}|${blank.computeBlank(details.text5,40)}|${details.proDate}|${details.delDate}|${blank.computeBlank(details.delArea,10)}
+${details.bthRecType}|${blank.computeBlank(details.bathInfo,10)}|${blank.computeBlank(details.bcdStart,6)}|${blank.computeZero(details.batchNo,8)}
+${details.ordRecType}|${blank.computeZero(details.ord,10)}|${blank.computeBlank(details.custNum,10)}|${blank.computeBlank(details.custNam,40)}|${blank.computeBlank(details.text1,40)}|${blank.computeBlank(details.text2,40)}|${blank.computeBlank(details.text3,40)}|${blank.computeBlank(details.text4,40)}|${blank.computeBlank(details.text5,40)}|${details.proDate}|${details.delDate}|${blank.computeBlank(details.delArea,10)}
<#list details.glassAndFrameList as item>
${item.recType}|${blank.computeZero(item.itemNum,5)}|${blank.computeBlank(item.idNum,8)}|${blank.computeZero(item.barcode,4)}|${item.qty}|${blank.computeZero(item.width,6)}|${blank.computeZero(item.height,6)}|${blank.computeBlank(item.glass1,9)}|${blank.computeBlank(item.frame1,9)}|${blank.computeBlank(item.glass2,9)}|${blank.computeBlank(item.frame2,9)}|${blank.computeBlank(item.glass3,9)}|${blank.computeBlank(item.frame3,9)}|${blank.computeBlank(item.glass4,9)}|${blank.computeBlank(item.frame4,9)}|${blank.computeBlank(item.glass5,9)}|${blank.computeZero(item.inset,4)}|${blank.computeZero(item.frameTxt,2)}|${blank.computeZero(item.gasCode1,9)}|${blank.computeZero(item.gasCode2,9)}|${blank.computeZero(item.gasCode3,9)}|${blank.computeZero(item.gasCode4,9)}|${blank.computeZero(item.sealType,9)}|${blank.computeZero(item.frahType,1)}|${blank.computeZero(item.frahHoe,6)}|${blank.computeZero(item.pattDir,1)}|${blank.computeZero(item.dguPane,1)}
<#list item.glassList as glass>
${glass.recType}|${blank.computeZero(glass.itemInx,5)}|${blank.computeBlank(glass.descript,40)}|${blank.computeZero(glass.surface,1)}|${blank.computeZero(glass.thickness,5)}|${blank.computeZero(glass.faceSide,1)}|${blank.computeBlank(glass.ident,10)}|${blank.computeZero(glass.pattDir,1)}|${blank.computeBlank(glass.paneBcd,10)}|${blank.computeZero(glass.prodPane,1)}|${blank.computeZero(glass.prodComp,2)}|${blank.computeZero(glass.gategory,2)}
</#list>
<#list item.frameList as frame>
- ${frame.recType}|${blank.computeZero(frame.itemInx,5)}|${blank.computeBlank(frame.descript,40)}|${blank.computeZero(frame.type,2)}|${blank.computeZero(frame.color,2)}|${blank.computeZero(frame.width,5)}|${blank.computeZero(frame.height,5)}|${blank.computeZero(frame.ident,10)}|${blank.computeZero(frame.frameBcd,10)}
+ ${frame.recType}|${blank.computeZero(frame.itemInx,5)}|${blank.computeBlank(frame.descript,40)}|${blank.computeZero(frame.type,2)}|${blank.computeZero(frame.color,2)}|${blank.computeZero(frame.width,5)}|${blank.computeZero(frame.height,5)}|${blank.computeBlank(frame.ident,10)}|${blank.computeBlank(frame.frameBcd,10)}
</#list>
</#list>
\ No newline at end of file
--
Gitblit v1.8.0