Commit 2b1b8540 authored by zhangsen's avatar zhangsen

bug修改

parent 38ea11d3
......@@ -4,7 +4,6 @@
<delete id="deleteByApplicationSeq">
delete
*
from
tz_jyjc_inspection_application_attachment
where
......
......@@ -5,7 +5,6 @@
<delete id="deleteByApplicationSeq">
delete
*
from
tz_jyjc_inspection_application_equip
where
......
......@@ -4,7 +4,6 @@
<delete id="deleteByApplicationSeq">
delete
*
from
tz_jyjc_inspection_application_push_log
where
......
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jyjc.biz.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.map.MapBuilder;
import cn.hutool.core.text.CharSequenceUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
......@@ -91,6 +92,11 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
public JyjcInspectionApplicationModel save(@RequestBody JyjcInspectionApplicationModel model) {
//开启报检流程工作流
if (CharSequenceUtil.isNotEmpty(model.getProcessInstanceId()) && model.getOperationType().equals("0")){
model.setOperationType("2");
}
if (!model.getOperationType().equals("2")) {
if (model.getOperationType().equals("0")) {
......@@ -290,8 +296,9 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
item.remove("SEQUENCE_NBR");
HashMap<String, Object> objectHashMap = new HashMap<>();
for (Map.Entry<String, Object> stringObjectEntry : item.entrySet()) {
objectHashMap.put(convertToCamelCase(stringObjectEntry.getKey()), stringObjectEntry.getValue());
objectHashMap.put(stringObjectEntry.getKey(), stringObjectEntry.getValue());
String s = stringObjectEntry.getKey().toLowerCase();
objectHashMap.put(CharSequenceUtil.toCamelCase(s), stringObjectEntry.getValue());
}
arrayList.add(objectHashMap);
});
......@@ -302,36 +309,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
/**
* 将下划线大写方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串
*
* @param name 转换前的下划线大写方式命名的字符串
* @return 转换后的驼峰式命名的字符串
*/
public static String convertToCamelCase(String name) {
StringBuilder result = new StringBuilder();
// 快速检查
if (name == null || name.isEmpty()) {
// 没必要转换
return "";
} else if (!name.contains("_")) {
// 不含下划线,仅将首字母大写
return name.substring(0, 1).toUpperCase() + name.substring(1);
}
// 用下划线将原始字符串分割
String[] camels = name.split("_");
for (String camel : camels) {
// 跳过原始字符串中开头、结尾的下换线或双重下划线
if (camel.isEmpty()) {
continue;
}
// 首字母大写
result.append(camel.substring(0, 1).toUpperCase());
result.append(camel.substring(1).toLowerCase());
}
return result.toString();
}
/**
* 接收
*
* @param params params
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment