|
@@ -55,6 +55,7 @@ import com.platform.dao.util.ExcelUtil;
|
|
|
import com.platform.dao.util.MessageTemplateUtil;
|
|
|
import com.platform.dao.util.UserUtil;
|
|
|
import com.platform.dao.util.compare.FieldComparedUtils;
|
|
|
+import com.platform.dao.util.compare.annotation.FieldCompared;
|
|
|
import com.platform.dao.vo.SysUserDeptVO;
|
|
|
import com.platform.dao.vo.SysUserVO;
|
|
|
import com.platform.dao.vo.export.sb.ExportSbInfoVO;
|
|
@@ -63,6 +64,7 @@ import com.platform.dao.vo.query.upms.SysDeptVO;
|
|
|
import com.platform.dao.vo.report.MeasureLogReportVO;
|
|
|
import com.platform.dao.vo.report.SbInfoTypeReportVO;
|
|
|
import com.platform.dao.vo.sb.*;
|
|
|
+import com.platform.office.annotation.Excel;
|
|
|
import com.platform.service.base.impl.BaseServiceImpl;
|
|
|
import com.platform.service.business.ActivitiBusinessService;
|
|
|
import com.platform.service.check.CheckStandardService;
|
|
@@ -88,6 +90,8 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
import tk.mybatis.mapper.weekend.Weekend;
|
|
|
import tk.mybatis.mapper.weekend.WeekendCriteria;
|
|
|
|
|
|
+import java.lang.reflect.Field;
|
|
|
+import java.lang.reflect.Method;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
@@ -2125,7 +2129,6 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
|
|
|
if (vo.getSeatNumber() == null) {
|
|
|
tempInfo.setSeatNumber(30);// 如果为空默认30天提醒
|
|
|
}
|
|
|
-
|
|
|
// 对必填字段进行判断
|
|
|
if (StringUtils.isBlank(vo.getPositionNo())) {
|
|
|
throw new BusinessException("第" + i + "行,位号为空,位号为必填项目,请填写;");// 编号为空,复制位号
|
|
@@ -2259,6 +2262,27 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
|
|
|
tempInfo.setCreatedUserName(SecurityUtils.getUserInfo().getUsername());
|
|
|
tempInfo.setCreatedUserId(SecurityUtils.getUserInfo().getUserId());
|
|
|
tempInfo.setCreatedTime(LocalDateTime.now());
|
|
|
+ // 检索自定义字段值
|
|
|
+ Class clazz = vo.getClass();
|
|
|
+ Field[] fields = clazz.getDeclaredFields();
|
|
|
+ StringBuilder paramList = new StringBuilder();
|
|
|
+ paramList.append("[");
|
|
|
+ for (Field field : fields) {
|
|
|
+ Method requestMethod = clazz.getMethod(getGetMethod(field.getName()));
|
|
|
+ Object requestVal = requestMethod.invoke(vo);
|
|
|
+ Excel excel = field.getAnnotation(Excel.class);
|
|
|
+ if (excel != null && excel.styleType() == 1) {
|
|
|
+ // 拼接自定义字符串
|
|
|
+ paramList.append("{\"name\":\"").append(excel.name()).append("\",");
|
|
|
+ paramList.append("\"content\":\"").append(requestVal).append("\"},");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String param = paramList.toString();
|
|
|
+ if(param.length() > 1){
|
|
|
+ param = param.substring(0,param.length()-1);
|
|
|
+ }
|
|
|
+ param += "]";
|
|
|
+ tempInfo.setParamList(param);
|
|
|
addList.add(tempInfo);
|
|
|
}
|
|
|
}
|
|
@@ -2274,6 +2298,11 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public String getGetMethod(String fieldName){
|
|
|
+ char cha = fieldName.charAt(0);
|
|
|
+ return "get" + Character.toUpperCase(cha) + fieldName.substring(1);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 全部参数修改
|
|
|
*
|