Browse Source

fix: 格式化

shc 3 years ago
parent
commit
c84e1bda70

+ 4 - 3
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/WmScorePackageController.java

@@ -58,6 +58,7 @@ import com.qunzhixinxi.hnqz.admin.service.*;
 import com.qunzhixinxi.hnqz.common.core.constant.CommonConstants;
 import com.qunzhixinxi.hnqz.common.core.util.R;
 import com.qunzhixinxi.hnqz.common.log.annotation.SysLog;
+import com.qunzhixinxi.hnqz.common.qcc.utils.JsonUtils;
 import com.qunzhixinxi.hnqz.common.security.annotation.Inner;
 import com.qunzhixinxi.hnqz.common.security.service.HnqzUser;
 import com.qunzhixinxi.hnqz.common.security.util.SecurityUtils;
@@ -3368,8 +3369,6 @@ public class WmScorePackageController {
 			return R.failed(errorMap.asMap());
 		}
 
-		List<WmScorePackage> bizPackage = new ArrayList<>(batchPackageExcelModels.size());
-
 		for (BatchPackageExcelModel model : batchPackageExcelModels) {
 
 			scorePackage.setScore(model.getScore());
@@ -3389,7 +3388,9 @@ public class WmScorePackageController {
 		Map<String, Object> history = new HashMap<>(2);
 		scorePackage.setCreateTime(null);
 		scorePackage.setUpdateTime(null);
-		history.put("history", scorePackage);
+		JSONObject jsonObject = JSONUtil.parseObj(scorePackage);
+		jsonObject.set("relatedService",Integer.parseInt(scorePackage.getRelatedService()));
+		history.put("history", jsonObject);
 		history.put("timestamp", DateTimeFormatter.ofPattern(DatePattern.CHINESE_DATE_TIME_PATTERN).format(LocalDateTime.now()));
 		redisTemplate.opsForValue().set(key, JSONUtil.toJsonStr(history));