|
@@ -54,6 +54,7 @@ import com.platform.dao.util.UserUtil;
|
|
|
import com.platform.dao.util.compare.FieldComparedUtils;
|
|
|
import com.platform.dao.vo.SysUserDeptVO;
|
|
|
import com.platform.dao.vo.SysUserVO;
|
|
|
+import com.platform.dao.vo.export.sb.CustomParams;
|
|
|
import com.platform.dao.vo.export.sb.ExportSbInfoVO;
|
|
|
import com.platform.dao.vo.export.sb.ExportYiBiaoSbInfoVO;
|
|
|
import com.platform.dao.vo.query.sb.SbChangeRecordVO;
|
|
@@ -1654,7 +1655,7 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
|
|
|
}
|
|
|
|
|
|
// 自定义参数
|
|
|
- if (StringUtils.isNotBlank(sbInfo.getParamList()) && sbInfo.getParamList() != "") {
|
|
|
+ /*if (StringUtils.isNotBlank(sbInfo.getParamList()) && sbInfo.getParamList() != "") {
|
|
|
JSONArray jsonArray = JSONArray.parseArray(sbInfo.getParamList());
|
|
|
StringBuffer sBuffer = new StringBuffer();
|
|
|
if (jsonArray != null) {
|
|
@@ -1666,6 +1667,28 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
|
|
|
}
|
|
|
}
|
|
|
sbInfo.setParamList(sBuffer.toString());
|
|
|
+ }*/
|
|
|
+
|
|
|
+ try{
|
|
|
+ if (StringUtils.isNotBlank(sbInfo.getParamList()) && sbInfo.getParamList() != "[]"){
|
|
|
+ List<CustomParams> params = JSONArray.parseArray(sbInfo.getParamList(),CustomParams.class);
|
|
|
+ Map<String,String> paramsMap = new HashMap<>();
|
|
|
+ params.forEach(item->{
|
|
|
+ paramsMap.put(item.getName(),item.getContent());
|
|
|
+ });
|
|
|
+ Class clazz = sbInfo.getClass();
|
|
|
+ Field[] fields = clazz.getDeclaredFields();
|
|
|
+ for (Field field : fields) {
|
|
|
+ Excel excel = field.getAnnotation(Excel.class);
|
|
|
+ if (excel != null && excel.styleType() == 1) {
|
|
|
+ String content = paramsMap.get(excel.name());
|
|
|
+ Method requestMethod = clazz.getMethod(getSetMethod(field.getName()),String.class);
|
|
|
+ requestMethod.invoke(sbInfo,content);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
return vos;
|
|
@@ -2880,6 +2903,12 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
|
|
|
return "get" + Character.toUpperCase(cha) + fieldName.substring(1);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ public String getSetMethod(String fieldName) {
|
|
|
+ char cha = fieldName.charAt(0);
|
|
|
+ return "set" + Character.toUpperCase(cha) + fieldName.substring(1);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 全部参数修改
|
|
|
*
|