Merge remote-tracking branch 'origin/master'
This commit is contained in:
+140
@@ -0,0 +1,140 @@
|
||||
package com.jero.modules.cert.collect.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author: liyawei
|
||||
* @Description:
|
||||
* @Date: Created in 15:15 2022/5/27
|
||||
*/
|
||||
@Data
|
||||
public class ParamsCollectManifestBaseEO implements Serializable {
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**nio编号*/
|
||||
@Excel(name = "nio编号", width = 15)
|
||||
@ApiModelProperty(value = "nio编号")
|
||||
private String nioNumber;
|
||||
|
||||
/**是否必填*/
|
||||
@Excel(name = "是否必填", width = 15)
|
||||
@ApiModelProperty(value = "是否必填")
|
||||
private String isMust;
|
||||
|
||||
/**参数名称*/
|
||||
@Excel(name = "参数名称", width = 15)
|
||||
@ApiModelProperty(value = "参数名称")
|
||||
private String paramsName;
|
||||
|
||||
/**技术领域*/
|
||||
@Excel(name = "技术领域", width = 15)
|
||||
@ApiModelProperty(value = "技术领域")
|
||||
private String technologyTerritory;
|
||||
|
||||
/**参数批次*/
|
||||
@Excel(name = "参数批次", width = 15)
|
||||
@ApiModelProperty(value = "参数批次")
|
||||
private String paramsBatch;
|
||||
|
||||
/**责任领域*/
|
||||
@Excel(name = "责任领域", width = 15)
|
||||
@ApiModelProperty(value = "责任领域")
|
||||
private String dutyTerritory;
|
||||
|
||||
/**参数说明*/
|
||||
@Excel(name = "参数说明", width = 15)
|
||||
@ApiModelProperty(value = "参数说明")
|
||||
private String description;
|
||||
|
||||
/**认证类别*/
|
||||
@Excel(name = "认证类别", width = 15)
|
||||
@ApiModelProperty(value = "认证类别")
|
||||
private String certCategory;
|
||||
|
||||
/**控件类型*/
|
||||
@Excel(name = "控件类型", width = 15)
|
||||
@ApiModelProperty(value = "控件类型")
|
||||
private String controlType;
|
||||
|
||||
/**控件备选值*/
|
||||
@Excel(name = "控件备选值", width = 15)
|
||||
@ApiModelProperty(value = "控件备选值")
|
||||
private String controlValues;
|
||||
|
||||
/**控件校验*/
|
||||
@Excel(name = "控件校验", width = 15)
|
||||
@ApiModelProperty(value = "控件校验")
|
||||
private String controlVerify;
|
||||
|
||||
/**附件模板*/
|
||||
@Excel(name = "附件模板", width = 15)
|
||||
@ApiModelProperty(value = "附件模板")
|
||||
private String fileTemplate;
|
||||
|
||||
/**参数模板id*/
|
||||
@Excel(name = "参数模板id", width = 15)
|
||||
@ApiModelProperty(value = "参数模板id")
|
||||
private String paramsTemplateId;
|
||||
|
||||
/**状态*/
|
||||
@Excel(name = "状态", width = 15)
|
||||
@ApiModelProperty(value = "状态")
|
||||
private String state;
|
||||
|
||||
/**工程接口人*/
|
||||
@Excel(name = "工程接口人", width = 15)
|
||||
@ApiModelProperty(value = "工程接口人")
|
||||
private String sdt;
|
||||
|
||||
/**填写人*/
|
||||
@Excel(name = "填写人", width = 15)
|
||||
@ApiModelProperty(value = "填写人")
|
||||
private String dre;
|
||||
|
||||
/**截止时间*/
|
||||
@Excel(name = "截止时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "截止时间")
|
||||
private java.util.Date deadline;
|
||||
|
||||
/**参数清单id*/
|
||||
@Excel(name = "参数清单id", width = 15)
|
||||
@ApiModelProperty(value = "参数清单id")
|
||||
private String paramsManifestId;
|
||||
}
|
||||
+1
-122
@@ -27,130 +27,9 @@ import java.io.Serializable;
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="params_collect_manifest对象", description="参数收集清单")
|
||||
public class ParamsCollectManifestEO implements Serializable {
|
||||
public class ParamsCollectManifestEO extends ParamsCollectManifestBaseEO implements Serializable {
|
||||
// private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**nio编号*/
|
||||
@Excel(name = "nio编号", width = 15)
|
||||
@ApiModelProperty(value = "nio编号")
|
||||
private String nioNumber;
|
||||
|
||||
/**是否必填*/
|
||||
@Excel(name = "是否必填", width = 15)
|
||||
@ApiModelProperty(value = "是否必填")
|
||||
private String isMust;
|
||||
|
||||
/**参数名称*/
|
||||
@Excel(name = "参数名称", width = 15)
|
||||
@ApiModelProperty(value = "参数名称")
|
||||
private String paramsName;
|
||||
|
||||
/**技术领域*/
|
||||
@Excel(name = "技术领域", width = 15)
|
||||
@ApiModelProperty(value = "技术领域")
|
||||
private String technologyTerritory;
|
||||
|
||||
/**参数批次*/
|
||||
@Excel(name = "参数批次", width = 15)
|
||||
@ApiModelProperty(value = "参数批次")
|
||||
private String paramsBatch;
|
||||
|
||||
/**责任领域*/
|
||||
@Excel(name = "责任领域", width = 15)
|
||||
@ApiModelProperty(value = "责任领域")
|
||||
private String dutyTerritory;
|
||||
|
||||
/**参数说明*/
|
||||
@Excel(name = "参数说明", width = 15)
|
||||
@ApiModelProperty(value = "参数说明")
|
||||
private String description;
|
||||
|
||||
/**认证类别*/
|
||||
@Excel(name = "认证类别", width = 15)
|
||||
@ApiModelProperty(value = "认证类别")
|
||||
private String certCategory;
|
||||
|
||||
/**控件类型*/
|
||||
@Excel(name = "控件类型", width = 15)
|
||||
@ApiModelProperty(value = "控件类型")
|
||||
private String controlType;
|
||||
|
||||
/**控件备选值*/
|
||||
@Excel(name = "控件备选值", width = 15)
|
||||
@ApiModelProperty(value = "控件备选值")
|
||||
private String controlValues;
|
||||
|
||||
/**控件校验*/
|
||||
@Excel(name = "控件校验", width = 15)
|
||||
@ApiModelProperty(value = "控件校验")
|
||||
private String controlVerify;
|
||||
|
||||
/**附件模板*/
|
||||
@Excel(name = "附件模板", width = 15)
|
||||
@ApiModelProperty(value = "附件模板")
|
||||
private String fileTemplate;
|
||||
|
||||
/**参数模板id*/
|
||||
@Excel(name = "参数模板id", width = 15)
|
||||
@ApiModelProperty(value = "参数模板id")
|
||||
private String paramsTemplateId;
|
||||
|
||||
/**状态*/
|
||||
@Excel(name = "状态", width = 15)
|
||||
@ApiModelProperty(value = "状态")
|
||||
private String state;
|
||||
|
||||
/**工程接口人*/
|
||||
@Excel(name = "工程接口人", width = 15)
|
||||
@ApiModelProperty(value = "工程接口人")
|
||||
private String sdt;
|
||||
|
||||
/**填写人*/
|
||||
@Excel(name = "填写人", width = 15)
|
||||
@ApiModelProperty(value = "填写人")
|
||||
private String dre;
|
||||
|
||||
/**截止时间*/
|
||||
@Excel(name = "截止时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "截止时间")
|
||||
private java.util.Date deadline;
|
||||
|
||||
/**参数清单id*/
|
||||
@Excel(name = "参数清单id", width = 15)
|
||||
@ApiModelProperty(value = "参数清单id")
|
||||
private String paramsManifestId;
|
||||
|
||||
/**变更标识*/
|
||||
@Excel(name = "变更标识", width = 15)
|
||||
@ApiModelProperty(value = "变更标识")
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -20,6 +21,6 @@ import java.io.Serializable;
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="params_collect_manifest_history对象", description="参数项收集清单历史版本")
|
||||
public class ParamsCollectManifestHistoryEO extends ParamsCollectManifestEO implements Serializable {
|
||||
public class ParamsCollectManifestHistoryEO extends ParamsCollectManifestBaseEO implements Serializable {
|
||||
|
||||
}
|
||||
|
||||
+75
-17
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
@@ -1165,27 +1166,84 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
return updateBatchById(updateEOList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一个类和其父类的所有属性
|
||||
*
|
||||
* @param clazz
|
||||
* @return
|
||||
*/
|
||||
private List<Field> findAllFieldsOfSelfAndSuperClass(Class clazz) {
|
||||
Field[] fields = null;
|
||||
List fieldList = Lists.newArrayList();
|
||||
while (true) {
|
||||
if (clazz == null) {
|
||||
break;
|
||||
} else {
|
||||
fields = clazz.getDeclaredFields();
|
||||
for (int i = 0; i < fields.length; i++) {
|
||||
fieldList.add(fields[i]);
|
||||
}
|
||||
clazz = clazz.getSuperclass();
|
||||
}
|
||||
}
|
||||
return fieldList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将对象转Map
|
||||
* @param obj 待转对象
|
||||
* @return
|
||||
*/
|
||||
private Map<String, Object> objectToMap(Object obj) {
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
// 获取f对象对应类中的所有属性域
|
||||
List<Field> list = findAllFieldsOfSelfAndSuperClass(obj.getClass());
|
||||
for (Field field : list) {
|
||||
|
||||
String varName = field.getName();
|
||||
try {
|
||||
// 获取原来的访问控制权限
|
||||
boolean accessFlag = field.isAccessible();
|
||||
// 修改访问控制权限
|
||||
field.setAccessible(true);
|
||||
// 获取在对象f中属性fields[i]对应的对象中的变量
|
||||
Object o = field.get(obj);
|
||||
if (o != null)
|
||||
map.put(varName, o);
|
||||
// 恢复访问控制权限
|
||||
field.setAccessible(accessFlag);
|
||||
} catch (IllegalArgumentException ex) {
|
||||
ex.printStackTrace();
|
||||
} catch (IllegalAccessException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
return map;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 实体对象转成Map
|
||||
* @param obj 实体对象
|
||||
* @return
|
||||
*/
|
||||
private Map<String, Object> objectToMap(Object obj) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if (obj == null) {
|
||||
return map;
|
||||
}
|
||||
Class clazz = obj.getClass();
|
||||
Field[] fields = clazz.getDeclaredFields();
|
||||
try {
|
||||
for (Field field : fields) {
|
||||
field.setAccessible(true);
|
||||
map.put(field.getName(), field.get(obj));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return map;
|
||||
}
|
||||
// private Map<String, Object> objectToMap(Object obj) {
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// if (obj == null) {
|
||||
// return map;
|
||||
// }
|
||||
// Class clazz = obj.getClass();
|
||||
// Field[] fields = clazz.getDeclaredFields();
|
||||
// try {
|
||||
// for (Field field : fields) {
|
||||
// field.setAccessible(true);
|
||||
// map.put(field.getName(), field.get(obj));
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// return map;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
+76
-18
@@ -3,6 +3,7 @@ package com.jero.modules.cert.collect.service.impl;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
@@ -145,7 +146,7 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
* @param paramsCollectManifestEO
|
||||
* @return
|
||||
*/
|
||||
private List<ParamsConfigDataVO> getConfigDataVOList(String controlType, ParamsConfigDataEO paramsConfigDataEO, ParamsCollectManifestEO paramsCollectManifestEO) {
|
||||
private List<ParamsConfigDataVO> getConfigDataVOList(String controlType, ParamsConfigDataEO paramsConfigDataEO, ParamsCollectManifestHistoryEO paramsCollectManifestEO) {
|
||||
List<ParamsConfigDataVO> paramsConfigDataVOList = new ArrayList<>();
|
||||
|
||||
if (ControlTypeEnum.TEXT.getValue().equals(controlType)) {
|
||||
@@ -382,26 +383,83 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一个类和其父类的所有属性
|
||||
*
|
||||
* @param clazz
|
||||
* @return
|
||||
*/
|
||||
private List<Field> findAllFieldsOfSelfAndSuperClass(Class clazz) {
|
||||
Field[] fields = null;
|
||||
List fieldList = Lists.newArrayList();
|
||||
while (true) {
|
||||
if (clazz == null) {
|
||||
break;
|
||||
} else {
|
||||
fields = clazz.getDeclaredFields();
|
||||
for (int i = 0; i < fields.length; i++) {
|
||||
fieldList.add(fields[i]);
|
||||
}
|
||||
clazz = clazz.getSuperclass();
|
||||
}
|
||||
}
|
||||
return fieldList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将对象转Map
|
||||
* @param obj 待转对象
|
||||
* @return
|
||||
*/
|
||||
private Map<String, Object> objectToMap(Object obj) {
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
// 获取f对象对应类中的所有属性域
|
||||
List<Field> list = findAllFieldsOfSelfAndSuperClass(obj.getClass());
|
||||
for (Field field : list) {
|
||||
|
||||
String varName = field.getName();
|
||||
try {
|
||||
// 获取原来的访问控制权限
|
||||
boolean accessFlag = field.isAccessible();
|
||||
// 修改访问控制权限
|
||||
field.setAccessible(true);
|
||||
// 获取在对象f中属性fields[i]对应的对象中的变量
|
||||
Object o = field.get(obj);
|
||||
if (o != null)
|
||||
map.put(varName, o);
|
||||
// 恢复访问控制权限
|
||||
field.setAccessible(accessFlag);
|
||||
} catch (IllegalArgumentException ex) {
|
||||
ex.printStackTrace();
|
||||
} catch (IllegalAccessException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
return map;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 实体对象转成Map
|
||||
* @param obj 实体对象
|
||||
* @return
|
||||
*/
|
||||
private Map<String, Object> objectToMap(Object obj) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if (obj == null) {
|
||||
return map;
|
||||
}
|
||||
Class clazz = obj.getClass();
|
||||
Field[] fields = clazz.getDeclaredFields();
|
||||
try {
|
||||
for (Field field : fields) {
|
||||
field.setAccessible(true);
|
||||
map.put(field.getName(), field.get(obj));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return map;
|
||||
}
|
||||
// private Map<String, Object> objectToMap(Object obj) {
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// if (obj == null) {
|
||||
// return map;
|
||||
// }
|
||||
// Class clazz = obj.getClass();
|
||||
// Field[] fields = clazz.getDeclaredFields();
|
||||
// try {
|
||||
// for (Field field : fields) {
|
||||
// field.setAccessible(true);
|
||||
// map.put(field.getName(), field.get(obj));
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// return map;
|
||||
// }
|
||||
}
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@ package com.jero.modules.cert.report.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestBaseEO;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -25,7 +26,7 @@ import java.io.Serializable;
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="params_report_detail对象", description="上报库参数项")
|
||||
public class ParamsReportDetailEO extends ParamsCollectManifestEO implements Serializable {
|
||||
public class ParamsReportDetailEO extends ParamsCollectManifestBaseEO implements Serializable {
|
||||
// private static final long serialVersionUID = 1L;
|
||||
|
||||
/**同步时间*/
|
||||
|
||||
+76
-18
@@ -3,6 +3,7 @@ package com.jero.modules.cert.report.service.impl;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
@@ -148,7 +149,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
* @param paramsCollectManifestEO
|
||||
* @return
|
||||
*/
|
||||
private List<ParamsConfigDataVO> getConfigDataVOList(String controlType, ParamsConfigDataEO paramsConfigDataEO, ParamsCollectManifestEO paramsCollectManifestEO) {
|
||||
private List<ParamsConfigDataVO> getConfigDataVOList(String controlType, ParamsConfigDataEO paramsConfigDataEO, ParamsReportDetailEO paramsCollectManifestEO) {
|
||||
List<ParamsConfigDataVO> paramsConfigDataVOList = new ArrayList<>();
|
||||
|
||||
if (ControlTypeEnum.TEXT.getValue().equals(controlType)) {
|
||||
@@ -385,26 +386,83 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一个类和其父类的所有属性
|
||||
*
|
||||
* @param clazz
|
||||
* @return
|
||||
*/
|
||||
private List<Field> findAllFieldsOfSelfAndSuperClass(Class clazz) {
|
||||
Field[] fields = null;
|
||||
List fieldList = Lists.newArrayList();
|
||||
while (true) {
|
||||
if (clazz == null) {
|
||||
break;
|
||||
} else {
|
||||
fields = clazz.getDeclaredFields();
|
||||
for (int i = 0; i < fields.length; i++) {
|
||||
fieldList.add(fields[i]);
|
||||
}
|
||||
clazz = clazz.getSuperclass();
|
||||
}
|
||||
}
|
||||
return fieldList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将对象转Map
|
||||
* @param obj 待转对象
|
||||
* @return
|
||||
*/
|
||||
private Map<String, Object> objectToMap(Object obj) {
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
// 获取f对象对应类中的所有属性域
|
||||
List<Field> list = findAllFieldsOfSelfAndSuperClass(obj.getClass());
|
||||
for (Field field : list) {
|
||||
|
||||
String varName = field.getName();
|
||||
try {
|
||||
// 获取原来的访问控制权限
|
||||
boolean accessFlag = field.isAccessible();
|
||||
// 修改访问控制权限
|
||||
field.setAccessible(true);
|
||||
// 获取在对象f中属性fields[i]对应的对象中的变量
|
||||
Object o = field.get(obj);
|
||||
if (o != null)
|
||||
map.put(varName, o);
|
||||
// 恢复访问控制权限
|
||||
field.setAccessible(accessFlag);
|
||||
} catch (IllegalArgumentException ex) {
|
||||
ex.printStackTrace();
|
||||
} catch (IllegalAccessException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
return map;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 实体对象转成Map
|
||||
* @param obj 实体对象
|
||||
* @return
|
||||
*/
|
||||
private Map<String, Object> objectToMap(Object obj) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if (obj == null) {
|
||||
return map;
|
||||
}
|
||||
Class clazz = obj.getClass();
|
||||
Field[] fields = clazz.getDeclaredFields();
|
||||
try {
|
||||
for (Field field : fields) {
|
||||
field.setAccessible(true);
|
||||
map.put(field.getName(), field.get(obj));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return map;
|
||||
}
|
||||
// private Map<String, Object> objectToMap(Object obj) {
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// if (obj == null) {
|
||||
// return map;
|
||||
// }
|
||||
// Class clazz = obj.getClass();
|
||||
// Field[] fields = clazz.getDeclaredFields();
|
||||
// try {
|
||||
// for (Field field : fields) {
|
||||
// field.setAccessible(true);
|
||||
// map.put(field.getName(), field.get(obj));
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// return map;
|
||||
// }
|
||||
}
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.jero.modules.system.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.system.service.ISyncDataService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @Author: liyawei
|
||||
* @Description:
|
||||
* @Date: Created in 15:50 2022/5/24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sys/people")
|
||||
@Api(tags="people同步")
|
||||
@Slf4j
|
||||
public class SyncDataController {
|
||||
@Autowired
|
||||
private ISyncDataService syncDataService;
|
||||
|
||||
@ApiOperation(value = "通过people同步部门信息")
|
||||
@GetMapping("/syncDepartInfo")
|
||||
public Result<?> syncDepartInfo() throws Exception {
|
||||
syncDataService.synchronPPDepartInfo();
|
||||
return Result.OK("开始同步部门信息");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "通过people同步用户信息")
|
||||
@GetMapping("/syncUserInfo")
|
||||
public Result<?> syncUserInfo() throws Exception {
|
||||
syncDataService.synchronPPUserInfo();
|
||||
return Result.OK("开始同步用户信息");
|
||||
}
|
||||
}
|
||||
+10
-1
@@ -579,7 +579,16 @@ public class SysCategoryController {
|
||||
*/
|
||||
@GetMapping("/getSysCategoryTree")
|
||||
public Result getSysCategoryTree() {
|
||||
return Result.OK(sysCategoryService.getSysCategoryTree());
|
||||
return Result.OK(sysCategoryService.getSysCategoryTree(null));
|
||||
}
|
||||
/**
|
||||
* 只查询交付物类型的树形数据字典
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getDeliverableTree")
|
||||
public Result getDeliverableTree() {
|
||||
String flag = "deliverable_template";
|
||||
return Result.OK(sysCategoryService.getSysCategoryTree(flag));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
package com.jero.modules.system.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 同步时间记录表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-05-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("ot_sync_info")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="ot_sync_info对象", description="同步时间记录表")
|
||||
public class OtSyncInfoEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**同步时间*/
|
||||
@Excel(name = "同步时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "同步时间")
|
||||
private java.util.Date syncTime;
|
||||
|
||||
/**上次同步时间*/
|
||||
@Excel(name = "上次同步时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "上次同步时间")
|
||||
private java.util.Date lastSyncTime;
|
||||
|
||||
/**同步类型*/
|
||||
@Excel(name = "同步类型", width = 15)
|
||||
@ApiModelProperty(value = "同步类型")
|
||||
private String syncType;
|
||||
|
||||
}
|
||||
+2
-2
@@ -9,10 +9,10 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class PPDepartment {
|
||||
private String ref_id; //部门ID ----id
|
||||
private String ref_id; //部门ID ----id, org_code(因为org_code不能为空)
|
||||
private String name_en; //部门英文名 ----depart_name_en
|
||||
private String name_cn; //部门中文名 ----depart_name
|
||||
private String code; //部门code ----org_code
|
||||
private String code; //部门code ----depart_order
|
||||
private String manager_id; //部门负责人员工号
|
||||
private String manager_wk_uid; //部门负责人域账号
|
||||
private String hr_partner; //部门 HRBP(多个会用";"隔开)
|
||||
|
||||
+27
-11
@@ -11,14 +11,15 @@ import java.util.Date;
|
||||
*/
|
||||
@Data
|
||||
public class PPEmployee {
|
||||
// people_info
|
||||
private String data_difference; //数据来源[WORKDAY,XPT,NIOCAPITAL]
|
||||
private String employee_difference; // 员工来源[CN, EU_US,EU]
|
||||
private String employee_id; // 员工编号(员工唯一标识)
|
||||
private String worker_user_id; //WD帐号创建SSO账号 / AD账户
|
||||
private String user_name; // WD同步到people的域帐号
|
||||
private String foreign_employee_id; // 兼职公司对应的员工编号
|
||||
private String employee_id; // 员工编号(员工唯一标识) ----workNo
|
||||
private String worker_user_id; //WD帐号创建SSO账号 / AD账户 ----thirdId
|
||||
private String user_name; // WD同步到people的域帐号 ----username
|
||||
// private String foreign_employee_id; // 兼职公司对应的员工编号
|
||||
private String name; // 全名
|
||||
private String formatted_name; // 全名-拼音及中文
|
||||
private String formatted_name; // 全名-拼音及中文 ----realname
|
||||
private String preferred_first_name; // 首选-名
|
||||
private String preferred_last_name; // 首选-姓
|
||||
private String first_name; //法定-名-拼音
|
||||
@@ -28,13 +29,13 @@ public class PPEmployee {
|
||||
private String name_in_local_script; // 法定-姓名-中文
|
||||
private String first_name_in_local_script; // 名-中文
|
||||
private String last_name_in_local_script; // 姓-中文
|
||||
private String delete_flag; // 删除标记[1:存在;0:删除]
|
||||
private String delete_flag; // 删除标记[1:存在;0:删除] ----delFlag
|
||||
private String delete_time; // 删除时间
|
||||
private String delay_flag; // 延期标记(0:延期,1:未延期,2:未操作)
|
||||
private String delay_time; // 延期时间
|
||||
private String employee_status; // 员工状态[Active,Terminated]
|
||||
private String employee_status; // 员工状态[Active,Terminated] ----statue
|
||||
private String outsourcing_type; // 外包形式
|
||||
private String worker_type; // 员工种类 Employee,Contingent Worker
|
||||
private String worker_type; // 员工种类 Employee,Contingent Worker ----workerType
|
||||
private String hire_date; // 员工入职日期
|
||||
private String original_hire_date; // 员工原始入职日期
|
||||
private String rehire; // 重新雇用[1:是;0:否]
|
||||
@@ -53,8 +54,23 @@ public class PPEmployee {
|
||||
private String domain; // 账号所属域
|
||||
private String ad_failed; // 创建ad失败原账号
|
||||
private String have_employees; // 是否有下属员工
|
||||
private String id; // id
|
||||
private Date creation_time; // 创建时间
|
||||
private Date update_time; // 修改时间
|
||||
private String id; // id ----id
|
||||
private Date creation_time; // 创建时间 ----createTime
|
||||
private Date update_time; // 修改时间 ----updateTime
|
||||
|
||||
// people_job_info 多个 取第一个
|
||||
private String job_code;
|
||||
private String job_title;
|
||||
private String supervisory_organization_ref_id; // 部门id
|
||||
|
||||
|
||||
// people_contact_email 多个 取第一个WORK邮箱
|
||||
private String email_type; // HOME/WORK
|
||||
private String email_address;
|
||||
|
||||
// people_contact_phone 多个 取第一个Mobile的WORK电话
|
||||
private String phone_type; // HOME/WORK
|
||||
private String phone_device_type; // Mobile/Landline
|
||||
private String formatted_phone_number;
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -164,6 +164,7 @@ public class SysUser implements Serializable {
|
||||
private String clientId;
|
||||
|
||||
private String thirdId;//用户域账号
|
||||
private String thirdType;//用户数据来源
|
||||
|
||||
@Excel(name = "员工类型", width = 15, dicCode = "worker_type")
|
||||
@Dict(dicCode = "worker_type")
|
||||
@@ -182,4 +183,8 @@ public class SysUser implements Serializable {
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut; //中英文切换标识
|
||||
|
||||
//新添加的字段
|
||||
private String jobCode;
|
||||
private String jobTitle;
|
||||
}
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.system.entity.OtSyncInfoEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 同步时间记录表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-05-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface OtSyncInfoEOMapper extends BaseMapper<OtSyncInfoEO> {
|
||||
|
||||
}
|
||||
+2
@@ -41,5 +41,7 @@ public interface SysCategoryMapper extends BaseMapper<SysCategory> {
|
||||
|
||||
public String getFieldInfo(@Param("fieldName") String fieldName);
|
||||
|
||||
public String getDictId(@Param("dicCode") String dicCode);
|
||||
|
||||
List<SysCategory> queryByTreeDicCode( @Param("dicCode") String dicCode);
|
||||
}
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<?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.jero.modules.system.mapper.OtSyncInfoEOMapper">
|
||||
<resultMap id="OtSyncInfoEOResultMap" type="com.jero.modules.system.entity.OtSyncInfoEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="sync_time" property="syncTime" />
|
||||
<result column="last_sync_time" property="lastSyncTime" />
|
||||
<result column="sync_type" property="syncType" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+7
-2
@@ -18,7 +18,7 @@
|
||||
</select>
|
||||
|
||||
<select id="queryPageList" resultType="com.jero.modules.system.entity.SysCategory">
|
||||
select create_by,create_time,sys_org_code,update_by,update_time,attribute_type,code,
|
||||
select create_by,create_time,sys_org_code,update_by,update_time,attribute_type,code,sort_order,
|
||||
del_flag,description,en_name,has_child,id,is_read_only,is_tag_dict,item_value,name,pid,sys_dict_id
|
||||
from sys_category
|
||||
where is_tag_dict=1 and sys_dict_id=#{params.sysDictId} and del_flag=0
|
||||
@@ -34,7 +34,7 @@
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
order by create_time desc
|
||||
order by sort_order
|
||||
</select>
|
||||
|
||||
<select id="getFieldInfo" resultType="java.lang.String">
|
||||
@@ -49,4 +49,9 @@
|
||||
where sys_dict_id = (select id from sys_dict where dict_code = #{dicCode})
|
||||
and del_flag=0
|
||||
</select>
|
||||
|
||||
<select id="getDictId" resultType="java.lang.String">
|
||||
select id from sys_dict
|
||||
where dict_code = #{dicCode}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+1
-1
@@ -166,6 +166,6 @@
|
||||
</choose>
|
||||
</if>
|
||||
|
||||
order by d.order_num desc
|
||||
order by d.order_num
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.jero.modules.system.service;
|
||||
|
||||
import com.jero.modules.system.entity.OtSyncInfoEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 同步时间记录表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-05-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IOtSyncInfoEOService extends IService<OtSyncInfoEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param otSyncInfoEO
|
||||
* @return
|
||||
*/
|
||||
void add(OtSyncInfoEO otSyncInfoEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param otSyncInfoEO
|
||||
* @return
|
||||
*/
|
||||
void editById(OtSyncInfoEO otSyncInfoEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
OtSyncInfoEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<OtSyncInfoEO> queryList();
|
||||
|
||||
OtSyncInfoEO getLastSyncInfo(String syncType);
|
||||
}
|
||||
+6
-2
@@ -13,6 +13,12 @@ import java.security.NoSuchAlgorithmException;
|
||||
* @Date: Created in 15:37 2022/2/28
|
||||
*/
|
||||
public interface ISyncDataService {
|
||||
|
||||
void synchronPPDepartInfo() throws Exception;
|
||||
|
||||
void synchronPPUserInfo() throws Exception;
|
||||
|
||||
|
||||
void syncDepartInfo() throws IOException, NoSuchAlgorithmException, InvalidKeyException;
|
||||
|
||||
int insertDepartFromTree(PPOrganization root, int i);
|
||||
@@ -22,6 +28,4 @@ public interface ISyncDataService {
|
||||
void syncDepartRoleInfo() throws IOException, NoSuchAlgorithmException, InvalidKeyException;
|
||||
|
||||
void syncDepartRoleUserInfo() throws IOException, NoSuchAlgorithmException, InvalidKeyException;
|
||||
|
||||
String getResultDataOfGet(String uri, String queryString) throws IOException, NoSuchAlgorithmException, InvalidKeyException;
|
||||
}
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ public interface ISysCategoryService extends IService<SysCategory> {
|
||||
* 获取树形结构
|
||||
* @return
|
||||
*/
|
||||
List<SysCategoryTreeVO> getSysCategoryTree();
|
||||
List<SysCategoryTreeVO> getSysCategoryTree(String flag);
|
||||
|
||||
/**
|
||||
* 获取树形结构,中英文可切换
|
||||
|
||||
+17
-1
@@ -140,8 +140,24 @@ public interface ISysDepartService extends IService<SysDepart>{
|
||||
*/
|
||||
void updateAllParentId();
|
||||
|
||||
/**
|
||||
* 获取从people同步过来的部门列表
|
||||
* @return
|
||||
*/
|
||||
List<SysDepart> getPPDepartList();
|
||||
|
||||
/**
|
||||
* 添加从people同步过来的部门
|
||||
* @param ppDepartment
|
||||
* @return
|
||||
*/
|
||||
SysDepart addPPDepart(PPDepartment ppDepartment);
|
||||
void updatePPDepart(PPDepartment ppDepartment);
|
||||
|
||||
/**
|
||||
* 修改从people同步过来的部门
|
||||
* @param sysDepart
|
||||
* @param ppDepartment
|
||||
*/
|
||||
void updatePPDepart(SysDepart sysDepart, PPDepartment ppDepartment);
|
||||
|
||||
}
|
||||
|
||||
+8
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.vo.SysUserCacheInfo;
|
||||
import com.jero.modules.system.entity.PPEmployee;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.model.DepartIdModel;
|
||||
import com.jero.modules.system.model.SysUserSysDepartModel;
|
||||
@@ -254,4 +255,11 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* 根据用户名usernameList查询id
|
||||
*/
|
||||
List<SysUser> queryUserIdListByNameList(List<String> usernameList);
|
||||
|
||||
List<SysUser> getPPEmployeeList();
|
||||
|
||||
SysUser addPPUserInfo(PPEmployee ppEmployee);
|
||||
|
||||
void updatePPUserInfo(SysUser sysUser, PPEmployee ppEmployee);
|
||||
|
||||
}
|
||||
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
package com.jero.modules.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.modules.system.entity.OtSyncInfoEO;
|
||||
import com.jero.modules.system.mapper.OtSyncInfoEOMapper;
|
||||
import com.jero.modules.system.service.IOtSyncInfoEOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 同步时间记录表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-05-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class OtSyncInfoEOServiceImpl extends ServiceImpl<OtSyncInfoEOMapper, OtSyncInfoEO> implements IOtSyncInfoEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param otSyncInfoEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(OtSyncInfoEO otSyncInfoEO) {
|
||||
Date now = new Date();
|
||||
otSyncInfoEO.setCreateTime(now);
|
||||
otSyncInfoEO.setUpdateTime(now);
|
||||
save(otSyncInfoEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param otSyncInfoEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(OtSyncInfoEO otSyncInfoEO) {
|
||||
Date now = new Date();
|
||||
otSyncInfoEO.setUpdateTime(now);
|
||||
saveOrUpdate(otSyncInfoEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public OtSyncInfoEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<OtSyncInfoEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取上一次同步的信息
|
||||
* @param syncType
|
||||
* @return
|
||||
*/
|
||||
public OtSyncInfoEO getLastSyncInfo(String syncType){
|
||||
LambdaQueryWrapper<OtSyncInfoEO> queryWrapper = new LambdaQueryWrapper();
|
||||
queryWrapper.eq(OtSyncInfoEO::getSyncType, syncType)
|
||||
.orderByDesc(OtSyncInfoEO::getSyncTime);
|
||||
List<OtSyncInfoEO> syncInfoEOList = list(queryWrapper);
|
||||
if(syncInfoEOList!=null && !syncInfoEOList.isEmpty()){
|
||||
return syncInfoEOList.get(0);
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
+292
-17
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.system.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
@@ -8,6 +9,7 @@ import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.PasswordUtil;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.modules.system.entity.*;
|
||||
import com.jero.modules.system.enums.PPSyncEnum;
|
||||
import com.jero.modules.system.service.*;
|
||||
import com.jero.modules.system.util.HmacSignUtil;
|
||||
import com.jero.modules.system.util.HttpRequestUtil;
|
||||
@@ -16,15 +18,15 @@ import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -54,12 +56,283 @@ public class SyncDataServiceImpl implements ISyncDataService{
|
||||
private ISysDepartRoleService sysDepartRoleService;
|
||||
@Autowired
|
||||
private ISysDepartRoleUserService sysDepartRoleUserService;
|
||||
@Autowired
|
||||
private IOtSyncInfoEOService otSyncInfoEOService;
|
||||
|
||||
/**
|
||||
* 同步部门信息
|
||||
* @throws Exception
|
||||
*/
|
||||
@Async
|
||||
@Transactional(readOnly = false, rollbackFor = Exception.class)
|
||||
public void synchronPPDepartInfo() throws Exception {
|
||||
Date nowTime = new Date();
|
||||
// 本地组织机构MAP
|
||||
Map<String, SysDepart> localDepartMap = new HashMap<String, SysDepart>();
|
||||
// 获取上次同步状态
|
||||
OtSyncInfoEO lastSyncInfo = otSyncInfoEOService.getLastSyncInfo(PPSyncEnum.PP_DEPART.getValue());
|
||||
//首先获取系统内的所有PP组织机构
|
||||
List<SysDepart> sysDepartList = sysDepartService.getPPDepartList();
|
||||
//将List转化成Map结构
|
||||
if (sysDepartList != null && !sysDepartList.isEmpty()) {
|
||||
for (SysDepart eo : sysDepartList) {
|
||||
localDepartMap.put(eo.getId(), eo);
|
||||
}
|
||||
}
|
||||
// 取PP数据
|
||||
String path = "/people/v1/base/department/list";
|
||||
String queryStr = "app_id=" + appId +"&hash_type=sha256&offset=0&limit=100";
|
||||
String response = getResultDataOfGet(path, queryStr);
|
||||
JSONObject myJson = JSONObject.parseObject(response);
|
||||
log.debug(myJson.toJSONString());
|
||||
if (!myJson.get("result_code").toString().equals("success")) {
|
||||
log.error("请求出现异常:" + myJson.get("message") + " " + myJson);
|
||||
} else {
|
||||
log.debug("打印输出本次同步信息返回结果:" + myJson.get("data").toString());
|
||||
JSONObject resultJson = (JSONObject) myJson.get("data");
|
||||
List<PPDepartment> ppDepartList = JSONObject.parseArray(resultJson.get("list").toString(), PPDepartment.class);
|
||||
//获取总记录数
|
||||
int total = (int) resultJson.get("amount");
|
||||
if (total > 100) {
|
||||
int pageSum = total / 100; // 总页数
|
||||
if ((total % 100) > 0) {
|
||||
pageSum += 1;
|
||||
}
|
||||
//循环查询统一认证系统所有账户信息(从第二页开始)
|
||||
for (int page = 1; page < pageSum; page++) {
|
||||
path = "/people/v1/base/department/list";
|
||||
queryStr = "app_id=" + appId +"&hash_type=sha256&limit=100&offset=" + (page*100);
|
||||
response = getResultDataOfGet(path, queryStr);
|
||||
myJson = JSONObject.parseObject(response.toString());
|
||||
resultJson = (JSONObject) myJson.get("data");
|
||||
log.debug("打印输出本次同步信息返回结果:" + myJson.get("data").toString());
|
||||
List<PPDepartment> currentPPDepartList = JSONObject.parseArray(resultJson.get("list").toString(), PPDepartment.class);
|
||||
ppDepartList.addAll(currentPPDepartList);
|
||||
}
|
||||
}
|
||||
|
||||
//开始循环遍历数据
|
||||
/***
|
||||
* 判断PP数据是否存在,不存在:插入,存在:更新
|
||||
*/
|
||||
if (ppDepartList != null && !ppDepartList.isEmpty()) {
|
||||
for (PPDepartment ppDepart : ppDepartList) {
|
||||
try {
|
||||
// 判断当前SSO组织机构是否在本地存在 不存在先将数据添加到数据中
|
||||
if (!localDepartMap.containsKey(ppDepart.getRef_id())) {
|
||||
if (StringUtils.isNotBlank(ppDepart.getRef_id())) { // 排除ref_id为空的情况
|
||||
SysDepart sysDepart = sysDepartService.addPPDepart(ppDepart);
|
||||
localDepartMap.put(ppDepart.getRef_id(), sysDepart);
|
||||
}
|
||||
} else {
|
||||
SysDepart sysDepart = localDepartMap.get(ppDepart.getRef_id());
|
||||
sysDepartService.updatePPDepart(sysDepart, ppDepart);
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error("同步部门数据出现异常,异常信息为:"+e.getMessage(), e);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
//记录同步规则
|
||||
// 写入本次同步记录
|
||||
OtSyncInfoEO syncInfoEO = new OtSyncInfoEO();
|
||||
syncInfoEO.setSyncTime(nowTime);
|
||||
syncInfoEO.setSyncType(PPSyncEnum.PP_DEPART.getValue());
|
||||
syncInfoEO.setLastSyncTime(lastSyncInfo != null ? lastSyncInfo.getSyncTime() : null);
|
||||
otSyncInfoEOService.save(syncInfoEO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步用户信息
|
||||
* @throws Exception
|
||||
*/
|
||||
@Async
|
||||
@Transactional(readOnly = false, rollbackFor = Exception.class)
|
||||
public void synchronPPUserInfo() throws Exception {
|
||||
// 获取当前时间
|
||||
Date nowTime = new Date();
|
||||
// 获取上次更新时间
|
||||
OtSyncInfoEO lastSyncInfo = otSyncInfoEOService.getLastSyncInfo(PPSyncEnum.PP_USER.getValue());
|
||||
//本地用户信息Map
|
||||
Map<String, SysUser> localUserMap=new HashMap<String,SysUser>();
|
||||
//people获取用户信息Map
|
||||
Map<String, PPEmployee> PPEmployeeMap=new HashMap<String,PPEmployee>();
|
||||
|
||||
String path = "/people/v1/employee/all-info";
|
||||
String queryStr = "app_id=" + appId + "&hash_type=sha256&offset=0&limit=100";
|
||||
String response = getResultDataOfGet(path, queryStr);
|
||||
JSONObject myJson = JSONObject.parseObject(response);
|
||||
log.debug(myJson.toJSONString());
|
||||
if(!myJson.get("result_code").toString().equals("success")){
|
||||
log.error("请求出现异常:"+myJson.get("message")+" "+myJson);
|
||||
}else{
|
||||
log.debug("打印输出本次同步信息返回结果:"+myJson.get("data").toString());
|
||||
JSONObject resultJson = (JSONObject) myJson.get("data");
|
||||
//将第一页的账户信息转换为本地dto集合
|
||||
List<JSONObject> userList = JSONObject.parseArray(resultJson.get("list").toString(), JSONObject.class);
|
||||
List<PPEmployee> ppEmployeeList = getPPEmployeeList(userList);
|
||||
|
||||
//获取总记录数
|
||||
int total = (int) resultJson.get("amount");
|
||||
if(total > 100){
|
||||
int pageSum = total / 100; // 总页数
|
||||
if((total % 100) > 0){
|
||||
pageSum += 1;
|
||||
}
|
||||
//循环查询统一认证系统所有账户信息(从第二页开始)
|
||||
for(int page = 1; page < pageSum; page++){
|
||||
path = "/people/v1/employee/all-info";
|
||||
queryStr = "app_id=" + appId + "&hash_type=sha256&limit=100&offset=" + (page*100);
|
||||
response = getResultDataOfGet(path, queryStr);
|
||||
myJson = JSONObject.parseObject(response);
|
||||
log.debug("打印输出本次同步信息返回结果:"+myJson.get("data").toString());
|
||||
resultJson = (JSONObject) myJson.get("data");
|
||||
userList = JSONObject.parseArray(resultJson.get("list").toString(), JSONObject.class);
|
||||
List<PPEmployee> currentPPEmployeeList = getPPEmployeeList(userList);
|
||||
ppEmployeeList.addAll(currentPPEmployeeList);
|
||||
}
|
||||
}
|
||||
|
||||
//此处获取全部pp用户信息
|
||||
List<SysUser> sysUserList = sysUserService.getPPEmployeeList();
|
||||
// log.info("查询到的用户信息结果集为:"+JSONObject.toJSONString(userEOList));
|
||||
for(SysUser user:sysUserList){
|
||||
localUserMap.put(user.getId(),user);
|
||||
}
|
||||
// log.info("将用户信息集合转换为的用户MAP为:"+JSONObject.toJSONString(localUserMap));
|
||||
log.info("开始更新数据库信息");
|
||||
for(PPEmployee ppEmployee:ppEmployeeList){
|
||||
try {
|
||||
PPEmployeeMap.put(ppEmployee.getId(), ppEmployee);
|
||||
//1.判断当前账号是否已添加到用户中
|
||||
if (!localUserMap.containsKey(ppEmployee.getId())) {
|
||||
//删除数据库中与该账户相同的数据
|
||||
if(StringUtils.isNotBlank(ppEmployee.getId())) {
|
||||
sysUserService.removeById(ppEmployee.getId());
|
||||
log.info("需要新增的用户信息为:" + JSONObject.toJSONString(ppEmployee));
|
||||
SysUser newUser = sysUserService.addPPUserInfo(ppEmployee);
|
||||
localUserMap.put(ppEmployee.getId(), newUser);
|
||||
}
|
||||
|
||||
} else {
|
||||
SysUser userEO = localUserMap.get(ppEmployee.getId());
|
||||
log.info("需要更新的用户信息为:" + JSONObject.toJSONString(userEO) + " " + JSONObject.toJSONString(ppEmployee));
|
||||
if(userEO != null) {
|
||||
sysUserService.updatePPUserInfo(userEO, ppEmployee);
|
||||
}
|
||||
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
log.error("同步用户数据出现异常,异常信息为:"+e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
log.info("更新数据结束");
|
||||
// 写入本次同步记录
|
||||
OtSyncInfoEO syncInfoEO = new OtSyncInfoEO();
|
||||
syncInfoEO.setSyncTime(nowTime);
|
||||
syncInfoEO.setSyncType(PPSyncEnum.PP_USER.getValue());
|
||||
syncInfoEO.setLastSyncTime(lastSyncInfo != null ? lastSyncInfo.getSyncTime() : null);
|
||||
try {
|
||||
otSyncInfoEOService.save(syncInfoEO);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
log.error("出现异常,异常信息为:"+e.getMessage(), e);
|
||||
}
|
||||
log.info("写入同步记录结束");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static List<PPEmployee> getPPEmployeeList(List<JSONObject> userList) {
|
||||
List<PPEmployee> ppEmployeeList = new ArrayList<>();
|
||||
for (JSONObject user : userList) {
|
||||
PPEmployee userMainInfo = JSONObject.parseObject(user.get("people_info").toString(), PPEmployee.class);
|
||||
|
||||
List<PPEmployee> userJobInfoList = JSONObject.parseArray(user.get("people_job_info").toString(), PPEmployee.class);
|
||||
if (CollectionUtil.isNotEmpty(userJobInfoList)) {
|
||||
userMainInfo.setJob_code(userJobInfoList.get(0).getJob_code());
|
||||
userMainInfo.setJob_title(userJobInfoList.get(0).getJob_title());
|
||||
userMainInfo.setSupervisory_organization_ref_id(userJobInfoList.get(0).getSupervisory_organization_ref_id());
|
||||
}
|
||||
List<PPEmployee> userEmailInfoList = JSONObject.parseArray(user.get("people_contact_email").toString(), PPEmployee.class);
|
||||
if (CollectionUtil.isNotEmpty(userEmailInfoList)) {
|
||||
PPEmployee userEmailInfo = userEmailInfoList.stream().filter(e->"WORK".equals(e.getEmail_type())).collect(Collectors.toList()).get(0);
|
||||
if (ObjectUtil.isNotEmpty(userEmailInfo)) {
|
||||
userMainInfo.setEmail_address(userEmailInfo.getEmail_address());
|
||||
}
|
||||
}
|
||||
List<PPEmployee> userPhoneInfoList = JSONObject.parseArray(user.get("people_contact_phone").toString(), PPEmployee.class);
|
||||
if (CollectionUtil.isNotEmpty(userPhoneInfoList)) {
|
||||
PPEmployee userPhoneInfo = userPhoneInfoList.stream().filter(e->"WORK".equals(e.getPhone_type()) && "Mobile".equals(e.getPhone_device_type())).collect(Collectors.toList()).get(0);
|
||||
if (ObjectUtil.isNotEmpty(userPhoneInfo)) {
|
||||
userMainInfo.setFormatted_phone_number(userPhoneInfo.getFormatted_phone_number());
|
||||
}
|
||||
}
|
||||
|
||||
ppEmployeeList.add(userMainInfo);
|
||||
}
|
||||
return ppEmployeeList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送请求,获取同步数据
|
||||
* @param uri
|
||||
* @param queryString
|
||||
* @return
|
||||
* @throws IOException
|
||||
* @throws NoSuchAlgorithmException
|
||||
* @throws InvalidKeyException
|
||||
*/
|
||||
private String getResultDataOfGet(String uri, String queryString) throws IOException, NoSuchAlgorithmException, InvalidKeyException {
|
||||
// 获取签名
|
||||
String method ="GET";
|
||||
String path = uri;
|
||||
String queryStr = queryString;
|
||||
Map<String, String> header = new HashMap<>();
|
||||
String timestamp = HmacSignUtil.getSecondTimestamp(new Date());
|
||||
queryStr += "×tamp=" + timestamp;
|
||||
String sign = HmacSignUtil.getSign(secret,method,path,queryStr,header);
|
||||
String url = host;
|
||||
url += path + "?";
|
||||
url += queryStr;
|
||||
url += "&sign=" + sign;
|
||||
Map<String, String> headerMap = new HashMap<>();
|
||||
String response = HttpRequestUtil.getResponseOfGET(url, headerMap);
|
||||
JSONObject myJson = JSONObject.parseObject(response);
|
||||
|
||||
return myJson.toJSONString();
|
||||
// log.debug(myJson.toJSONString());
|
||||
// if(!myJson.get("result_code").toString().equals("success")) {
|
||||
// log.error("请求出现异常:" + myJson.get("result_code") + " " + myJson);
|
||||
// }
|
||||
// log.debug("打印输出本次同步信息返回结果:"+myJson.get("data").toString());
|
||||
// return myJson.get("data").toString();
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException, NoSuchAlgorithmException, InvalidKeyException {
|
||||
|
||||
String path = "/people/v1/employee/all-info";
|
||||
// String path = "/people/v1/base/department/list";
|
||||
// String queryStr = "app_id=100679&hash_type=sha256&employee_id=10438,22705,27785,28617,28617,45143";
|
||||
// String queryStr = "app_id=100679&hash_type=sha256&worker_user_id=ning.chen,shanshan.su,frank.qiang,huaming.liu,charles.wang,songran.liu";
|
||||
String queryStr = "app_id=100679&hash_type=sha256&worker_user_id=abin.ban1";
|
||||
|
||||
String response = getResultDataOfGetTest(path, queryStr);
|
||||
// JSONObject myJson = JSONObject.parseObject(response);
|
||||
// JSONObject resultJson = (JSONObject) myJson.get("data");
|
||||
//将第一页的账户信息转换为本地dto集合
|
||||
// List<JSONObject> userList = JSONObject.parseArray(resultJson.get("list").toString(), JSONObject.class);
|
||||
// List<PPEmployee> ppEmployeeList = getPPEmployeeList(userList);
|
||||
System.out.println("ok");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 同步组织信息
|
||||
* @throws IOException
|
||||
@@ -70,7 +343,7 @@ public class SyncDataServiceImpl implements ISyncDataService{
|
||||
//查询所有组织列表,children为空
|
||||
String path = "/people/v1/organization/list";
|
||||
String queryStr = "app_id=100679&hash_type=sha256";
|
||||
String resultData = getResultDataOfGet(path, queryStr);
|
||||
String resultData = getResultDataOfGetTest(path, queryStr);
|
||||
//JSON转实体类
|
||||
List<PPOrganization> organizationList = JSONArray.parseArray(resultData, PPOrganization.class);
|
||||
log.info("需要同步的组织数据总数:" + organizationList.size());
|
||||
@@ -146,7 +419,7 @@ public class SyncDataServiceImpl implements ISyncDataService{
|
||||
//查询所有角色列表,非树状,children为空
|
||||
String path = "/people/v1/position/list";
|
||||
String queryStr = "app_id=100679&hash_type=sha256";
|
||||
String resultData = getResultDataOfGet(path, queryStr);
|
||||
String resultData = getResultDataOfGetTest(path, queryStr);
|
||||
//JSON转实体类
|
||||
List<PPPosition> positionList = JSONArray.parseArray(resultData, PPPosition.class);
|
||||
List<String> positionCodeList = positionList.stream().map(PPPosition :: getCode).collect(Collectors.toList());
|
||||
@@ -155,7 +428,7 @@ public class SyncDataServiceImpl implements ISyncDataService{
|
||||
log.info("需要同步的岗位数据总数:" + positionList.size());
|
||||
for(String code : positionCodeList){
|
||||
String queryStrDetail = positionDetailQueryStr + code;
|
||||
String result = getResultDataOfGet(positionDetailPath, queryStrDetail);
|
||||
String result = getResultDataOfGetTest(positionDetailPath, queryStrDetail);
|
||||
PPPosition position = JSONObject.parseObject(result, PPPosition.class);
|
||||
SysRole sysRole = new SysRole();
|
||||
sysRole.setId(position.getId());
|
||||
@@ -181,7 +454,7 @@ public class SyncDataServiceImpl implements ISyncDataService{
|
||||
public void syncDepartRoleInfo() throws IOException, NoSuchAlgorithmException, InvalidKeyException {
|
||||
String path = "/people/v1/organization-position/all";
|
||||
String queryStr = "app_id=100679&hash_type=sha256";
|
||||
String resultData = getResultDataOfGet(path, queryStr);
|
||||
String resultData = getResultDataOfGetTest(path, queryStr);
|
||||
//JSON转实体类
|
||||
List<PPOrganizationPosition> organizationPositionList = JSONArray.parseArray(resultData, PPOrganizationPosition.class);
|
||||
log.info("需要同步的组织岗位关系数据总数:" + organizationPositionList.size());
|
||||
@@ -211,7 +484,7 @@ public class SyncDataServiceImpl implements ISyncDataService{
|
||||
//查询所有人员组织岗位
|
||||
String path = "/people/v1/employee/organization-position/list";
|
||||
String queryStr = "app_id=100679&hash_type=sha256";
|
||||
String resultData = getResultDataOfGet(path, queryStr);
|
||||
String resultData = getResultDataOfGetTest(path, queryStr);
|
||||
//JSON转实体类
|
||||
List<PPOrgPosEmployee> orgPosEmployeeList = JSONArray.parseArray(resultData, PPOrgPosEmployee.class);
|
||||
log.info("需要同步的组织岗位人员关系数据总数:" + orgPosEmployeeList.size());
|
||||
@@ -220,7 +493,7 @@ public class SyncDataServiceImpl implements ISyncDataService{
|
||||
for(PPOrgPosEmployee ope : orgPosEmployeeList){
|
||||
//查询人员详情
|
||||
String queryStrDetail = employeeDetailQueryStr + ope.getEmployee_id();
|
||||
String result = getResultDataOfGet(employeeDetailPath, queryStrDetail);
|
||||
String result = getResultDataOfGetTest(employeeDetailPath, queryStrDetail);
|
||||
//JSON转实体类
|
||||
PPEmployee employee = JSONObject.parseObject(result, PPEmployee.class);
|
||||
//判断用户信息是否已添加,人员-组织岗位关系为多对多
|
||||
@@ -273,7 +546,7 @@ public class SyncDataServiceImpl implements ISyncDataService{
|
||||
* @throws NoSuchAlgorithmException
|
||||
* @throws InvalidKeyException
|
||||
*/
|
||||
public String getResultDataOfGet(String uri, String queryString) throws IOException, NoSuchAlgorithmException, InvalidKeyException {
|
||||
public static String getResultDataOfGetTest(String uri, String queryString) throws IOException, NoSuchAlgorithmException, InvalidKeyException {
|
||||
String appId = "100679";
|
||||
// String appSecret = "CDf2D9404C6ac1B0f7c3e3845ae0282a";
|
||||
String appSecret = "7C3F03170E3ea489df04Ce8DEC7Df4f7";
|
||||
@@ -290,15 +563,17 @@ public class SyncDataServiceImpl implements ISyncDataService{
|
||||
url += path + "?";
|
||||
url += queryStr;
|
||||
url += "&sign=" + sign;
|
||||
System.out.println(url);
|
||||
Map<String, String> headerMap = new HashMap<>();
|
||||
String response = HttpRequestUtil.getResponseOfGET(url, headerMap);
|
||||
JSONObject myJson = JSONObject.parseObject(response);
|
||||
|
||||
log.debug(myJson.toJSONString());
|
||||
if(!myJson.get("result_code").toString().equals("success")) {
|
||||
log.error("请求出现异常:" + myJson.get("result_code") + " " + myJson);
|
||||
}
|
||||
log.debug("打印输出本次同步信息返回结果:"+myJson.get("data").toString());
|
||||
return myJson.get("data").toString();
|
||||
return myJson.toJSONString();
|
||||
// log.debug(myJson.toJSONString());
|
||||
// if(!myJson.get("result_code").toString().equals("success")) {
|
||||
// log.error("请求出现异常:" + myJson.get("result_code") + " " + myJson);
|
||||
// }
|
||||
// log.debug("打印输出本次同步信息返回结果:"+myJson.get("data").toString());
|
||||
// return myJson.get("data").toString();
|
||||
}
|
||||
}
|
||||
|
||||
+60
-29
@@ -264,10 +264,15 @@ public class SysCategoryServiceImpl extends ServiceImpl<SysCategoryMapper, SysCa
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysCategoryTreeVO> getSysCategoryTree() {
|
||||
public List<SysCategoryTreeVO> getSysCategoryTree(String flag) {
|
||||
try {
|
||||
//只查询技术领域的technology_territory
|
||||
String dictId = sysCategoryMapper.getFieldInfo("technology_territory");
|
||||
String dictId = "";
|
||||
if("deliverable_template".equals(flag)){
|
||||
dictId = sysCategoryMapper.getDictId("deliverable_template");
|
||||
}else{
|
||||
dictId = sysCategoryMapper.getFieldInfo("technology_territory");
|
||||
}
|
||||
List<SysCategory> list = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(dictId)){
|
||||
LambdaQueryWrapper<SysCategory> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -319,6 +324,11 @@ public class SysCategoryServiceImpl extends ServiceImpl<SysCategoryMapper, SysCa
|
||||
queryWrapper.eq("sys_dict_id",sysCategory.getSysDictId())
|
||||
.eq("del_flag", CommonConstant.DEL_FLAG_0)
|
||||
.orderByAsc("sort_order");
|
||||
if(StringUtils.isNotBlank(sysCategory.getPid())){
|
||||
queryWrapper.eq("pid",sysCategory.getPid());
|
||||
}else{
|
||||
queryWrapper.eq("pid",0);
|
||||
}
|
||||
queryWrapper.eq("sort_order", inputOrderNum);
|
||||
Integer orderNumCount = sysCategoryMapper.selectCount(queryWrapper);
|
||||
if (orderNumCount > 0) {//有重复展示顺序的,后面的号全+1
|
||||
@@ -328,16 +338,23 @@ public class SysCategoryServiceImpl extends ServiceImpl<SysCategoryMapper, SysCa
|
||||
.eq("sys_dict_id",sysCategory.getSysDictId())
|
||||
.eq("del_flag", CommonConstant.DEL_FLAG_0)
|
||||
.orderByAsc("sort_order");
|
||||
if(StringUtils.isNotBlank(sysCategory.getPid())){
|
||||
orderNumQueryWrapper.eq("pid",sysCategory.getPid());
|
||||
}else{
|
||||
orderNumQueryWrapper.eq("pid",0);
|
||||
}
|
||||
List<SysCategory> geOrderNumList = list(orderNumQueryWrapper);
|
||||
|
||||
//判断相邻的序号,去掉不邻的
|
||||
for (int i = 0; i < geOrderNumList.size(); i++) {
|
||||
if (geOrderNumList.size() == 1) {
|
||||
if (geOrderNumList.size() == 1 || (geOrderNumList.size()==2 && geOrderNumList.get(i + 1).getSortOrder() - geOrderNumList.get(i).getSortOrder() == 1)) {
|
||||
break;
|
||||
} else if (geOrderNumList.get(i + 1).getSortOrder() - geOrderNumList.get(i).getSortOrder() > 1) {
|
||||
int deleteStart = geOrderNumList.get(i + 1).getSortOrder();
|
||||
geOrderNumList = geOrderNumList.stream().filter(e -> e.getSortOrder() < deleteStart).collect(Collectors.toList());
|
||||
break;
|
||||
if(geOrderNumList.size()!=(i+1)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,35 +370,49 @@ public class SysCategoryServiceImpl extends ServiceImpl<SysCategoryMapper, SysCa
|
||||
if(inputOrderNum != null) {
|
||||
//查询展示顺序相同的
|
||||
QueryWrapper<SysCategory> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("sys_dict_id",sysCategory.getSysDictId())
|
||||
queryWrapper.eq("sys_dict_id", sysCategory.getSysDictId())
|
||||
.eq("del_flag", CommonConstant.DEL_FLAG_0)
|
||||
.orderByAsc("sort_order");
|
||||
Integer orderNumData = list(queryWrapper).stream().filter(e -> e.getId().equals(sysCategory.getId()))
|
||||
.map(e -> e.getSortOrder()).collect(Collectors.toList()).get(0);
|
||||
queryWrapper.eq("sort_order", inputOrderNum);
|
||||
Integer orderNumCount = sysCategoryMapper.selectCount(queryWrapper);
|
||||
if (orderNumCount > 0 && !orderNumData.equals(inputOrderNum)) {//有重复展示顺序的,后面的号全+1
|
||||
//设置排序
|
||||
QueryWrapper<SysCategory> orderNumQueryWrapper = new QueryWrapper<>();
|
||||
orderNumQueryWrapper.ge("sort_order", inputOrderNum)
|
||||
.eq("sys_dict_id",sysCategory.getSysDictId())
|
||||
.eq("del_flag", CommonConstant.DEL_FLAG_0)
|
||||
.orderByAsc("sort_order");
|
||||
List<SysCategory> geOrderNumList = list(orderNumQueryWrapper);
|
||||
|
||||
//判断相邻的序号,去掉不邻的
|
||||
for (int i = 0; i < geOrderNumList.size(); i++) {
|
||||
if (geOrderNumList.size() == 1) {
|
||||
break;
|
||||
} else if (geOrderNumList.get(i + 1).getSortOrder() - geOrderNumList.get(i).getSortOrder() > 1) {
|
||||
int deleteStart = geOrderNumList.get(i + 1).getSortOrder();
|
||||
geOrderNumList = geOrderNumList.stream().filter(e -> e.getSortOrder() < deleteStart).collect(Collectors.toList());
|
||||
break;
|
||||
if (StringUtils.isNotBlank(sysCategory.getPid())) {
|
||||
queryWrapper.eq("pid", sysCategory.getPid());
|
||||
} else {
|
||||
queryWrapper.eq("pid", 0);
|
||||
}
|
||||
if (list(queryWrapper).size() > 0) {
|
||||
Integer orderNumData = list(queryWrapper).stream().filter(e -> e.getId().equals(sysCategory.getId()))
|
||||
.map(e -> e.getSortOrder()).collect(Collectors.toList()).get(0);
|
||||
queryWrapper.eq("sort_order", inputOrderNum);
|
||||
Integer orderNumCount = sysCategoryMapper.selectCount(queryWrapper);
|
||||
if (orderNumCount > 0 && !orderNumData.equals(inputOrderNum)) {//有重复展示顺序的,后面的号全+1
|
||||
//设置排序
|
||||
QueryWrapper<SysCategory> orderNumQueryWrapper = new QueryWrapper<>();
|
||||
orderNumQueryWrapper.ge("sort_order", inputOrderNum)
|
||||
.eq("sys_dict_id", sysCategory.getSysDictId())
|
||||
.eq("del_flag", CommonConstant.DEL_FLAG_0)
|
||||
.orderByAsc("sort_order");
|
||||
if (StringUtils.isNotBlank(sysCategory.getPid())) {
|
||||
orderNumQueryWrapper.eq("pid", sysCategory.getPid());
|
||||
} else {
|
||||
orderNumQueryWrapper.eq("pid", 0);
|
||||
}
|
||||
}
|
||||
List<SysCategory> geOrderNumList = list(orderNumQueryWrapper);
|
||||
|
||||
geOrderNumList.stream().forEach(e -> e.setSortOrder(e.getSortOrder() + 1));
|
||||
saveOrUpdateBatch(geOrderNumList);
|
||||
//判断相邻的序号,去掉不邻的
|
||||
for (int i = 0; i < geOrderNumList.size(); i++) {
|
||||
if (geOrderNumList.size() == 1 || (geOrderNumList.size() == 2 && geOrderNumList.get(i + 1).getSortOrder() - geOrderNumList.get(i).getSortOrder() == 1)) {
|
||||
break;
|
||||
} else if (geOrderNumList.get(i + 1).getSortOrder() - geOrderNumList.get(i).getSortOrder() > 1) {
|
||||
int deleteStart = geOrderNumList.get(i + 1).getSortOrder();
|
||||
geOrderNumList = geOrderNumList.stream().filter(e -> e.getSortOrder() < deleteStart).collect(Collectors.toList());
|
||||
if (geOrderNumList.size() != (i + 1)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
geOrderNumList.stream().forEach(e -> e.setSortOrder(e.getSortOrder() + 1));
|
||||
saveOrUpdateBatch(geOrderNumList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-4
@@ -571,8 +571,7 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
|
||||
@Override
|
||||
public List<SysDepart> getPPDepartList() {
|
||||
LambdaQueryWrapper<SysDepart> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(SysDepart::getDepartSource, PPSyncEnum.PP.getValue())
|
||||
.eq(SysDepart::getDelFlag, 0);
|
||||
queryWrapper.eq(SysDepart::getDepartSource, PPSyncEnum.PP.getValue());
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
@@ -612,8 +611,8 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePPDepart(PPDepartment ppDepartment) {
|
||||
SysDepart updateDepart = getById(ppDepartment.getRef_id());
|
||||
public void updatePPDepart(SysDepart sysDepart, PPDepartment ppDepartment) {
|
||||
SysDepart updateDepart = sysDepart;
|
||||
|
||||
updateDepart.setDepartNameEn(ppDepartment.getName_en());
|
||||
updateDepart.setDepartName(ppDepartment.getName_cn());
|
||||
|
||||
+29
-27
@@ -65,7 +65,7 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
|
||||
queryWrapper.eq("del_flag", CommonConstant.DEL_FLAG_0)
|
||||
.eq("dict_id",sysDictItem.getDictId())
|
||||
.eq("is_tag_dict",sysDictItem.getIsTagDict())
|
||||
.orderByDesc("sort_order");
|
||||
.orderByAsc("sort_order");
|
||||
queryWrapper.eq("sort_order", inputOrderNum);
|
||||
Integer orderNumCount = sysDictItemMapper.selectCount(queryWrapper);
|
||||
if (orderNumCount > 0) {//有重复展示顺序的,后面的号全+1
|
||||
@@ -102,36 +102,38 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
|
||||
//查询展示顺序相同的
|
||||
QueryWrapper<SysDictItem> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("del_flag", CommonConstant.DEL_FLAG_0)
|
||||
.eq("dict_id",sysDictItem.getDictId())
|
||||
.eq("is_tag_dict",sysDictItem.getIsTagDict())
|
||||
.eq("dict_id", sysDictItem.getDictId())
|
||||
.eq("is_tag_dict", sysDictItem.getIsTagDict())
|
||||
.orderByAsc("sort_order");
|
||||
Integer orderNumData = list(queryWrapper).stream().filter(e -> e.getId().equals(sysDictItem.getId()))
|
||||
.map(e -> e.getSortOrder()).collect(Collectors.toList()).get(0);
|
||||
queryWrapper.eq("sort_order", inputOrderNum);
|
||||
Integer orderNumCount = sysDictItemMapper.selectCount(queryWrapper);
|
||||
if (orderNumCount > 0 && !orderNumData.equals(inputOrderNum)) {//有重复展示顺序的,后面的号全+1
|
||||
//设置排序
|
||||
QueryWrapper<SysDictItem> orderNumQueryWrapper = new QueryWrapper<>();
|
||||
orderNumQueryWrapper.ge("sort_order", inputOrderNum)
|
||||
.eq("dict_id",sysDictItem.getDictId())
|
||||
.eq("del_flag", CommonConstant.DEL_FLAG_0)
|
||||
.eq("is_tag_dict",sysDictItem.getIsTagDict())
|
||||
.orderByAsc("sort_order");
|
||||
List<SysDictItem> geOrderNumList = list(orderNumQueryWrapper);
|
||||
if (list(queryWrapper).size() > 0) {
|
||||
Integer orderNumData = list(queryWrapper).stream().filter(e -> e.getId().equals(sysDictItem.getId()))
|
||||
.map(e -> e.getSortOrder()).collect(Collectors.toList()).get(0);
|
||||
queryWrapper.eq("sort_order", inputOrderNum);
|
||||
Integer orderNumCount = sysDictItemMapper.selectCount(queryWrapper);
|
||||
if (orderNumCount > 0 && !orderNumData.equals(inputOrderNum)) {//有重复展示顺序的,后面的号全+1
|
||||
//设置排序
|
||||
QueryWrapper<SysDictItem> orderNumQueryWrapper = new QueryWrapper<>();
|
||||
orderNumQueryWrapper.ge("sort_order", inputOrderNum)
|
||||
.eq("dict_id", sysDictItem.getDictId())
|
||||
.eq("del_flag", CommonConstant.DEL_FLAG_0)
|
||||
.eq("is_tag_dict", sysDictItem.getIsTagDict())
|
||||
.orderByAsc("sort_order");
|
||||
List<SysDictItem> geOrderNumList = list(orderNumQueryWrapper);
|
||||
|
||||
//判断相邻的序号,去掉不邻的
|
||||
for (int i = 0; i < geOrderNumList.size(); i++) {
|
||||
if (geOrderNumList.size() == 1) {
|
||||
break;
|
||||
} else if (geOrderNumList.get(i + 1).getSortOrder() - geOrderNumList.get(i).getSortOrder() > 1) {
|
||||
int deleteStart = geOrderNumList.get(i + 1).getSortOrder();
|
||||
geOrderNumList = geOrderNumList.stream().filter(e -> e.getSortOrder() < deleteStart).collect(Collectors.toList());
|
||||
break;
|
||||
//判断相邻的序号,去掉不邻的
|
||||
for (int i = 0; i < geOrderNumList.size(); i++) {
|
||||
if (geOrderNumList.size() == 1) {
|
||||
break;
|
||||
} else if (geOrderNumList.get(i + 1).getSortOrder() - geOrderNumList.get(i).getSortOrder() > 1) {
|
||||
int deleteStart = geOrderNumList.get(i + 1).getSortOrder();
|
||||
geOrderNumList = geOrderNumList.stream().filter(e -> e.getSortOrder() < deleteStart).collect(Collectors.toList());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
geOrderNumList.stream().forEach(e -> e.setSortOrder(e.getSortOrder() + 1));
|
||||
saveOrUpdateBatch(geOrderNumList);
|
||||
geOrderNumList.stream().forEach(e -> e.setSortOrder(e.getSortOrder() + 1));
|
||||
saveOrUpdateBatch(geOrderNumList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+89
@@ -17,12 +17,14 @@ import com.jero.common.util.UUIDGenerator;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.modules.base.service.BaseCommonService;
|
||||
import com.jero.modules.system.entity.*;
|
||||
import com.jero.modules.system.enums.PPSyncEnum;
|
||||
import com.jero.modules.system.mapper.*;
|
||||
import com.jero.modules.system.model.DepartIdModel;
|
||||
import com.jero.modules.system.model.SysUserSysDepartModel;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.vo.SysUserDepVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -474,4 +476,91 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
List<SysUser> sysUsers = this.baseMapper.selectList(sysUserQueryWrapper);
|
||||
return sysUsers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysUser> getPPEmployeeList() {
|
||||
QueryWrapper<SysUser> sysUserQueryWrapper = new QueryWrapper<>();
|
||||
sysUserQueryWrapper.lambda().eq(SysUser::getThirdType, PPSyncEnum.PP.getValue());
|
||||
return list(sysUserQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysUser addPPUserInfo(PPEmployee ppEmployee) {
|
||||
|
||||
SysUser sysUser = new SysUser();
|
||||
// 基本信息
|
||||
sysUser.setId(ppEmployee.getId());
|
||||
sysUser.setUsername(ppEmployee.getUser_name());
|
||||
sysUser.setRealname(ppEmployee.getFormatted_name());
|
||||
sysUser.setStatus("Active".equals(ppEmployee.getEmployee_status())? CommonConstant.USER_UNFREEZE : CommonConstant.USER_FREEZE);
|
||||
sysUser.setDelFlag("1".equals(ppEmployee.getDelete_flag())? CommonConstant.DEL_FLAG_0 : CommonConstant.DEL_FLAG_1);
|
||||
sysUser.setThirdId(ppEmployee.getWorker_user_id());
|
||||
sysUser.setActivitiSync(CommonConstant.ACT_SYNC_1);
|
||||
sysUser.setWorkNo(ppEmployee.getEmployee_id());
|
||||
sysUser.setWorkerType("Employee".equals(ppEmployee.getWorker_type())? CommonConstant.WORKER_TYPE_1 : CommonConstant.WORKER_TYPE_2);
|
||||
sysUser.setCreateTime(ppEmployee.getCreation_time());
|
||||
sysUser.setUpdateTime(ppEmployee.getUpdate_time());
|
||||
sysUser.setThirdType(PPSyncEnum.PP.getValue());
|
||||
// 工作信息
|
||||
sysUser.setJobCode(ppEmployee.getJob_code());
|
||||
sysUser.setJobTitle(ppEmployee.getJob_title());
|
||||
sysUser.setOrgCode(ppEmployee.getSupervisory_organization_ref_id());
|
||||
// 联系方式
|
||||
sysUser.setEmail(ppEmployee.getEmail_address());
|
||||
sysUser.setTelephone(ppEmployee.getFormatted_phone_number());
|
||||
|
||||
// 设置用户默认密码
|
||||
String username = ppEmployee.getUser_name();
|
||||
String password = "nio.com123"; // 设置默认密码
|
||||
String salt = oConvertUtils.randomGen(8);
|
||||
String passwordEncode = PasswordUtil.encrypt(username, password, salt);
|
||||
sysUser.setPassword(passwordEncode);
|
||||
sysUser.setSalt(salt);
|
||||
|
||||
// 添加用户部门关系
|
||||
SysUserDepart sysUserDepart = new SysUserDepart(ppEmployee.getId(), ppEmployee.getSupervisory_organization_ref_id());
|
||||
sysUserDepartMapper.insert(sysUserDepart);
|
||||
// 添加用户信息
|
||||
save(sysUser);
|
||||
return sysUser;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePPUserInfo(SysUser sysUser, PPEmployee ppEmployee) {
|
||||
|
||||
// 基本信息
|
||||
sysUser.setUsername(ppEmployee.getUser_name());
|
||||
sysUser.setRealname(ppEmployee.getFormatted_name());
|
||||
sysUser.setStatus("Active".equals(ppEmployee.getEmployee_status())? CommonConstant.USER_UNFREEZE : CommonConstant.USER_FREEZE);
|
||||
sysUser.setDelFlag("1".equals(ppEmployee.getDelete_flag())? CommonConstant.DEL_FLAG_0 : CommonConstant.DEL_FLAG_1);
|
||||
sysUser.setThirdId(ppEmployee.getWorker_user_id());
|
||||
sysUser.setWorkNo(ppEmployee.getEmployee_id());
|
||||
sysUser.setWorkerType("Employee".equals(ppEmployee.getWorker_type())? CommonConstant.WORKER_TYPE_1 : CommonConstant.WORKER_TYPE_2);
|
||||
sysUser.setCreateTime(ppEmployee.getCreation_time());
|
||||
sysUser.setUpdateTime(ppEmployee.getUpdate_time());
|
||||
|
||||
// 工作信息
|
||||
sysUser.setJobCode(ppEmployee.getJob_code());
|
||||
sysUser.setJobTitle(ppEmployee.getJob_title());
|
||||
sysUser.setOrgCode(ppEmployee.getSupervisory_organization_ref_id());
|
||||
// 联系方式
|
||||
sysUser.setEmail(ppEmployee.getEmail_address());
|
||||
sysUser.setTelephone(ppEmployee.getFormatted_phone_number());
|
||||
|
||||
if (!StringUtils.equals(sysUser.getOrgCode(), ppEmployee.getSupervisory_organization_ref_id())) {
|
||||
// 删除原用户部门关系
|
||||
QueryWrapper<SysUserDepart> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(SysUserDepart::getUserId, sysUser.getId()).eq(SysUserDepart::getDepId,sysUser.getOrgCode());
|
||||
sysUserDepartMapper.delete(queryWrapper);
|
||||
|
||||
if (StringUtils.isNotEmpty(ppEmployee.getSupervisory_organization_ref_id())) {
|
||||
// 添加用户部门关系
|
||||
SysUserDepart sysUserDepart = new SysUserDepart(ppEmployee.getId(), ppEmployee.getSupervisory_organization_ref_id());
|
||||
sysUserDepartMapper.insert(sysUserDepart);
|
||||
}
|
||||
}
|
||||
|
||||
updateById(sysUser);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.jero.modules.system.timer;
|
||||
|
||||
import com.jero.modules.system.entity.OtSyncInfoEO;
|
||||
import com.jero.modules.system.service.ISyncDataService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 定时同步SSO数据至本地
|
||||
*/
|
||||
@Component
|
||||
@EnableScheduling
|
||||
@Slf4j
|
||||
public class PPSyncDataTimer {
|
||||
|
||||
@Value("${people.cronJobIsOpen}")
|
||||
private Boolean isOpen;
|
||||
|
||||
@Autowired
|
||||
private ISyncDataService syncDataService;
|
||||
|
||||
// @Scheduled(cron = "0 10 0 * * ?") //每天凌晨0点10分执行
|
||||
public void syncDepartInfo() {
|
||||
if (isOpen) {
|
||||
log.info("<======================================启动同步部门信息======================================>");
|
||||
try {
|
||||
log.info("=========================================开始同步部门信息=========================================");
|
||||
long startTime = System.currentTimeMillis();
|
||||
syncDataService.synchronPPDepartInfo();
|
||||
long endTime = System.currentTimeMillis();
|
||||
log.info("==============同步部门信息结束,同步共用时:"+((endTime-startTime)/1000)+" 秒========================");
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("同步部门信息出现异常,异常信息为:" + e.getMessage(), e);
|
||||
}
|
||||
log.info("<======================================结束同步部门信息=======================================>");
|
||||
}
|
||||
}
|
||||
|
||||
// @Scheduled(cron = "0 10 1 * * ?") //每天凌晨1点10分执行
|
||||
public void syncUserInfo() {
|
||||
log.info("<======================================启动同步用户信息=======================================>");
|
||||
if (isOpen) {
|
||||
try {
|
||||
log.info("=========================================开始同步用户信息=========================================");
|
||||
long startTime = System.currentTimeMillis();
|
||||
syncDataService.synchronPPUserInfo();
|
||||
long endTime = System.currentTimeMillis();
|
||||
log.info("==============同步用户信息结束,同步共用时:"+((endTime-startTime)/1000)+" 秒========================");
|
||||
|
||||
//删除重复的用户数据
|
||||
/*List<String> repeatUserIdList = userEOService.selectRepeatUserIdList();
|
||||
if(CollectionUtils.isNotEmpty(repeatUserIdList)) {
|
||||
userEOService.delete(repeatUserIdList);
|
||||
}*/
|
||||
} catch (Exception accountException) {
|
||||
log.error("同步用户信息出现异常,异常信息为:" + accountException.getMessage(), accountException);
|
||||
}
|
||||
log.info("<======================================结束同步用户信息=======================================>");
|
||||
}
|
||||
}
|
||||
}
|
||||
+117
-37
@@ -170,6 +170,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//删除文件
|
||||
List<Map<String, Object>> mapList = bussDocumentLibraryEOMapper.selectMapsAll(StringUtils.join(ids, ","));
|
||||
|
||||
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsAll();
|
||||
|
||||
|
||||
|
||||
List<String> connectIdList = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldFileList) {
|
||||
@@ -202,14 +205,28 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
for (Map<String, Object> map : mapList) {
|
||||
String id = (String) map.get("id");
|
||||
String serialNumber = (String) map.get("serial_number");
|
||||
String titleEn = (String) map.get("title_en");
|
||||
String title = (String) map.get("title");
|
||||
//文档动态-------------------
|
||||
String hrefTemp = "<a href='/docManage/library/detail?id=" + id +
|
||||
String category = (String)map.get("lei4_bie2");
|
||||
if(StringUtils.isNotBlank(category)){
|
||||
String finalCategory = category;
|
||||
List<SysDictItem> stateDictItemList = dictItemList.stream()
|
||||
.filter(e -> "type".equals(e.getDictCode()) && finalCategory.equals(e.getItemValue()))
|
||||
.collect(Collectors.toList());
|
||||
if(stateDictItemList.size() != 0){
|
||||
category = stateDictItemList.get(0).getEnName();
|
||||
}
|
||||
}else {
|
||||
category = "";
|
||||
}
|
||||
|
||||
//文档动态-------------------
|
||||
String hrefTemp =category + " " + "<a href='/docManage/library/detail?id=" + id +
|
||||
"&title=" + title +
|
||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>,";
|
||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>" + " " + titleEn + ",";
|
||||
HomeDocumentDynamicEO homeDocumentDynamicEO = new HomeDocumentDynamicEO();
|
||||
sbTemp.append(hrefTemp);
|
||||
serialNumberListTemp.add(serialNumber);
|
||||
serialNumberListTemp.add(category + " " + serialNumber + " " + titleEn);
|
||||
//---------------------------
|
||||
if (documentIds.size() != 0 && documentIds.contains((String) map.get("id"))) {
|
||||
serialNumberList.add(serialNumber);
|
||||
@@ -219,15 +236,17 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
sb.append(href);
|
||||
}
|
||||
}
|
||||
//The standard GB 7258-2017 Technical specifications has been deleted from the document library.
|
||||
//文档动态信息添加
|
||||
String substring = sbTemp.substring(0, sbTemp.length() - 1);
|
||||
HomeDocumentDynamicEO homeDocumentDynamicEO = new HomeDocumentDynamicEO();
|
||||
String msgContent = "文档库删除了" + StringUtils.join(serialNumberListTemp,",");
|
||||
String msgContentInfo = "文档库删除了" + substring;
|
||||
homeDocumentDynamicEO.setMsgContent(msgContent);
|
||||
homeDocumentDynamicEO.setMsgContentInfo(msgContentInfo);
|
||||
homeDocumentDynamicEOService.save(homeDocumentDynamicEO);
|
||||
|
||||
if(StringUtils.isNotBlank(sbTemp)){
|
||||
String substring = sbTemp.substring(0, sbTemp.length() - 1);
|
||||
HomeDocumentDynamicEO homeDocumentDynamicEO = new HomeDocumentDynamicEO();
|
||||
String msgContent = "The " + StringUtils.join(serialNumberListTemp,",") + " has been deleted from the document library.";
|
||||
String msgContentInfo = "The " + substring + " has been deleted from the document library.";
|
||||
homeDocumentDynamicEO.setMsgContent(msgContent);
|
||||
homeDocumentDynamicEO.setMsgContentInfo(msgContentInfo);
|
||||
homeDocumentDynamicEOService.save(homeDocumentDynamicEO);
|
||||
}
|
||||
|
||||
String sbStr = "";
|
||||
if (ObjectUtils.isNotEmpty(sb)) {
|
||||
@@ -384,7 +403,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
|
||||
}
|
||||
//树形数据字典
|
||||
List<SysCategoryTreeVO> sysCategoryTree = sysCategoryService.getSysCategoryTree();
|
||||
List<SysCategoryTreeVO> sysCategoryTree = sysCategoryService.getSysCategoryTree(null);
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
@@ -430,7 +449,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsQuery()))).collect(Collectors.toList());
|
||||
}
|
||||
//树形数据字典
|
||||
List<SysCategoryTreeVO> sysCategoryTree = sysCategoryService.getSysCategoryTree();
|
||||
List<SysCategoryTreeVO> sysCategoryTree = sysCategoryService.getSysCategoryTree(null);
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
@@ -482,7 +501,10 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
} else {
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
if(CutEnum.EN.getValue().equals(cut) && "title".equals(onlCgformField.getDbFieldName())){
|
||||
onlCgformField.setDbFieldEnName("title");
|
||||
onlCgformField.setDbFieldEnName("Title");
|
||||
break;
|
||||
} else if(CutEnum.CN.getValue().equals(cut) && "title".equals(onlCgformField.getDbFieldName())){
|
||||
onlCgformField.setDbFieldTxt("标题");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -558,7 +580,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
|
||||
}
|
||||
//树形数据字典
|
||||
List<SysCategoryTreeVO> sysCategoryTree = sysCategoryService.getSysCategoryTree();
|
||||
List<SysCategoryTreeVO> sysCategoryTree = sysCategoryService.getSysCategoryTree(null);
|
||||
// List<Map<String, Object>> result = new ArrayList<>();
|
||||
// for (OnlCgformArea onlCgformAreaTemp : areaList) {
|
||||
// String areaName = "";
|
||||
@@ -651,7 +673,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
|
||||
}
|
||||
//树形数据字典
|
||||
List<SysCategoryTreeVO> sysCategoryTree = sysCategoryService.getSysCategoryTree();
|
||||
List<SysCategoryTreeVO> sysCategoryTree = sysCategoryService.getSysCategoryTree(null);
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
for (OnlCgformArea onlCgformAreaTemp : areaList) {
|
||||
String areaName = "";
|
||||
@@ -701,7 +723,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String key = entry.getKey();
|
||||
if(personList.contains(key)){
|
||||
String value = (String) entry.getValue();
|
||||
userNameList.addAll(Arrays.asList(value.split(",")));
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
userNameList.addAll(Arrays.asList(value.split(",")));
|
||||
}
|
||||
}
|
||||
if(dateMoreList.contains(key) && ObjectUtils.isNotEmpty(entry.getValue())){
|
||||
String value = (String) entry.getValue();
|
||||
@@ -1986,9 +2010,26 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
List<String> userIdList = domainUserRelService.queryDomainUserRelInfo(mapTemp);
|
||||
String title = (String) map.get("title");
|
||||
String serialNumber = (String) map.get("serial_number");
|
||||
String category = (String)map.get("lei4_bie2");
|
||||
String titleEn = (String) map.get("title_en");
|
||||
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsAll();
|
||||
if(StringUtils.isNotBlank(category)){
|
||||
String finalCategory = category;
|
||||
List<SysDictItem> stateDictItemList = dictItemList.stream()
|
||||
.filter(e -> "type".equals(e.getDictCode()) && finalCategory.equals(e.getItemValue()))
|
||||
.collect(Collectors.toList());
|
||||
if(stateDictItemList.size() != 0){
|
||||
category = stateDictItemList.get(0).getEnName();
|
||||
}
|
||||
}else{
|
||||
category = "";
|
||||
}
|
||||
|
||||
Set<String> technologyTerritorySet = new HashSet<>();
|
||||
String technologyTerritoryId = map.get("technology_territory").toString();
|
||||
String technologyTerritoryId = "";
|
||||
if(ObjectUtils.isNotEmpty(map.get("technology_territory"))){
|
||||
technologyTerritoryId = map.get("technology_territory").toString();
|
||||
}
|
||||
//技术领域
|
||||
if(StringUtils.isNotEmpty(technologyTerritoryId)){
|
||||
List<String> technologyTerritoryIdList = Arrays.asList(technologyTerritoryId.split(","));
|
||||
@@ -2021,13 +2062,14 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
|
||||
|
||||
|
||||
String href = "<a href='/docManage/library/detail?id=" + idTemp +
|
||||
String href = category + " " + "<a href='/docManage/library/detail?id=" + idTemp +
|
||||
"&title=" + title +
|
||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>";
|
||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>" + " "+ titleEn + " ";
|
||||
//文档动态, 文档库中新增了标准XXXX homeDocumentDynamicEOService
|
||||
//The standard GB 7258-2017 Technical specifications has been added to the document library.
|
||||
HomeDocumentDynamicEO homeDocumentDynamicEO = new HomeDocumentDynamicEO();
|
||||
homeDocumentDynamicEO.setMsgContent("文档库中新增了标准" + serialNumber);
|
||||
homeDocumentDynamicEO.setMsgContentInfo("文档库中新增了标准" + href);
|
||||
homeDocumentDynamicEO.setMsgContent("The " + category + " " + serialNumber + " " + titleEn + " has been added to the document library.");
|
||||
homeDocumentDynamicEO.setMsgContentInfo("The " + href + " has been added to the document library.");
|
||||
homeDocumentDynamicEOService.save(homeDocumentDynamicEO);
|
||||
|
||||
|
||||
@@ -2070,8 +2112,10 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
List<BussDocumentLibraryEO> list = this.list();
|
||||
List<String> serialNumberList = list.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
|
||||
String serialNumber = (String)map.get("serial_number");
|
||||
String category = (String)map.get("lei4_bie2");
|
||||
String id = (String) map.get("id");
|
||||
String title = (String) map.get("title");
|
||||
String titleEn = (String) map.get("title_en");
|
||||
//通过id查询数据
|
||||
List<Map<String, Object>> dataList = bussDocumentLibraryEOMapper.selectMapsAll(id);
|
||||
if(dataList.size() != 0){
|
||||
@@ -2085,7 +2129,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//普通数据字典
|
||||
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsAll();
|
||||
//编辑时处理首页文档动态 1. 标准XXXX的状态改为 2. 标准XXXX的适用车型改为 3. 标准XXXX删除了XXXX文件 4. 标准XXXX上传了XXXX文件
|
||||
homeDocumentDynamic(cut,map, serialNumber, id, title, dataList, fieldList,dictItemList);
|
||||
homeDocumentDynamic(cut,map, serialNumber, id, title, dataList, fieldList,dictItemList,category,titleEn);
|
||||
|
||||
|
||||
try {
|
||||
@@ -2392,7 +2436,20 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String id, String title,
|
||||
List<Map<String, Object>> dataList,
|
||||
List<OnlCgformField> fieldList,
|
||||
List<SysDictItem> dictItemList) {
|
||||
List<SysDictItem> dictItemList,
|
||||
String category,
|
||||
String titleEn) {
|
||||
if(StringUtils.isNotBlank(category)){
|
||||
String finalCategory = category;
|
||||
List<SysDictItem> stateDictItemList = dictItemList.stream()
|
||||
.filter(e -> "type".equals(e.getDictCode()) && finalCategory.equals(e.getItemValue()))
|
||||
.collect(Collectors.toList());
|
||||
if(stateDictItemList.size() != 0){
|
||||
category = stateDictItemList.get(0).getEnName();
|
||||
}
|
||||
}else{
|
||||
category = "";
|
||||
}
|
||||
//文件类型字段
|
||||
List<OnlCgformField> onlCgformFieldList = fieldList.stream()
|
||||
.filter(e -> FieldTypeEnum.FILE.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
|
||||
@@ -2402,10 +2459,17 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//编辑时处理首页文档动态 1. 标准XXXX的状态改为 2. 标准XXXX的适用车型改为 3. 标准XXXX删除了XXXX文件 4. 标准XXXX上传了XXXX文件
|
||||
String href = "<a href='/docManage/library/detail?id=" + id +
|
||||
"&title=" + title +
|
||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>,";
|
||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>" + " " + titleEn;
|
||||
|
||||
StringBuilder msgContentSb = new StringBuilder();
|
||||
StringBuilder msgContentInfoSb = new StringBuilder();
|
||||
//适用车型
|
||||
StringBuilder msgContentSbCarType = new StringBuilder("Applicable Models of the " + category + " " + serialNumber + " " + titleEn);
|
||||
StringBuilder msgContentInfoSbCarType = new StringBuilder("Applicable Models of the " + category + " " + href);
|
||||
//状态
|
||||
StringBuilder msgContentSbStatus = new StringBuilder("The Status of the " + category + " " + serialNumber + " " + titleEn);
|
||||
StringBuilder msgContentInfoSbStatus = new StringBuilder("The Status of the " + category + " " + href);
|
||||
|
||||
StringBuilder msgContentSb = new StringBuilder("标准" + serialNumber);
|
||||
StringBuilder msgContentInfoSb = new StringBuilder("标准" + href);
|
||||
|
||||
List<String> fileIdLIstTemp = new ArrayList<>();
|
||||
for (Map.Entry<String, Object> entry : dataList.get(0).entrySet()) {
|
||||
@@ -2468,14 +2532,21 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
.filter(e -> "state".equals(e.getDictCode()) && finalValue.equals(e.getItemValue()))
|
||||
.collect(Collectors.toList());
|
||||
if(stateDictItemList.size() != 0){
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
value = stateDictItemList.get(0).getItemText();
|
||||
}else{
|
||||
value = stateDictItemList.get(0).getEnName();
|
||||
}
|
||||
value = stateDictItemList.get(0).getEnName();
|
||||
}
|
||||
msgContentSb.append("状态改为" + value + ",");
|
||||
msgContentInfoSb.append("状态改为" + value + ",");
|
||||
//
|
||||
if(StringUtils.isBlank(value)){
|
||||
msgContentSbStatus.append(" has been modified to be empty ,");
|
||||
msgContentInfoSbStatus.append(" has been modified to be empty ,");
|
||||
msgContentSb.append(msgContentSbStatus);
|
||||
msgContentInfoSb.append(msgContentInfoSbStatus);
|
||||
}else{
|
||||
msgContentSbStatus.append(" has been modified to " + value + ",");
|
||||
msgContentInfoSbStatus.append(" has been modified to " + value + ",");
|
||||
msgContentSb.append(msgContentSbStatus);
|
||||
msgContentInfoSb.append(msgContentInfoSbStatus);
|
||||
}
|
||||
|
||||
}
|
||||
//适用车型 car_type
|
||||
if("shi4_yong4_che1_xing2".equals(key) && !value.equals((String)dataList.get(0).get("shi4_yong4_che1_xing2"))){
|
||||
@@ -2500,9 +2571,18 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String substring = sb.substring(0, sb.length() - 1);
|
||||
value = substring;
|
||||
}
|
||||
if(StringUtils.isBlank(value)){
|
||||
msgContentSbCarType.append(" has been modified to be empty ,");
|
||||
msgContentInfoSbCarType.append(" has been modified to be empty ,");
|
||||
msgContentSb.append(msgContentSbCarType);
|
||||
msgContentInfoSb.append(msgContentInfoSbCarType);
|
||||
}else{
|
||||
msgContentSbCarType.append(" has been modified to " + value + ",");
|
||||
msgContentInfoSbCarType.append(" has been modified to " + value + ",");
|
||||
msgContentSb.append(msgContentSbCarType);
|
||||
msgContentInfoSb.append(msgContentInfoSbCarType);
|
||||
}
|
||||
|
||||
msgContentSb.append("适用车型改为" + value + ",");
|
||||
msgContentInfoSb.append("适用车型改为" + value + ",");
|
||||
}
|
||||
}
|
||||
if(upFileList.size() != 0){
|
||||
|
||||
+7
@@ -177,6 +177,9 @@ public class DummyInventoryInfoEO implements Serializable {
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
private java.lang.String designDeliverableType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private java.lang.String designDeliverableTypeName;
|
||||
|
||||
/**设计符合性确认-交付物模板*/
|
||||
|
||||
@ApiModelProperty(value = "设计符合性确认-交付物模板")
|
||||
@@ -203,6 +206,8 @@ public class DummyInventoryInfoEO implements Serializable {
|
||||
@ApiModelProperty(value = "prehomo确认-交付物类型")
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
private java.lang.String prehomoDeliverableType;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String prehomoDeliverableTypeName;
|
||||
|
||||
/**prehomo确认-交付物模板*/
|
||||
|
||||
@@ -230,6 +235,8 @@ public class DummyInventoryInfoEO implements Serializable {
|
||||
@ApiModelProperty(value = "验证符合性确认-交付物类型")
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
private java.lang.String verifyDeliverableType;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String verifyDeliverableTypeName;
|
||||
|
||||
/**验证符合性确认-交付物模板*/
|
||||
|
||||
|
||||
+319
-88
@@ -446,7 +446,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
}
|
||||
}
|
||||
}
|
||||
//翻译成中文名
|
||||
//翻译成中文名
|
||||
public void disposeData(List<DummyInventoryInfoEO> records) {
|
||||
Set<String> technologyTerritorySet = new HashSet<>();
|
||||
for (DummyInventoryInfoEO dummyInventoryInfoEO : records) {
|
||||
@@ -545,14 +545,22 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
}else {
|
||||
dummyInventoryInfoEO.setImplementType("空");
|
||||
}
|
||||
|
||||
//认证类型
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getAttestationType())) {
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getAttestationType())) {
|
||||
List<SysDictItem> attestationType = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.ATTESTATION_TYPE.getValue());
|
||||
String attestationTypeName = attestationType.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getAttestationType())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setAttestationType(attestationTypeName);
|
||||
}else {
|
||||
List<String> attestationTypeList = Arrays.asList(dummyInventoryInfoEO.getAttestationType().split(","));
|
||||
StringBuilder attestationTypeBuilder = new StringBuilder();
|
||||
for (String midAttestationType : attestationTypeList) {
|
||||
String dutyTerritoryName = attestationType.stream().filter(e -> e.getItemValue().equals(midAttestationType)).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
attestationTypeBuilder.append(dutyTerritoryName).append(",");
|
||||
}
|
||||
dummyInventoryInfoEO.setAttestationType(attestationTypeBuilder.substring(0, attestationTypeBuilder.toString().length() - 1));
|
||||
}
|
||||
else {
|
||||
dummyInventoryInfoEO.setAttestationType("空");
|
||||
}
|
||||
|
||||
//认证级别
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getAttestationRank())) {
|
||||
List<SysDictItem> attestationRank = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.ATTESTATION_RANK.getValue());
|
||||
@@ -652,6 +660,218 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
|
||||
}
|
||||
}
|
||||
//翻译成英文名
|
||||
public void disposeDataToEn(List<DummyInventoryInfoEO> records) {
|
||||
Set<String> technologyTerritorySet = new HashSet<>();
|
||||
for (DummyInventoryInfoEO dummyInventoryInfoEO : records) {
|
||||
//子标题
|
||||
if (StringUtils.isBlank(dummyInventoryInfoEO.getSubtitle())) {
|
||||
dummyInventoryInfoEO.setSubtitle("null");
|
||||
}
|
||||
//WVTA ID
|
||||
if (StringUtils.isBlank(dummyInventoryInfoEO.getWvtaId())) {
|
||||
dummyInventoryInfoEO.setWvtaId("null");
|
||||
}
|
||||
//备注
|
||||
if (StringUtils.isBlank(dummyInventoryInfoEO.getRemark())) {
|
||||
dummyInventoryInfoEO.setRemark("null");
|
||||
}
|
||||
//适用增补件
|
||||
if (StringUtils.isBlank(dummyInventoryInfoEO.getApplicableSupplement())) {
|
||||
dummyInventoryInfoEO.setApplicableSupplement("null");
|
||||
}
|
||||
//技术领域
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getTechnologyTerritory())) {
|
||||
List<String> list = Arrays.asList(dummyInventoryInfoEO.getTechnologyTerritory().split(","));
|
||||
technologyTerritorySet.addAll(list);
|
||||
}
|
||||
//树形结构数据字典(技术领域)
|
||||
List<SysCategory> categoryList = new ArrayList<>();
|
||||
if (technologyTerritorySet.size() != 0) {
|
||||
LambdaQueryWrapper<SysCategory> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(SysCategory::getId, technologyTerritorySet);
|
||||
categoryList = sysCategoryService.list(wrapper);
|
||||
}
|
||||
//技术领域
|
||||
if (categoryList.size() != 0 && StringUtils.isNotBlank(dummyInventoryInfoEO.getTechnologyTerritory())) {
|
||||
List<String> technologyTerritoryList = Arrays.asList(dummyInventoryInfoEO.getTechnologyTerritory().split(","));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String technologyTerritory : technologyTerritoryList) {
|
||||
List<SysCategory> collect = categoryList.stream().filter(e -> technologyTerritory.equals(e.getId())).collect(Collectors.toList());
|
||||
if (collect.size() != 0) {
|
||||
sb.append(collect.get(0).getEnName() + ",");
|
||||
}
|
||||
}
|
||||
String technologyTerritoryName = null;
|
||||
if (StringUtils.isNotBlank(sb)) {
|
||||
technologyTerritoryName = sb.substring(0, sb.length() - 1);
|
||||
}
|
||||
dummyInventoryInfoEO.setTechnologyTerritoryName(technologyTerritoryName);
|
||||
}else{
|
||||
dummyInventoryInfoEO.setTechnologyTerritoryName("null");
|
||||
}
|
||||
|
||||
//适用范围
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getShi4Yong4Fan4Wei2())) {
|
||||
List<SysDictItem> shi4Yong4Fan4Wei2 = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.SHI4_YONG4_FAN4_WEI2.getValue());
|
||||
List<String> shi4Yong4Fan4Wei2List = Arrays.asList(dummyInventoryInfoEO.getShi4Yong4Fan4Wei2().split(","));
|
||||
StringBuilder shi4Yong4Fan4Wei2Builder = new StringBuilder();
|
||||
for (String midshi4Yong4Fan4Wei2 : shi4Yong4Fan4Wei2List) {
|
||||
String shi4Yong4Fan4Wei2EnName = shi4Yong4Fan4Wei2.stream().filter(e -> e.getItemValue().equals(midshi4Yong4Fan4Wei2)).map(f -> f.getEnName()).collect(Collectors.joining(","));
|
||||
shi4Yong4Fan4Wei2Builder.append(shi4Yong4Fan4Wei2EnName).append(",");
|
||||
}
|
||||
dummyInventoryInfoEO.setShi4Yong4Fan4Wei2(shi4Yong4Fan4Wei2Builder.substring(0, shi4Yong4Fan4Wei2Builder.toString().length() - 1));
|
||||
}else{
|
||||
dummyInventoryInfoEO.setShi4Yong4Fan4Wei2("null");
|
||||
}
|
||||
//适用地区
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getRegion())) {
|
||||
List<SysDictItem> region = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.REGION.getValue());
|
||||
List<String> regionList = Arrays.asList(dummyInventoryInfoEO.getRegion().split(","));
|
||||
StringBuilder regionBuilder = new StringBuilder();
|
||||
for (String midRegion : regionList) {
|
||||
String regionEnName = region.stream().filter(e -> e.getItemValue().equals(midRegion)).map(f -> f.getEnName()).collect(Collectors.joining(","));
|
||||
regionBuilder.append(regionEnName).append(",");
|
||||
}
|
||||
dummyInventoryInfoEO.setRegion(regionBuilder.substring(0, regionBuilder.toString().length() - 1));
|
||||
}else {
|
||||
dummyInventoryInfoEO.setRegion("null");
|
||||
}
|
||||
//责任领域
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getDutyTerritory())) {
|
||||
List<SysDictItem> dutyTerritory = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.DUTY_TERRITORY.getValue());
|
||||
List<String> dutyTerritoryList = Arrays.asList(dummyInventoryInfoEO.getDutyTerritory().split(","));
|
||||
StringBuilder dutyTerritoryBuilder = new StringBuilder();
|
||||
for (String midDutyTerritory : dutyTerritoryList) {
|
||||
String dutyTerritoryEnName = dutyTerritory.stream().filter(e -> e.getItemValue().equals(midDutyTerritory)).map(f -> f.getEnName()).collect(Collectors.joining(","));
|
||||
dutyTerritoryBuilder.append(dutyTerritoryEnName).append(",");
|
||||
}
|
||||
dummyInventoryInfoEO.setDutyTerritory(dutyTerritoryBuilder.substring(0, dutyTerritoryBuilder.toString().length() - 1));
|
||||
}
|
||||
else {
|
||||
dummyInventoryInfoEO.setDutyTerritory("null");
|
||||
}
|
||||
//实施类别
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getImplementType())) {
|
||||
List<SysDictItem> implementType = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.IMPLEMENT_TYPE.getValue());
|
||||
String implementTypeEnName = implementType.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getImplementType())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setImplementType(implementTypeEnName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setImplementType("null");
|
||||
}
|
||||
//认证类型
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getAttestationType())) {
|
||||
List<SysDictItem> attestationType = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.ATTESTATION_TYPE.getValue());
|
||||
List<String> attestationTypeList = Arrays.asList(dummyInventoryInfoEO.getAttestationType().split(","));
|
||||
StringBuilder attestationTypeBuilder = new StringBuilder();
|
||||
for (String midDutyTerritory : attestationTypeList) {
|
||||
String attestationTypeName = attestationType.stream().filter(e -> e.getItemValue().equals(midDutyTerritory)).map(f -> f.getEnName()).collect(Collectors.joining(","));
|
||||
attestationTypeBuilder.append(attestationTypeName).append(",");
|
||||
}
|
||||
dummyInventoryInfoEO.setAttestationType(attestationTypeBuilder.substring(0, attestationTypeBuilder.toString().length() - 1));
|
||||
|
||||
}else {
|
||||
dummyInventoryInfoEO.setAttestationType("null");
|
||||
}
|
||||
//认证级别
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getAttestationRank())) {
|
||||
List<SysDictItem> attestationRank = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.ATTESTATION_RANK.getValue());
|
||||
String attestationRankEnName = attestationRank.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getAttestationRank())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setAttestationRank(attestationRankEnName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setAttestationRank("null");
|
||||
}
|
||||
//新车型实施日期
|
||||
if (dummyInventoryInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1() != null) {
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
||||
String dateString = sdf.format(dummyInventoryInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1());
|
||||
dummyInventoryInfoEO.setXin1Che1Xing2Shi2Shi1Ri4Qi1String(dateString);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setXin1Che1Xing2Shi2Shi1Ri4Qi1String("null");
|
||||
}
|
||||
//在产车实施日期
|
||||
if (dummyInventoryInfoEO.getImplementTime() != null) {
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
||||
String dateString = sdf.format(dummyInventoryInfoEO.getImplementTime());
|
||||
dummyInventoryInfoEO.setImplementTimeString(dateString);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setImplementTimeString("null");
|
||||
}
|
||||
|
||||
//交付物类型
|
||||
List<SysDictItem> deliverableTemplate = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.DELIVERABLE_TEMPLATE.getValue());
|
||||
//设计符合性确认-交付物类型
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getDesignDeliverableType())) {
|
||||
String designDeliverableTypeEnName = deliverableTemplate.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getDesignDeliverableType())).map(f -> f.getEnName()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setDesignDeliverableType(designDeliverableTypeEnName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setDesignDeliverableType("null");
|
||||
}
|
||||
//prehomo确认-交付物类型
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getPrehomoDeliverableType())) {
|
||||
String prehomoDeliverableTypeEnName = deliverableTemplate.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getPrehomoDeliverableType())).map(f -> f.getEnName()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setPrehomoDeliverableType(prehomoDeliverableTypeEnName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setPrehomoDeliverableType("null");
|
||||
}
|
||||
//验证符合性确认-交付物类型
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getVerifyDeliverableType())) {
|
||||
String verifyDeliverableTypeEnName = deliverableTemplate.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getVerifyDeliverableType())).map(f -> f.getEnName()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setVerifyDeliverableType(verifyDeliverableTypeEnName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setVerifyDeliverableType("null");
|
||||
}
|
||||
|
||||
//发起人
|
||||
List<SysDictItem> fa1_qi3_ren2 = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.FA1_QI3_REN2.getValue());
|
||||
//设计符合性确认-发起人
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getDesignInitiator())) {
|
||||
String designInitiatorEnName = fa1_qi3_ren2.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getDesignInitiator())).map(f -> f.getEnName()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setDesignInitiator(designInitiatorEnName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setDesignInitiator("null");
|
||||
}
|
||||
//prehomo确认-发起人
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getPrehomoInitiator())) {
|
||||
String prehomoInitiatorEnName = fa1_qi3_ren2.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getPrehomoInitiator())).map(f -> f.getEnName()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setPrehomoInitiator(prehomoInitiatorEnName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setPrehomoInitiator("null");
|
||||
}
|
||||
//验证符合性确认-发起人
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getVerifyInitiator())) {
|
||||
String verifyInitiatorEnName = fa1_qi3_ren2.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getVerifyInitiator())).map(f -> f.getEnName()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setVerifyInitiator(verifyInitiatorEnName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setVerifyInitiator("null");
|
||||
}
|
||||
|
||||
//责任人
|
||||
List<SysDictItem> ze2_ren4_ren2 = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.ZE2_REN2_REN2.getValue());
|
||||
//设计符合性确认-责任人
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getDesignDuty())) {
|
||||
String designDutyEnName = ze2_ren4_ren2.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getDesignDuty())).map(f -> f.getEnName()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setDesignDuty(designDutyEnName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setDesignDuty("null");
|
||||
}
|
||||
//prehomo确认-责任人
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getPrehomoDuty())) {
|
||||
String prehomoDutyEnName = ze2_ren4_ren2.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getPrehomoDuty())).map(f -> f.getEnName()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setPrehomoDuty(prehomoDutyEnName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setPrehomoDuty("null");
|
||||
}
|
||||
//验证符合性确认-责任人
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getVerifyDuty())) {
|
||||
String verifyDutyEnName = ze2_ren4_ren2.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getVerifyDuty())).map(f -> f.getEnName()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setVerifyDuty(verifyDutyEnName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setVerifyDuty("null");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//发送消息
|
||||
private void sendMsg(Map<String, String> baseDiff, String idTemp,List<Map<String, String>> infoDiffList,
|
||||
String addSerialNumber,String deleteSerialNumber,String state,String cut) {
|
||||
@@ -701,7 +921,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
int row = 1;
|
||||
|
||||
//设置虚拟清单列表的修改消息
|
||||
if(MapUtils.isNotEmpty(baseDiff)) {
|
||||
if (MapUtils.isNotEmpty(baseDiff)) {
|
||||
//虚拟清单名称
|
||||
if (StringUtils.isNotBlank(baseDiff.get("name"))) {
|
||||
List<String> nameList = Arrays.asList(baseDiff.get("name").split(","));
|
||||
@@ -731,23 +951,34 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
contentInfo += row + ". " + "This virtual list has been deleted Number : " + deleteSerialNumber + ".\r\n";
|
||||
row++;
|
||||
}
|
||||
|
||||
//设置维护清单的修改消息
|
||||
if(CollectionUtils.isNotEmpty(infoDiffList)) {
|
||||
for (Map<String, String> infoDiff : infoDiffList) {
|
||||
if (infoDiff.size() > 1) {
|
||||
int infoDiffRow = 1;
|
||||
contentInfo += row + ". The Number " + infoDiff.get("serialNumber") + " has been updated as follows : " + "\r\n";
|
||||
contentInfo = setInfoDiffListContent(contentInfo,infoDiffList,contentLog);
|
||||
}
|
||||
}
|
||||
}
|
||||
return contentInfo;
|
||||
}
|
||||
|
||||
public String setInfoDiffListContent(String contentInfo, List<Map<String, String>> infoDiffList,String contentLog){
|
||||
//设置维护清单的修改消息
|
||||
if(CollectionUtils.isNotEmpty(infoDiffList)) {
|
||||
for (Map<String, String> infoDiff : infoDiffList) {
|
||||
if (infoDiff.size() > 1) {
|
||||
//标题
|
||||
if (StringUtils.isNotBlank(infoDiff.get("title"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("title").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Title has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.TITLE.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.SUBTITLE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.TITLE.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
|
||||
}
|
||||
}
|
||||
//子标题
|
||||
@@ -756,10 +987,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Sub-Title has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.SUBTITLE.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.SUBTITLE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.SUBTITLE.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//WVTA ID
|
||||
@@ -768,10 +999,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). WVTA ID has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.WVTA_ID.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.WVTA_ID.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.WVTA_ID.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//适用范围applyScope 多选
|
||||
@@ -780,10 +1011,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Apply Scope has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.SHI4_YONG4_FAN4_WEI2.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.SHI4_YONG4_FAN4_WEI2.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.SHI4_YONG4_FAN4_WEI2.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -793,10 +1024,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). The implementation date of new model has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -806,10 +1037,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Implement time has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.IMPLEMENT_TIME.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.IMPLEMENT_TIME.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.IMPLEMENT_TIME.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -819,10 +1050,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Attestation type has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.ATTESTATION_TYPE.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.ATTESTATION_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.ATTESTATION_TYPE.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -832,10 +1063,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Technology territory has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.TECHNOLOGY_TERRITORY.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.TECHNOLOGY_TERRITORY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.TECHNOLOGY_TERRITORY.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -845,10 +1076,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Duty territory has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.DUTY_TERRITORY.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.DUTY_TERRITORY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.DUTY_TERRITORY.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -858,10 +1089,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Attestation rank has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.ATTESTATION_RANK.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.ATTESTATION_RANK.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.ATTESTATION_RANK.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -871,10 +1102,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Implement type has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.IMPLEMENT_TYPE.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.IMPLEMENT_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.IMPLEMENT_TYPE.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -884,10 +1115,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Region has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.REGION.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.REGION.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.REGION.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -897,10 +1128,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Applicable Supplement has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.APPLICABLE_SUPPLEMENT.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.APPLICABLE_SUPPLEMENT.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.APPLICABLE_SUPPLEMENT.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//备注
|
||||
@@ -909,10 +1140,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Remark has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.REMARK.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.REMARK.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.REMARK.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -920,12 +1151,12 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
if (StringUtils.isNotBlank(infoDiff.get("designDeliverableType"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("designDeliverableType").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
String infoDiffNew = "list.get(1)";
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Design deliverable type has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.DESIGN_DELIVERABLE_TYPE.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.DESIGN_DELIVERABLE_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.DESIGN_DELIVERABLE_TYPE.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//设计符合性确认-交付物模板
|
||||
@@ -934,10 +1165,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Design deliverable template has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.DESIGN_DELIVERABLE_TEMPLATE.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.DESIGN_DELIVERABLE_TEMPLATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.DESIGN_DELIVERABLE_TEMPLATE.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//设计符合性确认-发起人
|
||||
@@ -946,10 +1177,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Design initiator has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.DESIGN_INITIATOR.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.DESIGN_INITIATOR.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.DESIGN_INITIATOR.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//设计符合性确认-责任人
|
||||
@@ -958,10 +1189,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Design duty has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.DESIGN_DUTY.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.DESIGN_DUTY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.DESIGN_DUTY.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//prehomo确认-交付物类型
|
||||
@@ -970,10 +1201,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Prehomo deliverable type has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.PREHOMO_DELIVERABLE_TYPE.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.PREHOMO_DELIVERABLE_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.PREHOMO_DELIVERABLE_TYPE.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//prehomo确认-交付物模板
|
||||
@@ -982,10 +1213,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Prehomo deliverable template has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.PREHOMO_DELIVERABLE_TEMPLATE.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.PREHOMO_DELIVERABLE_TEMPLATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.PREHOMO_DELIVERABLE_TEMPLATE.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//prehomo确认-发起人
|
||||
@@ -994,10 +1225,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Prehomo initiator has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.PREHOMO_INITIATOR.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.PREHOMO_INITIATOR.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.PREHOMO_INITIATOR.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//prehomo确认-责任人
|
||||
@@ -1006,10 +1237,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Prehomo duty has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.PREHOMO_DUTY.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.PREHOMO_DUTY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.PREHOMO_DUTY.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//验证符合性确认-交付物类型
|
||||
@@ -1018,10 +1249,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Verify deliverable type has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.VERIFY_DELIVERABLE_TYPE.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.VERIFY_DELIVERABLE_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.VERIFY_DELIVERABLE_TYPE.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//验证符合性确认-交付物模板
|
||||
@@ -1030,10 +1261,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Verify deliverable template has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.VERIFY_DELIVERABLE_TEMPLATE.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.VERIFY_DELIVERABLE_TEMPLATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.VERIFY_DELIVERABLE_TEMPLATE.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//验证符合性确认-发起人
|
||||
@@ -1042,10 +1273,10 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Verify initiator has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.VERIFY_INITIATOR.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.VERIFY_INITIATOR.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.VERIFY_INITIATOR.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//验证符合性确认-责任人
|
||||
@@ -1054,13 +1285,13 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Verify duty has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
contentInfo += "'"+DummyInventoryBaseFieldEnum.VERIFY_DUTY.getEnName() +"' has been changed from " + infoDiffOld + " to " + infoDiffNew + ",";
|
||||
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.VERIFY_DUTY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += "'"+DummyInventoryBaseFieldEnum.VERIFY_DUTY.getName() + "'由" + infoDiffOld + "改为了" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
row++;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+293
-209
@@ -20,17 +20,20 @@ import com.jero.modules.dummy.entity.DummyInventoryInfoEOEn;
|
||||
import com.jero.modules.dummy.enums.DummyInventoryBaseFieldEnum;
|
||||
import com.jero.modules.dummy.mapper.DummyInventoryInfoEOMapper;
|
||||
import com.jero.modules.dummy.service.IDummyInventoryInfoEOService;
|
||||
import com.jero.modules.dummy.util.DeepCopyListUtil;
|
||||
import com.jero.modules.dummy.util.ListDiff;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.split.common.FileUnZip;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.mapper.SysCategoryMapper;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.SerializationUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.hssf.usermodel.*;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
@@ -41,6 +44,7 @@ import org.aspectj.util.FileUtil;
|
||||
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@@ -82,6 +86,8 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
private DummyLogEOServiceImpl dummyLogEOService;
|
||||
@Autowired
|
||||
private DummyInventoryBaseEOServiceImpl dummyInventoryBaseEOService;
|
||||
@Autowired
|
||||
SysCategoryMapper sysCategoryMapper;
|
||||
|
||||
@Override
|
||||
public IPage<DummyInventoryInfoEO> getPageInfo(DummyInventoryInfoEO dummyInventoryInfoEO,HttpServletRequest req) {
|
||||
@@ -148,8 +154,8 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
String serialNumber = list.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||
String contentLog = username+"向清单中添加了标准“"+serialNumber+"”";
|
||||
String enContentLog = username+" added the standard “"+serialNumber+"” to the list.";
|
||||
String contentLog = username+"向清单中添加了“"+serialNumber+"”";
|
||||
String enContentLog = username+" added “"+serialNumber+"” to the list.";
|
||||
dummyLogEOService.updateLog(contentLog, dummyInventoryInfoEO.getDummyInventoryBaseId(),CutEnum.CN.getValue());
|
||||
dummyLogEOService.updateLog(enContentLog, dummyInventoryInfoEO.getDummyInventoryBaseId(),CutEnum.EN.getValue());
|
||||
}
|
||||
@@ -165,33 +171,45 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
public void editById(DummyInventoryInfoEO dummyInventoryInfoEO) {
|
||||
Date now = new Date();
|
||||
dummyInventoryInfoEO.setUpdateTime(now);
|
||||
DummyInventoryInfoEO dummyInventoryInfoEOCopy = SerializationUtils.clone(dummyInventoryInfoEO);//复制
|
||||
|
||||
//更新log
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
String contentLog = username+"编辑了清单中的“" + dummyInventoryInfoEO.getSerialNumber() + "”标准:";
|
||||
String enContentLog = username+" edited the “" + dummyInventoryInfoEO.getSerialNumber() + "” standard in the list:";
|
||||
|
||||
String contentLog = username+"编辑了清单中的“" + dummyInventoryInfoEO.getSerialNumber() + "”:";
|
||||
String enContentLog = username+" edited the “" + dummyInventoryInfoEO.getSerialNumber() + "” in the list:";
|
||||
|
||||
List<DummyInventoryInfoEO> infoEOList = new ArrayList<>();
|
||||
infoEOList.add(dummyInventoryInfoEO);
|
||||
List<DummyInventoryInfoEO> infoEOListCopy = new ArrayList<>();
|
||||
infoEOListCopy.add(dummyInventoryInfoEOCopy);
|
||||
|
||||
//查询数据库里原来的数据
|
||||
QueryWrapper<DummyInventoryInfoEO> queryWrapper = new QueryWrapper<>();
|
||||
List<DummyInventoryInfoEO> dataList = list(queryWrapper.eq("id", dummyInventoryInfoEO.getId()));
|
||||
List<DummyInventoryInfoEO> dataListCopy = DeepCopyListUtil.depCopy(dataList);
|
||||
|
||||
saveOrUpdate(dummyInventoryInfoEO);
|
||||
//翻译
|
||||
//翻译-中文
|
||||
dummyInventoryBaseEOService.disposeData(infoEOList);
|
||||
dummyInventoryBaseEOService.disposeData(dataList);
|
||||
//翻译-英文
|
||||
dummyInventoryBaseEOService.disposeDataToEn(infoEOListCopy);
|
||||
dummyInventoryBaseEOService.disposeDataToEn(dataListCopy);
|
||||
|
||||
//比对不同字段
|
||||
Map<String, String> infoDiff = ListDiff.compareObject(dataList.get(0),dummyInventoryInfoEO);
|
||||
Map<String, String> infoDiffEn = ListDiff.compareObject(dataListCopy.get(0),dummyInventoryInfoEOCopy);
|
||||
|
||||
//设置更新log
|
||||
List<Map<String,String>> infoDiffList = new ArrayList<>();
|
||||
infoDiffList.add(infoDiff);
|
||||
contentLog = dummyInventoryBaseEOService.setContentInfo(null,null,infoDiffList,null,null,contentLog);
|
||||
enContentLog=contentLog.replace("由"," changed from ")
|
||||
.replace("改为"," to ");
|
||||
List<Map<String,String>> infoDiffListEn = new ArrayList<>();
|
||||
infoDiffListEn.add(infoDiffEn);
|
||||
|
||||
contentLog = dummyInventoryBaseEOService.setInfoDiffListContent(null,infoDiffList,contentLog);
|
||||
enContentLog=dummyInventoryBaseEOService.setInfoDiffListContent(enContentLog,infoDiffListEn,null);
|
||||
|
||||
dummyLogEOService.updateLog(contentLog, dummyInventoryInfoEO.getDummyInventoryBaseId(),CutEnum.CN.getValue());
|
||||
dummyLogEOService.updateLog(enContentLog, dummyInventoryInfoEO.getDummyInventoryBaseId(),CutEnum.EN.getValue());
|
||||
}
|
||||
@@ -240,8 +258,8 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
String username = sysUser.getUsername();
|
||||
String projectId = dummyInventoryInfoEOList.get(0).getDummyInventoryBaseId();
|
||||
String serialNumber = dummyInventoryInfoEOList.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||
String contentLog = username+"删除了清单中的“"+serialNumber+"”标准";
|
||||
String enContentLog = username+" deleted the “"+serialNumber+"” standard from the list";
|
||||
String contentLog = username+"删除了清单中的“"+serialNumber+"”";
|
||||
String enContentLog = username+" deleted “"+serialNumber+"” from the list";
|
||||
dummyLogEOService.updateLog(contentLog, projectId,CutEnum.CN.getValue());
|
||||
dummyLogEOService.updateLog(enContentLog, projectId,CutEnum.EN.getValue());
|
||||
}
|
||||
@@ -360,135 +378,115 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
}
|
||||
this.updateBatchById(dummyInventoryInfoEOList);
|
||||
|
||||
//更新log
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
String contentLog = username+"批量设置了“";
|
||||
StringBuilder contentLogBuilder = new StringBuilder(contentLog);
|
||||
String enContentLog = username+" batch set “";
|
||||
StringBuilder enContentLogBuilder = new StringBuilder(enContentLog);
|
||||
//更新log
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
String contentLog = username+"批量设置了“";
|
||||
StringBuilder contentLogBuilder = new StringBuilder(contentLog);
|
||||
String enContentLog = username+" batch set “";
|
||||
StringBuilder enContentLogBuilder = new StringBuilder(enContentLog);
|
||||
|
||||
//根据id查询数据库中完整信息,翻译
|
||||
// List<String> idList = Arrays.asList(dummyInventoryInfoEO.getIds().split(","));
|
||||
// QueryWrapper<DummyInventoryInfoEO> queryWrapper = new QueryWrapper<>();
|
||||
// List<DummyInventoryInfoEO> infoList = list(queryWrapper.in("id", idList));
|
||||
// String projectId = infoList.get(0).getDummyInventoryBaseId();
|
||||
dummyInventoryBaseEOService.disposeData(infoList);
|
||||
List<DummyInventoryInfoEO> infoListCopy = DeepCopyListUtil.depCopy(infoList);
|
||||
|
||||
//翻译传入的数据
|
||||
List<DummyInventoryInfoEO> inputList = new ArrayList<>();
|
||||
inputList.add(dummyInventoryInfoEO);
|
||||
dummyInventoryBaseEOService.disposeData(inputList);
|
||||
DummyInventoryInfoEO inputInfoEO = inputList.get(0);
|
||||
//根据id查询数据库中完整信息,翻译
|
||||
dummyInventoryBaseEOService.disposeData(infoList);
|
||||
dummyInventoryBaseEOService.disposeDataToEn(infoListCopy);
|
||||
|
||||
for (String id : idList) {
|
||||
DummyInventoryInfoEO info = infoList.stream().filter(e -> id.equals(e.getId())).collect(Collectors.toList()).get(0);
|
||||
contentLogBuilder.append(info.getSerialNumber() + ":");
|
||||
enContentLogBuilder.append(info.getSerialNumber() + ":");
|
||||
DummyInventoryInfoEO dummyInventoryInfoEOTemp = new DummyInventoryInfoEO();
|
||||
dummyInventoryInfoEOTemp.setId(id);
|
||||
//实施类别 implementType
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getImplementType())) {
|
||||
if (StringUtils.isBlank(info.getImplementType())){
|
||||
info.setImplementType("空");
|
||||
//翻译传入的数据
|
||||
List<DummyInventoryInfoEO> inputList = new ArrayList<>();
|
||||
inputList.add(dummyInventoryInfoEO);
|
||||
dummyInventoryBaseEOService.disposeData(inputList);
|
||||
DummyInventoryInfoEO inputInfoEO = inputList.get(0);
|
||||
|
||||
for (String id : idList) {
|
||||
DummyInventoryInfoEO info = infoList.stream().filter(e -> id.equals(e.getId())).collect(Collectors.toList()).get(0);
|
||||
DummyInventoryInfoEO infoCopy = infoListCopy.stream().filter(e -> id.equals(e.getId())).collect(Collectors.toList()).get(0);
|
||||
contentLogBuilder.append(info.getSerialNumber() + ":");
|
||||
enContentLogBuilder.append(infoCopy.getSerialNumber() + ":");
|
||||
DummyInventoryInfoEO dummyInventoryInfoEOTemp = new DummyInventoryInfoEO();
|
||||
dummyInventoryInfoEOTemp.setId(id);
|
||||
|
||||
//实施类别 implementType
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getImplementType())) {
|
||||
if (!info.getImplementType().equals(inputInfoEO.getImplementType()) && !inputInfoEO.getImplementType().equals("空")){
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.IMPLEMENT_TYPE.getName(), info.getImplementType(), inputInfoEO.getImplementType());
|
||||
setUpdateEnContentLog(enContentLogBuilder,DummyInventoryBaseFieldEnum.IMPLEMENT_TYPE.getEnName(), infoCopy.getImplementType(), inputInfoEO.getImplementType());
|
||||
}
|
||||
}
|
||||
if (!info.getImplementType().equals(inputInfoEO.getImplementType())) {
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.IMPLEMENT_TYPE.getName(), info.getImplementType(), inputInfoEO.getImplementType());
|
||||
setUpdateEnContentLog(enContentLogBuilder,DummyInventoryBaseFieldEnum.IMPLEMENT_TYPE.getEnName(), info.getImplementType(), inputInfoEO.getImplementType());
|
||||
//认证类型 attestationType
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getAttestationType())) {
|
||||
if (!info.getAttestationType().equals(inputInfoEO.getAttestationType()) && !inputInfoEO.getAttestationType().equals("空")){
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.ATTESTATION_TYPE.getName(), info.getAttestationType(), inputInfoEO.getAttestationType());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.ATTESTATION_TYPE.getEnName(), infoCopy.getAttestationType(), inputInfoEO.getAttestationType());
|
||||
}
|
||||
}
|
||||
}
|
||||
//认证类型 attestationType
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getAttestationType())) {
|
||||
if (StringUtils.isBlank(info.getAttestationType())){
|
||||
info.setAttestationType("空");
|
||||
//认证级别 attestationRank
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getAttestationRank())) {
|
||||
if (!info.getAttestationRank().equals(inputInfoEO.getAttestationRank()) && !inputInfoEO.getAttestationRank().equals("空")){
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.ATTESTATION_RANK.getName(), info.getAttestationRank(), inputInfoEO.getAttestationRank());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.ATTESTATION_RANK.getEnName(), infoCopy.getAttestationRank(), inputInfoEO.getAttestationRank());
|
||||
}
|
||||
}
|
||||
if (!info.getAttestationType().equals(inputInfoEO.getAttestationType())) {
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.ATTESTATION_TYPE.getName(), info.getAttestationType(), inputInfoEO.getAttestationType());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.ATTESTATION_TYPE.getEnName(), info.getAttestationType(), inputInfoEO.getAttestationType());
|
||||
//责任领域 dutyTerritory
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getDutyTerritory())) {
|
||||
if (!info.getDutyTerritory().equals(inputInfoEO.getDutyTerritory()) && !inputInfoEO.getDutyTerritory().equals("空")){
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.DUTY_TERRITORY.getName(), info.getDutyTerritory(), inputInfoEO.getDutyTerritory());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.DUTY_TERRITORY.getEnName(), infoCopy.getDutyTerritory(), inputInfoEO.getDutyTerritory());
|
||||
}
|
||||
}
|
||||
}
|
||||
//认证级别 attestationRank
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getAttestationRank())) {
|
||||
if (StringUtils.isBlank(info.getAttestationRank())){
|
||||
info.setAttestationRank("空");
|
||||
//适用范围 shi4Yong4Fan4Wei2
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getShi4Yong4Fan4Wei2())){
|
||||
if (!info.getShi4Yong4Fan4Wei2().equals(inputInfoEO.getShi4Yong4Fan4Wei2()) && !inputInfoEO.getShi4Yong4Fan4Wei2().equals("空")){
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.SHI4_YONG4_FAN4_WEI2.getName(),info.getShi4Yong4Fan4Wei2(),inputInfoEO.getShi4Yong4Fan4Wei2());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.SHI4_YONG4_FAN4_WEI2.getEnName(),infoCopy.getShi4Yong4Fan4Wei2(),inputInfoEO.getShi4Yong4Fan4Wei2());
|
||||
}
|
||||
}
|
||||
if (!info.getAttestationRank().equals(inputInfoEO.getAttestationRank())){
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.ATTESTATION_RANK.getName(), info.getAttestationRank(), inputInfoEO.getAttestationRank());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.ATTESTATION_RANK.getEnName(), info.getAttestationRank(), inputInfoEO.getAttestationRank());
|
||||
//技术领域 technologyTerritory
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getTechnologyTerritory())){
|
||||
if (!info.getTechnologyTerritoryName().equals(inputInfoEO.getTechnologyTerritoryName()) && !inputInfoEO.getTechnologyTerritoryName().equals("空")){
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.TECHNOLOGY_TERRITORY.getName(),info.getTechnologyTerritoryName(),inputInfoEO.getTechnologyTerritoryName());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.TECHNOLOGY_TERRITORY.getEnName(),infoCopy.getTechnologyTerritoryName(),inputInfoEO.getTechnologyTerritoryName());
|
||||
}
|
||||
}
|
||||
}
|
||||
//责任领域 dutyTerritory
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getDutyTerritory())) {
|
||||
if (StringUtils.isBlank(info.getDutyTerritory())){
|
||||
info.setDutyTerritory("空");
|
||||
//适用地区 region
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getRegion())){
|
||||
if (!info.getRegion().equals(inputInfoEO.getRegion()) && !inputInfoEO.getRegion().equals("空")){
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.REGION.getName(),info.getRegion(),inputInfoEO.getRegion());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.REGION.getEnName(),infoCopy.getRegion(),inputInfoEO.getRegion());
|
||||
}
|
||||
}
|
||||
if (!info.getDutyTerritory().equals(inputInfoEO.getDutyTerritory())){
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.DUTY_TERRITORY.getName(), info.getDutyTerritory(), inputInfoEO.getDutyTerritory());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.DUTY_TERRITORY.getEnName(), info.getDutyTerritory(), inputInfoEO.getDutyTerritory());
|
||||
//新车实施日期
|
||||
if(ObjectUtils.isNotEmpty(dummyInventoryInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1())){
|
||||
if (info.getXin1Che1Xing2Shi2Shi1Ri4Qi1() == null){
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName(),"空",inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getEnName(),"null",inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
|
||||
}else {
|
||||
if (!info.getXin1Che1Xing2Shi2Shi1Ri4Qi1String().equals(inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String())) {
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName(), info.getXin1Che1Xing2Shi2Shi1Ri4Qi1String(), inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getEnName(), info.getXin1Che1Xing2Shi2Shi1Ri4Qi1String(), inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//适用范围 shi4Yong4Fan4Wei2
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getShi4Yong4Fan4Wei2())){
|
||||
if (StringUtils.isBlank(info.getShi4Yong4Fan4Wei2())){
|
||||
info.setShi4Yong4Fan4Wei2("空");
|
||||
}
|
||||
if (!info.getShi4Yong4Fan4Wei2().equals(inputInfoEO.getShi4Yong4Fan4Wei2())) {
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.SHI4_YONG4_FAN4_WEI2.getName(),info.getShi4Yong4Fan4Wei2(),inputInfoEO.getShi4Yong4Fan4Wei2());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.SHI4_YONG4_FAN4_WEI2.getEnName(),info.getShi4Yong4Fan4Wei2(),inputInfoEO.getShi4Yong4Fan4Wei2());
|
||||
}
|
||||
}
|
||||
//技术领域 technologyTerritory
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getTechnologyTerritory())){
|
||||
if (StringUtils.isBlank(info.getTechnologyTerritoryName())){
|
||||
info.setTechnologyTerritoryName("空");
|
||||
}
|
||||
if (!info.getTechnologyTerritoryName().equals(inputInfoEO.getTechnologyTerritoryName())) {
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.TECHNOLOGY_TERRITORY.getName(),info.getTechnologyTerritoryName(),inputInfoEO.getTechnologyTerritoryName());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.TECHNOLOGY_TERRITORY.getEnName(),info.getTechnologyTerritoryName(),inputInfoEO.getTechnologyTerritoryName());
|
||||
}
|
||||
}
|
||||
//适用地区 region
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getRegion())){
|
||||
if (StringUtils.isBlank(info.getRegion())){
|
||||
info.setRegion("空");
|
||||
}
|
||||
if (!info.getRegion().equals(inputInfoEO.getRegion())) {
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.REGION.getName(),info.getRegion(),inputInfoEO.getRegion());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.REGION.getEnName(),info.getRegion(),inputInfoEO.getRegion());
|
||||
}
|
||||
}
|
||||
//新车实施日期
|
||||
if(ObjectUtils.isNotEmpty(dummyInventoryInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1())){
|
||||
if (info.getXin1Che1Xing2Shi2Shi1Ri4Qi1() == null){
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName(),"空",inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getEnName(),"null",inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
|
||||
}else {
|
||||
if (!info.getXin1Che1Xing2Shi2Shi1Ri4Qi1String().equals(inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String())) {
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName(), info.getXin1Che1Xing2Shi2Shi1Ri4Qi1String(), inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getEnName(), info.getXin1Che1Xing2Shi2Shi1Ri4Qi1String(), inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
|
||||
//在产车实施日期
|
||||
if(ObjectUtils.isNotEmpty(dummyInventoryInfoEO.getImplementTime())){
|
||||
if (info.getImplementTime() == null){
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.IMPLEMENT_TIME.getName(),"空",inputInfoEO.getImplementTimeString());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.IMPLEMENT_TIME.getEnName(),"null",inputInfoEO.getImplementTimeString());
|
||||
}else {
|
||||
if (!info.getImplementTimeString().equals(inputInfoEO.getImplementTimeString())) {
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.IMPLEMENT_TIME.getName(), info.getImplementTimeString(), inputInfoEO.getImplementTimeString());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.IMPLEMENT_TIME.getEnName(), info.getImplementTimeString(), inputInfoEO.getImplementTimeString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//在产车实施日期
|
||||
if(ObjectUtils.isNotEmpty(dummyInventoryInfoEO.getImplementTime())){
|
||||
if (info.getImplementTime() == null){
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.IMPLEMENT_TIME.getName(),"空",inputInfoEO.getImplementTimeString());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.IMPLEMENT_TIME.getEnName(),"null",inputInfoEO.getImplementTimeString());
|
||||
}else {
|
||||
if (!info.getImplementTimeString().equals(inputInfoEO.getImplementTimeString())) {
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.IMPLEMENT_TIME.getName(), info.getImplementTimeString(), inputInfoEO.getImplementTimeString());
|
||||
setUpdateEnContentLog(enContentLogBuilder, DummyInventoryBaseFieldEnum.IMPLEMENT_TIME.getEnName(), info.getImplementTimeString(), inputInfoEO.getImplementTimeString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
contentLog = contentLogBuilder.substring(0, contentLogBuilder.length() - 1);
|
||||
contentLog += "”";
|
||||
enContentLog = enContentLogBuilder.substring(0, enContentLogBuilder.length() - 1).replace("空","null");
|
||||
enContentLog += "”";
|
||||
dummyLogEOService.updateLog(contentLog, projectId,CutEnum.CN.getValue());
|
||||
dummyLogEOService.updateLog(enContentLog, projectId,CutEnum.EN.getValue());
|
||||
contentLog = contentLogBuilder.substring(0, contentLogBuilder.length() - 1);
|
||||
contentLog += "”";
|
||||
enContentLog = enContentLogBuilder.substring(0, enContentLogBuilder.length() - 1);
|
||||
enContentLog += "”";
|
||||
dummyLogEOService.updateLog(contentLog, projectId,CutEnum.CN.getValue());
|
||||
dummyLogEOService.updateLog(enContentLog, projectId,CutEnum.EN.getValue());
|
||||
}
|
||||
}
|
||||
public StringBuilder setUpdateContentLog(StringBuilder contentLogBuilder,String fieldName,String oldValue,String newValue){
|
||||
@@ -656,21 +654,10 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
* @param dummyInventoryInfoEOList
|
||||
*/
|
||||
private void treeDict(DummyInventoryInfoEO dummyInventoryInfoEO, List<DummyInventoryInfoEO> dummyInventoryInfoEOList) {
|
||||
Set<String> technologyTerritorySet = new HashSet<>();
|
||||
Set<String> correspondingStandardSet = new HashSet<>();
|
||||
|
||||
List<String> deliverableList = new ArrayList<>();
|
||||
if(dummyInventoryInfoEOList.size() != 0){
|
||||
for (DummyInventoryInfoEO record : dummyInventoryInfoEOList) {
|
||||
//技术领域
|
||||
if(StringUtils.isNotBlank(record.getTechnologyTerritory())){
|
||||
List<String> list = Arrays.asList(record.getTechnologyTerritory().split(","));
|
||||
technologyTerritorySet.addAll(list);
|
||||
}
|
||||
//对应标准
|
||||
// if(StringUtils.isNotBlank(record.getCorrespondingStandard())){
|
||||
// List<String> list = Arrays.asList(record.getCorrespondingStandard().split(","));
|
||||
// correspondingStandardSet.addAll(list);
|
||||
// }
|
||||
//设计符合性确认交付物模板
|
||||
if(StringUtils.isNotBlank(record.getDesignDeliverableTemplate())){
|
||||
deliverableList.addAll(Arrays.asList(record.getDesignDeliverableTemplate().split(",")));
|
||||
@@ -685,17 +672,6 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
}
|
||||
}
|
||||
|
||||
// List<BussDocumentLibraryEO> bussDocumentLibraryEOList = new ArrayList<>();
|
||||
// if(correspondingStandardSet.size() != 0){
|
||||
// //对应标准 iBussDocumentLibraryEOService
|
||||
// LambdaQueryWrapper<BussDocumentLibraryEO> wrapperTemp = new LambdaQueryWrapper<>();
|
||||
// wrapperTemp.in(BussDocumentLibraryEO::getId,correspondingStandardSet);
|
||||
// bussDocumentLibraryEOList = iBussDocumentLibraryEOService.list(wrapperTemp);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
//文件
|
||||
List<OSSFile> fileInfos = new ArrayList<>();
|
||||
if(deliverableList.size() != 0){
|
||||
@@ -703,52 +679,35 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
}
|
||||
|
||||
//树形结构数据字典(技术领域)
|
||||
List<SysCategory> categoryList = new ArrayList<>();
|
||||
if(technologyTerritorySet.size() != 0){
|
||||
LambdaQueryWrapper<SysCategory> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(SysCategory::getId, technologyTerritorySet);
|
||||
categoryList = sysCategoryService.list(wrapper);
|
||||
}
|
||||
List<SysCategory> categoryList = sysCategoryService.list();
|
||||
|
||||
for (DummyInventoryInfoEO record : dummyInventoryInfoEOList) {
|
||||
//对应标准
|
||||
// if(bussDocumentLibraryEOList.size() != 0 && StringUtils.isNotBlank(record.getCorrespondingStandard())){
|
||||
// StringBuilder stringBuilder = new StringBuilder();
|
||||
// for (String bussDocumentLibraryId : record.getCorrespondingStandard().split(",")) {
|
||||
// List<BussDocumentLibraryEO> bussDocumentLibraryEOS = bussDocumentLibraryEOList.stream()
|
||||
// .filter(e -> e.getId().equals(bussDocumentLibraryId)).collect(Collectors.toList());
|
||||
// if(bussDocumentLibraryEOS.size() != 0){
|
||||
// stringBuilder.append(bussDocumentLibraryEOS.get(0).getSerialNumber()+",");
|
||||
// }else{
|
||||
// //手动输入的情况
|
||||
// stringBuilder.append(bussDocumentLibraryId + ",");
|
||||
// }
|
||||
// }
|
||||
// if(StringUtils.isNotBlank(stringBuilder)){
|
||||
// String substring = stringBuilder.substring(0, stringBuilder.length() - 1);
|
||||
// record.setCorrespondingStandardName(substring);
|
||||
// }
|
||||
// }
|
||||
//技术领域
|
||||
if (categoryList.size() != 0 && StringUtils.isNotBlank(record.getTechnologyTerritory())) {
|
||||
List<String> technologyTerritoryList = Arrays.asList(record.getTechnologyTerritory().split(","));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String technologyTerritory : technologyTerritoryList) {
|
||||
List<SysCategory> collect = categoryList.stream().filter(e -> technologyTerritory.equals(e.getId())).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
if (CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())) {
|
||||
sb.append(collect.get(0).getName() + ",");
|
||||
} else {
|
||||
sb.append(collect.get(0).getEnName());
|
||||
}
|
||||
}
|
||||
}
|
||||
String technologyTerritoryName = "";
|
||||
if (StringUtils.isNotBlank(sb)) {
|
||||
technologyTerritoryName = sb.substring(0, sb.length() - 1);
|
||||
}
|
||||
String technologyTerritoryName = getTreeName(dummyInventoryInfoEO, categoryList, technologyTerritoryList);
|
||||
record.setTechnologyTerritoryName(technologyTerritoryName);
|
||||
}
|
||||
//设计交付物类型
|
||||
if(StringUtils.isNotBlank(record.getDesignDeliverableType())){
|
||||
List<String> designDeliverableTypeList = Arrays.asList(record.getDesignDeliverableType().split(","));
|
||||
String name = getTreeName(dummyInventoryInfoEO, categoryList, designDeliverableTypeList);
|
||||
record.setDesignDeliverableTypeName(name);
|
||||
}
|
||||
|
||||
//pre交付物类型
|
||||
if(StringUtils.isNotBlank(record.getPrehomoDeliverableType())){
|
||||
List<String> prehomoDeliverableTypeList = Arrays.asList(record.getPrehomoDeliverableType().split(","));
|
||||
String name = getTreeName(dummyInventoryInfoEO, categoryList, prehomoDeliverableTypeList);
|
||||
record.setPrehomoDeliverableTypeName(name);
|
||||
}
|
||||
|
||||
//验证交付物类型
|
||||
if(StringUtils.isNotBlank(record.getVerifyDeliverableType())){
|
||||
List<String> verifyDeliverableTypeList = Arrays.asList(record.getVerifyDeliverableType().split(","));
|
||||
String name = getTreeName(dummyInventoryInfoEO, categoryList, verifyDeliverableTypeList);
|
||||
record.setVerifyDeliverableTypeName(name);
|
||||
}
|
||||
|
||||
//交付物类型模板
|
||||
if(fileInfos.size() != 0){
|
||||
@@ -776,6 +735,25 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
}
|
||||
}
|
||||
|
||||
private String getTreeName(DummyInventoryInfoEO dummyInventoryInfoEO, List<SysCategory> categoryList, List<String> technologyTerritoryList) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String technologyTerritory : technologyTerritoryList) {
|
||||
List<SysCategory> collect = categoryList.stream().filter(e -> technologyTerritory.equals(e.getId())).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
if (CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())) {
|
||||
sb.append(collect.get(0).getName() + ",");
|
||||
} else {
|
||||
sb.append(collect.get(0).getEnName());
|
||||
}
|
||||
}
|
||||
}
|
||||
String technologyTerritoryName = "";
|
||||
if (StringUtils.isNotBlank(sb)) {
|
||||
technologyTerritoryName = sb.substring(0, sb.length() - 1);
|
||||
}
|
||||
return technologyTerritoryName;
|
||||
}
|
||||
|
||||
private String getFileName(DummyInventoryInfoEO dummyInventoryInfoEO,List<OSSFile> fileInfos,String deliverableTemplate){
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String s : deliverableTemplate.split(",")) {
|
||||
@@ -1039,6 +1017,14 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
String zipEntryName,
|
||||
File saveDirectory,
|
||||
DummyInventoryInfoEO dummyInventoryInfoEOTemp) {
|
||||
String dictId = sysCategoryMapper.getDictId("deliverable_template");
|
||||
List<SysCategory> collect = categoryList.stream().filter(e -> e.getSysDictId().equals(dictId)).collect(Collectors.toList());
|
||||
List<String> treeNameList = new ArrayList<>();
|
||||
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEOTemp.getCut())){
|
||||
treeNameList = collect.stream().map(SysCategory::getName).collect(Collectors.toList());
|
||||
}else{
|
||||
treeNameList = collect.stream().map(SysCategory::getEnName).collect(Collectors.toList());
|
||||
}
|
||||
int i = 3;
|
||||
List<String> msgList = new ArrayList<>();
|
||||
String value = "";
|
||||
@@ -1141,7 +1127,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
}
|
||||
|
||||
//认证类型(单选不必填)
|
||||
value = pullSingle(dictItemList, dummyInventoryInfoEO, errorMsg, attestationType,msgList,"认证类型","Certification Type","attestation_type");
|
||||
value = pullMore(dictItemList, dummyInventoryInfoEO, errorMsg, attestationType,msgList,"认证类型","Certification Type","attestation_type");
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
dummyInventoryInfoEO.setAttestationType(value);
|
||||
}
|
||||
@@ -1166,9 +1152,10 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
|
||||
//设计
|
||||
//交付物类型
|
||||
value = pullSingle(dictItemList, dummyInventoryInfoEO, errorMsg, designDeliverableType,msgList,"交付物类型","type of deliverables","deliverable_template");
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
dummyInventoryInfoEO.setDesignDeliverableType(value);
|
||||
value = tree(categoryList, treeNameList,dummyInventoryInfoEO, errorMsg, designDeliverableType,msgList,"交付物类型","type of deliverables","deliverable_template");
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
String treeId = getTreeId(categoryList, dummyInventoryInfoEOTemp, treeNameList, value);
|
||||
dummyInventoryInfoEO.setDesignDeliverableType(treeId);
|
||||
}
|
||||
|
||||
//交付物模板
|
||||
@@ -1191,9 +1178,10 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
|
||||
//pre
|
||||
//交付物类型
|
||||
value = pullSingle(dictItemList, dummyInventoryInfoEO, errorMsg, prehomoDeliverableType,msgList,"交付物类型","type of deliverables","deliverable_template");
|
||||
value = tree(categoryList, treeNameList,dummyInventoryInfoEO, errorMsg, prehomoDeliverableType,msgList,"交付物类型","type of deliverables","deliverable_template");
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
dummyInventoryInfoEO.setPrehomoDeliverableType(value);
|
||||
String treeId = getTreeId(categoryList, dummyInventoryInfoEOTemp, treeNameList, value);
|
||||
dummyInventoryInfoEO.setPrehomoDeliverableType(treeId);
|
||||
}
|
||||
|
||||
//交付物模板
|
||||
@@ -1216,9 +1204,10 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
|
||||
//确认
|
||||
//交付物类型
|
||||
value = pullSingle(dictItemList, dummyInventoryInfoEO, errorMsg, verifyDeliverableType,msgList,"交付物类型","type of deliverables","deliverable_template");
|
||||
value = tree(categoryList, treeNameList,dummyInventoryInfoEO, errorMsg, verifyDeliverableType,msgList,"交付物类型","type of deliverables","deliverable_template");
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
dummyInventoryInfoEO.setVerifyDeliverableType(value);
|
||||
String treeId = getTreeId(categoryList, dummyInventoryInfoEOTemp, treeNameList, value);
|
||||
dummyInventoryInfoEO.setVerifyDeliverableType(treeId);
|
||||
}
|
||||
|
||||
//交付物模板
|
||||
@@ -1261,14 +1250,36 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
String serialNumber = serialNumberBuilder.substring(0, serialNumberBuilder.length() - 1);
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
String contentLog = username+"向清单中导入了“"+serialNumber+"”标准";
|
||||
String enContentLog = username+" imported “"+serialNumber+"” standard into the list.";
|
||||
String contentLog = username+"向清单中导入了“"+serialNumber+"”";
|
||||
String enContentLog = username+" imported “"+serialNumber+"” into the list.";
|
||||
dummyLogEOService.updateLog(contentLog, dataList.get(0).getDummyInventoryBaseId(),CutEnum.CN.getValue());
|
||||
dummyLogEOService.updateLog(enContentLog, dataList.get(0).getDummyInventoryBaseId(),CutEnum.EN.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getTreeId(List<SysCategory> categoryList, DummyInventoryInfoEO dummyInventoryInfoEOTemp, List<String> treeNameList, String value) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String valueTemp : value.split(",")) {
|
||||
if (treeNameList.contains(valueTemp)) {
|
||||
List<SysCategory> sysCategoryList = new ArrayList<>();
|
||||
if (CutEnum.CN.getValue().equals(dummyInventoryInfoEOTemp.getCut())) {
|
||||
sysCategoryList = categoryList.stream().filter(e -> e.getName().equals(valueTemp)).collect(Collectors.toList());
|
||||
} else {
|
||||
sysCategoryList = categoryList.stream().filter(e -> e.getEnName().equals(valueTemp)).collect(Collectors.toList());
|
||||
}
|
||||
if (sysCategoryList.size() != 0) {
|
||||
sb.append(sysCategoryList.get(0).getId() + ",");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(sb)) {
|
||||
String substring = sb.substring(0, sb.length() - 1);
|
||||
return substring;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void verifySerialNumber(List<DummyInventoryInfoEO> dataList,DummyInventoryInfoEO dummyInventoryInfoEOTemp) {
|
||||
//文档库数据
|
||||
List<String> serialNumberList = dataList.stream().map(DummyInventoryInfoEO::getSerialNumber).collect(Collectors.toList());
|
||||
@@ -1408,6 +1419,49 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
}
|
||||
}
|
||||
|
||||
private String tree(List<SysCategory> categoryList, List<String> nameList,DummyInventoryInfoEO dummyInventoryInfoEO,
|
||||
String errorMsg, String value,List<String> msgList,
|
||||
String nameCn,String nameEn,String dictCode) {
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String s : value.split(",")) {
|
||||
if(!nameList.contains(s)){
|
||||
sb.append(s+",");
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(sb)){
|
||||
String substring = sb.substring(0, sb.length() - 1);
|
||||
if (CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())) {
|
||||
errorMsg += nameCn + "中的" + substring + "与数据字典不匹配, ";
|
||||
} else {
|
||||
errorMsg += nameEn + " " + substring + " does not match the data dictionary, ";
|
||||
}
|
||||
msgList.add(errorMsg);
|
||||
}else{
|
||||
StringBuilder sbTemp = new StringBuilder();
|
||||
for (String s : value.split(",")) {
|
||||
List<SysCategory> collect = new ArrayList<>();
|
||||
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
|
||||
collect = categoryList.stream().filter(e -> s.equals(e.getName())).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
sbTemp.append(collect.get(0).getName()+",");
|
||||
}
|
||||
}else{
|
||||
collect = categoryList.stream().filter(e -> s.equals(e.getEnName())).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
sbTemp.append(collect.get(0).getEnName()+",");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(sbTemp)){
|
||||
String substring = sbTemp.substring(0, sbTemp.length() - 1);
|
||||
return substring;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private String pullSingle(List<SysDictItem> dictItemList, DummyInventoryInfoEO dummyInventoryInfoEO,
|
||||
String errorMsg, String value,List<String> msgList,
|
||||
String nameCn,String nameEn,String dictCode) {
|
||||
@@ -1841,23 +1895,36 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
|
||||
//技术领域
|
||||
if(StringUtils.isNotBlank(technologyTerritory)){
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String s : technologyTerritory.split(",")) {
|
||||
List<SysCategory> collect = sysCategoryList.stream()
|
||||
.filter(e -> s.equals(e.getId())).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
|
||||
sb.append(collect.get(0).getName()+",");
|
||||
}else{
|
||||
sb.append(collect.get(0).getEnName()+",");
|
||||
}
|
||||
}
|
||||
}
|
||||
StringBuilder sb = getStringBuilder(dummyInventoryInfoEO, sysCategoryList, technologyTerritory);
|
||||
if(StringUtils.isNotBlank(sb)){
|
||||
String substring = sb.substring(0, sb.length() - 1);
|
||||
inventoryInfoEO.setTechnologyTerritory(substring);
|
||||
}
|
||||
}
|
||||
//设计交付物类型 inventoryInfoEO
|
||||
if(StringUtils.isNotBlank(inventoryInfoEO.getDesignDeliverableType())){
|
||||
StringBuilder sb = getStringBuilder(dummyInventoryInfoEO, sysCategoryList, inventoryInfoEO.getDesignDeliverableType());
|
||||
if(StringUtils.isNotBlank(sb)){
|
||||
String substring = sb.substring(0, sb.length() - 1);
|
||||
inventoryInfoEO.setDesignDeliverableType(substring);
|
||||
}
|
||||
}
|
||||
//pre交付物类型
|
||||
if(StringUtils.isNotBlank(inventoryInfoEO.getPrehomoDeliverableType())){
|
||||
StringBuilder sb = getStringBuilder(dummyInventoryInfoEO, sysCategoryList, inventoryInfoEO.getPrehomoDeliverableType());
|
||||
if(StringUtils.isNotBlank(sb)){
|
||||
String substring = sb.substring(0, sb.length() - 1);
|
||||
inventoryInfoEO.setPrehomoDeliverableType(substring);
|
||||
}
|
||||
}
|
||||
//验证交付物类型
|
||||
if(StringUtils.isNotBlank(inventoryInfoEO.getVerifyDeliverableType())){
|
||||
StringBuilder sb = getStringBuilder(dummyInventoryInfoEO, sysCategoryList, inventoryInfoEO.getVerifyDeliverableType());
|
||||
if(StringUtils.isNotBlank(sb)){
|
||||
String substring = sb.substring(0, sb.length() - 1);
|
||||
inventoryInfoEO.setVerifyDeliverableType(substring);
|
||||
}
|
||||
}
|
||||
//设计交付物模板
|
||||
if(StringUtils.isNotBlank(designDeliverableTemplate)){
|
||||
String designDeliverableTemplateName = template(fileInfos, designDeliverableTemplate);
|
||||
@@ -1877,6 +1944,23 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private StringBuilder getStringBuilder(DummyInventoryInfoEO dummyInventoryInfoEO, List<SysCategory> sysCategoryList, String technologyTerritory) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String s : technologyTerritory.split(",")) {
|
||||
List<SysCategory> collect = sysCategoryList.stream()
|
||||
.filter(e -> s.equals(e.getId())).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
|
||||
sb.append(collect.get(0).getName()+",");
|
||||
}else{
|
||||
sb.append(collect.get(0).getEnName()+",");
|
||||
}
|
||||
}
|
||||
}
|
||||
return sb;
|
||||
}
|
||||
|
||||
private String getPerson(DummyInventoryInfoEO dummyInventoryInfoEO, List<SysDictItem> sysDictItemList, String designInitiator) {
|
||||
if(StringUtils.isNotBlank(designInitiator)){
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.jero.modules.dummy.util;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 深拷贝List
|
||||
*/
|
||||
public class DeepCopyListUtil {
|
||||
public static <T> List<T> depCopy(List<T> srcList) {
|
||||
ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
|
||||
try {
|
||||
ObjectOutputStream out = new ObjectOutputStream(byteOut);
|
||||
out.writeObject(srcList);
|
||||
|
||||
ByteArrayInputStream byteIn = new ByteArrayInputStream(byteOut.toByteArray());
|
||||
ObjectInputStream inStream = new ObjectInputStream(byteIn);
|
||||
List<T> destList = (List<T>) inStream.readObject();
|
||||
return destList;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,7 +27,9 @@ public class ListDiff <T> {
|
||||
&& !f.getName().contains("update") && !f.getName().equals("id")
|
||||
&& !f.getName().equals("technologyTerritory") &&!f.getName().equals("xin1Che1Xing2Shi2Shi1Ri4Qi1")
|
||||
&& !f.getName().equals("implementTime") && !f.getName().equals("xin1Che1Xing2Shi2Shi1Ri4Qi1")
|
||||
&& !f.getName().equals("implementTime")
|
||||
&& !f.getName().equals("implementTime") && !f.getName().equals("inventoryAffirmStatusName")
|
||||
&& !f.getName().equals("taskAffirmStatusName") && !f.getName().equals("roleCode")
|
||||
&& !f.getName().equals("roleName")
|
||||
){
|
||||
|
||||
StringBuilder v1String= new StringBuilder(String.valueOf(v1));
|
||||
|
||||
+2
-2
@@ -49,12 +49,12 @@ public class ProjectLawsInventoryLogEOController extends JeroController<ProjectL
|
||||
@AutoLog(value = "项目库-法规清单更新log表-分页列表查询")
|
||||
@ApiOperation(value="项目库-法规清单更新log表-分页列表查询", notes="项目库-法规清单更新log表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProjectLawsInventoryLogEO projectLawsInventoryLogEO,
|
||||
public Result<?> queryPageList(ProjectLawsInventoryLogEO projectLawsInventoryLogEO,String cut,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProjectLawsInventoryLogEO> queryWrapper = QueryGenerator.initQueryWrapper(projectLawsInventoryLogEO, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
queryWrapper.orderByDesc("create_time").eq("is_en_log",cut);
|
||||
Page<ProjectLawsInventoryLogEO> page = new Page<ProjectLawsInventoryLogEO>(pageNo, pageSize);
|
||||
IPage<ProjectLawsInventoryLogEO> pageList = projectLawsInventoryLogEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
|
||||
+6
@@ -200,6 +200,8 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
@ApiModelProperty(value = "设计符合性确认-交付物类型")
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
private String designDeliverableType;
|
||||
@TableField(exist = false)
|
||||
private String designDeliverableTypeName;
|
||||
|
||||
/**设计符合性确认-交付物模板*/
|
||||
@ApiModelProperty(value = "设计符合性确认-交付物模板")
|
||||
@@ -259,6 +261,8 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
@ApiModelProperty(value = "prehomo确认-1")
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
private String prehomoDeliverableType;
|
||||
@TableField(exist = false)
|
||||
private String prehomoDeliverableTypeName;
|
||||
|
||||
/**prehomo确认-交付物模板*/
|
||||
@ApiModelProperty(value = "prehomo确认-交付物模板")
|
||||
@@ -318,6 +322,8 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
@ApiModelProperty(value = "验证符合性确认-交付物类型")
|
||||
@Dict(dicCode ="deliverable_template")
|
||||
private String verifyDeliverableType;
|
||||
@TableField(exist = false)
|
||||
private String verifyDeliverableTypeName;
|
||||
|
||||
/**验证符合性确认-交付物模板*/
|
||||
@ApiModelProperty(value = "验证符合性确认-交付物模板")
|
||||
|
||||
+45
-34
@@ -1,50 +1,53 @@
|
||||
package com.jero.modules.project.enums;
|
||||
|
||||
public enum ProjectInventoryFieldEnum {
|
||||
SUBTITLE("子标题","subtitle"),
|
||||
WVTA_ID("WVTA ID","wvta_id"),
|
||||
TECHNOLOGY_TERRITORY("技术领域","technology_territory"),
|
||||
DUTY_TERRITORY("责任领域","duty_territory"),
|
||||
REGULATION_OWNER_NAME("法规工程师名称","regulation_owner_name"),
|
||||
HOMOLOGATION_ENGINEER_NAME("认证工程师名称","homologation_engineer_name"),
|
||||
ENGINEERING_INTERFACE_PERSON_NAME("工程接口人名称","engineering_interface_personName"),
|
||||
IMPLEMENT_TYPE("实施类别","implement_type"),
|
||||
ATTESTATION_TYPE("认证类型","attestation_type"),
|
||||
ATTESTATION_RANK("认证级别","attestation_rank"),
|
||||
XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1("新车型实施日期","xin1_che1_xing2_shi2_shi1_ri4_qi1"),
|
||||
IMPLEMENT_TIME("在产车实施日期","implement_time"),
|
||||
REGION("适用地区","region"),
|
||||
REMARK("备注","remark"),
|
||||
DESIGN_DUE_DATE("设计符合性确认-截止时间","designDueDate"),
|
||||
PREHOMO_DUE_DATE("Pre-Homo确认-截止时间","prehomoDueDate"),
|
||||
VERIFY_DUE_DATE("验证符合性确认-截止时间","verifyDueDate"),
|
||||
SUBTITLE("子标题", "subtitle","Sub-Title"),
|
||||
WVTA_ID("WVTA ID", "wvta_id","WVTA ID"),
|
||||
TECHNOLOGY_TERRITORY("技术领域", "technology_territory","Technical Field"),
|
||||
DUTY_TERRITORY("责任领域", "duty_territory","Responsible Field"),
|
||||
REGULATION_OWNER_NAME("法规工程师名称","regulation_owner_name","Regulation Engineer"),
|
||||
HOMOLOGATION_ENGINEER_NAME("认证工程师名称","homologation_engineer_name","Homologation Engineer"),
|
||||
ENGINEERING_INTERFACE_PERSON_NAME("工程接口人名称","engineering_interface_personName","Engineering Interface"),
|
||||
IMPLEMENT_TYPE("实施类别", "implement_type","Usage"),
|
||||
ATTESTATION_TYPE("认证类型", "attestation_type","Certification Type"),
|
||||
ATTESTATION_RANK("认证级别", "attestation_rank","Certification Level"),
|
||||
XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1("新车型实施日期", "xin1_che1_xing2_shi2_shi1_ri4_qi1","New Type Execute Date"),
|
||||
IMPLEMENT_TIME("在产车实施日期", "implement_time","New Vehicle Execute Date"),
|
||||
REGION("适用地区", "region","Area"),
|
||||
REMARK("备注", "remark","Comments"),
|
||||
DESIGN_DUE_DATE("设计符合性确认-截止时间","designDueDate","Cut-Off Time"),
|
||||
PREHOMO_DUE_DATE("Pre-Homo确认-截止时间","prehomoDueDate","Cut-Off Time"),
|
||||
VERIFY_DUE_DATE("验证符合性确认-截止时间","verifyDueDate","Cut-Off Time"),
|
||||
|
||||
DELIVERABLE_TEMPLATE("交付物类型","deliverable_template"),
|
||||
FA1_QI3_REN2("发起人","fa1_qi3_ren2"),
|
||||
ZE2_REN2_REN2("责任人","ze2_ren4_ren2"),
|
||||
DELIVERABLE_TEMPLATE("交付物类型", "deliverable_template","Type of deliverables"),
|
||||
FA1_QI3_REN2("发起人", "fa1_qi3_ren2","Initiator"),
|
||||
ZE2_REN2_REN2("责任人", "ze2_ren4_ren2","Assignee"),
|
||||
|
||||
DESIGN_DELIVERABLE_TYPE("设计符合性确认-交付物类型","deliverable_template"),
|
||||
DESIGN_DELIVERABLE_TEMPLATE("设计符合性确认-交付物模板","design_deliverable_template"),
|
||||
DESIGN_INITIATOR("设计符合性确认-发起人","fa1_qi3_ren2"),
|
||||
DESIGN_DUTY("设计符合性确认-责任人","ze2_ren4_ren2"),
|
||||
DESIGN_DELIVERABLE_TYPE("设计符合性确认-交付物类型", "deliverable_template","Type of deliverables"),
|
||||
DESIGN_DELIVERABLE_TEMPLATE("设计符合性确认-交付物模板", "design_deliverable_template","Deliverable template"),
|
||||
DESIGN_INITIATOR("设计符合性确认-发起人", "fa1_qi3_ren2","Initiator"),
|
||||
DESIGN_DUTY("设计符合性确认-责任人", "ze2_ren4_ren2","Assignee"),
|
||||
|
||||
PREHOMO_DELIVERABLE_TYPE("prehomo确认-交付物类型","deliverable_template"),
|
||||
PREHOMO_DELIVERABLE_TEMPLATE("prehomo确认-交付物模板","prehomo_deliverable_template"),
|
||||
PREHOMO_INITIATOR("prehomo确认-发起人","fa1_qi3_ren2"),
|
||||
PREHOMO_DUTY("prehomo确认-责任人","ze2_ren4_ren2"),
|
||||
PREHOMO_DELIVERABLE_TYPE("prehomo确认-交付物类型", "deliverable_template","Type of deliverables"),
|
||||
PREHOMO_DELIVERABLE_TEMPLATE("prehomo确认-交付物模板", "prehomo_deliverable_template","Deliverable template"),
|
||||
PREHOMO_INITIATOR("prehomo确认-发起人", "fa1_qi3_ren2","Initiator"),
|
||||
PREHOMO_DUTY("prehomo确认-责任人", "ze2_ren4_ren2","Assignee"),
|
||||
|
||||
VERIFY_DELIVERABLE_TYPE("验证符合性确认-交付物类型", "deliverable_template","Type of deliverables"),
|
||||
VERIFY_DELIVERABLE_TEMPLATE("验证符合性确认-交付物模板", "verify_deliverable_template","Deliverable template"),
|
||||
VERIFY_INITIATOR("验证符合性确认-发起人", "fa1_qi3_ren2","Initiator"),
|
||||
VERIFY_DUTY("验证符合性确认-责任人", "ze2_ren4_ren2","Assignee"),
|
||||
|
||||
VERIFY_DELIVERABLE_TYPE("验证符合性确认-交付物类型","deliverable_template"),
|
||||
VERIFY_DELIVERABLE_TEMPLATE("验证符合性确认-交付物模板","verify_deliverable_template"),
|
||||
VERIFY_INITIATOR("验证符合性确认-发起人","fa1_qi3_ren2"),
|
||||
VERIFY_DUTY("验证符合性确认-责任人","ze2_ren4_ren2"),
|
||||
|
||||
;
|
||||
String name;
|
||||
String value;
|
||||
String enName;
|
||||
|
||||
ProjectInventoryFieldEnum(String name, String value) {
|
||||
ProjectInventoryFieldEnum(String name, String value, String enName) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
@@ -62,4 +65,12 @@ public enum ProjectInventoryFieldEnum {
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
public String getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
}
|
||||
+828
-163
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -24,13 +24,14 @@ public class ProjectLawsInventoryLogEOServiceImpl extends ServiceImpl<ProjectLaw
|
||||
* 设置更新log
|
||||
*
|
||||
*/
|
||||
public void updateLog(String contentLog,String projectLibraryId) {
|
||||
public void updateLog(String contentLog,String projectLibraryId,String isEnLog) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if (StringUtils.isNotBlank(contentLog)) {
|
||||
ProjectLawsInventoryLogEO projectLawsInventoryLogEO = new ProjectLawsInventoryLogEO();
|
||||
projectLawsInventoryLogEO.setProjectLibraryId(projectLibraryId);
|
||||
projectLawsInventoryLogEO.setLogContent(contentLog);
|
||||
projectLawsInventoryLogEO.setCreateBy(sysUser.getUsername());
|
||||
projectLawsInventoryLogEO.setIsEnLog(isEnLog);
|
||||
add(projectLawsInventoryLogEO);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -2808,7 +2808,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsQuery()))).collect(Collectors.toList());
|
||||
}
|
||||
//树形数据字典
|
||||
List<SysCategoryTreeVO> sysCategoryTree = sysCategoryService.getSysCategoryTree(); // 查询所有 并以树结构返回
|
||||
List<SysCategoryTreeVO> sysCategoryTree = sysCategoryService.getSysCategoryTree(null); // 查询所有 并以树结构返回
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
||||
+1
-1
@@ -25,6 +25,6 @@ public interface OnlCgformAreaMapper extends BaseMapper<OnlCgformArea> {
|
||||
"a.is_model,i.item_text as is_model_name,i.en_name as is_model_en_name,a.show_area,a.sort,a.en_name\n" +
|
||||
"from onl_cgform_area as a left join sys_dict_item as i \n" +
|
||||
"on a.is_model=i.item_value \n" +
|
||||
"where i.dict_id=1493096744092102657 order by a.sort desc")
|
||||
"where i.dict_id=1493096744092102657 order by a.sort ")
|
||||
IPage<OnlCgformArea> queryPageList(IPage page, @Param("params") Map<String,Object> params);
|
||||
}
|
||||
|
||||
+1
-1
@@ -70,6 +70,6 @@
|
||||
<if test="params.showArea != null and params.showArea != '' ">
|
||||
and f.show_area like concat('%',#{params.showArea},'%')
|
||||
</if>
|
||||
order by f.order_num desc
|
||||
order by f.order_num
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -380,14 +380,15 @@ feign:
|
||||
people:
|
||||
appId: 100679
|
||||
# 访问域名 CN TEST版
|
||||
host: http://napoleon-fab-test.nioint.com
|
||||
# host: http://napoleon-fab-test.nioint.com
|
||||
# 访问域名 CN PROD版
|
||||
# host: http://napoleon.nioint.com
|
||||
host: http://napoleon.nioint.com
|
||||
|
||||
# appSecret CN TEST版
|
||||
secret: CDf2D9404C6ac1B0f7c3e3845ae0282a
|
||||
# secret: CDf2D9404C6ac1B0f7c3e3845ae0282a
|
||||
# appSecret CN PROD版
|
||||
# secret: 7C3F03170E3ea489df04Ce8DEC7Df4f7
|
||||
secret: 7C3F03170E3ea489df04Ce8DEC7Df4f7
|
||||
cronJobIsOpen: true
|
||||
## Feishu
|
||||
Feishu:
|
||||
# 测试
|
||||
@@ -409,7 +410,6 @@ opensso:
|
||||
clientSecret: CDf2D9404C6ac1B0f7c3e3845ae0282a
|
||||
redirectUri: http%3A%2F%2F139.9.235.66%3A8010
|
||||
|
||||
|
||||
---
|
||||
## space系统
|
||||
Space:
|
||||
|
||||
@@ -90,10 +90,15 @@
|
||||
.jee-hidden {
|
||||
display: none
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection {
|
||||
height: 38px !important;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection__rendered {
|
||||
line-height: 38px;
|
||||
}
|
||||
|
||||
.ant-table-fixed-left table, .ant-table-fixed-right table .ant-table-fixed{
|
||||
width: min-content;
|
||||
}
|
||||
@@ -894,4 +894,7 @@ module.exports = {
|
||||
basicInformation:'Basic Information',
|
||||
replyFromProjectContact:'Reply from project contact person',
|
||||
pleaseUpload:'Please Upload',
|
||||
fullScreenView:'Full Screen View',
|
||||
systemPrompt:'System Prompt',
|
||||
loginExpired:'Login Expired',
|
||||
}
|
||||
@@ -899,4 +899,7 @@ module.exports = {
|
||||
basicInformation:'基础信息',
|
||||
replyFromProjectContact:'工程接口人回复',
|
||||
pleaseUpload:'请上传',
|
||||
fullScreenView:'全屏查看',
|
||||
systemPrompt:'系统提示',
|
||||
loginExpired:'登录已过期',
|
||||
}
|
||||
@@ -1,15 +1,18 @@
|
||||
<template>
|
||||
<div class="customContent-box">
|
||||
<div class="box-content-top">
|
||||
<div class="box-content" v-for="(item,index) in dataSourceContentList" :key="index" @click="urlClick(item)">
|
||||
<img :src="item.iconPath" class="img" alt="">
|
||||
<div class="text" :title="item.iconName">{{item.iconName}}</div>
|
||||
<div style="display: inline-block">
|
||||
<div class="box-content-top">
|
||||
<div class="box-content" v-for="(item,index) in dataSourceContentList" :key="index" @click="urlClick(item)">
|
||||
<img :src="item.iconPath" class="img" alt="">
|
||||
<div class="text" :title="item.iconName">{{item.iconName}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-content" @click="customClick()" style=";margin-top: 0;float: right">
|
||||
<img src="../../../assets/zdy.png" class="img" alt="">
|
||||
<div class="text">{{$t('custom')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-content" @click="customClick()" style=";margin-top: 0">
|
||||
<img src="../../../assets/zdy.png" class="img" alt="">
|
||||
<div class="text">{{$t('custom')}}</div>
|
||||
</div>
|
||||
|
||||
<a-modal
|
||||
:title="$t('custom')"
|
||||
:width="1180"
|
||||
@@ -73,21 +76,23 @@
|
||||
methods: {
|
||||
customClick() {
|
||||
this.visible = true
|
||||
this.dataSourceTopList = []
|
||||
this.dataSourceContentList = []
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
getAction(this.url.list, {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result || []
|
||||
this.dataSourceTopList = []
|
||||
this.dataSourceContentList = []
|
||||
this.dataSource.forEach(val => {
|
||||
if (res.state == 1) {
|
||||
if (val.state == 1) {
|
||||
this.dataSourceTopList.push(val)
|
||||
this.dataSourceContentList.push(val)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.dataSourceTopList = []
|
||||
this.dataSourceContentList = []
|
||||
this.dataSource = []
|
||||
}
|
||||
})
|
||||
@@ -175,7 +180,6 @@
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.box-content {
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
<div class="title-text" :title="$t('MessageContent')">
|
||||
<span>{{this.$t('MessageContent')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input"
|
||||
<j-input class="box-input"
|
||||
:placeholder="$t('pleaseEnter')+$t('MessageContent')"
|
||||
v-model="queryParam.msgContent">
|
||||
</a-input>
|
||||
</j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
|
||||
@@ -165,8 +165,7 @@
|
||||
},
|
||||
//下载模板
|
||||
handleModule() {
|
||||
|
||||
downloadFile('document/bussDocumentLibraryEO/exportTemplate', this.$t('importTemplate')+this.$t('importTemplate')+'.xls', {})
|
||||
downloadFile('document/bussDocumentLibraryEO/exportTemplate', this.$t('DocumentLibrary')+this.$t('importTemplate')+'.xls', {})
|
||||
},
|
||||
//批量删除
|
||||
handleDel() {
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
],
|
||||
},
|
||||
spinning:false, //loading标识
|
||||
type:'doc',
|
||||
type:'pdfdoc',
|
||||
url:{
|
||||
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //表格头部字段
|
||||
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //搜索字段
|
||||
|
||||
@@ -301,12 +301,22 @@
|
||||
:title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="typeOfDeliverables">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.designDeliverableType"
|
||||
:disabled="disabled"
|
||||
@input="handleInput('designDeliverableType')"
|
||||
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'deliverable_template'"/>
|
||||
<a-tree-select
|
||||
v-model="formInline.designDeliverableType"
|
||||
:maxTagCount="1"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
:tree-data="DeliverableTreeList"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||
/>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDeliverableType"-->
|
||||
<!-- :disabled="disabled"-->
|
||||
<!-- @input="handleInput('designDeliverableType')"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'deliverable_template'"/>-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -372,12 +382,22 @@
|
||||
:title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="prehomoDeliverableType">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.prehomoDeliverableType"
|
||||
:disabled="disabled"
|
||||
@input="handleInput('prehomoDeliverableType')"
|
||||
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'deliverable_template'"/>
|
||||
<a-tree-select
|
||||
v-model="formInline.prehomoDeliverableType"
|
||||
:maxTagCount="1"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
:tree-data="DeliverableTreeList"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||
/>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="formInline.prehomoDeliverableType"-->
|
||||
<!-- :disabled="disabled"-->
|
||||
<!-- @input="handleInput('prehomoDeliverableType')"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'deliverable_template'"/>-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -444,12 +464,22 @@
|
||||
:title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="verifyDeliverableType">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.verifyDeliverableType"
|
||||
:disabled="disabled"
|
||||
@input="handleInput('verifyDeliverableType')"
|
||||
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'deliverable_template'"/>
|
||||
<a-tree-select
|
||||
v-model="formInline.verifyDeliverableType"
|
||||
:maxTagCount="1"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
:tree-data="DeliverableTreeList"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||
/>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="formInline.verifyDeliverableType"-->
|
||||
<!-- :disabled="disabled"-->
|
||||
<!-- @input="handleInput('verifyDeliverableType')"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'deliverable_template'"/>-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -584,11 +614,13 @@
|
||||
},
|
||||
formInline: {},
|
||||
disabled: false,
|
||||
CategoryTreeList: []
|
||||
CategoryTreeList: [],
|
||||
DeliverableTreeList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getSysCategoryTree()
|
||||
this.getDeliverableTree()
|
||||
},
|
||||
methods: {
|
||||
getSysCategoryTree() {
|
||||
@@ -600,11 +632,23 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
getDeliverableTree() {
|
||||
getAction('/sys/category/getDeliverableTree', {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.DeliverableTreeList = res.result
|
||||
} else {
|
||||
this.DeliverableTreeList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
editModel(item) {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.formInline = item || {}
|
||||
this.formInline.technologyTerritory = this.formInline.technologyTerritory ? this.formInline.technologyTerritory.split(',') : []
|
||||
this.formInline.designDeliverableType = this.formInline.designDeliverableType ? this.formInline.designDeliverableType.split(',') : []
|
||||
this.formInline.prehomoDeliverableType = this.formInline.prehomoDeliverableType ? this.formInline.prehomoDeliverableType.split(',') : []
|
||||
this.formInline.verifyDeliverableType = this.formInline.verifyDeliverableType ? this.formInline.verifyDeliverableType.split(',') : []
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
{{text && text.length > 10 ? text.slice(0,9)+'...':text}}
|
||||
</span>
|
||||
<span slot="designDeliverableTemplateName" slot-scope="text,record">
|
||||
<span>{{record.designDeliverableType_dictText}}</span><br v-if="record.designDeliverableType_dictText">
|
||||
<span>{{record.designDeliverableTypeName}}</span><br v-if="record.designDeliverableTypeName">
|
||||
<a v-if="record.designDeliverableTemplate && record.designDeliverableTemplate.split(',').length == 1"
|
||||
:title="record.designDeliverableTemplateName"
|
||||
@click="pdfPreviewClick(record.designDeliverableTemplateName,record.designDeliverableTemplate)">
|
||||
@@ -155,7 +155,7 @@
|
||||
<span v-else>--</span>
|
||||
</span>
|
||||
<span slot="prehomoDeliverableTemplateName" slot-scope="text,record">
|
||||
<span>{{record.prehomoDeliverableType_dictText}}</span><br v-if="record.prehomoDeliverableType_dictText">
|
||||
<span>{{record.prehomoDeliverableTypeName}}</span><br v-if="record.prehomoDeliverableTypeName">
|
||||
<a v-if="record.prehomoDeliverableTemplate && record.prehomoDeliverableTemplate.split(',').length == 1"
|
||||
:title="record.prehomoDeliverableTemplateName"
|
||||
@click="pdfPreviewClick(record.prehomoDeliverableTemplateName,record.prehomoDeliverableTemplate)">
|
||||
@@ -166,7 +166,7 @@
|
||||
<span v-else>--</span>
|
||||
</span>
|
||||
<span slot="verifyDeliverableTemplateName" slot-scope="text,record">
|
||||
<span>{{record.verifyDeliverableType_dictText}}</span><br v-if="record.verifyDeliverableType_dictText">
|
||||
<span>{{record.verifyDeliverableTypeName}}</span><br v-if="record.verifyDeliverableTypeName">
|
||||
<a v-if="record.verifyDeliverableTemplate && record.verifyDeliverableTemplate.split(',').length == 1"
|
||||
:title="record.verifyDeliverableTemplateName"
|
||||
@click="pdfPreviewClick(record.verifyDeliverableTemplateName,record.verifyDeliverableTemplate)">
|
||||
|
||||
@@ -140,6 +140,9 @@ export default {
|
||||
this.title = '新增'
|
||||
this.formInline = {}
|
||||
this.formInline.state = '1'
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs['ruleForm'].resetFields();
|
||||
// })
|
||||
},
|
||||
editModel(value) {
|
||||
this.visible = true
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<div class="title-text add-text-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('templateName')">{{$t('templateName')}}</span>
|
||||
@@ -481,4 +481,7 @@ export default {
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
.add-text-text{
|
||||
margin-top: -14px;
|
||||
}
|
||||
</style>
|
||||
@@ -270,8 +270,10 @@
|
||||
:title="$t('ParameterDescription')">{{$t('ParameterDescription')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="description">
|
||||
<a-input class="box-input"
|
||||
<a-input class="box-input add-input"
|
||||
style='height: 135px; width: 100%'
|
||||
:disabled="disabled"
|
||||
type="textarea"
|
||||
v-model="item.description"
|
||||
:placeholder="$t('PleaseEnter')+$t('ParameterDescription')"/>
|
||||
</a-form-model-item>
|
||||
@@ -392,7 +394,8 @@ export default {
|
||||
projectNameList: [],
|
||||
title: '',
|
||||
stateOne: '',
|
||||
contentList : []
|
||||
contentList : [],
|
||||
contentListed: [] // 编辑 contentList 所带出来的数据
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -423,17 +426,35 @@ export default {
|
||||
})
|
||||
},
|
||||
Onchangelabel(val) {
|
||||
let _tt = []
|
||||
val.forEach((item) => {
|
||||
_tt.push({
|
||||
textVal: item.text, // tab
|
||||
certCategory: item.value, // 所属认证类别
|
||||
paramsNumber: '', // 编号
|
||||
paramsName: '', // 参数名称
|
||||
description: ''// 参数说明
|
||||
console.log(val,'lllll')
|
||||
// 新增
|
||||
if(this.title === '新增') {
|
||||
let _tt = []
|
||||
val.forEach((item) => {
|
||||
_tt.push({
|
||||
textVal: item.text, // tab
|
||||
certCategory: item.value, // 所属认证类别
|
||||
paramsNumber: '', // 编号
|
||||
paramsName: '', // 参数名称
|
||||
description: ''// 参数说明
|
||||
})
|
||||
})
|
||||
})
|
||||
this.contentList = _tt
|
||||
this.contentList = _tt
|
||||
} else {
|
||||
// 编辑 todo
|
||||
// console.log(this.contentListed,'this.contentListed')
|
||||
// val.forEach((item) => {
|
||||
// this.contentListed.push({
|
||||
// textVal: item.text, // tab
|
||||
// certCategory: item.value, // 所属认证类别
|
||||
// paramsNumber: '', // 编号
|
||||
// paramsName: '', // 参数名称
|
||||
// description: ''// 参数说明
|
||||
// })
|
||||
// })
|
||||
// this.contentList = this.contentListed
|
||||
// this.contentList = val
|
||||
}
|
||||
},
|
||||
Onchange() {
|
||||
|
||||
@@ -464,17 +485,18 @@ export default {
|
||||
this.title = '新增'
|
||||
this.formInline = {}
|
||||
this.formInline.isMust = '0'
|
||||
this.contentListed = [] // 防止编辑数据带出
|
||||
},
|
||||
editModel(value) {
|
||||
this.contentListed = []
|
||||
this.visible = true
|
||||
this.formInline = value
|
||||
this.title = '编辑'
|
||||
this.$nextTick(() => {
|
||||
this.formInline = value
|
||||
this.contentList = this.certCategoryParamsInfoEOListItem
|
||||
this.contentList.map((item,index) => {
|
||||
value.certCategoryParamsInfoEOList.map((item, index) => {
|
||||
item.textVal = item.certCategory_dictText
|
||||
this.contentListed.push(item)
|
||||
})
|
||||
})
|
||||
this.contentList = this.contentListed
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
InitiatorName: this.standardContentListQuery.designInitiatorName,
|
||||
DutyName: this.standardContentListQuery.designDutyName,
|
||||
DueDate: this.standardContentListQuery.designDueDate,
|
||||
DeliverableType: this.standardContentListQuery.designDeliverableType_dictText,
|
||||
DeliverableType: this.standardContentListQuery.designDeliverableTypeName,
|
||||
DeliverableTemplate: this.standardContentListQuery.designDeliverableTemplate,
|
||||
DeliverableTemplateName: this.standardContentListQuery.designDeliverableTemplateName,
|
||||
remark: this.standardContentListQuery.designRemark
|
||||
@@ -151,7 +151,7 @@
|
||||
InitiatorName: this.standardContentListQuery.prehomoInitiatorName,
|
||||
DutyName: this.standardContentListQuery.prehomoDutyName,
|
||||
DueDate: this.standardContentListQuery.prehomoDueDate,
|
||||
DeliverableType: this.standardContentListQuery.prehomoDeliverableType_dictText,
|
||||
DeliverableType: this.standardContentListQuery.prehomoDeliverableTypeName,
|
||||
DeliverableTemplate: this.standardContentListQuery.prehomoDeliverableTemplate,
|
||||
DeliverableTemplateName: this.standardContentListQuery.prehomoDeliverableTemplateName,
|
||||
remark: this.standardContentListQuery.prehomoRemark
|
||||
@@ -161,7 +161,7 @@
|
||||
InitiatorName: this.standardContentListQuery.verifyInitiatorName,
|
||||
DutyName: this.standardContentListQuery.verifyDutyName,
|
||||
DueDate: this.standardContentListQuery.verifyDueDate,
|
||||
DeliverableType: this.standardContentListQuery.verifyDeliverableType_dictText,
|
||||
DeliverableType: this.standardContentListQuery.verifyDeliverableTypeName,
|
||||
DeliverableTemplate: this.standardContentListQuery.verifyDeliverableTemplate,
|
||||
DeliverableTemplateName: this.standardContentListQuery.verifyDeliverableTemplateName,
|
||||
remark: this.standardContentListQuery.verifyRemark
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div id="examineBox">
|
||||
<headerProcess
|
||||
:title="$t('confirmationOfDesignConformity')"
|
||||
:title="title"
|
||||
/>
|
||||
<div class="detail-box">
|
||||
<div class="detail-content">
|
||||
@@ -145,7 +145,8 @@
|
||||
value: this.$route.query.remarks
|
||||
}
|
||||
],
|
||||
queryPersonInCharge: {}
|
||||
queryPersonInCharge: {},
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -190,6 +191,13 @@
|
||||
},
|
||||
mounted() {
|
||||
let _this = this
|
||||
if (this.$route.query.flowType == 2) {
|
||||
this.title = this.$t('confirmationOfDesignConformity')
|
||||
} else if (this.$route.query.flowType == 3) {
|
||||
this.title = this.$t('PrehomoConfirmation')
|
||||
} else if (this.$route.query.flowType == 4) {
|
||||
this.title = this.$t('verificationAndConformityconfirmation')
|
||||
}
|
||||
this.$route.query.isDisplay = JSON.parse(this.$route.query.isDisplay)
|
||||
let query = {
|
||||
actiProcInstId: this.$route.query.actiProcInstId,
|
||||
|
||||
@@ -297,7 +297,7 @@
|
||||
flowType: 2,
|
||||
Sponsor: 'designInitiatorName',
|
||||
personLiable: 'designDutyName',
|
||||
typeOfDeliverables: 'designDeliverableType_dictText',
|
||||
typeOfDeliverables: 'designDeliverableTypeName',
|
||||
deliverableTemplate: 'designDeliverableTemplate',
|
||||
DueDate: 'designDueDate',
|
||||
remarks: 'designRemark',
|
||||
@@ -321,7 +321,7 @@
|
||||
id: this.$route.query.id,
|
||||
Sponsor: 'prehomoInitiatorName',
|
||||
personLiable: 'prehomoDutyName',
|
||||
typeOfDeliverables: 'prehomoDeliverableType_dictText',
|
||||
typeOfDeliverables: 'prehomoDeliverableTypeName',
|
||||
deliverableTemplate: 'prehomoDeliverableTemplate',
|
||||
DueDate: 'prehomoDueDate',
|
||||
remarks: 'prehomoRemark',
|
||||
@@ -345,7 +345,7 @@
|
||||
isDisplay: isTrue,
|
||||
Sponsor: 'verifyInitiatorName',
|
||||
personLiable: 'verifyDutyName',
|
||||
typeOfDeliverables: 'verifyDeliverableType_dictText',
|
||||
typeOfDeliverables: 'verifyDeliverableTypeName',
|
||||
deliverableTemplate: 'verifyDeliverableTemplate',
|
||||
DueDate: 'verifyDueDate',
|
||||
remarks: 'verifyRemark',
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
</div>
|
||||
<!-- 参数模板-->
|
||||
<a-modal v-model="areaVisible" :title="$t('parameterTemplate')" width='750px' :footer="null">
|
||||
<parameter-template-add v-if='areaVisible' @areaVisible='handleCancel' :templateTitle='templatetitle'
|
||||
<parameter-template-add :url='url' ref='templateRef' v-if='areaVisible' @areaVisible='handleCancel' :templateTitle='templatetitle'
|
||||
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version'
|
||||
:projectId='this.$route.query.id'></parameter-template-add>
|
||||
</a-modal>
|
||||
@@ -226,7 +226,6 @@
|
||||
},
|
||||
// 历史版本
|
||||
historicalVersion(historicalRow) {
|
||||
console.log(historicalRow)
|
||||
this.historicalVisible = true
|
||||
this.historicalRow = historicalRow
|
||||
},
|
||||
@@ -254,50 +253,47 @@
|
||||
},
|
||||
edit(edit) {
|
||||
this.areaVisible = true
|
||||
let _this = this
|
||||
let query = {
|
||||
id: edit.id
|
||||
}
|
||||
getAction(_this.url.queryById, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.templatetitle = res.result.title
|
||||
this.selectedRowKeys = res.result.paramsTemplateId.split(',')
|
||||
this.rowId = res.result.id
|
||||
this.version = res.result.paramsTemplatePublishVersion
|
||||
} else {
|
||||
}
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.$refs.templateRef.editData(edit)
|
||||
},50)
|
||||
},
|
||||
handleAdd() {
|
||||
this.areaVisible = true
|
||||
},
|
||||
// 变更扩展
|
||||
handleModule() {
|
||||
let _this = this
|
||||
axios({
|
||||
url: `/jero-boot/params/manifest/changeExtension?id=${this.selectedRowKeys[0]}`,
|
||||
method: 'get',
|
||||
transformRequest: [function(data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token': _this.token
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.success) {
|
||||
_this.$message.success(res.data.message)
|
||||
} else {
|
||||
_this.$message.warning(res.data.message)
|
||||
if(this.selectedRowKeys.length == 0){
|
||||
this.$message.warning(_this.$t('pleaseSelectData'))
|
||||
}else if(this.selectedRowKeys.length > 2){
|
||||
this.$message.warning(_this.$t('OnlyOneSelected'))
|
||||
} else {
|
||||
axios({
|
||||
url: `/jero-boot/params/manifest/changeExtension?id=${this.selectedRowKeys[0]}`,
|
||||
method: 'get',
|
||||
transformRequest: [function(data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token': _this.token
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.success) {
|
||||
_this.$message.success(res.data.message)
|
||||
} else {
|
||||
_this.$message.warning(res.data.message)
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
},
|
||||
handleDel() {
|
||||
let param = {
|
||||
@@ -308,14 +304,33 @@
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmBatchDeletion'),
|
||||
onOk() {
|
||||
postAction(_this.url.deleteAll, param).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getlist()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
axios({
|
||||
url: `/jero-boot/params/manifest/deleteBatch`,
|
||||
method: 'post',
|
||||
data: param,
|
||||
transformRequest: [function(data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token': _this.token
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.success) {
|
||||
_this.$message.success(res.data.message)
|
||||
_this.getlist()
|
||||
} else {
|
||||
_this.$message.warning(res.data.message)
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -323,16 +338,17 @@
|
||||
}
|
||||
},
|
||||
handleCody() {
|
||||
this.areaVisibleCody = true
|
||||
console.log('复制')
|
||||
// this.areaVisibleCody = true
|
||||
},
|
||||
getPersonnelList() {
|
||||
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.getlist()
|
||||
},
|
||||
pageOnChange() {
|
||||
|
||||
},
|
||||
SizeChange() {
|
||||
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.getlist()
|
||||
},
|
||||
getlist() {
|
||||
let query = {
|
||||
@@ -343,6 +359,11 @@
|
||||
}
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||
this.pageNo = res.result.current - 1
|
||||
this.getlist()
|
||||
return
|
||||
}
|
||||
this.total = res.result.total
|
||||
this.dataSource = res.result.records || []
|
||||
this.loading = false
|
||||
|
||||
@@ -322,12 +322,22 @@
|
||||
:title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="typeOfDeliverables">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.designDeliverableType"
|
||||
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.designDeliverableType ? true : false"
|
||||
@input="handleInput('designDeliverableType')"
|
||||
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'deliverable_template'"/>
|
||||
<a-tree-select
|
||||
v-model="formInline.designDeliverableType"
|
||||
:maxTagCount="1"
|
||||
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.designDeliverableType ? true : false"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
:tree-data="DeliverableTreeList"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||
/>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDeliverableType"-->
|
||||
<!-- @input="handleInput('designDeliverableType')"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'deliverable_template'"/>-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -459,13 +469,23 @@
|
||||
:title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="prehomoDeliverableType">
|
||||
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.prehomoDeliverableType"
|
||||
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.prehomoDeliverableType ? true : false"
|
||||
@input="handleInput('prehomoDeliverableType')"
|
||||
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'deliverable_template'"/>
|
||||
<a-tree-select
|
||||
v-model="formInline.prehomoDeliverableType"
|
||||
:maxTagCount="1"
|
||||
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.prehomoDeliverableType ? true : false"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
:tree-data="DeliverableTreeList"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||
/>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="formInline.prehomoDeliverableType"-->
|
||||
<!-- :disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.prehomoDeliverableType ? true : false"-->
|
||||
<!-- @input="handleInput('prehomoDeliverableType')"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'deliverable_template'"/>-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -598,12 +618,23 @@
|
||||
:title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="verifyDeliverableType">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.verifyDeliverableType"
|
||||
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.verifyDeliverableType ? true : false"
|
||||
@input="handleInput('verifyDeliverableType')"
|
||||
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'deliverable_template'"/>
|
||||
<a-tree-select
|
||||
v-model="formInline.verifyDeliverableType"
|
||||
:maxTagCount="1"
|
||||
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.verifyDeliverableType ? true : false"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
:tree-data="DeliverableTreeList"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||
/>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="formInline.verifyDeliverableType"-->
|
||||
<!-- :disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.verifyDeliverableType ? true : false"-->
|
||||
<!-- @input="handleInput('verifyDeliverableType')"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'deliverable_template'"/>-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -821,16 +852,33 @@
|
||||
prehomoInitiatorIdDisabled: false,
|
||||
prehomoDutyIdDisabled: false,
|
||||
verifyDutyIdDisabled: false,
|
||||
verifyInitiatorIdDisabled: false
|
||||
verifyInitiatorIdDisabled: false,
|
||||
DeliverableTreeList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getDeliverableTree()
|
||||
},
|
||||
methods: {
|
||||
getDeliverableTree() {
|
||||
getAction('/sys/category/getDeliverableTree', {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.DeliverableTreeList = res.result
|
||||
} else {
|
||||
this.DeliverableTreeList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
dutyTerritoryChange(event) {
|
||||
this.formInline.regulationOwnerId = undefined
|
||||
this.formInline.engineeringInterfacePerson = undefined
|
||||
this.formInline.homologationEngineerId = undefined
|
||||
this.formInline.designInitiatorId = undefined
|
||||
this.formInline.designDutyId = undefined
|
||||
this.formInline.prehomoInitiatorId = undefined
|
||||
this.formInline.prehomoDutyId = undefined
|
||||
this.formInline.verifyInitiatorId = undefined
|
||||
this.formInline.verifyDutyId = undefined
|
||||
this.queryPersonByProject(event)
|
||||
},
|
||||
|
||||
@@ -845,7 +893,14 @@
|
||||
this.engineeringInterfacePersonList = res.result.engineeringInterfacePersonList //工程接口人
|
||||
this.certificationEngineerList = res.result.certificationEngineerList //认证工程师
|
||||
if (row.dutyTerritory) {
|
||||
this.getData(row, res)
|
||||
let _this = this
|
||||
this.getProject(row, res, function() {
|
||||
_this.getData(row, res)
|
||||
})
|
||||
} else {
|
||||
this.getProject({}, res, function() {
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -896,7 +951,7 @@
|
||||
this.verifyInitiatorIdDisabled = true
|
||||
}
|
||||
},
|
||||
getData(row, res) {
|
||||
getProject(row, res, callback) {
|
||||
//设计符合性确认-发起人
|
||||
if (row.designInitiator == 1) {
|
||||
this.designInitiatorList = res.result.lawEngineerList || []
|
||||
@@ -957,6 +1012,9 @@
|
||||
} else if (!row.verifyDuty || row.verifyDuty == '') {
|
||||
this.verifyDutyList = res.result.allPersonList || []
|
||||
}
|
||||
callback()
|
||||
},
|
||||
getData(row, res) {
|
||||
//清空下拉框选中没有的数据
|
||||
if (!(this.designInitiatorList.some(val => val.value == row.designInitiatorId))) {
|
||||
row.designInitiatorId = undefined
|
||||
@@ -1001,6 +1059,10 @@
|
||||
this.verifyInitiatorList = []
|
||||
this.verifyDutyList = []
|
||||
this.prehomoDutyList = []
|
||||
this.getDeliverableTree()
|
||||
item.designDeliverableType = item.designDeliverableType ? item.designDeliverableType.split(',') : []
|
||||
item.prehomoDeliverableType = item.prehomoDeliverableType ? item.prehomoDeliverableType.split(',') : []
|
||||
item.verifyDeliverableType = item.verifyDeliverableType ? item.verifyDeliverableType.split(',') : []
|
||||
if (item.dutyTerritory) {
|
||||
this.queryPersonByProject(item)
|
||||
} else {
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
{{ text && text.length > 10 ? text.slice(0, 9) + '...' : text }}
|
||||
</span>
|
||||
<span slot="designDeliverableTemplateName" slot-scope="text,record">
|
||||
<span>{{ record.designDeliverableType_dictText }}</span><br v-if="record.designDeliverableType_dictText">
|
||||
<span>{{ record.designDeliverableTypeName }}</span><br v-if="record.designDeliverableTypeName">
|
||||
<a v-if="record.designDeliverableTemplate && record.designDeliverableTemplate.split(',').length == 1"
|
||||
:title="record.designDeliverableTemplateName"
|
||||
@click="pdfPreviewClick(record.designDeliverableTemplateName,record.designDeliverableTemplate)">
|
||||
@@ -172,7 +172,7 @@
|
||||
</span>
|
||||
|
||||
<span slot="prehomoDeliverableTemplateName" slot-scope="text,record">
|
||||
<span>{{ record.prehomoDeliverableType_dictText }}</span><br v-if="record.prehomoDeliverableType_dictText">
|
||||
<span>{{ record.prehomoDeliverableTypeName }}</span><br v-if="record.prehomoDeliverableTypeName">
|
||||
<a v-if="record.prehomoDeliverableTemplate && record.prehomoDeliverableTemplate.split(',').length == 1"
|
||||
:title="record.prehomoDeliverableTemplateName"
|
||||
@click="pdfPreviewClick(record.prehomoDeliverableTemplateName,record.prehomoDeliverableTemplate)">
|
||||
@@ -184,7 +184,7 @@
|
||||
</span>
|
||||
|
||||
<span slot="verifyDeliverableTemplateName" slot-scope="text,record">
|
||||
<span>{{ record.verifyDeliverableType_dictText }}</span><br v-if="record.verifyDeliverableType_dictText">
|
||||
<span>{{ record.verifyDeliverableTypeName }}</span><br v-if="record.verifyDeliverableTypeName">
|
||||
<a v-if="record.verifyDeliverableTemplate && record.verifyDeliverableTemplate.split(',').length == 1"
|
||||
:title="record.verifyDeliverableTemplateName"
|
||||
@click="pdfPreviewClick(record.verifyDeliverableTemplateName,record.verifyDeliverableTemplate)">
|
||||
|
||||
@@ -2,43 +2,43 @@
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('standard')">
|
||||
<span>{{$t('standard')}}</span>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('standard')">
|
||||
<span>{{$t('standard')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||
v-model="queryParam.serialNumber"></j-input>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||
v-model="queryParam.serialNumber"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('title')">
|
||||
<span>{{$t('title')}}</span>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('title')">
|
||||
<span>{{$t('title')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||
v-model="queryParam.title"></j-input>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||
v-model="queryParam.title"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" style="width: 64px" :title="$t('areaOfResponsibility')">
|
||||
<span>{{$t('areaOfResponsibility')}}</span>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" style="width: 64px" :title="$t('areaOfResponsibility')">
|
||||
<span>{{$t('areaOfResponsibility')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.dutyTerritory"
|
||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.dutyTerritory"
|
||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-row>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
@@ -54,7 +54,7 @@
|
||||
:loading="loading"
|
||||
rowKey="uuid"
|
||||
:pagination="false"
|
||||
:scroll="{x: true}"
|
||||
:scroll="{x: '100%'}"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:data-source="dataSource"
|
||||
:columns="columns"
|
||||
@@ -94,38 +94,52 @@
|
||||
title: this.$t('standard'),
|
||||
align: 'center',
|
||||
dataIndex: 'serialNumber',
|
||||
scopedSlots: { customRender: 'standard' }
|
||||
scopedSlots: { customRender: 'standard' },
|
||||
ellipsis: true,
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
title: this.$t('title'),
|
||||
align: 'center',
|
||||
dataIndex: 'title',
|
||||
ellipsis: true,
|
||||
width: 180,
|
||||
scopedSlots: { customRender: 'standard' }
|
||||
},
|
||||
{
|
||||
title: this.$t('ProcessType'),
|
||||
align: 'center',
|
||||
dataIndex: 'flowType'
|
||||
dataIndex: 'flowType',
|
||||
ellipsis: true,
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
title: this.$t('areaOfResponsibility'),
|
||||
align: 'center',
|
||||
dataIndex: 'dutyTerritory_dictText'
|
||||
dataIndex: 'dutyTerritory_dictText',
|
||||
ellipsis: true,
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
title: this.$t('problemType'),
|
||||
align: 'center',
|
||||
dataIndex: 'problemType'
|
||||
dataIndex: 'problemType',
|
||||
ellipsis: true,
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
title: this.$t('Sponsor'),
|
||||
align: 'center',
|
||||
dataIndex: 'initiator'
|
||||
dataIndex: 'initiator',
|
||||
ellipsis: true,
|
||||
width: 140
|
||||
},
|
||||
{
|
||||
title: this.$t('personLiable'),
|
||||
align: 'center',
|
||||
dataIndex: 'duty'
|
||||
dataIndex: 'duty',
|
||||
ellipsis: true,
|
||||
width: 140
|
||||
}
|
||||
],
|
||||
total: 0,
|
||||
@@ -213,7 +227,7 @@
|
||||
serialNumber: val.serialNumber,
|
||||
actiProcInstId: val.prcId,
|
||||
primaryKeyId: val.projectTaskInventoryDetailId,
|
||||
TaskKey: val.taskDefinitionKey,
|
||||
TaskKey: val.taskDefinitionKey,
|
||||
isDisplay: val.status == 'NotDone' ? true : false
|
||||
}
|
||||
switch (num) {
|
||||
@@ -221,7 +235,7 @@
|
||||
query.flowType = 2
|
||||
query.Sponsor = 'designInitiatorName'
|
||||
query.personLiable = 'designDutyName'
|
||||
query.typeOfDeliverables = 'designDeliverableType_dictText'
|
||||
query.typeOfDeliverables = 'designDeliverableTypeName'
|
||||
query.deliverableTemplate = 'designDeliverableTemplate'
|
||||
query.DueDate = 'designDueDate'
|
||||
query.remarks = 'designRemark'
|
||||
@@ -230,7 +244,7 @@
|
||||
query.flowType = 3
|
||||
query.Sponsor = 'prehomoInitiatorName'
|
||||
query.personLiable = 'prehomoDutyName'
|
||||
query.typeOfDeliverables = 'prehomoDeliverableType_dictText'
|
||||
query.typeOfDeliverables = 'prehomoDeliverableTypeName'
|
||||
query.deliverableTemplate = 'prehomoDeliverableTemplate'
|
||||
query.DueDate = 'prehomoDueDate'
|
||||
query.remarks = 'prehomoRemark'
|
||||
@@ -239,7 +253,7 @@
|
||||
query.flowType = 4
|
||||
query.Sponsor = 'verifyInitiatorName'
|
||||
query.personLiable = 'verifyDutyName'
|
||||
query.typeOfDeliverables = 'verifyDeliverableType_dictText'
|
||||
query.typeOfDeliverables = 'verifyDeliverableTypeName'
|
||||
query.deliverableTemplate = 'verifyDeliverableTemplate'
|
||||
query.DueDate = 'verifyDueDate'
|
||||
query.remarks = 'verifyRemark'
|
||||
|
||||
@@ -4,16 +4,17 @@
|
||||
<a-form-model
|
||||
class='tag-module'
|
||||
ref='ruleForm'
|
||||
:model='form'
|
||||
:model='formData'
|
||||
:rules='rules'
|
||||
:label-col='labelCol'
|
||||
:wrapper-col='wrapperCol'
|
||||
>
|
||||
<a-row :gutter='24'>
|
||||
<a-col :span='9'>
|
||||
<a-form-model-item :label="$t('title')" prop='templatetitle' :rules='rules'>
|
||||
<a-form-model-item :label="$t('title')" prop='templatetitle'>
|
||||
<a-input style='width: 420px'
|
||||
v-model='templatetitle' />
|
||||
:placeholder="$t('PleaseEnter')+$t('title')"
|
||||
v-model='formData.templatetitle' />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span='9'>
|
||||
@@ -37,6 +38,7 @@
|
||||
<a-col :span='9'>
|
||||
<a-form-model-item ref='paramsTemplateName' :label="$t('parameterTemplate')" prop='paramsTemplateName'>
|
||||
<a-input
|
||||
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"
|
||||
v-model='form.paramsTemplateName' />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
@@ -55,13 +57,18 @@
|
||||
:scroll='{x: 600}'
|
||||
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
|
||||
@change='handleTableChange'>
|
||||
<a slot='name' slot-scope='text'>{{ text }}</a>
|
||||
<span slot='action' slot-scope='text, record'>
|
||||
<a class='action-edit' @click='editArea(record.id)' v-has="'area:edit'">{{ $t('edit') }}</a>
|
||||
<a style='color:red' href='javascript:;' @click=' deleteArea(record.id)'
|
||||
v-has="'area:delete'">{{ $t('delete') }}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<div class="page" style='display: flex;justify-content: flex-end;'>
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
@change="pageOnChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
<div class='drawer-bootom-button'>
|
||||
<a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>
|
||||
<a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>
|
||||
@@ -107,17 +114,20 @@ export default {
|
||||
sm: { span: 14 }
|
||||
},
|
||||
form: {},
|
||||
formData: {},
|
||||
rules: {
|
||||
// templatetitle: [
|
||||
// { required: true, message: this.$t('enterTitle'), trigger: 'blur' }
|
||||
// ]
|
||||
templatetitle: [
|
||||
{ required: true, message: this.$t('enterTitle'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
areaTable: [],
|
||||
flag: false, //表单提交标识
|
||||
spinLoading: false,
|
||||
confirmLoading: false,
|
||||
templatetitle: '',
|
||||
selectedRowKeys: []
|
||||
selectedRowKeys: [],
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -145,20 +155,36 @@ export default {
|
||||
type: String,
|
||||
default: '',
|
||||
require: true
|
||||
},
|
||||
url: {
|
||||
type: Object,
|
||||
default: '',
|
||||
require: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.loadData()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.loadData()
|
||||
},
|
||||
loadData() {
|
||||
this.loading = true
|
||||
let params = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
...this.form
|
||||
}
|
||||
getAction(`params/manifest/getParamsTemplateList`, params).then(res => {
|
||||
getAction(`params/manifest/getParamsTemplatePage`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.areaTable = [...res.result]
|
||||
this.areaTable = [...res.result.records]
|
||||
this.total = res.result.total
|
||||
}
|
||||
}).finally(() => {
|
||||
@@ -186,6 +212,20 @@ export default {
|
||||
this.newVisible = true
|
||||
this.form = {}
|
||||
},
|
||||
editData(edit) {
|
||||
let query = {
|
||||
id: edit.id
|
||||
}
|
||||
getAction(this.url.queryById, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.formData.templatetitle = res.result.title
|
||||
this.selectedRowKeys = res.result.paramsTemplateId.split(',')
|
||||
// this.rowId = res.result.id
|
||||
// this.version = res.result.paramsTemplatePublishVersion
|
||||
} else {
|
||||
}
|
||||
})
|
||||
},
|
||||
//新增
|
||||
handleSubmit() {
|
||||
if (this.selectedRowKeys.length == 0) {
|
||||
@@ -199,16 +239,17 @@ export default {
|
||||
this.spinLoading = true
|
||||
// 新增編輯之前 判断 标题唯一
|
||||
getAction(`params/manifest/verifyTitle?projectId=${this.$route.query.id}
|
||||
&title=${this.templatetitle}`, {})
|
||||
&title=${this.formData.templatetitle}`, {})
|
||||
.then(res => {
|
||||
if (res.success) {
|
||||
let postDate = {
|
||||
title: this.templatetitle,
|
||||
title: this.formData.templatetitle,
|
||||
paramsTemplateId: this.rowId || this.selectedRowKeysDate[0].id,
|
||||
paramsTemplatePublishVersion: this.version || this.selectedRowKeysDate[0].version,
|
||||
projectId: this.projectId
|
||||
}
|
||||
if (this.rowId) {
|
||||
console.log('编辑')
|
||||
//编辑
|
||||
postAction(`params/manifest/edit`, postDate).then(res => {
|
||||
if (res.success) {
|
||||
@@ -225,6 +266,7 @@ export default {
|
||||
this.newVisible = false
|
||||
})
|
||||
} else {
|
||||
console.log('新增')
|
||||
//新增
|
||||
postAction(`params/manifest/add`, postDate).then(res => {
|
||||
if (res.success) {
|
||||
@@ -283,25 +325,11 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
//编辑按钮
|
||||
editArea(val) {
|
||||
this.title = this.$t('edit')
|
||||
this.newVisible = true
|
||||
let params = {
|
||||
id: val
|
||||
}
|
||||
getAction(`tag/onlCgformArea/queryById`, params).then((res) => {
|
||||
if (res.success) {
|
||||
this.form = { ...res.result }
|
||||
// this.$emit('updateOk',res.result)
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑
|
||||
},
|
||||
watch: {
|
||||
templateTitle(val) {
|
||||
this.templatetitle = val
|
||||
this.formData.templatetitle = val
|
||||
},
|
||||
selectedRowKeyS(val) {
|
||||
this.selectedRowKeys = val
|
||||
@@ -331,6 +359,10 @@ export default {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
</style>
|
||||
<style lang='less'>
|
||||
.area-module {
|
||||
|
||||
@@ -154,18 +154,19 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
loadData() {
|
||||
this.loading = true
|
||||
let params = {
|
||||
...this.form
|
||||
}
|
||||
getAction(`params/manifest/getParamsTemplateList`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.areaTable = [...res.result]
|
||||
this.total = res.result.total
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
console.log('复制')
|
||||
// this.loading = true
|
||||
// let params = {
|
||||
// ...this.form
|
||||
// }
|
||||
// getAction(`params/manifest/getParamsTemplateList`, params).then(res => {
|
||||
// if (res.success) {
|
||||
// this.areaTable = [...res.result]
|
||||
// this.total = res.result.total
|
||||
// }
|
||||
// }).finally(() => {
|
||||
// this.loading = false
|
||||
// })
|
||||
},
|
||||
searchQuery() {
|
||||
this.loadData()
|
||||
@@ -188,66 +189,66 @@ export default {
|
||||
this.newVisible = true
|
||||
this.form = {}
|
||||
},
|
||||
//新增
|
||||
// 复制 - 确定
|
||||
handleSubmit() {
|
||||
if (this.selectedRowKeys.length == 0) {
|
||||
this.$message.warning(this.$t('pleaseSelectData'))
|
||||
} else if (this.selectedRowKeys.length > 1) {
|
||||
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||
} else {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.flag = true
|
||||
this.spinLoading = true
|
||||
// 新增編輯之前 判断 标题唯一
|
||||
getAction(`params/manifest/verifyTitle?projectId=${this.$route.query.id}
|
||||
&title=${this.templatetitle}`, {})
|
||||
.then(res => {
|
||||
if (res.success) {
|
||||
let postDate = {
|
||||
// sourceManifestId:
|
||||
paramsTemplateId: this.rowId || this.selectedRowKeysDate[0].id,
|
||||
paramsTemplatePublishVersion: this.version || this.selectedRowKeysDate[0].version,
|
||||
projectId: this.projectId
|
||||
}
|
||||
let _this = this
|
||||
axios({
|
||||
url: `/jero-boot/params/manifest/copy`,
|
||||
method: 'post',
|
||||
data: postDate,
|
||||
transformRequest: [function (data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token':_this.token
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
if (res.data.success) {
|
||||
_this.$message.success(res.data.result)
|
||||
}else{
|
||||
_this.$message.warning(res.data.result)
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
// if (this.selectedRowKeys.length == 0) {
|
||||
// this.$message.warning(this.$t('pleaseSelectData'))
|
||||
// } else if (this.selectedRowKeys.length > 1) {
|
||||
// this.$message.warning(this.$t('OnlyOneSelected'))
|
||||
// } else {
|
||||
// this.$refs.ruleForm.validate(valid => {
|
||||
// if (valid) {
|
||||
// this.flag = true
|
||||
// this.spinLoading = true
|
||||
// // 新增編輯之前 判断 标题唯一
|
||||
// getAction(`params/manifest/verifyTitle?projectId=${this.$route.query.id}
|
||||
// &title=${this.templatetitle}`, {})
|
||||
// .then(res => {
|
||||
// if (res.success) {
|
||||
// let postDate = {
|
||||
// // sourceManifestId:
|
||||
// paramsTemplateId: this.rowId || this.selectedRowKeysDate[0].id,
|
||||
// paramsTemplatePublishVersion: this.version || this.selectedRowKeysDate[0].version,
|
||||
// projectId: this.projectId
|
||||
// }
|
||||
// let _this = this
|
||||
// axios({
|
||||
// url: `/jero-boot/params/manifest/copy`,
|
||||
// method: 'post',
|
||||
// data: postDate,
|
||||
// transformRequest: [function (data) {
|
||||
// let ret = ''
|
||||
// for (let it in data) {
|
||||
// ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
// }
|
||||
// return ret
|
||||
// }],
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/x-www-form-urlencoded',
|
||||
// 'X-Access-Token':_this.token
|
||||
// }
|
||||
// })
|
||||
// .then( (res) =>{
|
||||
// if (res.data.success) {
|
||||
// _this.$message.success(res.data.result)
|
||||
// }else{
|
||||
// _this.$message.warning(res.data.result)
|
||||
// }
|
||||
// })
|
||||
// .catch( (error) =>{
|
||||
// console.log(error);
|
||||
// });
|
||||
// } else {
|
||||
// this.$message.warning(res.message)
|
||||
// }
|
||||
// }).finally(() => {
|
||||
// this.loading = false
|
||||
// })
|
||||
// } else {
|
||||
// return false
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
cancelModel() {
|
||||
this.newVisible = false
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
:scroll='{x: 600}'>
|
||||
<a slot='name' slot-scope='text'>{{ text }}</a>
|
||||
<span slot='action' slot-scope='text, record'>
|
||||
<a class='action-edit' @click='editArea(record.id)' v-has="'area:edit'">{{ $t('edit') }}</a>
|
||||
<a class='action-edit' @click='editArea(record.id)' v-has="'area:edit'">{{ $t('See') }}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
@@ -38,8 +38,7 @@ export default {
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('VersionNumber'),
|
||||
dataIndex: 'region_dictText',
|
||||
key: 'showArea',
|
||||
dataIndex: 'version',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
@@ -47,7 +46,8 @@ export default {
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
dataIndex: 'paramsTemplateName',
|
||||
ellipsis: true
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
newVisible: false,
|
||||
@@ -71,9 +71,10 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
loadData() {
|
||||
console.log(this.historicalRow,'this.historicalRow')
|
||||
let _this = this
|
||||
axios({
|
||||
url: `/jero-boot/params/collectManifestHistory/getConfigById?id=${this.historicalRow.id}`,
|
||||
url: `/jero-boot/params/manifest/history?title=${this.historicalRow.title}`,
|
||||
method: 'get',
|
||||
transformRequest: [function (data) {
|
||||
let ret = ''
|
||||
@@ -88,9 +89,8 @@ export default {
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
console.log(res)
|
||||
if (res.data.success) {
|
||||
console.log(res,'lll')
|
||||
this.areaTable = res.data.result
|
||||
}else{
|
||||
_this.$message.warning(res.data.result)
|
||||
}
|
||||
@@ -99,21 +99,23 @@ export default {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
//编辑按钮
|
||||
// 查看
|
||||
editArea(val) {
|
||||
this.title = this.$t('edit')
|
||||
this.newVisible = true
|
||||
let params = {
|
||||
id: val
|
||||
}
|
||||
getAction(`tag/onlCgformArea/queryById`, params).then((res) => {
|
||||
if (res.success) {
|
||||
this.form = { ...res.result }
|
||||
// this.$emit('updateOk',res.result)
|
||||
|
||||
}
|
||||
})
|
||||
console.log('查看')
|
||||
}
|
||||
// this.title = this.$t('edit')
|
||||
// this.newVisible = true
|
||||
// let params = {
|
||||
// id: val
|
||||
// }
|
||||
// getAction(`tag/onlCgformArea/queryById`, params).then((res) => {
|
||||
// if (res.success) {
|
||||
// this.form = { ...res.result }
|
||||
// // this.$emit('updateOk',res.result)
|
||||
//
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
{{ text && text.length > 20 ? text.slice(0, 19) + '...' : text }}
|
||||
</span>
|
||||
<span slot="designDeliverableTemplateName" slot-scope="text,record">
|
||||
<span>{{ record.designDeliverableType_dictText }}</span><br v-if="record.designDeliverableType_dictText">
|
||||
<span>{{ record.designDeliverableTypeName }}</span><br v-if="record.designDeliverableTypeName">
|
||||
<a v-if="record.designDeliverableTemplate && record.designDeliverableTemplate.split(',').length == 1"
|
||||
@click="pdfPreviewClick(record.designDeliverableTemplateName,record.designDeliverableTemplate)">
|
||||
{{ record.designDeliverableTemplateName }}
|
||||
@@ -71,7 +71,7 @@
|
||||
<span v-else>--</span>
|
||||
</span>
|
||||
<span slot="prehomoDeliverableTemplateName" slot-scope="text,record">
|
||||
<span>{{ record.prehomoDeliverableType_dictText }}</span><br v-if="record.prehomoDeliverableType_dictText">
|
||||
<span>{{ record.prehomoDeliverableTypeName }}</span><br v-if="record.prehomoDeliverableTypeName">
|
||||
<a v-if="record.prehomoDeliverableTemplate && record.prehomoDeliverableTemplate.split(',').length == 1"
|
||||
@click="pdfPreviewClick(record.prehomoDeliverableTemplateName,record.prehomoDeliverableTemplate)">
|
||||
{{ record.prehomoDeliverableTemplateName }}
|
||||
@@ -81,7 +81,7 @@
|
||||
<span v-else>--</span>
|
||||
</span>
|
||||
<span slot="verifyDeliverableTemplateName" slot-scope="text,record">
|
||||
<span>{{ record.verifyDeliverableType_dictText }}</span><br v-if="record.verifyDeliverableType_dictText">
|
||||
<span>{{ record.verifyDeliverableTypeName }}</span><br v-if="record.verifyDeliverableTypeName">
|
||||
<a v-if="record.verifyDeliverableTemplate && record.verifyDeliverableTemplate.split(',').length == 1"
|
||||
@click="pdfPreviewClick(record.verifyDeliverableTemplateName,record.verifyDeliverableTemplate)">
|
||||
{{ record.verifyDeliverableTemplateName }}
|
||||
|
||||
@@ -66,10 +66,12 @@
|
||||
<div class="title-text" :title="$t('ModelPlatform')">
|
||||
<span>{{$t('ModelPlatform')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.vehiclePlatform"
|
||||
:placeholder="$t('PleaseSelect')+$t('ModelPlatform')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'vehicle_platform'"/>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('ModelPlatform')"
|
||||
v-model="queryParam.vehiclePlatform"></a-input>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="queryParam.vehiclePlatform"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('ModelPlatform')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'vehicle_platform'"/>-->
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
@@ -77,10 +79,12 @@
|
||||
<div class="title-text" :title="$t('DigitalPlatform')">
|
||||
<span>{{$t('DigitalPlatform')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.digitalPlatform"
|
||||
:placeholder="$t('PleaseSelect')+$t('DigitalPlatform')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'digital_platform'"/>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('DigitalPlatform')"
|
||||
v-model="queryParam.digitalPlatform"></a-input>
|
||||
<!-- <j-dict-select-tag class="box-input" v-model="queryParam.digitalPlatform"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('DigitalPlatform')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false" :dictCode="'digital_platform'"/>-->
|
||||
</div>
|
||||
</a-col>
|
||||
</template>
|
||||
|
||||
@@ -154,13 +154,13 @@
|
||||
rowKey="uuid"
|
||||
:loading="loading"
|
||||
:pagination="false"
|
||||
:scroll="{x: true}"
|
||||
:scroll="{x: '100%'}"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:data-source="dataSource"
|
||||
:columns="columns"
|
||||
>
|
||||
<span slot="standard" slot-scope="text,result">
|
||||
<a @click="standardClick(result)">{{text}}</a>
|
||||
<a @click="standardClick(result)" :title="text">{{text}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
@@ -201,48 +201,56 @@
|
||||
align: 'center',
|
||||
dataIndex: 'serialNumber',
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'standard' }
|
||||
width:180,
|
||||
scopedSlots: { customRender: 'standard' },
|
||||
},
|
||||
{
|
||||
title: this.$t('title'),
|
||||
align: 'center',
|
||||
dataIndex: 'title',
|
||||
ellipsis: true,
|
||||
width:180,
|
||||
scopedSlots: { customRender: 'standard' }
|
||||
},
|
||||
{
|
||||
title: this.$t('ProcessType'),
|
||||
align: 'center',
|
||||
dataIndex: 'flowType',
|
||||
width:180,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('areaOfResponsibility'),
|
||||
align: 'center',
|
||||
dataIndex: 'dutyTerritory_dictText',
|
||||
width:180,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('RelatedItems'),
|
||||
align: 'center',
|
||||
dataIndex: 'projectName',
|
||||
width:180,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('problemType'),
|
||||
align: 'center',
|
||||
dataIndex: 'problemType',
|
||||
ellipsis: true
|
||||
width:140,
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: this.$t('Sponsor'),
|
||||
align: 'center',
|
||||
dataIndex: 'initiator'
|
||||
dataIndex: 'initiator',
|
||||
width:140,
|
||||
},
|
||||
{
|
||||
title: this.$t('personLiable'),
|
||||
align: 'center',
|
||||
dataIndex: 'duty'
|
||||
dataIndex: 'duty',
|
||||
width:140,
|
||||
}
|
||||
],
|
||||
total: 0,
|
||||
@@ -357,7 +365,7 @@
|
||||
query.flowType = 2
|
||||
query.Sponsor = 'designInitiatorName'
|
||||
query.personLiable = 'designDutyName'
|
||||
query.typeOfDeliverables = 'designDeliverableType_dictText'
|
||||
query.typeOfDeliverables = 'designDeliverableTypeName'
|
||||
query.deliverableTemplate = 'designDeliverableTemplate'
|
||||
query.DueDate = 'designDueDate'
|
||||
query.remarks = 'designRemark'
|
||||
@@ -366,7 +374,7 @@
|
||||
query.flowType = 3
|
||||
query.Sponsor = 'prehomoInitiatorName'
|
||||
query.personLiable = 'prehomoDutyName'
|
||||
query.typeOfDeliverables = 'prehomoDeliverableType_dictText'
|
||||
query.typeOfDeliverables = 'prehomoDeliverableTypeName'
|
||||
query.deliverableTemplate = 'prehomoDeliverableTemplate'
|
||||
query.DueDate = 'prehomoDueDate'
|
||||
query.remarks = 'prehomoRemark'
|
||||
@@ -375,7 +383,7 @@
|
||||
query.flowType = 4
|
||||
query.Sponsor = 'verifyInitiatorName'
|
||||
query.personLiable = 'verifyDutyName'
|
||||
query.typeOfDeliverables = 'verifyDeliverableType_dictText'
|
||||
query.typeOfDeliverables = 'verifyDeliverableTypeName'
|
||||
query.deliverableTemplate = 'verifyDeliverableTemplate'
|
||||
query.DueDate = 'verifyDueDate'
|
||||
query.remarks = 'verifyRemark'
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
</div>
|
||||
<div class="box-top">
|
||||
<span class="box-top-text">{{$t('regulatoryCertificationTaskPlan')}}</span>
|
||||
<span class="box-top-text fullScreenView" @click="TaskPlanListClick">{{$t('fullScreenView')}}</span>
|
||||
<span style="float: right" class="box-top-text-right">
|
||||
<a-range-picker
|
||||
:placeholder="[this.$t('startMonth'), this.$t('endMonth')]"
|
||||
@@ -60,17 +61,20 @@
|
||||
</div>
|
||||
<div class="box-bottom">
|
||||
<span class="box-top-text">{{$t('projectStatusAndProgress')}}</span>
|
||||
<span class="box-top-text fullScreenView" @click="projectNameClick">{{$t('fullScreenView')}}</span>
|
||||
<div>
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
:loading="loading"
|
||||
:customRow="projectNameClick"
|
||||
:pagination="false"
|
||||
:scroll="{x: true,y:500}"
|
||||
:data-source="dataSource"
|
||||
:columns="columns"
|
||||
>
|
||||
<span slot="projectName" slot-scope="text" :title="text">
|
||||
{{text && text.length > 10 ? text.slice(0,10)+'...':text}}
|
||||
</span>
|
||||
<span slot="projectStatusTitle">
|
||||
<span>{{this.$t('projectStatus')}}</span><br/>
|
||||
<span>{{'('+$t('red')+'/'+$t('yellow')+'/'+$t('green')+')'}}</span>
|
||||
@@ -386,12 +390,12 @@
|
||||
axisTip.innerText = ''
|
||||
axisTip.style.display = 'none'
|
||||
})
|
||||
myChart.on('click', (params) => {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/TaskPlanList'
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
},
|
||||
TaskPlanListClick() {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/TaskPlanList'
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
},
|
||||
searchQuery() {
|
||||
this.getList()
|
||||
@@ -413,16 +417,10 @@
|
||||
})
|
||||
},
|
||||
projectNameClick() {
|
||||
return {
|
||||
on: {
|
||||
click: () => {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/projectStatusAndProgress'
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
}
|
||||
}
|
||||
}
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/projectStatusAndProgress'
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -509,4 +507,10 @@
|
||||
width: 300px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
||||
.fullScreenView {
|
||||
margin-left: 16px;
|
||||
color: #21c9cc;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user