瀏覽代碼

我的保单、理赔须知 接口BUG

jz.kai 5 年之前
父節點
當前提交
ceeafb586f

+ 6 - 4
picc-enterprise-server/src/main/java/com/jpsoft/picc/modules/auth/controller/InsurancePolicyController.java

@@ -942,6 +942,8 @@ public class InsurancePolicyController {
             Page<InsurancePolicy> page = insurancePolicyService.myPageSearch(searchParams, 1, 1000,sortList);
 
             //内容-写入数据
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+            SimpleDateFormat sdfEx = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
             for(int i=0;i<page.size();i++){
                 InsurancePolicy insurancePolicy = page.get(i);
 
@@ -949,17 +951,17 @@ public class InsurancePolicyController {
                 HSSFCell cellContent1 = rowContent.createCell(0);
                 cellContent1.setCellValue(i+1);
                 HSSFCell cellContent2 = rowContent.createCell(1);
-                if(insurancePolicy.getSinglNumber() != null) cellContent2.setCellValue(insurancePolicy.getSinglNumber());
+                if(insurancePolicy.getPolicyNo() != null) cellContent2.setCellValue(insurancePolicy.getPolicyNo());
                 HSSFCell cellContent3 = rowContent.createCell(2);
                 if(insurancePolicy.getDefinitionName() != null) cellContent3.setCellValue(insurancePolicy.getDefinitionName());
                 HSSFCell cellContent4 = rowContent.createCell(3);
                 if(insurancePolicy.getNumber() != null) cellContent4.setCellValue(insurancePolicy.getNumber());
                 HSSFCell cellContent5 = rowContent.createCell(4);
-                if(insurancePolicy.getStartTime() != null && insurancePolicy.getEndTime() != null) cellContent5.setCellValue(insurancePolicy.getStartTime() + " - " + insurancePolicy.getEndTime());
+                if(insurancePolicy.getStartTime() != null && insurancePolicy.getEndTime() != null) cellContent5.setCellValue(sdf.format(insurancePolicy.getStartTime()) + " - " + sdf.format(insurancePolicy.getEndTime()));
                 HSSFCell cellContent6 = rowContent.createCell(5);
-                if(insurancePolicy.getCreateTime() != null) cellContent6.setCellValue(insurancePolicy.getCreateTime());
+                if(insurancePolicy.getCreateTime() != null) cellContent6.setCellValue(sdfEx.format(insurancePolicy.getCreateTime()));
                 HSSFCell cellContent7 = rowContent.createCell(6);
-                if(insurancePolicy.getFinishTime() != null) cellContent7.setCellValue(insurancePolicy.getFinishTime());
+                if(insurancePolicy.getFinishTime() != null) cellContent7.setCellValue(sdfEx.format(insurancePolicy.getFinishTime()));
                 HSSFCell cellContent8 = rowContent.createCell(7);
                 if(insurancePolicy.getInsuranceFee() != null) cellContent8.setCellValue(insurancePolicy.getInsuranceFee().floatValue());
                 HSSFCell cellContent9 = rowContent.createCell(8);