瀏覽代碼

20220530_sun#473养老机构失信信息

15143018065 2 年之前
父節點
當前提交
0afbff7303

+ 118 - 0
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywYljgSxxxController.java

@@ -0,0 +1,118 @@
+package com.ruoyi.business.controller;
+
+import java.util.List;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.ruoyi.ext.api.validate.group.AddGroup;
+import com.ruoyi.business.domain.ZwywYljgSxxx;
+import com.ruoyi.business.service.IZwywYljgSxxxService;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+
+/**
+ * 养老机构失信信息Controller
+ *
+ * @author sun
+ * @date 2022-05-30
+ */
+@RestController
+@RequestMapping("/yljgSxxx")
+public class ZwywYljgSxxxController extends BaseController
+{
+    @Autowired
+    private IZwywYljgSxxxService zwywYljgSxxxService;
+
+    /**
+     * 查询养老机构失信信息列表
+     */
+    @RequiresPermissions("business:yljgSxxx:list")
+    @GetMapping("/list")
+    public TableDataInfo list(ZwywYljgSxxx zwywYljgSxxx)
+    {
+        startPage();
+        List<ZwywYljgSxxx> list = zwywYljgSxxxService.selectZwywYljgSxxxList(zwywYljgSxxx);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出养老机构失信信息列表
+     */
+    @RequiresPermissions("business:yljgSxxx:export")
+    @Log(title = "养老机构失信信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ZwywYljgSxxx zwywYljgSxxx)
+    {
+        List<ZwywYljgSxxx> list = zwywYljgSxxxService.selectZwywYljgSxxxList(zwywYljgSxxx);
+        ExcelUtil<ZwywYljgSxxx> util = new ExcelUtil<ZwywYljgSxxx>(ZwywYljgSxxx.class);
+        util.exportExcel(response, list, "养老机构失信信息数据");
+    }
+
+    /**
+     * 获取养老机构失信信息详细信息
+     */
+    @RequiresPermissions("business:yljgSxxx:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id)
+    {
+        return AjaxResult.success(zwywYljgSxxxService.selectZwywYljgSxxxById(id));
+    }
+
+    /**
+     * 新增养老机构失信信息
+     */
+    @RequiresPermissions("business:yljgSxxx:add")
+    @Log(title = "养老机构失信信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated({AddGroup.class}) @RequestBody ZwywYljgSxxx zwywYljgSxxx)
+    {
+        return toAjax(zwywYljgSxxxService.insertZwywYljgSxxx(zwywYljgSxxx),zwywYljgSxxx.getId());
+    }
+
+    /**
+     * 修改养老机构失信信息
+     */
+    @RequiresPermissions("business:yljgSxxx:edit")
+    @Log(title = "养老机构失信信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody ZwywYljgSxxx zwywYljgSxxx)
+    {
+        return toAjax(zwywYljgSxxxService.updateZwywYljgSxxx(zwywYljgSxxx));
+    }
+
+    /**
+     * 修改养老机构失信信息
+     */
+    @RequiresPermissions("business:yljgSxxx:edit")
+    @Log(title = "养老机构失信信息", businessType = BusinessType.UPDATE)
+    @GetMapping("/start/instance/{id}")
+    public AjaxResult startIns(@PathVariable("id") String id)
+    {
+        return toAjax(zwywYljgSxxxService.startInstance(id));
+    }
+
+    /**
+     * 删除养老机构失信信息
+     */
+    @RequiresPermissions("business:yljgSxxx:remove")
+    @Log(title = "养老机构失信信息", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String[] ids)
+    {
+        return toAjax(zwywYljgSxxxService.deleteZwywYljgSxxxByIds(ids));
+    }
+}

+ 191 - 0
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/domain/ZwywYljgSxxx.java

@@ -0,0 +1,191 @@
+package com.ruoyi.business.domain;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.ruoyi.ext.api.validate.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.ext.api.validate.group.AddGroup;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+import org.hibernate.validator.constraints.Range;
+import com.ruoyi.ext.api.validate.DictV;
+import com.ruoyi.ext.api.validate.DateV;
+import com.ruoyi.ext.api.validate.MobileV;
+import com.ruoyi.ext.api.validate.PhoneV;
+import com.ruoyi.ext.api.validate.IdCardV;
+import com.ruoyi.ext.api.validate.NumberV;
+
+import javax.validation.constraints.Digits;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.Size;
+
+/**
+ * 养老机构失信信息对象 zwyw_yljg_sxxx
+ *
+ * @author sun
+ * @date 2022-05-30
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@TableName("zwyw_yljg_sxxx")
+@ApiModel("养老机构失信信息")
+public class ZwywYljgSxxx extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键标识 */
+    @Excel(name = "主键标识")
+    @TableId(value = "id",type = IdType.ASSIGN_UUID)
+    @ApiModelProperty(value = "主键标识")
+    private String id;
+
+    /** 流程实例主键 */
+    @Excel(name = "流程实例主键")
+    @ApiModelProperty(value = "流程实例主键")
+    private String instanceId;
+
+    /** 机构名称 */
+    @Excel(name = "机构名称")
+    @ApiModelProperty(value = "机构名称", required = true)
+    @NotBlank(message = "{机构名称}",groups = AddGroup.class)
+    @Size(min = 1, max = 100, message = "{机构名称}")
+
+    private String jgmc;
+
+    /** 统一社会信用代码 */
+    @Excel(name = "统一社会信用代码")
+    @ApiModelProperty(value = "统一社会信用代码", required = true)
+    @NotBlank(message = "{统一社会信用代码}",groups = AddGroup.class)
+    @Size(min = 1, max = 18, message = "{统一社会信用代码}")
+
+    private String tyshxydm;
+
+    /** 数据来源(CH042) */
+    @Excel(name = "数据来源", dictType = "CH042")
+    @ApiModelProperty(value = "数据来源(CH042)", required = true)
+    @NotBlank(message = "{数据来源}",groups = AddGroup.class)
+    @DictV(type = "CH042",message = "{数据来源}")
+    private String sjly;
+
+    /** 采集方式(CH043) */
+    @Excel(name = "采集方式", dictType = "CH043")
+    @ApiModelProperty(value = "采集方式(CH043)")
+    @DictV(type = "CH043",message = "{采集方式}")
+    private String cjfs;
+
+    /** 流转状态(CZ023) */
+    @Excel(name = "流转状态", dictType = "CZ023")
+    @ApiModelProperty(value = "流转状态(CZ023)", required = true)
+//    @NotBlank(message = "{流转状态}",groups = AddGroup.class)
+    @DictV(type = "CZ023",message = "{流转状态}")
+    private String lzzt;
+
+    /** 联系电话 */
+    @Excel(name = "联系电话")
+    @ApiModelProperty(value = "联系电话", required = true)
+    @NotBlank(message = "{联系电话}",groups = AddGroup.class)
+    @Size(min = 1, max = 18, message = "{联系电话}")
+
+    private String lxdh;
+
+    /** 法定代表人姓名 */
+    @Excel(name = "法定代表人姓名")
+    @ApiModelProperty(value = "法定代表人姓名", required = true)
+    @NotBlank(message = "{法定代表人姓名}",groups = AddGroup.class)
+    @Size(min = 1, max = 72, message = "{法定代表人姓名}")
+
+    @ChineseV(message = "{法定代表人姓名}")
+    private String frxm;
+
+    /** 法定代表人证件类型(C0015) */
+    @Excel(name = "法定代表人证件类型", dictType = "C0015")
+    @ApiModelProperty(value = "法定代表人证件类型(C0015)", required = true)
+    @NotBlank(message = "{法定代表人证件类型}",groups = AddGroup.class)
+    @DictV(type = "C0015",message = "{法定代表人证件类型}")
+    private String frzjlx;
+
+    /** 法定代表人公民身份号码 */
+    @Excel(name = "法定代表人公民身份号码")
+    @ApiModelProperty(value = "法定代表人公民身份号码", required = true)
+    @NotBlank(message = "{法定代表人公民身份号码}",groups = AddGroup.class)
+    @IdCardV(message = "{法定代表人公民身份号码}")
+    private String frzjhm;
+
+    /** 所在行政区划 */
+    @Excel(name = "所在行政区划")
+    @ApiModelProperty(value = "所在行政区划", required = true)
+    @NotBlank(message = "{所在行政区划}",groups = AddGroup.class)
+    @Size(min = 1, max = 12, message = "{所在行政区划}")
+
+    private String szxzqh;
+
+    /** 通信地址 */
+    @Excel(name = "通信地址")
+    @ApiModelProperty(value = "通信地址", required = true)
+    @NotBlank(message = "{通信地址}",groups = AddGroup.class)
+    @Size(min = 1, max = 100, message = "{通信地址}")
+
+    private String txdzms;
+
+    /** 失信信息描述 */
+    @Excel(name = "失信信息描述")
+    @ApiModelProperty(value = "失信信息描述", required = true)
+    @NotBlank(message = "{失信信息描述}",groups = AddGroup.class)
+    @Size(min = 1, max = 500, message = "{失信信息描述}")
+
+    private String ms;
+
+    /** 是否被处罚(CZ035) */
+    @Excel(name = "是否被处罚", dictType = "CZ035")
+    @ApiModelProperty(value = "是否被处罚(CZ035)", required = true)
+    @NotBlank(message = "{是否被处罚}",groups = AddGroup.class)
+    @DictV(type = "CZ035",message = "{是否被处罚}")
+    private String isCf;
+
+    /** 处罚部门(CH036) */
+    @Excel(name = "处罚部门", dictType = "CH036")
+    @ApiModelProperty(value = "处罚部门(CH036)")
+    @DictV(type = "CH036",message = "{处罚部门}")
+    private String cfbm;
+
+    /** 处罚日期 */
+    @Excel(name = "处罚日期")
+    @ApiModelProperty(value = "处罚日期")
+    @DateV(pattern = "yyyyMMdd", message = "{处罚日期}")
+    private String cfrq;
+
+    /** 处罚依据 */
+    @Excel(name = "处罚依据")
+    @ApiModelProperty(value = "处罚依据")
+    @Size(max = 200, message = "{处罚依据}")
+
+    private String cfyj;
+
+    /** 处罚内容 */
+    @Excel(name = "处罚内容")
+    @ApiModelProperty(value = "处罚内容")
+    @Size(max = 500, message = "{处罚内容}")
+
+    private String cfnr;
+
+    /** 相关材料 */
+    @Excel(name = "相关材料")
+    @ApiModelProperty(value = "相关材料")
+    @Size(max = 400, message = "{相关材料}")
+
+    private String sxxxXgcl;
+
+    @TableField(exist = false)
+    private String szxzqhIds;
+
+    @TableField(exist = false)
+    private String szxzqhNames;
+}

+ 23 - 0
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/mapper/ZwywYljgSxxxMapper.java

@@ -0,0 +1,23 @@
+package com.ruoyi.business.mapper;
+
+import java.util.List;
+
+import com.ruoyi.business.domain.ZwywCyrySxxx;
+import com.ruoyi.business.domain.ZwywYljgSxxx;
+import com.ruoyi.common.datascope.handler.DataColumn;
+import com.ruoyi.common.datascope.handler.DataPermission;
+import com.ruoyi.common.datascope.utils.BaseMapperPlus;
+
+/**
+ * 养老机构失信信息Mapper接口
+ *
+ * @author sun
+ * @date 2022-05-30
+ */
+@DataPermission({
+        @DataColumn(key = "deptName", value = "create_unit")
+})
+public interface ZwywYljgSxxxMapper extends BaseMapperPlus<ZwywYljgSxxx> {
+
+    public List<ZwywYljgSxxx> selectZwywYljgSxxxList(ZwywYljgSxxx zwywCyrySxxx);
+}

+ 54 - 0
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/service/IZwywYljgSxxxService.java

@@ -0,0 +1,54 @@
+package com.ruoyi.business.service;
+
+import java.util.List;
+import com.ruoyi.business.domain.ZwywYljgSxxx;
+
+/**
+ * 养老机构失信信息Service接口
+ *
+ * @author sun
+ * @date 2022-05-30
+ */
+public interface IZwywYljgSxxxService
+{
+    /**
+     * 查询养老机构失信信息
+     *
+     * @param id 养老机构失信信息主键
+     * @return 养老机构失信信息
+     */
+    public ZwywYljgSxxx selectZwywYljgSxxxById(String id);
+
+    /**
+     * 查询养老机构失信信息列表
+     *
+     * @param zwywYljgSxxx 养老机构失信信息
+     * @return 养老机构失信信息集合
+     */
+    public List<ZwywYljgSxxx> selectZwywYljgSxxxList(ZwywYljgSxxx zwywYljgSxxx);
+
+    /**
+     * 新增养老机构失信信息
+     *
+     * @param zwywYljgSxxx 养老机构失信信息
+     * @return 结果
+     */
+    public int insertZwywYljgSxxx(ZwywYljgSxxx zwywYljgSxxx);
+
+    /**
+     * 修改养老机构失信信息
+     *
+     * @param zwywYljgSxxx 养老机构失信信息
+     * @return 结果
+     */
+    public int updateZwywYljgSxxx(ZwywYljgSxxx zwywYljgSxxx);
+    public int startInstance(String id);
+    /**
+     * 批量删除养老机构失信信息
+     *
+     * @param ids 需要删除的养老机构失信信息主键集合
+     * @return 结果
+     */
+    public int deleteZwywYljgSxxxByIds(String[] ids);
+
+}

+ 140 - 0
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/service/impl/ZwywYljgSxxxServiceImpl.java

@@ -0,0 +1,140 @@
+package com.ruoyi.business.service.impl;
+
+import java.util.*;
+
+import com.ruoyi.business.domain.ZwywCyrySxxx;
+import com.ruoyi.business.mapper.SysDeptJlMapper;
+import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.core.utils.uuid.IdUtils;
+import com.ruoyi.ext.api.enums.PunishmentsStatus;
+import com.ruoyi.ext.api.enums.SysDeptJlStatus;
+import org.apache.commons.lang3.ObjectUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.ruoyi.business.mapper.ZwywYljgSxxxMapper;
+import com.ruoyi.business.domain.ZwywYljgSxxx;
+import com.ruoyi.business.service.IZwywYljgSxxxService;
+
+/**
+ * 养老机构失信信息Service业务层处理
+ *
+ * @author sun
+ * @date 2022-05-30
+ */
+@Service
+public class ZwywYljgSxxxServiceImpl implements IZwywYljgSxxxService
+{
+    @Autowired
+    private ZwywYljgSxxxMapper zwywYljgSxxxMapper;
+
+    @Autowired
+    private SysDeptJlMapper sysDeptJlMapper;
+
+    /**
+     * 查询养老机构失信信息
+     *
+     * @param id 养老机构失信信息主键
+     * @return 养老机构失信信息
+     */
+    @Override
+    public ZwywYljgSxxx selectZwywYljgSxxxById(String id)
+    {
+        ZwywYljgSxxx res = zwywYljgSxxxMapper.selectById(id);
+        List<String> xzqhCodes = new ArrayList<>();
+        List<String> xzqhNames = new ArrayList<>();
+        Map<String, Object> map = sysDeptJlMapper.selectJlDeptByParams(null, res.getSzxzqh());
+        if (ObjectUtils.isNotEmpty(map)) {
+            if (map.containsKey(SysDeptJlStatus.ID.getCode())) {
+                recursionParent(xzqhCodes, xzqhNames, map.get(SysDeptJlStatus.ID.getCode()).toString());
+                Collections.reverse(xzqhCodes);
+                Collections.reverse(xzqhNames);
+                xzqhCodes.remove(0);
+                xzqhNames.remove(0);
+                res.setSzxzqhIds(String.join(",", xzqhCodes));
+                res.setSzxzqhNames(String.join(" ", xzqhNames));
+            }
+        }
+        return res;
+    }
+
+    private void recursionParent(List<String> xzqhCodes, List<String> xzqhNames, String id) {
+        Map<String, Object> map = sysDeptJlMapper.selectJlDeptByParams(id, null);
+        if (ObjectUtils.isNotEmpty(map)) {
+            if (map.containsKey(SysDeptJlStatus.CODE.getCode()) && map.containsKey(SysDeptJlStatus.NAME.getCode())) {
+                xzqhCodes.add(map.get(SysDeptJlStatus.CODE.getCode()).toString());
+                xzqhNames.add(map.get(SysDeptJlStatus.NAME.getCode()).toString());
+            }
+            if (map.containsKey(SysDeptJlStatus.PARENTID.getCode())) {
+                if (!StringUtils.equals(map.get(SysDeptJlStatus.PARENTID.getCode()).toString(),
+                        SysDeptJlStatus.CHINESE.getCode())) {
+                    recursionParent(xzqhCodes, xzqhNames, map.get(SysDeptJlStatus.PARENTID.getCode()).toString());
+                }
+            }
+        }
+    }
+
+    /**
+     * 查询养老机构失信信息列表
+     *
+     * @param zwywYljgSxxx 养老机构失信信息
+     * @return 养老机构失信信息
+     */
+    @Override
+    public List<ZwywYljgSxxx> selectZwywYljgSxxxList(ZwywYljgSxxx zwywYljgSxxx)
+    {
+        return zwywYljgSxxxMapper.selectZwywYljgSxxxList(zwywYljgSxxx);
+    }
+
+    /**
+     * 新增养老机构失信信息
+     *
+     * @param zwywYljgSxxx 养老机构失信信息
+     * @return 结果
+     */
+    @Override
+    public int insertZwywYljgSxxx(ZwywYljgSxxx zwywYljgSxxx)
+    {
+        zwywYljgSxxx.setInstanceId(IdUtils.simpleUUID());
+        zwywYljgSxxx.setLzzt(PunishmentsStatus.TJ.getCode());
+        return zwywYljgSxxxMapper.insert(zwywYljgSxxx);
+    }
+
+    /**
+     * 修改养老机构失信信息
+     *
+     * @param zwywYljgSxxx 养老机构失信信息
+     * @return 结果
+     */
+    @Override
+    public int updateZwywYljgSxxx(ZwywYljgSxxx zwywYljgSxxx)
+    {
+        return zwywYljgSxxxMapper.updateById(zwywYljgSxxx);
+    }
+
+    @Override
+    public int startInstance(String id) {
+        ZwywYljgSxxx zwywYljgSxxx = zwywYljgSxxxMapper.selectById(id);
+        if (ObjectUtils.isNotEmpty(zwywYljgSxxx)) {
+            // 20220530 sun test start
+            zwywYljgSxxx.setInstanceId(IdUtils.simpleUUID());
+            // 20220530 sun test end
+            zwywYljgSxxx.setLzzt(PunishmentsStatus.RD.getCode());
+        }
+        return zwywYljgSxxxMapper.updateById(zwywYljgSxxx);
+    }
+
+    /**
+     * 批量删除养老机构失信信息
+     *
+     * @param ids 需要删除的养老机构失信信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteZwywYljgSxxxByIds(String[] ids)
+    {
+        return zwywYljgSxxxMapper.deleteBatchIds(Arrays.asList(ids));
+    }
+
+}

+ 54 - 0
ruoyi-modules/mz-business/src/main/resources/mapper/business/ZwywYljgSxxxMapper.xml

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.business.mapper.ZwywYljgSxxxMapper">
+
+    <resultMap type="ZwywYljgSxxx" id="ZwywYljgSxxxResult">
+        <result property="id"    column="id"    />
+        <result property="instanceId"    column="instance_id"    />
+        <result property="jgmc"    column="jgmc"    />
+        <result property="tyshxydm"    column="tyshxydm"    />
+        <result property="sjly"    column="sjly"    />
+        <result property="cjfs"    column="cjfs"    />
+        <result property="lzzt"    column="lzzt"    />
+        <result property="lxdh"    column="lxdh"    />
+        <result property="frxm"    column="frxm"    />
+        <result property="frzjlx"    column="frzjlx"    />
+        <result property="frzjhm"    column="frzjhm"    />
+        <result property="szxzqh"    column="szxzqh"    />
+        <result property="txdzms"    column="txdzms"    />
+        <result property="ms"    column="ms"    />
+        <result property="isCf"    column="is_cf"    />
+        <result property="cfbm"    column="cfbm"    />
+        <result property="cfrq"    column="cfrq"    />
+        <result property="cfyj"    column="cfyj"    />
+        <result property="cfnr"    column="cfnr"    />
+        <result property="sxxxXgcl"    column="sxxx_xgcl"    />
+        <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="createUnit"    column="create_unit"    />
+        <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"    />
+        <result property="state"    column="state"    />
+    </resultMap>
+
+    <select id="selectZwywYljgSxxxList" parameterType="ZwywYljgSxxx" resultMap="ZwywYljgSxxxResult">
+        select id, instance_id, jgmc, tyshxydm, getxzqhmcbycode(szxzqh) as szxzqh, sjly, lzzt, lxdh from zwyw_yljg_sxxx
+        <where>
+            state = '0'
+            <if test="jgmc != null and jgmc != ''"> and jgmc like concat('%', #{jgmc}, '%')</if>
+            <if test="tyshxydm != null and tyshxydm != ''"> and tyshxydm = #{tyshxydm}</if>
+            <if test="szxzqh != null and szxzqh != ''"> and szxzqh = #{szxzqh}</if>
+            <if test="sjly != null and sjly != ''"> and sjly = #{sjly}</if>
+            <if test="lzzt != null and lzzt != ''"> and lzzt = #{lzzt}</if>
+            <if test="lxdh != null and lxdh != ''"> and lxdh = #{lxdh}</if>
+        </where>
+    </select>
+</mapper>

+ 51 - 0
ruoyi-ui/src/api/business/lhcj/sxxx/yljgSxxx.js

@@ -0,0 +1,51 @@
+import request from '@/utils/request'
+
+// 查询养老机构失信信息列表
+export function listYljgSxxx(query) {
+  return request({
+    url: '/business/yljgSxxx/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询养老机构失信信息详细
+export function getYljgSxxx(id) {
+  return request({
+    url: '/business/yljgSxxx/' + id,
+    method: 'get'
+  })
+}
+
+export function startYljgSxxx(id) {
+  return request({
+    url: '/business/yljgSxxx/start/instance/' + id,
+    method: 'get'
+  })
+}
+
+// 新增养老机构失信信息
+export function addYljgSxxx(data) {
+  return request({
+    url: '/business/yljgSxxx',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改养老机构失信信息
+export function updateYljgSxxx(data) {
+  return request({
+    url: '/business/yljgSxxx',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除养老机构失信信息
+export function delYljgSxxx(id) {
+  return request({
+    url: '/business/yljgSxxx/' + id,
+    method: 'delete'
+  })
+}

+ 581 - 0
ruoyi-ui/src/views/business/lhcj/sxxx/yljgSxxx/index.vue

@@ -0,0 +1,581 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="136px">
+      <el-form-item label="机构名称" prop="jgmc">
+        <el-input
+          v-model="queryParams.jgmc"
+          placeholder="请输入机构名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="统一社会信用代码" prop="tyshxydm">
+        <el-input
+          v-model="queryParams.tyshxydm"
+          placeholder="请输入统一社会信用代码"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="所在区划" prop="xzqh">
+        <RegionCascaderSelect
+          v-model="xzqh"
+          style="width: 100%"
+          endLevel="2"
+          valueProp="code"
+          :isDataRoot="true"
+        ></RegionCascaderSelect>
+      </el-form-item>
+
+      <el-form-item label="数据来源" prop="sjly">
+        <el-select v-model="queryParams.sjly" placeholder="请选择数据来源" clearable>
+          <el-option
+            v-for="dict in dict.type.CH042"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="流转状态" prop="lzzt">
+        <el-select v-model="queryParams.lzzt" placeholder="请选择流转状态" clearable>
+          <el-option
+            v-for="dict in dict.type.CZ023"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="联系电话" prop="lxdh">
+        <el-input
+          v-model="queryParams.lxdh"
+          placeholder="请输入联系电话"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['business:yljgSxxx:add']"
+        >新增</el-button>
+      </el-col>
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['business:yljgSxxx:export']"
+        >导出</el-button>
+      </el-col> -->
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="yljgSxxxList" >
+      <el-table-column label="序号" align="center">
+        <template slot-scope="scope">
+          {{(queryParams.pageNum-1)*queryParams.pageSize + scope.$index + 1}}
+        </template>
+      </el-table-column>
+      <el-table-column label="机构名称" align="center" prop="jgmc" />
+      <el-table-column label="统一社会信用代码" align="center" prop="tyshxydm" />
+      <el-table-column label="所在区划" align="center" prop="szxzqh" />
+      <el-table-column label="数据来源" align="center" prop="sjly">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.CH042" :value="scope.row.sjly"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="流转状态" align="center" prop="lzzt">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.CZ023" :value="scope.row.lzzt"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="联系电话" align="center" prop="lxdh" />
+      <el-table-column label="操作" width="300" align="center" class-name="small-padding fixed-width" fixed="right">
+        <template slot-scope="scope">
+          <el-button
+          v-if="scope.row.lzzt == '00'"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['business:yljgSxxx:edit']"
+          >修改</el-button>
+          <el-button
+          v-if="scope.row.lzzt == '00'"
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row,scope.$index)"
+            v-hasPermi="['business:yljgSxxx:remove']"
+          >删除</el-button>
+          <el-button
+            v-if="scope.row.lzzt == '00'"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleStart(scope.row)"
+            v-hasPermi="['business:yljgSxxx:edit']"
+            >提交</el-button
+          >
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['business:yljgSxxx:query']"
+            >详情</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改养老机构失信信息对话框 -->
+    <el-dialog v-dialog-drag :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+
+        <el-form-item label="养老服务机构名称" prop="jgmc">
+          <el-input v-model="form.jgmc" placeholder="请输入机构名称" />
+        </el-form-item>
+
+        <el-form-item label="统一社会信用代码" prop="tyshxydm">
+          <el-input v-model="form.tyshxydm" placeholder="请输入统一社会信用代码" />
+        </el-form-item>
+
+<el-form-item label="法人(负责人)姓名" prop="frxm">
+          <el-input v-model="form.frxm" placeholder="请输入法定代表人姓名" />
+        </el-form-item>
+
+<el-form-item label="联系方式" prop="lxdh">
+          <el-input v-model="form.lxdh" placeholder="请输入联系方式" />
+        </el-form-item>
+ <el-form-item label="证件类型" prop="frzjlx">
+          <el-select v-model="form.frzjlx" placeholder="证件类型">
+            <el-option
+              v-for="dict in dict.type.C0015"
+              :key="dict.value"
+              :label="dict.label"
+:value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="证件号码" prop="frzjhm">
+          <el-input v-model="form.frzjhm" placeholder="请输入证件号码" />
+        </el-form-item>
+
+<el-form-item label="行政区划" prop="szxzqh">
+          <RegionCascaderSelect
+            v-model="form.szxzqh"
+            style="width: 100%"
+            valueProp="code"
+          ></RegionCascaderSelect>
+        </el-form-item>
+
+        <el-form-item label="通信地址" prop="txdzms">
+          <el-input v-model="form.txdzms" placeholder="请输入通信地址" />
+        </el-form-item>
+
+        <el-form-item label="来源途径" prop="sjly">
+          <el-select v-model="form.sjly" placeholder="请选择数据来源">
+            <el-option
+              v-for="dict in dict.type.CH042"
+              :key="dict.value"
+              :label="dict.label"
+:value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+
+        <!-- <el-form-item label="流转状态" prop="lzzt">
+          <el-select v-model="form.lzzt" placeholder="请选择流转状态">
+            <el-option
+              v-for="dict in dict.type.CZ023"
+              :key="dict.value"
+              :label="dict.label"
+:value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item> -->
+
+        
+
+        
+
+       
+
+        
+
+        <el-form-item label="失信信息描述" prop="ms">
+          <el-input v-model="form.ms" type="textarea" maxlength="500" show-word-limit placeholder="请输入失信信息描述" />
+        </el-form-item>
+
+        <el-form-item label="是否被处罚" prop="isCf">
+          <el-radio-group v-model="form.isCf">
+            <el-radio
+              v-for="dict in dict.type.CZ035"
+              :key="dict.value"
+:label="dict.value"
+            >{{dict.label}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+
+        <el-form-item label="相关材料" prop="sxxxXgcl">
+          <file-upload v-model="form.sxxxXgcl"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button
+          type="primary"
+          @click="submitForm"
+          :loading="submitFormLoading"
+          >暂 存
+        </el-button>
+        <el-button
+          type="primary"
+          @click="submitFormAndStart"
+          :loading="submitFormLoading"
+          >提 交
+        </el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listYljgSxxx, getYljgSxxx, delYljgSxxx, addYljgSxxx, updateYljgSxxx, startYljgSxxx } from "@/api/business/lhcj/sxxx/yljgSxxx";
+import { Regular,chineseOne, idCard } from '@/utils/regular'
+
+export default {
+  name: "YljgSxxx",
+  dicts: ['CH043', 'CH042', 'CZ035', 'CH036', 'C0015', 'CZ023'],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      submitFormLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 养老机构失信信息表格数据
+      yljgSxxxList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      xzqh: [],
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        jgmc: [
+          { required: true, message: "机构名称不能为空", trigger: "blur" },
+          { max: 100, message: '机构名称不能超过100个字符', trigger: 'blur'},
+        ],
+        tyshxydm: [
+          { required: true, message: "统一社会信用代码不能为空", trigger: "blur" },
+          { max: 18, message: '统一社会信用代码不能超过18个字符', trigger: 'blur'},
+        ],
+        sjly: [
+          { required: true, message: "数据来源不能为空", trigger: "change" },
+        ],
+        lzzt: [
+          { required: true, message: "流转状态不能为空", trigger: "change" },
+        ],
+        lxdh: [
+          { required: true, message: "联系电话不能为空", trigger: "blur" },
+          { max: 18, message: '联系电话不能超过18个字符', trigger: 'blur'},
+        ],
+        frxm: [
+          { required: true, message: "法定代表人姓名不能为空", trigger: "blur" },
+          { max: 72, message: '法定代表人姓名不能超过72个字符', trigger: 'blur'},
+          { validator: chineseOne, trigger: 'blur' },
+        ],
+        frzjlx: [
+          { required: true, message: "法定代表人证件类型不能为空", trigger: "change" },
+        ],
+        frzjhm: [
+          { required: true, message: "法定代表人公民身份号码不能为空", trigger: "blur" },
+          { validator: idCard, trigger: 'blur' },
+        ],
+        szxzqh: [
+          { required: true, message: "所在行政区划不能为空", trigger: "blur" },
+          // { max: 12, message: '所在行政区划不能超过12个字符', trigger: 'blur'},
+        ],
+        txdzms: [
+          { required: true, message: "通信地址不能为空", trigger: "blur" },
+          { max: 100, message: '通信地址不能超过100个字符', trigger: 'blur'},
+        ],
+        ms: [
+          { required: true, message: "失信信息描述不能为空", trigger: "blur" },
+        ],
+        isCf: [
+          { required: true, message: "是否被处罚不能为空", trigger: "blur" },
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询养老机构失信信息列表 */
+    getList() {
+      this.loading = true;
+      listYljgSxxx(this.queryParams).then(response => {
+        this.yljgSxxxList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.submitFormLoading =false;
+      this.form = {
+        id: null,
+        instanceId: null,
+        jgmc: null,
+        tyshxydm: null,
+        sjly: null,
+        cjfs: null,
+        lzzt: null,
+        lxdh: null,
+        frxm: null,
+        frzjlx: null,
+        frzjhm: null,
+        szxzqh: null,
+        txdzms: null,
+        ms: null,
+        isCf: "0",
+        cfbm: null,
+        cfrq: null,
+        cfyj: null,
+        cfnr: null,
+        sxxxXgcl: null,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      if (this.xzqh) {
+        this.queryParams.szxzqh = this.xzqh[this.xzqh.length - 1];
+      } else {
+        this.queryParams.szxzqh = null;
+      }
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.xzqh = [];
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加养老机构失信信息";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getYljgSxxx(id).then(response => {
+        this.form = response.data;
+        if (this.form.szxzqhIds) {
+          this.form.szxzqh = JSON.stringify(this.form.szxzqhIds.split(","));
+        } else {
+          this.form.szxzqh = "";
+        }
+        /****** sks 需要改动的地方 start ******/
+        this.copyForm=this.deepCopy(response.data)
+        /****** sks 需要改动的地方 end ******/
+        this.open = true;
+        this.title = "修改养老机构失信信息";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          this.submitFormLoading = true;
+          let szxzqh = "";
+          if (Array.isArray(this.form.szxzqh)) {
+            szxzqh = this.form.szxzqh[this.form.szxzqh.length - 1];
+          } else {
+            let data = JSON.parse(this.form.szxzqh);
+            szxzqh = data[data.length - 1];
+          }
+          this.form.szxzqh = szxzqh;
+          if (this.form.id != null) {
+            /****** sks 需要改动的地方 start ******/
+            let formData=this.comparisonObject(this.form,this.copyForm);
+            if(formData) {
+              updateYljgSxxx({...formData,id:this.form.id}).then(response => {
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                this.yljgSxxxList=this.dataReplacement(this.yljgSxxxList,this.form.id,formData);
+                // this.getList();
+              }).finally(()=>this.submitFormLoading =false);
+            }else{
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.submitFormLoading = false;
+            }
+            /****** sks 需要改动的地方 end ******/
+          } else {
+            addYljgSxxx(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              // this.getList();
+              /****** sks 需要改动的地方 start ******/
+              if (this.queryParams.pageSize===this.yljgSxxxList.length)
+              {
+                this.yljgSxxxList.pop();
+              }
+              this.yljgSxxxList.unshift({...this.form,id:response.data});
+              this.total++;
+              /****** sks 需要改动的地方 end ******/
+            }).finally(()=>this.submitFormLoading =false);
+          }
+        }
+      });
+    },
+    /** 提交按钮 */
+    submitFormAndStart() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          this.submitFormLoading = true;
+          let szxzqh = "";
+          if (Array.isArray(this.form.szxzqh)) {
+            szxzqh = this.form.szxzqh[this.form.szxzqh.length - 1];
+          } else {
+            let data = JSON.parse(this.form.szxzqh);
+            szxzqh = data[data.length - 1];
+          }
+          this.form.szxzqh = szxzqh;
+          if (this.form.id != null) {
+            /****** sks 需要改动的地方 start ******/
+            let formData=this.comparisonObject(this.form,this.copyForm);
+            if(formData) {
+              updateYljgSxxx({...formData,id:this.form.id}).then(response => {
+startYljgSxxx(this.form.id).then((res) => {
+                    this.$modal.msgSuccess("该信息已提交");
+                    // this.getList()
+                  });
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                this.yljgSxxxList=this.dataReplacement(this.yljgSxxxList,this.form.id,formData);
+                // this.getList();
+              }).finally(()=>this.submitFormLoading =false);
+            }else{
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.submitFormLoading = false;
+            }
+            /****** sks 需要改动的地方 end ******/
+          } else {
+            addYljgSxxx(this.form).then(response => {
+startYljgSxxx(response.data).then((res) => {
+                    this.$modal.msgSuccess("该信息已提交");
+                    // this.getList()
+                  });
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              // this.getList();
+              /****** sks 需要改动的地方 start ******/
+              if (this.queryParams.pageSize===this.yljgSxxxList.length)
+              {
+                this.yljgSxxxList.pop();
+              }
+              this.yljgSxxxList.unshift({...this.form,id:response.data});
+              this.total++;
+              /****** sks 需要改动的地方 end ******/
+            }).finally(()=>this.submitFormLoading =false);
+          }
+        }
+      });
+    },
+    handleStart(row) {
+      const id = row.id || this.ids;
+      startYljgSxxx(id).then((res) => {
+        this.$modal.msgSuccess("该信息已提交");
+        this.getList();
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row,index) {
+      const ids = row.id || this.ids;
+      const xh = (this.queryParams.pageNum-1)*this.queryParams.pageSize + index + 1;
+      this.$modal.confirm('确认删除' + this.changeDelData(row,'id','ID值',xh) + '的记录?').then(function() {
+        return delYljgSxxx(ids);
+      }).then(() => {
+        // this.getList();
+        /****** sks 需要改动的地方 ind参数需要传进来 start ******/
+        this.yljgSxxxList.splice(index,1);
+        if(this.yljgSxxxList.length===0)
+        {
+          this.getList();
+        }else {
+          this.total--;
+        }
+        this.$modal.msgSuccess("删除成功");
+        /****** sks 需要改动的地方 end ******/
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('business/yljgSxxx/export', {
+        ...this.queryParams
+      }, `yljgSxxx_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>