Sfoglia il codice sorgente

留守老人确认-修改-二次提交

953954216 2 anni fa
parent
commit
5ab3e9acf1

+ 10 - 14
ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/domain/ZwywLrBhxx.java

@@ -7,6 +7,7 @@ import com.ruoyi.business.validator.BusinessLrVH;
 import com.ruoyi.common.core.annotation.Excel;
 import com.ruoyi.common.core.web.domain.BaseEntity;
 import com.ruoyi.system.validate.*;
+import com.ruoyi.system.validate.group.AddGroup;
 import com.ruoyi.system.validate.group.LogicGroup;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -14,6 +15,7 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 
+import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.Size;
 
 /**
@@ -32,55 +34,49 @@ public class ZwywLrBhxx extends BaseEntity
     private static final long serialVersionUID = 1L;
 
     /** 主键标识 */
-    @Excel(name = "主键标识")
     @TableId(value = "id",type = IdType.ASSIGN_UUID)
     @ApiModelProperty(value = "主键标识")
     private String id;
 
     /** 老人信息表id */
-    @Excel(name = "老人信息表id")
     @ApiModelProperty(value = "老人信息表id")
     @LogicV(message = "{老人信息表id}",handler = BusinessLrVH.class,groups = LogicGroup.class)
     private String lrId;
 
-    /** 驳回原因 */
-    @Excel(name = "驳回原因")
-    @ApiModelProperty(value = "驳回原因")
-    @Size(max = 200, message = "{驳回原因}")
-    private String lrBhyy;
-
     /** 上报日期 */
-    @Excel(name = "上报日期")
     @ApiModelProperty(value = "上报日期")
     @DateV(pattern = "yyyyMMdd", message = "{上报日期}")
     private String lrSbrq;
 
     /** 驳回时间 */
-    @Excel(name = "驳回时间")
     @ApiModelProperty(value = "驳回时间")
     @DateV(message = "{驳回时间}")
     private String lrBhsj;
 
     /** 记录创建人行政区划 */
-    @Excel(name = "记录创建人行政区划")
     @ApiModelProperty(value = "记录创建人行政区划")
     @Size(max = 12, message = "{记录创建人行政区划}")
     private String cjrXzqh;
 
     /** 老人姓名 */
-    @Excel(name = "老人姓名")
     @ApiModelProperty(value = "老人姓名")
     @Size(max = 72, message = "{老人姓名}")
-
     @ChineseV(message = "{老人姓名}")
     @EncryptionV
     private String lrXm;
 
     /** 老人身份证 */
-    @Excel(name = "老人身份证")
     @ApiModelProperty(value = "老人身份证")
     @IdCardV(message = "{老人身份证}")
     @EncryptionV
     private String lrZjhm;
 
+    @ApiModelProperty(value = "无法确认类型")
+    @DictV(type = "XZ125", isMuti = true, message = "{无法确认类型}")
+    private String wfqrLx;
+
+    /** 无法确认原因 */
+    @ApiModelProperty(value = "无法确认原因")
+    @Size(max = 50, message = "{无法确认原因}")
+    private String wfqrYy;
 }

+ 9 - 5
ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/domain/ZwywLrJbxx.java

@@ -514,11 +514,6 @@ public class ZwywLrJbxx extends BaseEntity
     @TableField(exist = false)
     private String age;
 
-    /** 最新驳回原因 */
-    @ApiModelProperty(value = "最新驳回原因")
-    @Size(max = 200, message = "{最新驳回原因}")
-    private String lrBhyy;
-
     @ApiModelProperty(value = "健康状况查询条件")
     @TableField(exist = false)
     private List<String> lrJkzkCx;
@@ -551,4 +546,13 @@ public class ZwywLrJbxx extends BaseEntity
     @TableField(exist = false)
     private List<String> lrCjlxCx;
 
+    @ApiModelProperty(value = "无法确认类型")
+    @TableField(exist = false)
+    @DictV(type = "XZ125", isMuti = true, message = "{无法确认类型}")
+    private String wfqrLx;
+
+    @ApiModelProperty(value = "无法确认原因")
+    @TableField(exist = false)
+    private String wfqrYy;
+
 }

+ 4 - 4
ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/service/impl/ZwywLrJbxxServiceImpl.java

@@ -100,7 +100,7 @@ public class ZwywLrJbxxServiceImpl implements IZwywLrJbxxService
     public List<ZwywLrJbxx> selectZwywLrJbxxXxqrcxList(ZwywLrJbxx zwywLrJbxx)
     {
         zwywLrJbxx.setLrSbdz(SecurityUtils.getAreaCode());
-        zwywLrJbxx.setLzztCx("01");
+        zwywLrJbxx.setLzztCx("05");
         return zwywLrJbxxMapper.selectZwywLrJbxxXxqrList(zwywLrJbxx);
     }
 
@@ -336,18 +336,18 @@ public class ZwywLrJbxxServiceImpl implements IZwywLrJbxxService
         ZwywLrJbxx lrJbxx = zwywLrJbxxMapper.selectById(zwywLrJbxx.getId());
         String oldLzzt = lrJbxx.getLzzt();
         String newLzzt = zwywLrJbxx.getLzzt();
-
             if(!"2".equals(oldLzzt) && "1".equals(newLzzt)){ // 驳回
-                zwywLrJbxxMapper.updateZwywLrJbxxLzzt(zwywLrJbxx);
                 ZwywLrBhxx bhxx = new ZwywLrBhxx();
                 bhxx.setLrId(zwywLrJbxx.getId());
-                bhxx.setLrBhyy(zwywLrJbxx.getLrBhyy());
                 bhxx.setLrSbrq(DateUtils.dateTime());
                 bhxx.setLrBhsj(DateUtils.dateTimeNow());
                 bhxx.setCjrXzqh(SecurityUtils.getAreaCode());
                 bhxx.setLrXm(lrJbxx.getLrXm());
                 bhxx.setLrZjhm(lrJbxx.getLrZjhm());
+                bhxx.setWfqrLx(zwywLrJbxx.getWfqrLx());
+                bhxx.setWfqrYy(zwywLrJbxx.getWfqrYy());
                 zwywLrBhxxMapper.insert(bhxx);
+                zwywLrJbxxMapper.updateZwywLrJbxxLzzt(zwywLrJbxx);
             }
             else if ("2".equals(oldLzzt)){
                 throw new ServiceException("已成功审批的老人无法再审批");

+ 1 - 5
ruoyi-modules/mz-business-lrgl/src/main/resources/mapper/business/ZwywLrBhxxMapper.xml

@@ -7,7 +7,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="ZwywLrBhxx" id="ZwywLrBhxxResult">
         <result property="id"    column="id"    />
         <result property="lrId"    column="lr_id"    />
-        <result property="lrBhyy"    column="lr_bhyy"    />
         <result property="lrSbrq"    column="lr_sbrq"    />
         <result property="lrBhsj"    column="lr_bhsj"    />
         <result property="cjrXzqh"    column="cjr_xzqh"    />
@@ -31,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectZwywLrBhxxVo">
-        select id, lr_id, lr_bhyy, lr_sbrq, lr_bhsj, cjr_xzqh, lr_xm, lr_zjhm, create_time_str, create_user_id, create_by, create_user_type,create_area_code, create_unit,create_tounit,create_bmjsc,create_qhjsc,create_unit_name, update_time_str, update_user_id, update_by, update_unit, update_unit_name from zwyw_lr_bhxx
+        select id, lr_id, lr_sbrq, lr_bhsj, cjr_xzqh, lr_xm, lr_zjhm, create_time_str, create_user_id, create_by, create_user_type,create_area_code, create_unit,create_tounit,create_bmjsc,create_qhjsc,create_unit_name, update_time_str, update_user_id, update_by, update_unit, update_unit_name from zwyw_lr_bhxx
     </sql>
 
     <select id="selectZwywLrBhxxList" parameterType="ZwywLrBhxx" resultMap="ZwywLrBhxxResult">
@@ -51,7 +50,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="id != null">id,</if>
             <if test="lrId != null">lr_id,</if>
-            <if test="lrBhyy != null">lr_bhyy,</if>
             <if test="lrSbrq != null">lr_sbrq,</if>
             <if test="lrBhsj != null">lr_bhsj,</if>
             <if test="cjrXzqh != null">cjr_xzqh,</if>
@@ -70,7 +68,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
             <if test="lrId != null">#{lrId},</if>
-            <if test="lrBhyy != null">#{lrBhyy},</if>
             <if test="lrSbrq != null">#{lrSbrq},</if>
             <if test="lrBhsj != null">#{lrBhsj},</if>
             <if test="cjrXzqh != null">#{cjrXzqh},</if>
@@ -92,7 +89,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update zwyw_lr_bhxx
         <trim prefix="SET" suffixOverrides=",">
             <if test="lrId != null">lr_id = #{lrId},</if>
-            <if test="lrBhyy != null">lr_bhyy = #{lrBhyy},</if>
             <if test="lrSbrq != null">lr_sbrq = #{lrSbrq},</if>
             <if test="lrBhsj != null">lr_bhsj = #{lrBhsj},</if>
             <if test="cjrXzqh != null">cjr_xzqh = #{cjrXzqh},</if>

+ 48 - 10
ruoyi-modules/mz-business-lrgl/src/main/resources/mapper/business/ZwywLrJbxxMapper.xml

@@ -75,7 +75,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="sbkh"    column="sbkh"    />
         <result property="khmc"    column="khmc"    />
         <result property="lzzt"    column="lzzt"    />
-        <result property="lrBhyy"    column="lr_bhyy"    />
         <result property="createTimeStr"    column="create_time_str"    />
         <result property="createUserId"    column="create_user_id"    />
         <result property="createBy"    column="create_by"    />
@@ -92,8 +91,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateUnit"    column="update_unit"    />
         <result property="updateUnitName"    column="update_unit_name"    />
         <result property="age"    column="age"    />
+        <result property="wfqrLx"    column="wfqr_lx"    />
+        <result property="wfqrYy"    column="wfqr_yy"    />
     </resultMap>
 
+
+    <resultMap type="ZwywLrJbxx" id="ZwywQrLrJbxxResult">
+        <result property="id"    column="id"    />
+        <result property="lrZjhm"    column="lr_zjhm"    />
+        <result property="lrXm"    column="lr_xm"    />
+        <result property="lrCydh"    column="lr_cydh"    />
+        <result property="lrHjdz"    column="lr_hjdz"    />
+        <result property="lrHjdzName"    column="lr_hjdz_name"    />
+        <result property="lrHjbcxx"    column="lr_hjbcxx"    />
+        <result property="lrXjdz"    column="lr_xjdz"    />
+        <result property="lrXjdzName"    column="lr_xjdz_name"    />
+        <result property="lrXjdzBcxx"    column="lr_xjdz_bcxx"    />
+        <result property="lrSbdz"    column="lr_sbdz"    />
+        <result property="wfqrLx"    column="wfqr_lx"    />
+        <result property="wfqrYy"    column="wfqr_yy"    />
+        <result property="lzzt"    column="lzzt"    />
+        <result property="createTimeStr"    column="create_time_str"    />
+        <result property="createUserId"    column="create_user_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createUserType"    column="create_user_type"    />
+        <result property="createAreaCode"    column="create_area_code"    />
+        <result property="createUnit"    column="create_unit"    />
+        <result property="createTounit"    column="create_tounit"    />
+        <result property="createBmjsc"    column="create_bmjsc"    />
+        <result property="createQhjsc"    column="create_qhjsc"    />
+        <result property="createUnitName"    column="create_unit_name"    />
+        <result property="updateTimeStr"    column="update_time_str"    />
+        <result property="updateUserId"    column="update_user_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateUnit"    column="update_unit"    />
+        <result property="updateUnitName"    column="update_unit_name"    />
+    </resultMap>
+
+
+
     <sql id="selectZwywLrJbxxVo">
         select
         getxzqhcodebycode(lr_hjdz) as lr_hjdz,
@@ -101,7 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         getxzqhmcbycode(lr_hjdz) as lr_hjdz_name,
         getxzqhmcbycode(lr_xjdz) as lr_xjdz_name,
         getxzqhmcbycode(lr_sbdz) as lr_sbdz_name,
-        lzzt, ( CASE lzzt WHEN 1 THEN lr_bhyy ELSE '无' END ) as lr_bhyy,
+        lzzt,
         id, lr_zjhm, lr_xm, lr_xb, lr_csrq, lr_xl, lr_zzmm, lr_mz, lr_gj, lr_jg, lr_hjbcxx, lr_hjlb, is_yz,
         lr_xjdz_bcxx, lr_cydh, lr_hyzk, lr_poxm, lr_po_zjmh, lr_tx, lr_sbdz, jhr_xm, jhr_sjhm, jhr_gx,
         is_sz, is_ls, is_db, is_dj, is_gl, is_tk, is_dsr, is_chx, is_yyjh, is_sn, lr_cjdj,
@@ -119,17 +155,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         from zwyw_lr_jbxx a
     </sql>
 
-    <select id="selectZwywLrJbxxXxqrById" parameterType="ZwywLrJbxx" resultMap="ZwywLrJbxxResult">
+    <select id="selectZwywLrJbxxXxqrById" parameterType="ZwywLrJbxx" resultMap="ZwywQrLrJbxxResult">
         select
             getxzqhcodebycode(lr_hjdz) as lr_hjdz,
             getxzqhcodebycode(lr_xjdz) as lr_xjdz,
             getxzqhmcbycode(lr_hjdz) as lr_hjdz_name,
             getxzqhmcbycode(lr_xjdz) as lr_xjdz_name,
             getxzqhmcbycode(lr_sbdz) as lr_sbdz_name,
-            ( CASE WHEN lzzt IS NULL OR lzzt = '0' THEN '00' WHEN lzzt = '1' THEN '02' WHEN lzzt = '2' THEN '01' END ) as lzzt,
-            ( CASE lzzt WHEN 1 THEN lr_bhyy ELSE '无' END ) as lr_bhyy, lr_xjdz_bcxx,
-            id, lr_zjhm, lr_xm, lr_xb, lr_csrq, lr_jg, lr_hjbcxx, lr_cydh,
-            lr_xjdz_bcxx,
+            lzzt,
+            ( CASE WHEN lzzt IS NULL OR lzzt = '0' THEN '00' WHEN lzzt = '1' THEN '99' WHEN lzzt = '2' THEN '01' END ) as lzztCx,
+            (SELECT wfqr_lx FROM zwyw_lr_bhxx where lr_id = zwyw_lr_jbxx.id ORDER BY create_time_str DESC LIMIT 1 ) as wfqr_lx,
+            (SELECT wfqr_yy FROM zwyw_lr_bhxx where lr_id = zwyw_lr_jbxx.id ORDER BY create_time_str DESC LIMIT 1 ) as wfqr_yy,
+            id, lr_zjhm, lr_xm, lr_cydh,
+            lr_hjbcxx, lr_xjdz_bcxx,
             create_time_str, create_user_id, create_by, create_user_type,create_area_code, create_unit,create_tounit,create_bmjsc,create_qhjsc,
             create_unit_name,
             update_time_str, update_user_id, update_by, update_unit, update_unit_name
@@ -139,8 +177,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectZwywLrJbxxXxqrList" parameterType="ZwywLrJbxx" resultMap="ZwywLrJbxxResult">
     select
-        id, lr_xm, lr_zjhm,
-        ( CASE WHEN lzzt IS NULL OR lzzt = '0' THEN '00' WHEN lzzt = '1' THEN '02' WHEN lzzt = '2' THEN '01' END ) as lzzt,
+        id, lr_xm, lr_zjhm, lzzt,
+        ( CASE WHEN lzzt IS NULL OR lzzt = '0' THEN '00' WHEN lzzt = '1' THEN '99' WHEN lzzt = '2' THEN '01' END ) as lzztCx,
         getxzqhmcbycode(lr_xjdz) as lr_sbdz_name, lr_sbdz,
         create_unit,create_tounit,create_bmjsc,create_qhjsc
     from zwyw_lr_jbxx
@@ -151,6 +189,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="lzztCx != null and lzztCx == '00'"> and ( lzzt is null or lzzt = '0' ) </if>
         <if test="lzztCx != null and lzztCx == '01'"> and lzzt = '2' </if>
         <if test="lzztCx != null and lzztCx == '02'"> and lzzt = '1' </if>
+        <if test="lzztCx != null and lzztCx == '05'"> and lzzt in ('1','2') </if>
         <if test="lzztCx != null and lzztCx == '99'"> and lzzt is null </if>
     </where>
     </select>
@@ -730,7 +769,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update zwyw_lr_jbxx
         <trim prefix="SET" suffixOverrides=",">
             <if test="lzzt != null">lzzt = #{lzzt},</if>
-            <if test="lrBhyy != null">lr_bhyy = #{lrBhyy},</if>
             update_time_str = #{updateTimeStr},
             update_user_id = #{updateUserId},
             update_by = #{updateBy},

+ 2 - 2
ruoyi-ui/src/views/business/lrxx/jbxxqr/index.vue

@@ -48,7 +48,7 @@
       <el-table-column label="居住地址" align="center" prop="lrSbdzName" />
       <el-table-column label="状态" align="center" prop="lzzt">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.XZ124" :value="scope.row.lzzt"/>
+          <dict-tag :options="dict.type.XZ124" :value="scope.row.lzztCx"/>
         </template>
       </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
@@ -111,7 +111,7 @@
               </tr>
               <tr>
                 <td>状态</td>
-                <td colspan="3">{{translateDict('XZ124', form.lzzt)}}</td>
+                <td colspan="3">{{translateDict('XZ124', form.lzztCx)}}</td>
               </tr>
             </table>
           </el-tab-pane>

+ 4 - 4
ruoyi-ui/src/views/business/lrxx/jbxxqrcx/index.vue

@@ -46,9 +46,9 @@
       <el-table-column label="姓名" align="center" prop="lrXm"/>
       <el-table-column label="身份证件号码" align="center" prop="lrZjhm"/>
       <el-table-column label="居住地址" align="center" prop="lrSbdzName" />
-      <el-table-column label="状态" align="center" prop="lzzt">
+      <el-table-column label="状态" align="center" prop="lzztCx">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.XZ124" :value="scope.row.lzzt"/>
+          <dict-tag :options="dict.type.XZ124" :value="scope.row.lzztCx"/>
         </template>
       </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
@@ -108,7 +108,7 @@
               </tr>
               <tr>
                 <td>状态</td>
-                <td colspan="3">{{translateDict('XZ124', form.lzzt)}}</td>
+                <td colspan="3">{{translateDict('XZ124', form.lzztCx)}}</td>
               </tr>
             </table>
           </el-tab-pane>
@@ -124,7 +124,7 @@ import { decryptData_ECB, decryptRowData_ECB } from "@/api/tool/sm4";
 
 export default {
   name: 'Jbxxcx',
-  dicts: ['XZ124'],
+  dicts: ['XZ124','CH051'],
   data() {
     return {
       // 遮罩层