Bläddra i källkod

系统单位查看

huangxingxing 1 månad sedan
förälder
incheckning
b11492bf7d
30 ändrade filer med 659 tillägg och 58 borttagningar
  1. 2 1
      dbscript/init/generate/03-functionInit.sql
  2. 112 0
      generated/com/miniframe/generate/business/es/model/ES0025BaseModel.java
  3. 29 3
      generated/com/miniframe/generate/comm/es/A_ES0022.java
  4. 25 0
      generated/com/miniframe/generate/comm/es/A_ES0025.java
  5. 0 26
      generated/com/miniframe/generate/comm/es/D_ES0024.java
  6. 26 0
      generated/com/miniframe/generate/comm/es/D_ES0025.java
  7. 103 0
      generated/com/miniframe/generate/comm/es/D_ES0025_ROWS_RECODE.java
  8. 99 0
      generated/com/miniframe/generate/comm/httpesapater/ES0025Client.java
  9. 3 0
      generated/validateform/a_es0022Form.xml
  10. 12 0
      generated/validateform/a_es0025Form.xml
  11. 3 1
      generated/validator/resources_a_es0022Form_validator.properties
  12. 3 1
      generated/validator/resources_a_es0022Form_validator_zh_CN.properties
  13. 2 0
      generated/validator/resources_a_es0025Form_validator.properties
  14. 2 0
      generated/validator/resources_a_es0025Form_validator_zh_CN.properties
  15. 0 2
      generated/validator/resources_d_es0024Form_validator.properties
  16. 0 2
      generated/validator/resources_d_es0024Form_validator_zh_CN.properties
  17. 1 0
      generated/validator/resources_d_es0025Form_validator.properties
  18. 1 0
      generated/validator/resources_d_es0025Form_validator_zh_CN.properties
  19. 8 0
      generated/validator/resources_d_es0025_rows_recodeForm_validator.properties
  20. 8 0
      generated/validator/resources_d_es0025_rows_recodeForm_validator_zh_CN.properties
  21. 56 19
      src/main/java/com/miniframe/bisiness/es/ES0022Service.java
  22. 6 0
      src/main/java/com/miniframe/bisiness/es/ES0023Service.java
  23. 68 0
      src/main/java/com/miniframe/bisiness/es/ES0025Service.java
  24. 14 0
      src/main/java/com/miniframe/mappers/es/dao/EsMapper.java
  25. 15 0
      src/main/java/com/miniframe/mappers/es/model/ProUnitGrpDel.java
  26. 44 0
      src/test/java/com/miniframe/comm/httpesapater/ES0025Test.java
  27. 2 1
      系统设计/系统模块/ES(无锡发动机).csv
  28. 4 2
      系统设计/通信设计/通讯报文/es(无锡发动机)/报文体/ES0022_A(系统单位默认值设置).csv
  29. 2 0
      系统设计/通信设计/通讯报文/es(无锡发动机)/报文体/ES0025_A(单位系统单位组值查看).csv
  30. 9 0
      系统设计/通信设计/通讯报文/es(无锡发动机)/报文体/ES0025_D(单位系统单位组值查看).csv

+ 2 - 1
dbscript/init/generate/03-functionInit.sql

@@ -23,9 +23,10 @@ INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('ES
 INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('ES0019', '无锡发动机','单位查看',true);
 INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('ES0020', '无锡发动机','系统单位添加',true);
 INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('ES0021', '无锡发动机','单位组查看',true);
-INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('ES0022', '无锡发动机','系统单位默认值设置',true);
+INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('ES0022', '无锡发动机','单位默认值设置',true);
 INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('ES0023', '无锡发动机','系统单位切换',true);
 INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('ES0024', '无锡发动机','单位系统查看',true);
+INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('ES0025', '无锡发动机','单位系统单位组值查看',true);
 INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('ES1001', '无锡发动机','组件查询',true);
 INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('BES001', '无锡发动机','基础字典查询',true);
 -- 基础系统

+ 112 - 0
generated/com/miniframe/generate/business/es/model/ES0025BaseModel.java

@@ -0,0 +1,112 @@
+package com.miniframe.generate.business.es.model;
+
+import java.util.Map;
+import java.io.IOException;
+import java.util.LinkedHashMap;
+import com.miniframe.core.BaseMapModel;
+import com.miniframe.core.ext.UtilTools;
+import com.miniframe.core.ext.HttpMapFormater;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import com.miniframe.generate.global.AppGlobalVariableSysconfig;
+
+import com.miniframe.generate.comm.es.A_ESHEAD;
+import com.miniframe.generate.comm.es.D_ESHEAD;
+import com.miniframe.generate.comm.es.A_ES0025;
+import com.miniframe.generate.comm.es.D_ES0025;
+
+/**
+ * 无锡发动机,“单位系统单位组值查看”模型类(不要维护,重新生成将覆盖)。
+ */
+@SuppressWarnings({ "rawtypes", "unchecked" })
+public class ES0025BaseModel extends BaseMapModel {
+
+	private static final long serialVersionUID = -1326184831746814093L;
+
+	A_ESHEAD a_eshead;//上行头
+	D_ESHEAD d_eshead;//下行头
+	A_ES0025 a_es0025;//上行体
+	D_ES0025 d_es0025;//下行体
+
+	public ES0025BaseModel(){
+		a_eshead=new A_ESHEAD();
+		d_eshead=new D_ESHEAD();
+		a_es0025=new A_ES0025();
+		d_es0025=new D_ES0025();
+	}
+
+	public void validater() throws Exception {
+		this.a_eshead.validater();
+		this.a_es0025.validater();
+	}
+
+	public void setTransMap(Map map) throws Exception {
+		Map headMap = HttpMapFormater.format(map, A_ESHEAD.class);
+		this.a_eshead = UtilTools.map2Obj(headMap, A_ESHEAD.class);
+		Map bodyMap = HttpMapFormater.format(map, A_ES0025.class);
+		this.a_es0025 = UtilTools.map2Obj(bodyMap, A_ES0025.class);
+	}
+
+	public Map getTransMap() throws Exception {
+		Map reMap = new LinkedHashMap();
+
+		if(UtilTools.isNullOrBlank((this.d_eshead).getTransCode())){
+			(this.d_eshead).setTransCode((this.a_eshead).getTransCode());
+		}
+		if(UtilTools.isNullOrBlank((this.d_eshead).getChannelNo())){
+			(this.d_eshead).setChannelNo((this.a_eshead).getChannelNo());
+		}
+		if(UtilTools.isNullOrBlank((this.d_eshead).getUserId())){
+			(this.d_eshead).setUserId((this.a_eshead).getUserId());
+		}
+        if(UtilTools.isNullOrBlank((this.d_eshead).getTransTime())){
+            (this.d_eshead).setTransTime(DateTimeFormatter.ofPattern(AppGlobalVariableSysconfig.DATETIMEFORMAT).format(ZonedDateTime.now()));
+        }
+
+		reMap.putAll(UtilTools.obj2Map(this.d_eshead));
+		reMap.putAll(UtilTools.obj2Map(this.d_es0025));
+
+		return reMap;
+	}
+
+	public A_ESHEAD getA_eshead() {
+		return this.a_eshead;
+	}
+
+	public void setA_eshead(A_ESHEAD a_eshead) {
+		this.a_eshead=a_eshead;
+	}
+
+	public D_ESHEAD getD_eshead() {
+		return d_eshead;
+	}
+
+	public void setD_eshead(D_ESHEAD d_eshead) {
+		this.d_eshead=d_eshead;
+	}
+
+	public A_ES0025 getA_es0025() {
+		return a_es0025;
+	}
+
+	public void setA_es0025(A_ES0025 a_es0025) {
+		this.a_es0025=a_es0025;
+	}
+
+	public D_ES0025 getD_es0025() {
+		return this.d_es0025;
+	}
+
+	public void setD_es0025(D_ES0025 d_es0025) {
+		this.d_es0025=d_es0025;
+	}
+
+	@Override
+	public String toString() {
+		try {
+			return UtilTools.obj2Json(this,true);
+		} catch (IOException e) {
+			return "";
+		}
+	}
+}

+ 29 - 3
generated/com/miniframe/generate/comm/es/A_ES0022.java

@@ -9,15 +9,15 @@ import java.io.Serializable;
  */
 public class A_ES0022 extends BaseMapModel implements Serializable {
 	private static final long serialVersionUID = -1463838678425832212L;
-	String value;//单位值
+	String value;//默认单位值
 	/**
-	 *单位值
+	 *默认单位值
 	 */
 	public void setValue(String value) {
 		this.value=value;
 	}
 	/**
-	 *单位值
+	 *默认单位值
 	 */
 	public String getValue() {
 		return this.value;
@@ -48,4 +48,30 @@ public class A_ES0022 extends BaseMapModel implements Serializable {
 	public String getSutId() {
 		return this.sutId;
 	}
+	String gsutId;//单位组配置
+	/**
+	 *单位组配置
+	 */
+	public void setGsutId(String gsutId) {
+		this.gsutId=gsutId;
+	}
+	/**
+	 *单位组配置
+	 */
+	public String getGsutId() {
+		return this.gsutId;
+	}
+	String utId;//默认单位Id
+	/**
+	 *默认单位Id
+	 */
+	public void setUtId(String utId) {
+		this.utId=utId;
+	}
+	/**
+	 *默认单位Id
+	 */
+	public String getUtId() {
+		return this.utId;
+	}
 }

+ 25 - 0
generated/com/miniframe/generate/comm/es/A_ES0025.java

@@ -0,0 +1,25 @@
+/**
+ * 无锡发动机
+ */
+package com.miniframe.generate.comm.es;
+import com.miniframe.core.BaseMapModel;
+import java.io.Serializable;
+/**
+ * 单位系统单位组值查看
+ */
+public class A_ES0025 extends BaseMapModel implements Serializable {
+	private static final long serialVersionUID = -1463838678425832212L;
+	String sutId;//系统单位编号
+	/**
+	 *系统单位编号
+	 */
+	public void setSutId(String sutId) {
+		this.sutId=sutId;
+	}
+	/**
+	 *系统单位编号
+	 */
+	public String getSutId() {
+		return this.sutId;
+	}
+}

+ 0 - 26
generated/com/miniframe/generate/comm/es/D_ES0024.java

@@ -36,30 +36,4 @@ public class D_ES0024 extends BaseMapModel implements Serializable {
 	public String getSutId() {
 		return this.sutId;
 	}
-	String nameZn;//已选择的系统单位中文名
-	/**
-	 *已选择的系统单位中文名
-	 */
-	public void setNameZn(String nameZn) {
-		this.nameZn=nameZn;
-	}
-	/**
-	 *已选择的系统单位中文名
-	 */
-	public String getNameZn() {
-		return this.nameZn;
-	}
-	String nameEn;//已选择的系统单位英文名
-	/**
-	 *已选择的系统单位英文名
-	 */
-	public void setNameEn(String nameEn) {
-		this.nameEn=nameEn;
-	}
-	/**
-	 *已选择的系统单位英文名
-	 */
-	public String getNameEn() {
-		return this.nameEn;
-	}
 }

+ 26 - 0
generated/com/miniframe/generate/comm/es/D_ES0025.java

@@ -0,0 +1,26 @@
+/**
+ * 无锡发动机
+ */
+package com.miniframe.generate.comm.es;
+import com.miniframe.core.BaseMapModel;
+import java.io.Serializable;
+import java.util.*;
+/**
+ * 单位系统单位组值查看
+ */
+public class D_ES0025 extends BaseMapModel implements Serializable {
+	private static final long serialVersionUID = -1463838678425832212L;
+	List <D_ES0025_ROWS_RECODE> rows;//数据
+	/**
+	 *数据
+	 */
+	public void setRows(List <D_ES0025_ROWS_RECODE> rows) {
+		this.rows=rows;
+	}
+	/**
+	 *数据
+	 */
+	public List <D_ES0025_ROWS_RECODE> getRows() {
+		return this.rows;
+	}
+}

+ 103 - 0
generated/com/miniframe/generate/comm/es/D_ES0025_ROWS_RECODE.java

@@ -0,0 +1,103 @@
+/**
+ * 无锡发动机
+ */
+package com.miniframe.generate.comm.es;
+import com.miniframe.core.BaseMapModel;
+import java.io.Serializable;
+/**
+ * 单位系统单位组值查看->数据
+ */
+public class D_ES0025_ROWS_RECODE extends BaseMapModel implements Serializable {
+	private static final long serialVersionUID = -1463838678425832212L;
+	String nameEn;//单位组英文名
+	/**
+	 *单位组英文名
+	 */
+	public void setNameEn(String nameEn) {
+		this.nameEn=nameEn;
+	}
+	/**
+	 *单位组英文名
+	 */
+	public String getNameEn() {
+		return this.nameEn;
+	}
+	String nameZn;//单位组中文名
+	/**
+	 *单位组中文名
+	 */
+	public void setNameZn(String nameZn) {
+		this.nameZn=nameZn;
+	}
+	/**
+	 *单位组中文名
+	 */
+	public String getNameZn() {
+		return this.nameZn;
+	}
+	String sutId;//系统单位编号
+	/**
+	 *系统单位编号
+	 */
+	public void setSutId(String sutId) {
+		this.sutId=sutId;
+	}
+	/**
+	 *系统单位编号
+	 */
+	public String getSutId() {
+		return this.sutId;
+	}
+	String gutId;//单位组id
+	/**
+	 *单位组id
+	 */
+	public void setGutId(String gutId) {
+		this.gutId=gutId;
+	}
+	/**
+	 *单位组id
+	 */
+	public String getGutId() {
+		return this.gutId;
+	}
+	String utId;//默认单位Id
+	/**
+	 *默认单位Id
+	 */
+	public void setUtId(String utId) {
+		this.utId=utId;
+	}
+	/**
+	 *默认单位Id
+	 */
+	public String getUtId() {
+		return this.utId;
+	}
+	String value;//默认单位值
+	/**
+	 *默认单位值
+	 */
+	public void setValue(String value) {
+		this.value=value;
+	}
+	/**
+	 *默认单位值
+	 */
+	public String getValue() {
+		return this.value;
+	}
+	String gsutId;//单位组配置
+	/**
+	 *单位组配置
+	 */
+	public void setGsutId(String gsutId) {
+		this.gsutId=gsutId;
+	}
+	/**
+	 *单位组配置
+	 */
+	public String getGsutId() {
+		return this.gsutId;
+	}
+}

+ 99 - 0
generated/com/miniframe/generate/comm/httpesapater/ES0025Client.java

@@ -0,0 +1,99 @@
+package com.miniframe.generate.comm.httpesapater;
+
+import com.miniframe.spring.httpclient.MFHttpRespInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import com.miniframe.core.Transmitter;
+import com.miniframe.core.ext.UtilTools;
+import com.miniframe.generate.comm.es.D_ES0025;
+import com.miniframe.generate.comm.es.D_ESHEAD;
+
+import com.miniframe.generate.business.es.model.ES0025BaseModel;
+
+public class ES0025Client {
+
+	private static final Logger logger = LoggerFactory.getLogger(ES0025Client.class);
+	private MFHttpRespInfo respInfo;
+
+	public MFHttpRespInfo getRespInfo(){
+		return respInfo;
+	}
+
+	/**
+	 * 调用 [无锡发动机->单位系统单位组值查看((ES0025)]的通讯接口
+	 * @param model 接口模型
+	 * @param extMap 扩展输入
+	 * @param url 请求地址
+	 * @return model 接口模型
+	 * @throws Exception
+	 */
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public ES0025BaseModel execute(ES0025BaseModel model,final Map extMap,final String url) throws Exception {
+		this.executeToRespInfo(model,extMap,url);
+		return model;
+	}
+
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public ES0025BaseModel execute(ES0025BaseModel model,final Map extMap) throws Exception {
+		this.executeToRespInfo(model,extMap,null);
+		return model;
+	}
+
+
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public MFHttpRespInfo executeToRespInfo(ES0025BaseModel model,final Map extMap,final String url) throws Exception {
+		if (logger.isDebugEnabled()) {
+			logger.debug("execute(ES0025BaseModel) - start");
+		}
+
+		if(UtilTools.isNullOrBlank(model.getA_eshead().getTransCode())){
+			model.getA_eshead().setTransCode("ES0025");
+		}
+
+		Map inMap = new LinkedHashMap();
+		inMap.putAll(UtilTools.obj2Map(model.getA_eshead()));
+		inMap.putAll(UtilTools.obj2Map(model.getA_es0025()));
+		if(extMap!=null && extMap.size()>0){
+			inMap.putAll(extMap);
+		}
+
+		Transmitter httpesApater = (Transmitter) UtilTools.getBean("httpesApater");
+		MFHttpRespInfo respInfo;
+		if(UtilTools.isNotNullAndBlank(url)){
+			respInfo = httpesApater.doPostDataToRespInfo(inMap,url);
+		}else{
+			respInfo = httpesApater.doPostDataToRespInfo(inMap);
+		}
+
+		if(respInfo!=null) {
+			Map outMap=respInfo.getParamMap();
+			D_ESHEAD d_eshead =  UtilTools.map2Obj(outMap, D_ESHEAD.class);
+			D_ES0025 d_es0025 =  UtilTools.map2Obj(outMap, D_ES0025.class);
+			model.setD_eshead(d_eshead);
+			model.setD_es0025(d_es0025);
+
+
+		}
+
+		if (logger.isDebugEnabled()) {
+			logger.debug("execute(ES0025BaseModel) - end");
+		}
+
+        this.respInfo=respInfo;
+
+		return respInfo;
+	}
+
+
+
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public ES0025BaseModel execute(ES0025BaseModel model) throws Exception {
+		return this.execute(model,null,null);
+	}
+
+
+}

+ 3 - 0
generated/validateform/a_es0022Form.xml

@@ -13,6 +13,9 @@
 <field property="sutId" depends="required">
     <arg0 key="a_es0022.sutId"/>
 </field>
+<field property="utId" depends="required">
+    <arg0 key="a_es0022.utId"/>
+</field>
 </form>
 </formset>
 </form-validation>

+ 12 - 0
generated/validateform/a_es0025Form.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN" "http://jakarta.apache.org/commons/dtds/validator_1_1.dtd">
+<!-- 单位系统单位组值查看Form配置文件系统生成请勿修改,否则重新生成将覆盖 -->
+<form-validation>
+<formset>
+<form name="a_es0025Form">
+<field property="sutId" depends="required">
+    <arg0 key="a_es0025.sutId"/>
+</field>
+</form>
+</formset>
+</form-validation>

+ 3 - 1
generated/validator/resources_a_es0022Form_validator.properties

@@ -1,4 +1,6 @@
-a_es0022.value = \u5355\u4F4D\u503C
+a_es0022.value = \u9ED8\u8BA4\u5355\u4F4D\u503C
 a_es0022.gutId = \u5355\u4F4D\u7EC4\u7F16\u53F7
 a_es0022.sutId = \u7CFB\u7EDF\u5355\u4F4D\u7F16\u53F7
+a_es0022.gsutId = \u5355\u4F4D\u7EC4\u914D\u7F6E
+a_es0022.utId = \u9ED8\u8BA4\u5355\u4F4DId
 a_es0022Form = true

+ 3 - 1
generated/validator/resources_a_es0022Form_validator_zh_CN.properties

@@ -1,4 +1,6 @@
-a_es0022.value = \u5355\u4F4D\u503C
+a_es0022.value = \u9ED8\u8BA4\u5355\u4F4D\u503C
 a_es0022.gutId = \u5355\u4F4D\u7EC4\u7F16\u53F7
 a_es0022.sutId = \u7CFB\u7EDF\u5355\u4F4D\u7F16\u53F7
+a_es0022.gsutId = \u5355\u4F4D\u7EC4\u914D\u7F6E
+a_es0022.utId = \u9ED8\u8BA4\u5355\u4F4DId
 a_es0022Form = true

+ 2 - 0
generated/validator/resources_a_es0025Form_validator.properties

@@ -0,0 +1,2 @@
+a_es0025.sutId = \u7CFB\u7EDF\u5355\u4F4D\u7F16\u53F7
+a_es0025Form = true

+ 2 - 0
generated/validator/resources_a_es0025Form_validator_zh_CN.properties

@@ -0,0 +1,2 @@
+a_es0025.sutId = \u7CFB\u7EDF\u5355\u4F4D\u7F16\u53F7
+a_es0025Form = true

+ 0 - 2
generated/validator/resources_d_es0024Form_validator.properties

@@ -1,4 +1,2 @@
 d_es0024.sutId = \u5DF2\u9009\u62E9\u7684\u7CFB\u7EDF\u5355\u4F4DID
-d_es0024.nameZn = \u5DF2\u9009\u62E9\u7684\u7CFB\u7EDF\u5355\u4F4D\u4E2D\u6587\u540D
-d_es0024.nameEn = \u5DF2\u9009\u62E9\u7684\u7CFB\u7EDF\u5355\u4F4D\u82F1\u6587\u540D
 d_es0024Form = true

+ 0 - 2
generated/validator/resources_d_es0024Form_validator_zh_CN.properties

@@ -1,4 +1,2 @@
 d_es0024.sutId = \u5DF2\u9009\u62E9\u7684\u7CFB\u7EDF\u5355\u4F4DID
-d_es0024.nameZn = \u5DF2\u9009\u62E9\u7684\u7CFB\u7EDF\u5355\u4F4D\u4E2D\u6587\u540D
-d_es0024.nameEn = \u5DF2\u9009\u62E9\u7684\u7CFB\u7EDF\u5355\u4F4D\u82F1\u6587\u540D
 d_es0024Form = true

+ 1 - 0
generated/validator/resources_d_es0025Form_validator.properties

@@ -0,0 +1 @@
+d_es0025Form = false

+ 1 - 0
generated/validator/resources_d_es0025Form_validator_zh_CN.properties

@@ -0,0 +1 @@
+d_es0025Form = false

+ 8 - 0
generated/validator/resources_d_es0025_rows_recodeForm_validator.properties

@@ -0,0 +1,8 @@
+d_es0025_rows_recode.nameEn = \u5355\u4F4D\u7EC4\u82F1\u6587\u540D
+d_es0025_rows_recode.nameZn = \u5355\u4F4D\u7EC4\u4E2D\u6587\u540D
+d_es0025_rows_recode.sutId = \u7CFB\u7EDF\u5355\u4F4D\u7F16\u53F7
+d_es0025_rows_recode.gutId = \u5355\u4F4D\u7EC4id
+d_es0025_rows_recode.utId = \u9ED8\u8BA4\u5355\u4F4DId
+d_es0025_rows_recode.value = \u9ED8\u8BA4\u5355\u4F4D\u503C
+d_es0025_rows_recode.gsutId = \u5355\u4F4D\u7EC4\u914D\u7F6E
+d_es0025_rows_recodeForm = true

+ 8 - 0
generated/validator/resources_d_es0025_rows_recodeForm_validator_zh_CN.properties

@@ -0,0 +1,8 @@
+d_es0025_rows_recode.nameEn = \u5355\u4F4D\u7EC4\u82F1\u6587\u540D
+d_es0025_rows_recode.nameZn = \u5355\u4F4D\u7EC4\u4E2D\u6587\u540D
+d_es0025_rows_recode.sutId = \u7CFB\u7EDF\u5355\u4F4D\u7F16\u53F7
+d_es0025_rows_recode.gutId = \u5355\u4F4D\u7EC4id
+d_es0025_rows_recode.utId = \u9ED8\u8BA4\u5355\u4F4DId
+d_es0025_rows_recode.value = \u9ED8\u8BA4\u5355\u4F4D\u503C
+d_es0025_rows_recode.gsutId = \u5355\u4F4D\u7EC4\u914D\u7F6E
+d_es0025_rows_recodeForm = true

+ 56 - 19
src/main/java/com/miniframe/bisiness/es/ES0022Service.java

@@ -1,5 +1,6 @@
 package com.miniframe.bisiness.es;
 
+import java.util.List;
 import java.util.Map;
 import com.miniframe.core.ExecProcessFlow;
 import com.miniframe.core.ext.UtilTools;
@@ -10,6 +11,7 @@ import com.miniframe.model.es.EsUnitSysDel;
 import com.miniframe.model.es.EsUnitSysDelSQLBuilder;
 import com.miniframe.model.es.dao.EsUnitMapper;
 import com.miniframe.model.es.dao.EsUnitSysDelMapper;
+import tk.mybatis.mapper.util.StringUtil;
 
 /**
  * 无锡发动机,“单位默认值设置”逻辑处理(重新生成不覆盖)。
@@ -25,25 +27,60 @@ public class ES0022Service extends ES0022BaseModel implements ExecProcessFlow {
 		String value = this.getA_es0022().getValue();
 		String gutId = this.getA_es0022().getGutId();
 		String sutId = this.getA_es0022().getSutId();
-		EsUnitSQLBuilder esUnitSQLBuilder = new EsUnitSQLBuilder();
-		EsUnitSQLBuilder.Criteria esUnitSQLBuilderCriteria = esUnitSQLBuilder.createCriteria();
-		esUnitSQLBuilderCriteria.andValueEqualTo(value);
-		esUnitSQLBuilderCriteria.andGutIdEqualTo(gutId);
-		EsUnitMapper esUnitMapper = UtilTools.getBean(EsUnitMapper.class);
-		EsUnit eu = esUnitMapper.selectOneByExample(esUnitSQLBuilder);
-		String utId = eu.getUtId();
-
-		EsUnitSysDelSQLBuilder  esUnitSysDelSQLBuilder = new EsUnitSysDelSQLBuilder();
-		EsUnitSysDelSQLBuilder.Criteria esUnitSysDelSQLBuilderCriteria = esUnitSysDelSQLBuilder.createCriteria();
-		esUnitSysDelSQLBuilderCriteria.andGutIdEqualTo(gutId);
-		esUnitSysDelSQLBuilderCriteria.andSutIdEqualTo(sutId);
-
-		EsUnitSysDel esUnitSysDel = new EsUnitSysDel();
-		esUnitSysDel.setUtId(utId);
-		esUnitSysDel.setValue(value);
-
-		EsUnitSysDelMapper  esUnitSysDelMapper = UtilTools.getBean(EsUnitSysDelMapper.class);
-		esUnitSysDelMapper.updateByExampleSelective(esUnitSysDel, esUnitSysDelSQLBuilder);
+		String gsutId =this.getA_es0022().getGsutId();
+		String utId =this.getA_es0022().getUtId();
+		EsUnitSysDelMapper  dao = UtilTools.getBean(EsUnitSysDelMapper.class);
+		if(StringUtil.isEmpty(gsutId)){
+			EsUnitSysDelSQLBuilder sb = new EsUnitSysDelSQLBuilder();
+			EsUnitSysDelSQLBuilder.Criteria sc  = sb.createCriteria();
+			sc.andSutIdEqualTo(sutId);
+			sc.andGutIdEqualTo(gsutId);
+			List<EsUnitSysDel> ds  = dao.selectByExample(sb);
+			if(ds!=null&&!ds.isEmpty()){//修改
+				EsUnitSysDel d = ds.get(0);
+				d.setGutId(gutId);
+				d.setSutId(sutId);
+				d.setUtId(utId);
+				d.setValue(value);
+				dao.updateByPrimaryKey(d);
+			}else{//添加
+				EsUnitSysDel d = new EsUnitSysDel();
+				d.setGsutId(UtilTools.getUUid());
+				d.setGutId(gutId);
+				d.setSutId(sutId);
+				d.setUtId(utId);
+				d.setValue(value);
+				dao.insert(d);
+			}
+		}else{//修改
+			EsUnitSysDel d = dao.selectByPrimaryKey(gsutId);
+			if(d!=null){
+				d.setGutId(gutId);
+				d.setSutId(sutId);
+				d.setUtId(utId);
+				d.setValue(value);
+				dao.updateByPrimaryKey(d);
+			}
+		}
+//		EsUnitSQLBuilder esUnitSQLBuilder = new EsUnitSQLBuilder();
+//		EsUnitSQLBuilder.Criteria esUnitSQLBuilderCriteria = esUnitSQLBuilder.createCriteria();
+//		esUnitSQLBuilderCriteria.andValueEqualTo(value);
+//		esUnitSQLBuilderCriteria.andGutIdEqualTo(gutId);
+//		EsUnitMapper esUnitMapper = UtilTools.getBean(EsUnitMapper.class);
+//		EsUnit eu = esUnitMapper.selectOneByExample(esUnitSQLBuilder);
+//		String utId = eu.getUtId();
+//
+//		EsUnitSysDelSQLBuilder  esUnitSysDelSQLBuilder = new EsUnitSysDelSQLBuilder();
+//		EsUnitSysDelSQLBuilder.Criteria esUnitSysDelSQLBuilderCriteria = esUnitSysDelSQLBuilder.createCriteria();
+//		esUnitSysDelSQLBuilderCriteria.andGutIdEqualTo(gutId);
+//		esUnitSysDelSQLBuilderCriteria.andSutIdEqualTo(sutId);
+//
+//		EsUnitSysDel esUnitSysDel = new EsUnitSysDel();
+//		esUnitSysDel.setUtId(utId);
+//		esUnitSysDel.setValue(value);
+//
+//		EsUnitSysDelMapper  esUnitSysDelMapper = UtilTools.getBean(EsUnitSysDelMapper.class);
+//		esUnitSysDelMapper.updateByExampleSelective(esUnitSysDel, esUnitSysDelSQLBuilder);
 	}
 	
 	/**

+ 6 - 0
src/main/java/com/miniframe/bisiness/es/ES0023Service.java

@@ -6,6 +6,7 @@ import com.miniframe.core.ExecProcessFlow;
 import com.miniframe.core.ext.UtilTools;
 import com.miniframe.generate.business.es.model.ES0023BaseModel;
 import com.miniframe.model.es.EsUnitSysUs;
+import com.miniframe.model.es.EsUnitSysUsSQLBuilder;
 import com.miniframe.model.es.dao.EsUnitSysUsMapper;
 
 /**
@@ -21,6 +22,11 @@ public class ES0023Service extends ES0023BaseModel implements ExecProcessFlow {
 	public void transExecute() throws Exception {
 		String sutId = this.getA_es0023().getSutId();
 		EsUnitSysUsMapper esUnitSysUsMapper = UtilTools.getBean(EsUnitSysUsMapper.class);
+		EsUnitSysUsSQLBuilder sb = new EsUnitSysUsSQLBuilder();
+		EsUnitSysUsSQLBuilder.Criteria sc = sb.createCriteria();
+		sc.andUidEqualTo(this.getA_eshead().getUserId());
+		esUnitSysUsMapper.deleteByExample(sb);
+
 		EsUnitSysUs esUnitSysUs = new  EsUnitSysUs();
 		esUnitSysUs.setPerUtId(UtilTools.getUUid());
 		esUnitSysUs.setSutId(sutId);

+ 68 - 0
src/main/java/com/miniframe/bisiness/es/ES0025Service.java

@@ -0,0 +1,68 @@
+package com.miniframe.bisiness.es;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import com.miniframe.core.ExecProcessFlow;
+import com.miniframe.core.ext.UtilTools;
+import com.miniframe.generate.business.es.model.ES0025BaseModel;
+import com.miniframe.generate.comm.es.D_ES0025_ROWS_RECODE;
+import com.miniframe.mappers.es.dao.EsMapper;
+import com.miniframe.mappers.es.model.ProUnitGrpDel;
+
+/**
+ * 无锡发动机,“单位系统单位组值查看”逻辑处理(重新生成不覆盖)。
+ */
+public class ES0025Service extends ES0025BaseModel implements ExecProcessFlow {
+	
+	private static final long serialVersionUID = -7051358269847459502L;
+		
+	/**
+	 * 无锡发动机,“单位系统单位组值查看”业务核心处理
+ 	 */
+	public void transExecute() throws Exception {
+		String sutId= this.getA_es0025().getSutId();
+		EsMapper es = UtilTools.getBean(EsMapper.class);
+		List<ProUnitGrpDel> ls = es.selectProUnitGrpDelList(sutId);
+		List<D_ES0025_ROWS_RECODE> rows = new ArrayList<>();
+		for (ProUnitGrpDel v:ls) {
+			D_ES0025_ROWS_RECODE r  =new D_ES0025_ROWS_RECODE();
+			r.setGsutId(v.getGsutId());
+			r.setNameEn(v.getNameEn());
+			r.setNameZn(v.getNameZn());
+			r.setGutId(v.getGutId());
+			r.setUtId(v.getUtId());
+			r.setValue(v.getValue());
+			rows.add(r);
+		}
+		this.getD_es0025().setRows(rows);
+	}
+	
+	/**
+	 * 无锡发动机,“单位系统单位组值查看”业务前处理
+ 	 */
+	public void preTransFlow() throws Exception {
+		this.validater();
+	}
+	
+	/**
+	 * 无锡发动机,“单位系统单位组值查看”业务后处理
+ 	 */
+	public void afterTransFlow() throws Exception {
+	
+	}
+	
+	/**
+	 * 无锡发动机,“单位系统单位组值查看”逻辑入口处理方法
+ 	 */
+ 	@SuppressWarnings("rawtypes")
+	@Override
+	public Map execute(Map vars) throws Exception {
+		this.setTransMap(vars);
+		preTransFlow();// 执行业务开始的规则检查和校验
+		transExecute();// 执行核心业务段
+		afterTransFlow();// 执行核心逻辑完成后的收尾逻辑
+		return this.getTransMap();
+	}
+
+}

+ 14 - 0
src/main/java/com/miniframe/mappers/es/dao/EsMapper.java

@@ -1,6 +1,7 @@
 package com.miniframe.mappers.es.dao;
 
 import com.miniframe.mappers.es.model.ProComAttDto;
+import com.miniframe.mappers.es.model.ProUnitGrpDel;
 import com.miniframe.model.es.EsDataAtt;
 import com.miniframe.model.es.EsProCom;
 import com.miniframe.model.es.EsProJob;
@@ -13,6 +14,19 @@ import org.apache.ibatis.annotations.Select;
 import java.util.List;
 
 public interface EsMapper extends MiniserviceBaseDao {
+
+    @Select("select a.gsut_id as gsutId, " +
+            "a.sut_id  as sutId, " +
+            "b.gut_id as gutId, " +
+            "b.name_en as nameEn, " +
+            "b.name_zh as nameZn, " +
+            "c.ut_id as utId, " +
+            "c.value as value" +
+            "from es_unit_sys_del a " +
+            "LEFT JOIN  es_unit_group b on a.gut_id =b.gut_id " +
+            "LEFT JOIN  es_unit c  on c.ut_id=a.ut_id  where sut_id =#{sutId} ORDER BY b.ser asc")
+    List<ProUnitGrpDel> selectProUnitGrpDelList(String sutId);
+
     /**
      * 删除 连线
      * @param pid

+ 15 - 0
src/main/java/com/miniframe/mappers/es/model/ProUnitGrpDel.java

@@ -0,0 +1,15 @@
+package com.miniframe.mappers.es.model;
+
+import lombok.Data;
+
+@Data
+public class ProUnitGrpDel {
+    private String nameEn;
+    private String nameZn;
+    private String sutId;
+    private String unitType;
+    private String gutId;
+    private String utId;
+    private String value;
+    private String gsutId;
+}

+ 44 - 0
src/test/java/com/miniframe/comm/httpesapater/ES0025Test.java

@@ -0,0 +1,44 @@
+package com.miniframe.comm.httpesapater;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import com.miniframe.comm.httpesapater.HttpesapaterUtil;
+import com.miniframe.generate.comm.es.A_ES0025;
+import com.miniframe.generate.comm.httpesapater.ES0025Client;
+import com.miniframe.generate.business.es.model.ES0025BaseModel;
+
+public class ES0025Test {
+
+	private static final Logger logger = LoggerFactory.getLogger(ES0025Test.class);
+
+	/**
+	 * 单位系统单位组值查看,获取报文体
+	 * @return
+	 */
+	public static A_ES0025 getA_es0025() {
+		A_ES0025 a_es0025 = new A_ES0025();
+
+		// ----------以下增加【单位系统单位组值查看】上行体赋值-------------
+
+
+
+		// ---------------------------------------------------
+		return a_es0025;
+	}
+	
+	/**
+	 * 运行客户端测试,单位系统单位组值查看
+	 * 
+	 * @param args
+	 * @throws Exception
+	 */
+	public static void main(String[] args) throws Exception {
+		ES0025BaseModel model = new ES0025BaseModel();
+		model.setA_eshead(HttpesapaterUtil.getA_eshead("ES0025"));
+		model.setA_es0025(ES0025Test.getA_es0025());
+		ES0025Client client = new ES0025Client();
+		logger.error("客户端发送前总线:\r\n"+model);
+		model = client.execute(model);
+		logger.error("客户端发送后总线:\r\n"+model);
+	}
+}

+ 2 - 1
系统设计/系统模块/ES(无锡发动机).csv

@@ -21,9 +21,10 @@
 100019,ES0019,单位查看,service,
 100020,ES0020,系统单位添加,service,
 100021,ES0021,单位组查看,service,
-100022,ES0022,系统单位默认值设置,service,
+100022,ES0022,单位默认值设置,service,
 100023,ES0023,系统单位切换,service,
 100024,ES0024,单位系统查看,service,
+100024,ES0025,单位系统单位组值查看,service,
 
 110001,ES1001,组件查询,service,
 110002,BES001,基础字典查询,service,

+ 4 - 2
系统设计/通信设计/通讯报文/es(无锡发动机)/报文体/ES0022_A(系统单位默认值设置).csv

@@ -1,4 +1,6 @@
 "序号","英文名称","中文名称","数据类型","默认值","格式化","非空/引用","最小(长度/值)","最大(长度/值)","验证规则","标准数据ID","XML样式","TAG标签","映射/子标签","CDATA"
-1,value,单位值,string,,,是,,,,,,,,
+1,value,默认单位值,string,,,是,,,,,,,,
 2,gutId,单位组编号,string,,,是,,,,,,,,
-3,sutId,系统单位编号,string,,,是,,,,,,,,
+3,sutId,系统单位编号,string,,,是,,,,,,,,
+4,gsutId,单位组配置,string,,,,,,,,,,,
+5,utId,默认单位Id,string,,,是,,,,,,,,

+ 2 - 0
系统设计/通信设计/通讯报文/es(无锡发动机)/报文体/ES0025_A(单位系统单位组值查看).csv

@@ -0,0 +1,2 @@
+"序号","英文名称","中文名称","数据类型","默认值","格式化","非空/引用","最小(长度/值)","最大(长度/值)","验证规则","标准数据ID","XML样式","TAG标签","映射/子标签","CDATA"
+1,sutId,系统单位编号,string,,,是,,,,,,,,

+ 9 - 0
系统设计/通信设计/通讯报文/es(无锡发动机)/报文体/ES0025_D(单位系统单位组值查看).csv

@@ -0,0 +1,9 @@
+"序号","英文名称","中文名称","数据类型","默认值","格式化","非空/引用","最小(长度/值)","最大(长度/值)","验证规则","标准数据ID","XML样式","TAG标签","映射/子标签","CDATA"
+1,rows,数据,list,,,,0,,,,,,,
+1.1,nameEn,单位组英文名,string,,,,,,,,,,,
+1.2,nameZn,单位组中文名,string,,,,,,,,,,,
+1.3,sutId,系统单位编号,string,,,,,,,,,,,
+1.4,gutId,单位组id,string,,,,,,,,,,,
+1.5,utId,默认单位Id,string,,,,,,,,,,,
+1.6,value,默认单位值,string,,,,,,,,,,,
+1.7,gsutId,单位组配置,string,,,,,,,,,,,