feat:There is no way the
This commit is contained in:
@@ -5,6 +5,7 @@ import com.adc.da.slrs.otSvpps.service.IOtSvppsService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||
import com.rabbitmq.client.Channel;
|
||||
import net.sf.json.JSONObject;
|
||||
@@ -35,6 +36,9 @@ public class SendStandMQService {
|
||||
@Autowired
|
||||
private SysInfoEOService sysInfoEOService;
|
||||
|
||||
@Autowired
|
||||
private DicTypeEODao dicTypeEODao;
|
||||
|
||||
|
||||
@Autowired
|
||||
private IOtSvppsService otSvppsEOService;
|
||||
@@ -112,12 +116,45 @@ public class SendStandMQService {
|
||||
saveMap.put("standstateshow",codeName);
|
||||
}
|
||||
saveMap.put("issueTime",dateFormatToStr(infoEO.getIssueTime()));
|
||||
|
||||
Date issue_time_data = null;
|
||||
if (StringUtils.isNotBlank(infoEO.getIssueTime())) {
|
||||
try {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
issue_time_data = format.parse(dateFormatToStr(infoEO.getIssueTime())+" 00:00:00");
|
||||
} catch (ParseException ignored) {
|
||||
}
|
||||
}
|
||||
if (issue_time_data != null) {
|
||||
saveMap.put("issue_time_data",issue_time_data.getTime());
|
||||
}else{
|
||||
saveMap.put("issue_time_data",-1000000000000000000L);
|
||||
}
|
||||
String standNatureName = "";
|
||||
if(infoEO.getStandNature() != null && StringUtils.isNotBlank(infoEO.getStandNature())){
|
||||
List<String> valArr = Arrays.asList(infoEO.getStandNature().split(","));
|
||||
standNatureName = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
}
|
||||
saveMap.put("standNature",infoEO.getStandNature());
|
||||
saveMap.put("standNatureName",standNatureName);
|
||||
saveMap.put("synopsis",infoEO.getSynopsis());
|
||||
saveMap.put("standType",infoEO.getStandType());
|
||||
String textStatusName = "";
|
||||
if(infoEO.getTextStatus() != null && StringUtils.isNotBlank(infoEO.getTextStatus())){
|
||||
List<String> valArr = Arrays.asList(infoEO.getTextStatus().split(","));
|
||||
textStatusName = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
}
|
||||
saveMap.put("textStatus",infoEO.getTextStatus());
|
||||
saveMap.put("textStatusName",textStatusName);
|
||||
String isRelateAccessName = "";
|
||||
if(infoEO.getIsRelateAccess() != null && StringUtils.isNotBlank(infoEO.getIsRelateAccess())){
|
||||
if(infoEO.getIsRelateAccess().equals("1")){
|
||||
isRelateAccessName = "是";
|
||||
}else {
|
||||
isRelateAccessName = "否";
|
||||
}
|
||||
}
|
||||
saveMap.put("isRelateAccess",infoEO.getIsRelateAccess());
|
||||
saveMap.put("isRelateAccessName",isRelateAccessName);
|
||||
saveMap.put("standSystem",infoEO.getStandSystem());
|
||||
|
||||
// 自定义属性字段
|
||||
@@ -148,16 +185,18 @@ public class SendStandMQService {
|
||||
|
||||
//当建立代替时,产生的没有文件的问题
|
||||
if (StringUtils.isBlank(String.valueOf(saveMap.get("content")))) {
|
||||
String context = String.valueOf(saveMap.get("FBGBJBD")) + ","
|
||||
+ String.valueOf(saveMap.get("XXZLXX")) + ","
|
||||
+ String.valueOf(saveMap.get("ZQYJG")) + ","
|
||||
+ String.valueOf(saveMap.get("BPG")) + ","
|
||||
+ String.valueOf(saveMap.get("CA")) + ","
|
||||
+ String.valueOf(saveMap.get("SSG")) + ","
|
||||
+ String.valueOf(saveMap.get("JDWJ")) + ","
|
||||
+ String.valueOf(saveMap.get("XGD")) + ","
|
||||
+ String.valueOf(saveMap.get("KWJ")) + ","
|
||||
+ String.valueOf(saveMap.get("ZBJBD"));
|
||||
List<String> list = new ArrayList<>();
|
||||
|
||||
String context = filterStringIsNotBlank(String.valueOf(saveMap.get("FBGBJBD")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("XXZLXX")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("ZQYJG")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("BPG")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("CA")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("SSG")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("JDWJ")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("XGD")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("KWJ")),true)
|
||||
+ filterStringIsNotBlank(String.valueOf(saveMap.get("ZBJBD")),false);
|
||||
context = context.replace(",,", ",");
|
||||
saveMap.put("content", context);
|
||||
}
|
||||
@@ -168,6 +207,11 @@ public class SendStandMQService {
|
||||
}
|
||||
}
|
||||
|
||||
private String filterStringIsNotBlank(String str,boolean boo){
|
||||
String f = ",";
|
||||
return (str == null || str.equals("") || str.equals("null")) ? "" : (boo ? str+f : str);
|
||||
}
|
||||
|
||||
private String dateFormatToStr(String dateStr){
|
||||
if(dateStr == null || dateStr.equals("")){
|
||||
return "";
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ public class SarStandardsInfo extends BaseEntity {
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private Date modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "是否纳入认证清单(0否 1是)")
|
||||
@ApiModelProperty(value = "是否纳入认证清单(2否 1是)")
|
||||
@TableField("IS_RELATE_ACCESS")
|
||||
private String isRelateAccess;
|
||||
|
||||
|
||||
+2
-2
@@ -2103,14 +2103,14 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
Set<String> keys = attrInfoMap.keySet();
|
||||
for (String key:keys) {
|
||||
String value = String.valueOf(attrInfoMap.get(key));
|
||||
if (com.adc.da.util.utils.StringUtils.isNotBlank(value) && !"null".equals(value) && !"SVPPS".equals(key)){
|
||||
if (StringUtils.isNotBlank(value) && !"null".equals(value) && !"SVPPS".equals(key)){
|
||||
value = value.replace(" , ",",");
|
||||
value = value.replace(","," , ");
|
||||
attrInfoMap.put(key,value);
|
||||
}
|
||||
}
|
||||
// 根据文件attid 读取文件内容
|
||||
if (org.apache.commons.lang.StringUtils.isNotEmpty(String.valueOf(attrInfoMap.get("content")))) {
|
||||
if (StringUtils.isNotEmpty(String.valueOf(attrInfoMap.get("content")))) {
|
||||
String[] attidlist = String.valueOf(attrInfoMap.get("content")).split(" , ");
|
||||
StringBuilder content = new StringBuilder("");
|
||||
for (int i = 0; i < attidlist.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user