Prechádzať zdrojové kódy

0902 新增项目克隆

caizm 1 týždeň pred
rodič
commit
3bc9a4bbe4

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

@@ -29,6 +29,7 @@ INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('ES
 INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('ES0025', '无锡发动机','单位系统单位组值查看',true);
 INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('ES0026', '无锡发动机','单位系统删除',true);
 INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('ES0027', '无锡发动机','图片base64编码查询',true);
+INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('ES0028', '无锡发动机','项目克隆',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/ES0028BaseModel.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_ES0028;
+import com.miniframe.generate.comm.es.D_ES0028;
+
+/**
+ * 无锡发动机,“项目克隆”模型类(不要维护,重新生成将覆盖)。
+ */
+@SuppressWarnings({ "rawtypes", "unchecked" })
+public class ES0028BaseModel extends BaseMapModel {
+
+	private static final long serialVersionUID = -1326184831746814093L;
+
+	A_ESHEAD a_eshead;//上行头
+	D_ESHEAD d_eshead;//下行头
+	A_ES0028 a_es0028;//上行体
+	D_ES0028 d_es0028;//下行体
+
+	public ES0028BaseModel(){
+		a_eshead=new A_ESHEAD();
+		d_eshead=new D_ESHEAD();
+		a_es0028=new A_ES0028();
+		d_es0028=new D_ES0028();
+	}
+
+	public void validater() throws Exception {
+		this.a_eshead.validater();
+		this.a_es0028.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_ES0028.class);
+		this.a_es0028 = UtilTools.map2Obj(bodyMap, A_ES0028.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_es0028));
+
+		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_ES0028 getA_es0028() {
+		return a_es0028;
+	}
+
+	public void setA_es0028(A_ES0028 a_es0028) {
+		this.a_es0028=a_es0028;
+	}
+
+	public D_ES0028 getD_es0028() {
+		return this.d_es0028;
+	}
+
+	public void setD_es0028(D_ES0028 d_es0028) {
+		this.d_es0028=d_es0028;
+	}
+
+	@Override
+	public String toString() {
+		try {
+			return UtilTools.obj2Json(this,true);
+		} catch (IOException e) {
+			return "";
+		}
+	}
+}

+ 38 - 0
generated/com/miniframe/generate/comm/es/A_ES0028.java

@@ -0,0 +1,38 @@
+/**
+ * 无锡发动机
+ */
+package com.miniframe.generate.comm.es;
+import com.miniframe.core.BaseMapModel;
+import java.io.Serializable;
+/**
+ * 项目克隆
+ */
+public class A_ES0028 extends BaseMapModel implements Serializable {
+	private static final long serialVersionUID = -1463838678425832212L;
+	String pid;//项目编码
+	/**
+	 *项目编码
+	 */
+	public void setPid(String pid) {
+		this.pid=pid;
+	}
+	/**
+	 *项目编码
+	 */
+	public String getPid() {
+		return this.pid;
+	}
+	String uid;//用户编码
+	/**
+	 *用户编码
+	 */
+	public void setUid(String uid) {
+		this.uid=uid;
+	}
+	/**
+	 *用户编码
+	 */
+	public String getUid() {
+		return this.uid;
+	}
+}

+ 12 - 0
generated/com/miniframe/generate/comm/es/D_ES0028.java

@@ -0,0 +1,12 @@
+/**
+ * 无锡发动机
+ */
+package com.miniframe.generate.comm.es;
+import com.miniframe.core.BaseMapModel;
+import java.io.Serializable;
+/**
+ * 项目克隆
+ */
+public class D_ES0028 extends BaseMapModel implements Serializable {
+	private static final long serialVersionUID = -1463838678425832212L;
+}

+ 99 - 0
generated/com/miniframe/generate/comm/httpesapater/ES0028Client.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_ES0028;
+import com.miniframe.generate.comm.es.D_ESHEAD;
+
+import com.miniframe.generate.business.es.model.ES0028BaseModel;
+
+public class ES0028Client {
+
+	private static final Logger logger = LoggerFactory.getLogger(ES0028Client.class);
+	private MFHttpRespInfo respInfo;
+
+	public MFHttpRespInfo getRespInfo(){
+		return respInfo;
+	}
+
+	/**
+	 * 调用 [无锡发动机->项目克隆((ES0028)]的通讯接口
+	 * @param model 接口模型
+	 * @param extMap 扩展输入
+	 * @param url 请求地址
+	 * @return model 接口模型
+	 * @throws Exception
+	 */
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public ES0028BaseModel execute(ES0028BaseModel model,final Map extMap,final String url) throws Exception {
+		this.executeToRespInfo(model,extMap,url);
+		return model;
+	}
+
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public ES0028BaseModel execute(ES0028BaseModel model,final Map extMap) throws Exception {
+		this.executeToRespInfo(model,extMap,null);
+		return model;
+	}
+
+
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public MFHttpRespInfo executeToRespInfo(ES0028BaseModel model,final Map extMap,final String url) throws Exception {
+		if (logger.isDebugEnabled()) {
+			logger.debug("execute(ES0028BaseModel) - start");
+		}
+
+		if(UtilTools.isNullOrBlank(model.getA_eshead().getTransCode())){
+			model.getA_eshead().setTransCode("ES0028");
+		}
+
+		Map inMap = new LinkedHashMap();
+		inMap.putAll(UtilTools.obj2Map(model.getA_eshead()));
+		inMap.putAll(UtilTools.obj2Map(model.getA_es0028()));
+		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_ES0028 d_es0028 =  UtilTools.map2Obj(outMap, D_ES0028.class);
+			model.setD_eshead(d_eshead);
+			model.setD_es0028(d_es0028);
+
+
+		}
+
+		if (logger.isDebugEnabled()) {
+			logger.debug("execute(ES0028BaseModel) - end");
+		}
+
+        this.respInfo=respInfo;
+
+		return respInfo;
+	}
+
+
+
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public ES0028BaseModel execute(ES0028BaseModel model) throws Exception {
+		return this.execute(model,null,null);
+	}
+
+
+}

+ 12 - 0
generated/validateform/a_es0028Form.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_es0028Form">
+<field property="pid" depends="required">
+    <arg0 key="a_es0028.pid"/>
+</field>
+</form>
+</formset>
+</form-validation>

+ 3 - 0
generated/validator/resources_a_es0028Form_validator.properties

@@ -0,0 +1,3 @@
+a_es0028.pid = \u9879\u76EE\u7F16\u7801
+a_es0028.uid = \u7528\u6237\u7F16\u7801
+a_es0028Form = true

+ 3 - 0
generated/validator/resources_a_es0028Form_validator_zh_CN.properties

@@ -0,0 +1,3 @@
+a_es0028.pid = \u9879\u76EE\u7F16\u7801
+a_es0028.uid = \u7528\u6237\u7F16\u7801
+a_es0028Form = true

+ 1 - 0
generated/validator/resources_d_es0028Form_validator.properties

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

+ 1 - 0
generated/validator/resources_d_es0028Form_validator_zh_CN.properties

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

+ 1 - 1
modelsrc/com/miniframe/model/es/dbconfig/MapperConfig-es.xml

@@ -5,7 +5,7 @@
     This file is generated by MyBatis Generator.
     This file is the shell of a Mapper Config file - in many cases you will need to add
       to this file before it is usable by MyBatis.
-    This file was generated on Wed Aug 20 15:27:40 CST 2025.
+    This file was generated on Tue Sep 02 10:15:37 CST 2025.
   -->
   <mappers>
     <mapper resource="com/miniframe/model/es/xml/EsProMapper.xml" />

+ 1 - 1
modelsrc/com/miniframe/model/system/dbconfig/MapperConfig-system.xml

@@ -5,7 +5,7 @@
     This file is generated by MyBatis Generator.
     This file is the shell of a Mapper Config file - in many cases you will need to add
       to this file before it is usable by MyBatis.
-    This file was generated on Wed Aug 20 15:27:42 CST 2025.
+    This file was generated on Tue Sep 02 10:15:39 CST 2025.
   -->
   <mappers>
     <mapper resource="com/miniframe/model/system/xml/SysAppcodeMapper.xml" />

+ 298 - 0
src/main/java/com/miniframe/bisiness/es/ES0028Service.java

@@ -0,0 +1,298 @@
+package com.miniframe.bisiness.es;
+
+import java.util.*;
+
+import com.miniframe.core.ExecProcessFlow;
+import com.miniframe.core.ext.UtilTools;
+import com.miniframe.generate.business.es.model.ES0028BaseModel;
+import com.miniframe.model.es.*;
+import com.miniframe.model.es.dao.*;
+import com.miniframe.tools.XIFileUtils;
+import tk.mybatis.mapper.entity.Example;
+
+import javax.naming.directory.InvalidAttributeIdentifierException;
+
+/**
+ * 无锡发动机,“项目克隆”逻辑处理(重新生成不覆盖)。
+ */
+public class ES0028Service extends ES0028BaseModel implements ExecProcessFlow {
+	
+	private static final long serialVersionUID = -7051358269847459502L;
+		
+	/**
+	 * 无锡发动机,“项目克隆”业务核心处理
+ 	 */
+	public void transExecute() throws Exception {
+		String uid = this.getA_es0028().getUid();
+		String pid = this.getA_es0028().getPid();
+		EsProSQLBuilder esProSQLBuilder = new EsProSQLBuilder();
+		EsProSQLBuilder.Criteria esProSQLBuilderCriteria = esProSQLBuilder.createCriteria();
+		esProSQLBuilderCriteria.andUidEqualTo(uid);
+		esProSQLBuilderCriteria.andPidEqualTo(pid);
+		EsProMapper esProMapper = UtilTools.getBean(EsProMapper.class);
+		EsPro esPro = esProMapper.selectOneByExample(esProSQLBuilder);
+
+		String pid_new = UtilTools.getUUid();
+		EsPro esProNew = new EsPro();
+		esProNew.setPid(pid_new);
+		esProNew.setUid(uid);
+		esProNew.setName(esPro.getName());
+		esProNew.setRemark(esPro.getRemark());
+		esProNew.setCreateTime(esPro.getCreateTime());
+		Date updateTime = new Date();
+		esProNew.setUpdateTime(updateTime);
+		esProNew.setFlow(esPro.getFlow());
+		esProNew.setUname(esPro.getUname());
+		esProNew.setSize(esPro.getSize());
+		esProNew.setKeywords(esPro.getKeywords());
+		esProMapper.insert(esProNew);
+
+		//创建文件路径
+		XIFileUtils.mkdir(XIFileUtils.getRootPathStr());
+		XIFileUtils.mkdir(XIFileUtils.getRootPathStr()+"/es");
+		XIFileUtils.mkdir(XIFileUtils.getRootPathStr()+"/es/"+pid_new);
+		XIFileUtils.mkdir(XIFileUtils.getRootPathStr()+"/es/"+pid_new+"/Calculate");
+		XIFileUtils.mkdir(XIFileUtils.getRootPathStr()+"/es/"+pid_new+"/Calculate/Geometry");//几何路径
+
+		List<String> pcIdList = new ArrayList<String>();
+		List<String> pcIdListNew = new ArrayList<String>();
+		selectAndSaveEsProCom(pid,pid_new,pcIdList,pcIdListNew);
+
+		Map<String,List<String>> pcaIdMap = new HashMap<>();
+		Map<String,List<String>> newPcaIdMap = new HashMap<>();
+		selectAndSaveEsProComAtt(pid,pid_new,pcIdList,pcIdListNew,pcaIdMap,newPcaIdMap);
+
+		//构造pcid和newpcid对照的map
+		Map<String, String> pcIdAndPcIdNewMap = new HashMap<>();
+		for (int i = 0; i < pcIdList.size(); i++) {
+			pcIdAndPcIdNewMap.put(pcIdList.get(i), pcIdListNew.get(i));
+		}
+
+		selectAndSaveEsProComAttData(pid,pid_new,pcIdAndPcIdNewMap,pcaIdMap,newPcaIdMap);
+
+		selectAndSaveEsProComCon(pid,pid_new,pcIdList,pcIdListNew);
+
+		//todo
+	}
+
+	/**
+	 * 查找并修改es_pro_com表记录
+	 * @param[in] pid
+	 * @param[in] pidNew
+	 * @param[out] pcIdList
+	 * @param[out] newPcIdList
+	 */
+	public void selectAndSaveEsProCom(String pid,String pidNew,List<String> pcIdList,List<String> newPcIdList)
+	{
+		EsProComMapper esProComMapper = UtilTools.getBean(EsProComMapper.class);
+		EsProComSQLBuilder esProComSQLBuilder = new EsProComSQLBuilder();
+		EsProComSQLBuilder.Criteria esProComSQLBuilderCriteria = esProComSQLBuilder.createCriteria();
+		esProComSQLBuilderCriteria.andUidEqualTo(this.getA_es0028().getUid());
+		esProComSQLBuilderCriteria.andPidEqualTo(pid);
+		List<EsProCom> esProComList = esProComMapper.selectByExample(esProComSQLBuilder);
+		for (EsProCom esProCom : esProComList){
+			String pcId = esProCom.getPcId();
+			pcIdList.add(pcId);
+
+			String pcIdNew = UtilTools.getUUid();
+			newPcIdList.add(pcIdNew);
+
+			EsProCom  esProComNew = new EsProCom();
+			esProComNew.setPcId(pcIdNew);
+			esProComNew.setComId(esProCom.getComId());
+			esProComNew.setUid(this.getA_es0028().getUid());
+			esProComNew.setRemark(esProCom.getRemark());
+			esProComNew.setCreateTime(esProCom.getCreateTime());
+			Date updateTime = new Date();
+			esProComNew.setUpdateTime(updateTime);
+			esProComNew.setPid(pidNew);
+			esProComNew.setSer(esProCom.getSer());
+			esProComNew.setIdCode(esProCom.getIdCode());
+			esProComMapper.insert(esProComNew);
+		}
+	}
+
+	/**
+	 * 查找并修改es_pro_com_att表记录
+	 * @param[in] pid
+	 * @param[in] pidNew
+	 * @param[in] pcIdList
+	 * @param[in] newPcIdList
+	 * @param[out] pcaIdMap
+	 * @param[out] newPcaIdMap
+	 */
+	public void selectAndSaveEsProComAtt(String pid,
+										 String pidNew,
+										 List<String> pcIdList,
+										 List<String> newPcIdList,
+										 Map<String,List<String>> pcaIdMap,
+										 Map<String,List<String>> newPcaIdMap){
+		EsProComAttMapper esProComAttMapper = UtilTools.getBean(EsProComAttMapper.class);
+		for(int i=0;i<pcIdList.size();i++){
+			if (pcIdList.get(i) == null || pcIdList.get(i).isEmpty()) {
+				continue;  // 跳过空值
+			}
+			Example example = new Example(EsProComAtt.class);
+			example.createCriteria()
+					.andEqualTo("pcId", pcIdList.get(i))
+					.andEqualTo("pid", pid)
+					.andEqualTo("uid", this.getA_es0028().getUid());
+			List<EsProComAtt> esProComAttList = esProComAttMapper.selectByExample(example);
+			for (EsProComAtt esProComAtt : esProComAttList){
+				String pcaId = esProComAtt.getPcId();
+				pcaIdMap.computeIfAbsent(pcIdList.get(i), k -> new ArrayList<>()).add(pcaId);
+
+				String pcaIdNew = UtilTools.getUUid();
+				newPcaIdMap.computeIfAbsent(newPcIdList.get(i), k -> new ArrayList<>()).add(pcaIdNew);
+
+				EsProComAtt  esProComAttNew = new EsProComAtt();
+				esProComAttNew.setPcaId(pcaIdNew);
+				esProComAttNew.setPid(pidNew);
+				esProComAttNew.setPcId(newPcIdList.get(i));
+				esProComAttNew.setComId(esProComAtt.getComId());
+				esProComAttNew.setAttId(esProComAtt.getAttId());
+				esProComAttNew.setValue(esProComAtt.getValue());
+				esProComAttNew.setUnit(esProComAtt.getUnit());
+				esProComAttNew.setUid(this.getA_es0028().getUid());
+				esProComAttNew.setRemark(esProComAtt.getRemark());
+				esProComAttNew.setCreateTime(esProComAtt.getCreateTime());
+				Date updateTime = new Date();
+				esProComAttNew.setUpdateTime(updateTime);
+				esProComAttMapper.insert(esProComAttNew);
+			}
+		}
+	}
+
+	/**
+	 * 查找并修改es_pro_com_att_data
+	 * @param[in] pid
+	 * @param[in] newPid
+	 * @param[in] pcIdAndPcIdNewMap
+	 * @param[in] pcaIdMap
+	 * @param[in] newPcaIdMap
+	 */
+	public void selectAndSaveEsProComAttData(String pid,
+											 String newPid,
+											 Map<String,String> pcIdAndPcIdNewMap,
+											 Map<String,List<String>> pcaIdMap,
+											 Map<String,List<String>> newPcaIdMap)
+	{
+		EsProComAttDataMapper esProComAttDataMapper = UtilTools.getBean(EsProComAttDataMapper.class);
+		if (esProComAttDataMapper == null) {
+			throw new IllegalStateException("Mapper not initialized");
+		}
+		if (pcIdAndPcIdNewMap == null || pcaIdMap == null || newPcaIdMap == null) {
+			throw new IllegalArgumentException("Input maps cannot be null");
+		}
+		for (Map.Entry<String, String> entry : pcIdAndPcIdNewMap.entrySet()) {
+			String pcId = entry.getKey();
+			String newPcId = entry.getValue();
+			List<String> pcaIdList = pcaIdMap.get(pcId);
+			List<String> newPcaIdList = newPcaIdMap.get(newPcId);
+			if (pcaIdList.isEmpty() || newPcaIdList.isEmpty()||pcaIdList==null || newPcaIdList==null) {
+				continue;
+			}
+			for(int i=0;i<pcaIdList.size();i++){
+				Example example = new Example(EsProComAttData.class);
+				example.createCriteria()
+						.andEqualTo("pid", pid)
+						.andEqualTo("pcId", pcId)
+						.andEqualTo("pcaId", pcaIdList.get(i))
+						.andEqualTo("uid", this.getA_es0028().getUid());
+				List<EsProComAttData> esProComAttDataList = esProComAttDataMapper.selectByExample(example);
+				for (EsProComAttData esProComAttData : esProComAttDataList){
+					EsProComAttData esProComAttDataNew = new EsProComAttData();
+					String pcad_id = UtilTools.getUUid();
+					esProComAttDataNew.setPcadId(pcad_id);
+					esProComAttDataNew.setPcadgId(esProComAttData.getPcadgId());
+					esProComAttDataNew.setPid(newPid);
+					esProComAttDataNew.setComId(esProComAttData.getComId());
+					esProComAttDataNew.setAttId(esProComAttData.getAttId());
+					esProComAttDataNew.setPcId(newPcId);
+					esProComAttDataNew.setPcaId(newPcaIdList.get(i));
+					esProComAttDataNew.setCdId(esProComAttData.getCdId());
+					esProComAttDataNew.setCdvId(esProComAttData.getCdvId());
+					esProComAttDataNew.setValue(esProComAttData.getValue());
+					esProComAttDataNew.setUnit(esProComAttData.getUnit());
+					esProComAttDataNew.setSer(esProComAttData.getSer());
+					esProComAttDataNew.setUid(this.getA_es0028().getUid());
+					esProComAttDataNew.setRemark(esProComAttData.getRemark());
+					esProComAttDataNew.setCreateTime(esProComAttData.getCreateTime());
+					Date updateTime = new Date();
+					esProComAttDataNew.setUpdateTime(updateTime);
+					esProComAttDataMapper.insert(esProComAttDataNew);
+				}
+			}
+		}
+	}
+
+	/**
+	 * 查找并修改es_pro_com_con
+	 * @param[in] pid
+	 * @param[in] newPid
+	 * @param[in] pcIdList
+	 * @param[in] newPcIdList
+	 */
+	public void selectAndSaveEsProComCon(String pid,
+										 String newPid,
+										 List<String> pcIdList,
+										 List<String> newPcIdList)
+	{
+		EsProComConMapper esProComConMapper = UtilTools.getBean(EsProComConMapper.class);
+		Example example = new Example(EsProComCon.class);
+		example.createCriteria()
+				.andEqualTo("pid", pid)
+				.andEqualTo("uid", this.getA_es0028().getUid());
+		List<EsProComCon>  esProComConList = esProComConMapper.selectByExample(example);
+		for (EsProComCon esProComCon : esProComConList){
+			EsProComCon esProComConNew = new EsProComCon();
+			String pccId = UtilTools.getUUid();
+			esProComConNew.setPccId(pccId);
+			esProComConNew.setPid(newPid);
+			esProComConNew.setType(esProComCon.getType());
+
+			int indexNpc = pcIdList.indexOf(esProComCon.getNpcId());
+			String npcId = newPcIdList.get(indexNpc);
+			esProComConNew.setNpcId(npcId);
+
+			int indexPc = pcIdList.indexOf(esProComCon.getPcId());
+			String pcId = newPcIdList.get(indexPc);
+			esProComConNew.setPcId(pcId);
+
+			esProComConNew.setUid(this.getA_es0028().getUid());
+			esProComConNew.setRemark(esProComCon.getRemark());
+			esProComConNew.setCreateTime(esProComCon.getCreateTime());
+			Date updateTime = new Date();
+			esProComConNew.setUpdateTime(updateTime);
+			esProComConMapper.insert(esProComConNew);
+		}
+	}
+
+	/**
+	 * 无锡发动机,“项目克隆”业务前处理
+ 	 */
+	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();
+	}
+
+}

+ 44 - 0
src/test/java/com/miniframe/comm/httpesapater/ES0028Test.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_ES0028;
+import com.miniframe.generate.comm.httpesapater.ES0028Client;
+import com.miniframe.generate.business.es.model.ES0028BaseModel;
+
+public class ES0028Test {
+
+	private static final Logger logger = LoggerFactory.getLogger(ES0028Test.class);
+
+	/**
+	 * 项目克隆,获取报文体
+	 * @return
+	 */
+	public static A_ES0028 getA_es0028() {
+		A_ES0028 a_es0028 = new A_ES0028();
+
+		// ----------以下增加【项目克隆】上行体赋值-------------
+
+
+
+		// ---------------------------------------------------
+		return a_es0028;
+	}
+	
+	/**
+	 * 运行客户端测试,项目克隆
+	 * 
+	 * @param args
+	 * @throws Exception
+	 */
+	public static void main(String[] args) throws Exception {
+		ES0028BaseModel model = new ES0028BaseModel();
+		model.setA_eshead(HttpesapaterUtil.getA_eshead("ES0028"));
+		model.setA_es0028(ES0028Test.getA_es0028());
+		ES0028Client client = new ES0028Client();
+		logger.error("客户端发送前总线:\r\n"+model);
+		model = client.execute(model);
+		logger.error("客户端发送后总线:\r\n"+model);
+	}
+}

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

@@ -27,6 +27,7 @@
 100025,ES0025,单位系统单位组值查看,service,
 100026,ES0026,单位系统删除,service,
 100027,ES0027,图片base64编码查询,service
+100028,ES0028,项目克隆,service
 
 110001,ES1001,组件查询,service,
 110002,BES001,基础字典查询,service,

+ 3 - 0
系统设计/通信设计/通讯报文/es(无锡发动机)/报文体/ES0028_A(项目克隆).csv

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

+ 2 - 0
系统设计/通信设计/通讯报文/es(无锡发动机)/报文体/ES0028_D(项目克隆).csv

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