|
@@ -171,19 +171,15 @@ import java.net.URI;
|
|
import java.net.URISyntaxException;
|
|
import java.net.URISyntaxException;
|
|
import java.security.MessageDigest;
|
|
import java.security.MessageDigest;
|
|
import java.security.NoSuchAlgorithmException;
|
|
import java.security.NoSuchAlgorithmException;
|
|
-import java.text.DateFormat;
|
|
|
|
-import java.text.ParseException;
|
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
|
import java.time.Duration;
|
|
import java.time.Duration;
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalTime;
|
|
import java.time.LocalTime;
|
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
import java.time.temporal.ChronoUnit;
|
|
import java.time.temporal.ChronoUnit;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
-import java.util.Calendar;
|
|
|
|
import java.util.Collections;
|
|
import java.util.Collections;
|
|
-import java.util.Date;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.HashSet;
|
|
import java.util.HashSet;
|
|
import java.util.LinkedHashMap;
|
|
import java.util.LinkedHashMap;
|
|
@@ -2128,37 +2124,21 @@ public class ApiController {
|
|
*/
|
|
*/
|
|
@GetMapping("/getScorePackageInfoById")
|
|
@GetMapping("/getScorePackageInfoById")
|
|
public R<?> getScorePackageInfoById(String id) {
|
|
public R<?> getScorePackageInfoById(String id) {
|
|
- WmScorePackage wms = wmScorePackageService.getById(id);
|
|
|
|
|
|
+
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ WmScorePackage wms = wmScorePackageService.getById(id);
|
|
|
|
+
|
|
|
|
+
|
|
SysDept dept = sysDeptService.getById(wms.getSendPackageDeptId());
|
|
SysDept dept = sysDeptService.getById(wms.getSendPackageDeptId());
|
|
map.put("packageEntName", dept.getName());
|
|
map.put("packageEntName", dept.getName());
|
|
map.put("packageEntId", dept.getDeptId());
|
|
map.put("packageEntId", dept.getDeptId());
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(wms.getBelongDate())) {
|
|
|
|
- map.put("termDate", wms.getBelongDate() + "-01 至 " + wms.getBelongDate() + "-30");
|
|
|
|
- DateFormat format = new SimpleDateFormat("yyyy-MM");
|
|
|
|
- DateFormat format1 = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
|
+ String issueDate = wms.getStartTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
|
|
|
+ String expireDate = wms.getEndTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
|
|
|
+ map.put("termDate", issueDate + " 至 " + expireDate);
|
|
|
|
|
|
- try {
|
|
|
|
- Date adata = format.parse(wms.getBelongDate());
|
|
|
|
- // 获取Calendar
|
|
|
|
- Calendar calendar = Calendar.getInstance();
|
|
|
|
- // 设置时间,当前时间不用设置
|
|
|
|
- calendar.setTime(adata);
|
|
|
|
- // 设置日期为本月最大日期
|
|
|
|
- calendar.set(Calendar.DATE, calendar.getActualMaximum(Calendar.DATE));
|
|
|
|
-
|
|
|
|
- // 打印
|
|
|
|
- String endDate = format1.format(calendar.getTime());
|
|
|
|
- if (null != endDate) {
|
|
|
|
- map.put("termDate", wms.getBelongDate() + "-01 至 " + endDate);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- } catch (ParseException e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
map.put("status", wms.getPackageStatus());
|
|
map.put("status", wms.getPackageStatus());
|
|
map.put("packageName", wms.getScorePackageName());
|
|
map.put("packageName", wms.getScorePackageName());
|
|
if (PackageTypeEnum.TYPE1_HCP_PACKAGE.val().equals(wms.getPackageType1())) {
|
|
if (PackageTypeEnum.TYPE1_HCP_PACKAGE.val().equals(wms.getPackageType1())) {
|