jz.kai 3 年之前
父节点
当前提交
c1ca1e8562

+ 2 - 2
common/src/main/java/com/jpsoft/excellent/modules/base/entity/Incident.java

@@ -22,9 +22,9 @@ public class Incident {
     @ApiModelProperty(value = "编号")
     @ApiModelProperty(value = "编号")
     private String id;
     private String id;
     @ApiModelProperty(value = "批次")
     @ApiModelProperty(value = "批次")
-    private String batch;
+    private Integer batch;
     @ApiModelProperty(value = "序号")
     @ApiModelProperty(value = "序号")
-    private String serialNo;
+    private Integer serialNo;
     @ApiModelProperty(value = "投诉人")
     @ApiModelProperty(value = "投诉人")
     private String complainant;
     private String complainant;
     @ApiModelProperty(value = "联系方式")
     @ApiModelProperty(value = "联系方式")

+ 4 - 4
common/src/main/resources/mapper/base/Incident.xml

@@ -61,8 +61,8 @@
 		values
 		values
 		(
 		(
 #{id,jdbcType=VARCHAR}
 #{id,jdbcType=VARCHAR}
-,#{batch,jdbcType=VARCHAR}
-,#{serialNo,jdbcType=VARCHAR}
+,#{batch,jdbcType=NUMERIC}
+,#{serialNo,jdbcType=NUMERIC}
 ,#{complainant,jdbcType=VARCHAR}
 ,#{complainant,jdbcType=VARCHAR}
 ,#{complainantPhone,jdbcType=VARCHAR}
 ,#{complainantPhone,jdbcType=VARCHAR}
 ,#{areaId,jdbcType=VARCHAR}
 ,#{areaId,jdbcType=VARCHAR}
@@ -86,10 +86,10 @@
 		update base_incident
 		update base_incident
 		<set>
 		<set>
 				<if test="batch!=null">
 				<if test="batch!=null">
-		batch_=#{batch,jdbcType=VARCHAR},
+		batch_=#{batch,jdbcType=NUMERIC},
 		</if>
 		</if>
 				<if test="serialNo!=null">
 				<if test="serialNo!=null">
-		serial_no=#{serialNo,jdbcType=VARCHAR},
+		serial_no=#{serialNo,jdbcType=NUMERIC},
 		</if>
 		</if>
 				<if test="complainant!=null">
 				<if test="complainant!=null">
 		complainant_=#{complainant,jdbcType=VARCHAR},
 		complainant_=#{complainant,jdbcType=VARCHAR},

+ 16 - 2
web/src/main/java/com/jpsoft/excellent/modules/base/controller/IncidentController.java

@@ -1096,7 +1096,14 @@ public class IncidentController {
                     incident.setCreateTime(new Date());
                     incident.setCreateTime(new Date());
 
 
                     if(StringUtils.isNotEmpty(strBatch)){
                     if(StringUtils.isNotEmpty(strBatch)){
-                        incident.setBatch(strBatch);
+                        try {
+                            incident.setBatch(Integer.valueOf(strBatch));
+                        }
+                        catch (Exception ex){
+                            sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("批次数据错误!");
+                            failCount++;
+                            continue;
+                        }
                     }
                     }
                     else{
                     else{
                         sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写批次!");
                         sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写批次!");
@@ -1105,7 +1112,14 @@ public class IncidentController {
                     }
                     }
 
 
                     if(StringUtils.isNotEmpty(strSerialNo)){
                     if(StringUtils.isNotEmpty(strSerialNo)){
-                        incident.setSerialNo(strSerialNo);
+                        try {
+                            incident.setSerialNo(Integer.valueOf(strSerialNo));
+                        }
+                        catch (Exception ex){
+                            sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("序号数据错误!");
+                            failCount++;
+                            continue;
+                        }
                     }
                     }
                     else{
                     else{
                         sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写序号!");
                         sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("请填写序号!");