Explorar o código

政务业务-服务质量检查 与 部分BUG修改

sigezuishuai %!s(int64=2) %!d(string=hai) anos
pai
achega
275eb9a926
Modificáronse 19 ficheiros con 803 adicións e 95 borrados
  1. 12 0
      ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/YljgJcxxController.java
  2. 16 7
      ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywJgFwjcController.java
  3. 107 0
      ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywJgFwjcJcxxController.java
  4. 45 45
      ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/domain/ZwywJgFwjc.java
  5. 119 0
      ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/domain/ZwywJgFwjcJcxx.java
  6. 5 0
      ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/mapper/YljgKhJbxxMapper.java
  7. 15 0
      ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/mapper/ZwywJgFwjcJcxxMapper.java
  8. 13 1
      ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/mapper/ZwywJgFwjcMapper.java
  9. 54 0
      ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/service/IZwywJgFwjcJcxxService.java
  10. 2 1
      ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/service/IZwywJgFwjcService.java
  11. 84 0
      ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/service/impl/ZwywJgFwjcJcxxServiceImpl.java
  12. 117 22
      ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/service/impl/ZwywJgFwjcServiceImpl.java
  13. 1 0
      ruoyi-modules/mz-business/src/main/resources/mapper/business/YljgJcxxMapper.xml
  14. 3 0
      ruoyi-modules/mz-business/src/main/resources/mapper/business/YljgKhJbxxMapper.xml
  15. 58 0
      ruoyi-modules/mz-business/src/main/resources/mapper/business/ZwywJgFwjcJcxxMapper.xml
  16. 144 9
      ruoyi-modules/mz-business/src/main/resources/mapper/business/ZwywJgFwjcMapper.xml
  17. 3 0
      ruoyi-modules/mz-business/src/main/resources/mapper/business/ZwywLrJbxxMapper.xml
  18. 3 4
      ruoyi-modules/mz-business/src/main/resources/mapper/business/ZwywLrJgyyMapper.xml
  19. 2 6
      ruoyi-ui/src/views/business/fwjggl/jgfwjc/index.vue

+ 12 - 0
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/YljgJcxxController.java

@@ -42,6 +42,18 @@ public class YljgJcxxController extends BaseController
         return getDataTable(list);
     }
 
+    /**
+     * 服务检查机构信息列表
+     */
+    @RequiresPermissions("business:jcxx:fwjcList")
+    @GetMapping("/fwjcList")
+    public TableDataInfo fwjcList(YljgJcxx yljgJcxx)
+    {
+        startPage();
+        List<YljgJcxx> list = yljgJcxxService.selectYljgJcxxList(yljgJcxx);
+        return getDataTable(list);
+    }
+
     /**
      * 获取机构信息详细信息
      */

+ 16 - 7
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywJgFwjcController.java

@@ -28,10 +28,10 @@ import com.ruoyi.common.core.web.page.TableDataInfo;
  * 服务检查Controller
  *
  * @author CH
- * @date 2022-05-12
+ * @date 2022-06-13
  */
 @RestController
-@RequestMapping("/jgfwjc")
+@RequestMapping("/fwjc")
 public class ZwywJgFwjcController extends BaseController
 {
     @Autowired
@@ -40,7 +40,7 @@ public class ZwywJgFwjcController extends BaseController
     /**
      * 查询服务检查列表
      */
-    @RequiresPermissions("business:jgfwjc:list")
+    @RequiresPermissions("business:fwjc:list")
     @GetMapping("/list")
     public TableDataInfo list(ZwywJgFwjc zwywJgFwjc)
     {
@@ -49,10 +49,19 @@ public class ZwywJgFwjcController extends BaseController
         return getDataTable(list);
     }
 
+    /** 服务检查 */
+    @RequiresPermissions("business:fwjc:checkJgFwJc")
+    @GetMapping("/checkJgFwJc")
+    public AjaxResult checkJgFwJcInfo(ZwywJgFwjc zwywJgFwjc)
+    {
+        ZwywJgFwjc list = zwywJgFwjcService.checkJgFwJc(zwywJgFwjc);
+        return AjaxResult.success(list);
+    }
+
     /**
      * 获取服务检查详细信息
      */
-    @RequiresPermissions("business:jgfwjc:query")
+    @RequiresPermissions("business:fwjc:query")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") String id)
     {
@@ -62,7 +71,7 @@ public class ZwywJgFwjcController extends BaseController
     /**
      * 新增服务检查
      */
-    @RequiresPermissions("business:jgfwjc:add")
+    @RequiresPermissions("business:fwjc:add")
     @Log(title = "服务检查", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@Validated({AddGroup.class}) @RequestBody ZwywJgFwjc zwywJgFwjc)
@@ -73,7 +82,7 @@ public class ZwywJgFwjcController extends BaseController
     /**
      * 修改服务检查
      */
-    @RequiresPermissions("business:jgfwjc:edit")
+    @RequiresPermissions("business:fwjc:edit")
     @Log(title = "服务检查", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@Validated @RequestBody ZwywJgFwjc zwywJgFwjc)
@@ -84,7 +93,7 @@ public class ZwywJgFwjcController extends BaseController
     /**
      * 删除服务检查
      */
-    @RequiresPermissions("business:jgfwjc:remove")
+    @RequiresPermissions("business:fwjc:remove")
     @Log(title = "服务检查", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable String[] ids)

+ 107 - 0
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/controller/ZwywJgFwjcJcxxController.java

@@ -0,0 +1,107 @@
+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.ZwywJgFwjcJcxx;
+import com.ruoyi.business.service.IZwywJgFwjcJcxxService;
+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 CH
+ * @date 2022-06-13
+ */
+@RestController
+@RequestMapping("/fwjcJcxx")
+public class ZwywJgFwjcJcxxController extends BaseController
+{
+    @Autowired
+    private IZwywJgFwjcJcxxService zwywJgFwjcJcxxService;
+
+    /**
+     * 查询服务质量检查子项信息列表
+     */
+    @RequiresPermissions("business:fwjcJcxx:list")
+    @GetMapping("/list")
+    public TableDataInfo list(ZwywJgFwjcJcxx zwywJgFwjcJcxx)
+    {
+        startPage();
+        List<ZwywJgFwjcJcxx> list = zwywJgFwjcJcxxService.selectZwywJgFwjcJcxxList(zwywJgFwjcJcxx);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出服务质量检查子项信息列表
+     */
+    @RequiresPermissions("business:fwjcJcxx:export")
+    @Log(title = "服务质量检查子项信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ZwywJgFwjcJcxx zwywJgFwjcJcxx)
+    {
+        List<ZwywJgFwjcJcxx> list = zwywJgFwjcJcxxService.selectZwywJgFwjcJcxxList(zwywJgFwjcJcxx);
+        ExcelUtil<ZwywJgFwjcJcxx> util = new ExcelUtil<ZwywJgFwjcJcxx>(ZwywJgFwjcJcxx.class);
+        util.exportExcel(response, list, "服务质量检查子项信息数据");
+    }
+
+    /**
+     * 获取服务质量检查子项信息详细信息
+     */
+    @RequiresPermissions("business:fwjcJcxx:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id)
+    {
+        return AjaxResult.success(zwywJgFwjcJcxxService.selectZwywJgFwjcJcxxById(id));
+    }
+
+    /**
+     * 新增服务质量检查子项信息
+     */
+    @RequiresPermissions("business:fwjcJcxx:add")
+    @Log(title = "服务质量检查子项信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated({AddGroup.class}) @RequestBody ZwywJgFwjcJcxx zwywJgFwjcJcxx)
+    {
+        return toAjax(zwywJgFwjcJcxxService.insertZwywJgFwjcJcxx(zwywJgFwjcJcxx),zwywJgFwjcJcxx.getId());
+    }
+
+    /**
+     * 修改服务质量检查子项信息
+     */
+    @RequiresPermissions("business:fwjcJcxx:edit")
+    @Log(title = "服务质量检查子项信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody ZwywJgFwjcJcxx zwywJgFwjcJcxx)
+    {
+        return toAjax(zwywJgFwjcJcxxService.updateZwywJgFwjcJcxx(zwywJgFwjcJcxx));
+    }
+
+    /**
+     * 删除服务质量检查子项信息
+     */
+    @RequiresPermissions("business:fwjcJcxx:remove")
+    @Log(title = "服务质量检查子项信息", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String[] ids)
+    {
+        return toAjax(zwywJgFwjcJcxxService.deleteZwywJgFwjcJcxxByIds(ids));
+    }
+}

+ 45 - 45
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/domain/ZwywJgFwjc.java

@@ -2,6 +2,7 @@ package com.ruoyi.business.domain;
 
 import com.baomidou.mybatisplus.annotation.*;
 import com.ruoyi.ext.api.validate.*;
+import com.ruoyi.organization.domain.YljgJcxmxx;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
@@ -9,18 +10,29 @@ 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;
+import java.util.List;
 
 /**
  * 服务检查对象 zwyw_jg_fwjc
  *
  * @author CH
- * @date 2022-05-12
+ * @date 2022-06-13
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
@@ -33,7 +45,7 @@ public class ZwywJgFwjc extends BaseEntity
 
     /** 主键标识 */
     @Excel(name = "主键标识")
-//    @TableId(value = "id",type = IdType.ASSIGN_UUID)
+    @TableId(value = "id",type = IdType.ASSIGN_UUID)
     @ApiModelProperty(value = "主键标识")
     private String id;
 
@@ -42,57 +54,45 @@ public class ZwywJgFwjc extends BaseEntity
     @ApiModelProperty(value = "机构id")
     private String jgId;
 
-    /** 序号 */
-    @Excel(name = "序号")
-    @ApiModelProperty(value = "序号")
-    @Range(min=0,max=100,message = "{序号}")
-    @NumberV(message = "{序号}")
-    private String zbXh;
-
-    /** 检查名称 */
-    @Excel(name = "检查名称")
-    @ApiModelProperty(value = "检查名称")
-    @Size(max = 200, message = "{检查名称}")
-
-    private String jcMc;
-
-    /** 是否为重点项 */
-    @Excel(name = "是否为重点项")
-    @ApiModelProperty(value = "是否为重点项")
-    @DictV(type = "XZ037",message = "{是否为重点项}")
-    private String isZdx;
+    /** 检查次数 */
+    @Excel(name = "检查次数")
+    @ApiModelProperty(value = "检查次数")
+    @NumberV(message = "{检查次数}")
+    private Integer jcCs;
 
-    /** 检查细则 */
-    @Excel(name = "检查细则")
-    @ApiModelProperty(value = "检查细则")
-    @Size(max = 500, message = "{检查细则}")
+    /** 题目适用对象 */
+    @Excel(name = "题目适用对象")
+    @ApiModelProperty(value = "题目适用对象")
+    private String tmsydx;
 
-    private String jcXz;
+    /** 状态 */
+    @Excel(name = "状态")
+    @ApiModelProperty(value = "状态")
+    @DictV(type = "CZ035",message = "{是否提交}")
+    private String zt;
 
-    /** 检查方式 */
-    @Excel(name = "检查方式")
-    @ApiModelProperty(value = "检查方式")
-    @Size(max = 100, message = "{检查方式}")
+    /** 检查信息信息 */
+    @TableField(exist = false)
+    private List<ZwywJgFwjcJcxx> zwywJgFwjcJcxxList;
 
-    private String jcFs;
+    @ApiModelProperty(value = "机构名称")
+    @TableField(exist = false)
+    private String jgmc;
 
-    /** 检查结果 */
-    @Excel(name = "检查结果")
-    @ApiModelProperty(value = "检查结果")
-    @DictV(type = "XZ032",message = "{检查结果}")
-    private String jcJg;
+    @ApiModelProperty(value = "填报人")
+    @TableField(exist = false)
+    private String tbr;
 
-    /** 相关材料 */
-    @Excel(name = "相关材料")
-    @ApiModelProperty(value = "相关材料")
-    @Size(max = 500, message = "{相关材料}")
-    private String jcXgcl;
+    @ApiModelProperty(value = "填报日期")
+    @TableField(exist = false)
+    private String tbrq;
 
-    /** 检查次数 */
-    @ApiModelProperty(value = "检查次数")
-    private Integer jcCs;
+    @ApiModelProperty(value = "重点项是否清零")
+    @TableField(exist = false)
+    private String zdxsfql;
 
+    @ApiModelProperty(value = "符合数")
     @TableField(exist = false)
-    private String tmsydx;
+    private String fhs;
 
 }

+ 119 - 0
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/domain/ZwywJgFwjcJcxx.java

@@ -0,0 +1,119 @@
+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;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 服务质量检查子项信息对象 zwyw_jg_fwjc_jcxx
+ *
+ * @author CH
+ * @date 2022-06-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@TableName("zwyw_jg_fwjc_jcxx")
+@ApiModel("服务质量检查子项信息")
+public class ZwywJgFwjcJcxx 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")
+    private String fwjcId;
+
+    /** 序号 */
+    @Excel(name = "序号")
+    @ApiModelProperty(value = "序号")
+    @Range(min=0,max=100,message = "{序号}")
+    @NumberV(message = "{序号}")
+    private String zbXh;
+
+    /** 检查名称 */
+    @Excel(name = "检查名称")
+    @ApiModelProperty(value = "检查名称")
+    @Size(max = 100, message = "{检查名称}")
+
+    private String jcMc;
+
+    /** 是否为重点项 */
+    @Excel(name = "是否为重点项")
+    @ApiModelProperty(value = "是否为重点项")
+    @DictV(type = "CZ035",message = "{是否为重点项}")
+    private String isZdx;
+
+    /** 检查细则 */
+    @Excel(name = "检查细则")
+    @ApiModelProperty(value = "检查细则")
+    @Size(max = 200, message = "{检查细则}")
+
+    private String jcXz;
+
+    /** 检查方式 */
+    @Excel(name = "检查方式")
+    @ApiModelProperty(value = "检查方式")
+    @Size(max = 100, message = "{检查方式}")
+
+    private String jcFs;
+
+    /** 检查结果 */
+    @Excel(name = "检查结果")
+    @ApiModelProperty(value = "检查结果")
+    @DictV(type = "XZ032", isMuti = true, message = "{检查结果}")
+    private String jcJg;
+
+    /** 答案信息 */
+    @Excel(name = "答案信息")
+    @ApiModelProperty(value = "答案信息")
+    @DictV(type = "XZ032", message = "{答案信息}")
+    private String daxx;
+
+    /** 前一次答案信息 */
+    @TableField(exist = false)
+    private String beforeDaxx;
+
+    /** 相关材料 */
+    @Excel(name = "相关材料")
+    @ApiModelProperty(value = "相关材料")
+    @Size(max = 500, message = "{相关材料}")
+    private String jcXgcl;
+
+    @TableField(exist = false)
+    private String label;
+
+    @TableField(exist = false)
+    private List<Map<String,Object>> config;
+
+}

+ 5 - 0
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/mapper/YljgKhJbxxMapper.java

@@ -59,4 +59,9 @@ public interface YljgKhJbxxMapper extends BaseMapperPlus<YljgKhJbxx>
     public List<YljgKhJbxx> selectYljgKhJbxxPage(List<String> pageIdList);
 
     public List<YljgKhJbxx> selectYljgKhJbxxSqPage(List<String> pageIdList);
+
+
+    public long selectYljgKhJbxxCountByJgId(YljgKhJbxx yljgKhJbxx);
+    public List<String> selectYljgKhJbxxPageIdListByJgId(YljgKhJbxx yljgKhJbxx);
+
 }

+ 15 - 0
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/mapper/ZwywJgFwjcJcxxMapper.java

@@ -0,0 +1,15 @@
+package com.ruoyi.business.mapper;
+
+import java.util.List;
+import com.ruoyi.business.domain.ZwywJgFwjcJcxx;
+import com.ruoyi.common.datascope.utils.BaseMapperPlus;
+
+/**
+ * 服务质量检查子项信息Mapper接口
+ *
+ * @author CH
+ * @date 2022-06-13
+ */
+public interface ZwywJgFwjcJcxxMapper extends BaseMapperPlus<ZwywJgFwjcJcxx> {
+    public int updateZwywJgFwjcJcxx(ZwywJgFwjcJcxx zwywJgFwjcJcxx);
+}

+ 13 - 1
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/mapper/ZwywJgFwjcMapper.java

@@ -2,14 +2,26 @@ package com.ruoyi.business.mapper;
 
 import java.util.List;
 import com.ruoyi.business.domain.ZwywJgFwjc;
+import com.ruoyi.business.domain.ZwywJgFwjcJcxx;
 import com.ruoyi.common.datascope.utils.BaseMapperPlus;
 
 /**
  * 服务检查Mapper接口
  *
  * @author CH
- * @date 2022-05-12
+ * @date 2022-06-13
  */
 public interface ZwywJgFwjcMapper extends BaseMapperPlus<ZwywJgFwjc> {
+
     public String selectMaxJcCs();
+
+    public ZwywJgFwjc selectZwywJgFwJcById(String id);
+
+    public ZwywJgFwjc selectZwywJgFwjcByJcCs(ZwywJgFwjc zwywJgFwjc);
+
+    public List<ZwywJgFwjc> selectZwywJgFwjcList(ZwywJgFwjc zwywJgFwjc);
+
+
+    public int batchZwywJgFwjcJcxx(List<ZwywJgFwjcJcxx> zwywJgFwjcJcxxList);
+
 }

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

@@ -0,0 +1,54 @@
+package com.ruoyi.business.service;
+
+import java.util.List;
+import com.ruoyi.business.domain.ZwywJgFwjcJcxx;
+
+/**
+ * 服务质量检查子项信息Service接口
+ * 
+ * @author CH
+ * @date 2022-06-13
+ */
+public interface IZwywJgFwjcJcxxService 
+{
+    /**
+     * 查询服务质量检查子项信息
+     * 
+     * @param id 服务质量检查子项信息主键
+     * @return 服务质量检查子项信息
+     */
+    public ZwywJgFwjcJcxx selectZwywJgFwjcJcxxById(String id);
+
+    /**
+     * 查询服务质量检查子项信息列表
+     * 
+     * @param zwywJgFwjcJcxx 服务质量检查子项信息
+     * @return 服务质量检查子项信息集合
+     */
+    public List<ZwywJgFwjcJcxx> selectZwywJgFwjcJcxxList(ZwywJgFwjcJcxx zwywJgFwjcJcxx);
+
+    /**
+     * 新增服务质量检查子项信息
+     * 
+     * @param zwywJgFwjcJcxx 服务质量检查子项信息
+     * @return 结果
+     */
+    public int insertZwywJgFwjcJcxx(ZwywJgFwjcJcxx zwywJgFwjcJcxx);
+
+    /**
+     * 修改服务质量检查子项信息
+     * 
+     * @param zwywJgFwjcJcxx 服务质量检查子项信息
+     * @return 结果
+     */
+    public int updateZwywJgFwjcJcxx(ZwywJgFwjcJcxx zwywJgFwjcJcxx);
+
+    /**
+     * 批量删除服务质量检查子项信息
+     * 
+     * @param ids 需要删除的服务质量检查子项信息主键集合
+     * @return 结果
+     */
+    public int deleteZwywJgFwjcJcxxByIds(String[] ids);
+
+}

+ 2 - 1
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/service/IZwywJgFwjcService.java

@@ -7,7 +7,7 @@ import com.ruoyi.business.domain.ZwywJgFwjc;
  * 服务检查Service接口
  *
  * @author CH
- * @date 2022-05-12
+ * @date 2022-06-13
  */
 public interface IZwywJgFwjcService
 {
@@ -18,6 +18,7 @@ public interface IZwywJgFwjcService
      * @return 服务检查
      */
     public ZwywJgFwjc selectZwywJgFwjcById(String id);
+    public ZwywJgFwjc checkJgFwJc(ZwywJgFwjc zwywJgFwjc);
 
     /**
      * 查询服务检查列表

+ 84 - 0
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/service/impl/ZwywJgFwjcJcxxServiceImpl.java

@@ -0,0 +1,84 @@
+package com.ruoyi.business.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Arrays;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.ruoyi.business.mapper.ZwywJgFwjcJcxxMapper;
+import com.ruoyi.business.domain.ZwywJgFwjcJcxx;
+import com.ruoyi.business.service.IZwywJgFwjcJcxxService;
+
+/**
+ * 服务质量检查子项信息Service业务层处理
+ * 
+ * @author CH
+ * @date 2022-06-13
+ */
+@Service
+public class ZwywJgFwjcJcxxServiceImpl implements IZwywJgFwjcJcxxService 
+{
+    @Autowired
+    private ZwywJgFwjcJcxxMapper zwywJgFwjcJcxxMapper;
+
+    /**
+     * 查询服务质量检查子项信息
+     * 
+     * @param id 服务质量检查子项信息主键
+     * @return 服务质量检查子项信息
+     */
+    @Override
+    public ZwywJgFwjcJcxx selectZwywJgFwjcJcxxById(String id)
+    {
+        return zwywJgFwjcJcxxMapper.selectById(id);
+    }
+
+    /**
+     * 查询服务质量检查子项信息列表
+     * 
+     * @param zwywJgFwjcJcxx 服务质量检查子项信息
+     * @return 服务质量检查子项信息
+     */
+    @Override
+    public List<ZwywJgFwjcJcxx> selectZwywJgFwjcJcxxList(ZwywJgFwjcJcxx zwywJgFwjcJcxx)
+    {
+        return zwywJgFwjcJcxxMapper.selectList(new LambdaQueryWrapper<>(zwywJgFwjcJcxx));
+    }
+
+    /**
+     * 新增服务质量检查子项信息
+     * 
+     * @param zwywJgFwjcJcxx 服务质量检查子项信息
+     * @return 结果
+     */
+    @Override
+    public int insertZwywJgFwjcJcxx(ZwywJgFwjcJcxx zwywJgFwjcJcxx)
+    {
+        return zwywJgFwjcJcxxMapper.insert(zwywJgFwjcJcxx);
+    }
+
+    /**
+     * 修改服务质量检查子项信息
+     * 
+     * @param zwywJgFwjcJcxx 服务质量检查子项信息
+     * @return 结果
+     */
+    @Override
+    public int updateZwywJgFwjcJcxx(ZwywJgFwjcJcxx zwywJgFwjcJcxx)
+    {
+        return zwywJgFwjcJcxxMapper.updateById(zwywJgFwjcJcxx);
+    }
+
+    /**
+     * 批量删除服务质量检查子项信息
+     * 
+     * @param ids 需要删除的服务质量检查子项信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteZwywJgFwjcJcxxByIds(String[] ids)
+    {
+        return zwywJgFwjcJcxxMapper.deleteBatchIds(Arrays.asList(ids));
+    }
+
+}

+ 117 - 22
ruoyi-modules/mz-business/src/main/java/com/ruoyi/business/service/impl/ZwywJgFwjcServiceImpl.java

@@ -1,14 +1,21 @@
 package com.ruoyi.business.service.impl;
 
-import java.util.List;
+import java.sql.Array;
+import java.util.*;
 
+import com.ruoyi.business.domain.DjpdSq;
+import com.ruoyi.business.domain.ZwywJgFwjcJcxx;
 import com.ruoyi.business.mapper.SysJgFwzljcMapper;
+import com.ruoyi.business.mapper.ZwywJgFwjcJcxxMapper;
+import com.ruoyi.common.core.exception.ServiceException;
+import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.uuid.IdUtils;
 import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.organization.domain.YljgJcxmxx;
 import com.ruoyi.system.domain.SysJgFwzljc;
+import org.apache.poi.ss.formula.ptg.AreaErrPtg;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import java.util.Arrays;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ruoyi.business.mapper.ZwywJgFwjcMapper;
 import com.ruoyi.business.domain.ZwywJgFwjc;
@@ -19,18 +26,19 @@ import org.springframework.transaction.annotation.Transactional;
  * 服务检查Service业务层处理
  *
  * @author CH
- * @date 2022-05-12
+ * @date 2022-06-13
  */
 @Service
 public class ZwywJgFwjcServiceImpl implements IZwywJgFwjcService
 {
     @Autowired
     private ZwywJgFwjcMapper zwywJgFwjcMapper;
+    @Autowired
+    private ZwywJgFwjcJcxxMapper zwywJgFwjcJcxxMapper;
 
     @Autowired
     private SysJgFwzljcMapper sysJgFwzljcMapper;
 
-
     /**
      * 查询服务检查
      *
@@ -40,7 +48,64 @@ public class ZwywJgFwjcServiceImpl implements IZwywJgFwjcService
     @Override
     public ZwywJgFwjc selectZwywJgFwjcById(String id)
     {
-        return zwywJgFwjcMapper.selectById(id);
+        return zwywJgFwjcMapper.selectZwywJgFwJcById(id);
+    }
+
+    @Override
+    public ZwywJgFwjc checkJgFwJc(ZwywJgFwjc zwywJgFwjc)
+    {
+        String jgId = zwywJgFwjc.getJgId();
+        ZwywJgFwjc fwjc = new ZwywJgFwjc();
+        fwjc.setJgId(jgId);
+        fwjc.setZt("0"); // 未提交
+        List<ZwywJgFwjc> zwywJgFwjcs = zwywJgFwjcMapper.selectZwywJgFwjcList(fwjc);
+        ZwywJgFwjc list;
+        if(zwywJgFwjcs.size() == 0){
+            insertZwywJgFwjc(zwywJgFwjc);
+            list = zwywJgFwjcMapper.selectZwywJgFwJcById(zwywJgFwjc.getId());
+        }else { // 该机构 存在 暂未提交的质量检查
+            if(zwywJgFwjcs.size()==1){
+                list = zwywJgFwjcMapper.selectZwywJgFwJcById(zwywJgFwjcs.get(0).getId());
+            }else{
+                throw new ServiceException("有多条重复【未提交】的质量检查信息,请联系管理员(CH)");
+            }
+        }
+
+        Integer jcCs = list.getJcCs();
+        List<ZwywJgFwjcJcxx> beforeJcxx = null;
+        if(!jcCs.equals(1)){
+            ZwywJgFwjc beforeFwjc = new ZwywJgFwjc();
+            beforeFwjc.setJgId(jgId);
+            beforeFwjc.setJcCs(jcCs-1); // 未提交
+            beforeJcxx = zwywJgFwjcMapper.selectZwywJgFwjcByJcCs(beforeFwjc).getZwywJgFwjcJcxxList();
+        }
+
+        // 根据前端需求做数据处理
+        List<ZwywJgFwjcJcxx> jcxxList = list.getZwywJgFwjcJcxxList();
+
+        for (ZwywJgFwjcJcxx zwywJgFwjcJcxx : jcxxList) {
+            String[] str = zwywJgFwjcJcxx.getJcJg().split(",");
+            String[] label = zwywJgFwjcJcxx.getLabel().split(",");
+            List<Map<String,Object>> mapList = new ArrayList<>();
+            for (int i = 0; i < str.length; i++) {
+                Map<String,Object> map = new HashMap<>();
+                map.put("label",label[i]);
+                map.put("value",str[i]);
+                mapList.add(map);
+            }
+            if(beforeJcxx != null){
+                for (ZwywJgFwjcJcxx jcxx : beforeJcxx) {
+                    if(zwywJgFwjcJcxx.getZbXh().equals(jcxx.getZbXh())){
+                        zwywJgFwjcJcxx.setBeforeDaxx(jcxx.getJcJg());
+                    }
+                }
+            }else{
+                zwywJgFwjcJcxx.setBeforeDaxx(null);
+            }
+            zwywJgFwjcJcxx.setConfig(mapList);
+        }
+
+        return list;
     }
 
     /**
@@ -65,23 +130,24 @@ public class ZwywJgFwjcServiceImpl implements IZwywJgFwjcService
     @Override
     public int insertZwywJgFwjc(ZwywJgFwjc zwywJgFwjc)
     {
-        // 前端需要传2个值;1:机构id 2:题目适用对象(是敬老院,还是养老院)
-        SysJgFwzljc sysJgFwzljc = new SysJgFwzljc();
-        sysJgFwzljc.setZt("1");
-        sysJgFwzljc.setTmsydx(zwywJgFwjc.getTmsydx());
-
-        List<SysJgFwzljc> rules = sysJgFwzljcMapper.selectJgFwljc(sysJgFwzljc);
-
-        zwywJgFwjc.setJcCs(Integer.parseInt(zwywJgFwjcMapper.selectMaxJcCs())+1);
-        for(int i=0,len=rules.size();i<len;i++){
-            zwywJgFwjc.setId(IdUtils.simpleUUID());
-            zwywJgFwjc.setZbXh(rules.get(i).getXh());
-            zwywJgFwjc.setJcMc(rules.get(i).getJcMc());
-            zwywJgFwjc.setIsZdx(rules.get(i).getIsZdx());
-            zwywJgFwjc.setJcXz(rules.get(i).getJcXz());
-            zwywJgFwjc.setJcFs(rules.get(i).getJcFs());
-            zwywJgFwjc.setJcJg(rules.get(i).getJcJg());
-            zwywJgFwjcMapper.insert(zwywJgFwjc);
+        // insert的条件是:该机构的质量检查,不存在【暂未提交】的状态
+        ZwywJgFwjc jgfwzc = new ZwywJgFwjc();
+        jgfwzc.setJgId(zwywJgFwjc.getJgId());
+        jgfwzc.setZt("0");
+        Long count = zwywJgFwjcMapper.selectCount(new LambdaQueryWrapper<>(jgfwzc));
+        if(count==0L){ // 不存在暂未提交的质量检查
+            // 前端需要传2个值;1:机构id 2:题目适用对象(是敬老院,还是养老院)
+            String maxJcCs = zwywJgFwjcMapper.selectMaxJcCs();
+            Integer int11;
+            if(StringUtils.isNotNull(maxJcCs)){
+                int11 = Integer.parseInt(maxJcCs)+1;
+            }else{
+                int11 = 1;
+            }
+            zwywJgFwjc.setJcCs(int11);
+            int rows =  zwywJgFwjcMapper.insert(zwywJgFwjc);
+            insertZwywJgFwjcJcxx(zwywJgFwjc);
+            return rows;
         }
         return 1;
     }
@@ -95,6 +161,9 @@ public class ZwywJgFwjcServiceImpl implements IZwywJgFwjcService
     @Override
     public int updateZwywJgFwjc(ZwywJgFwjc zwywJgFwjc)
     {
+        if(zwywJgFwjc.getZwywJgFwjcJcxxList() != null){
+            zwywJgFwjc.getZwywJgFwjcJcxxList().forEach(item->zwywJgFwjcJcxxMapper.updateZwywJgFwjcJcxx(item));
+        }
         return zwywJgFwjcMapper.updateById(zwywJgFwjc);
     }
 
@@ -110,4 +179,30 @@ public class ZwywJgFwjcServiceImpl implements IZwywJgFwjcService
         return zwywJgFwjcMapper.deleteBatchIds(Arrays.asList(ids));
     }
 
+    public void insertZwywJgFwjcJcxx(ZwywJgFwjc zwywJgFwjc){
+
+        SysJgFwzljc sysJgFwzljc = new SysJgFwzljc();
+        sysJgFwzljc.setZt("1");
+        sysJgFwzljc.setTmsydx(zwywJgFwjc.getTmsydx());
+        List<SysJgFwzljc> rules = sysJgFwzljcMapper.selectJgFwljc(sysJgFwzljc);
+
+        List<ZwywJgFwjcJcxx> list = new ArrayList<ZwywJgFwjcJcxx>();
+        for(int i=0,len=rules.size();i<len;i++){
+            ZwywJgFwjcJcxx zwywJgFwjcJcxx = new ZwywJgFwjcJcxx(); // CHProblem-对象实例化放外面与放在循环内 赋值fwjcId,导致list的结果不;前者是115条相同的序号为115的规则信息;后者没问题。先实现,后续看下出现这个问题原因。2022-6-14 10:44:07
+            zwywJgFwjcJcxx.setId(IdUtils.simpleUUID());
+            zwywJgFwjcJcxx.setFwjcId(zwywJgFwjc.getId());
+            zwywJgFwjcJcxx.setZbXh(rules.get(i).getXh());
+            zwywJgFwjcJcxx.setJcMc(rules.get(i).getJcMc());
+            zwywJgFwjcJcxx.setIsZdx(rules.get(i).getIsZdx());
+            zwywJgFwjcJcxx.setJcXz(rules.get(i).getJcXz());
+            zwywJgFwjcJcxx.setJcFs(rules.get(i).getJcFs());
+            zwywJgFwjcJcxx.setJcJg(rules.get(i).getJcJg());
+            list.add(zwywJgFwjcJcxx);
+        }
+        if (list.size() > 0)
+        {
+            zwywJgFwjcMapper.batchZwywJgFwjcJcxx(list);
+        }
+    }
+
 }

+ 1 - 0
ruoyi-modules/mz-business/src/main/resources/mapper/business/YljgJcxxMapper.xml

@@ -107,6 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
         <sql id="selectYljgJcxxVo">
             select
+            getxzqhmcbycode(ssxzqh) as ssxzqh_name,
             getxzqhmcbycode(szxzqh) as szxzqh_name,
             a.id, a.zzjgdm, a.tyshxydm, a.jgmc, a.jlrq, a.czyy, a.czsj,
             a.ssxzqh, a.szxzqh, a.txdz, a.frxm, a.frlxfs, a.frzjlx, a.frzjhm, a.frdjjg, a.frlx,

+ 3 - 0
ruoyi-modules/mz-business/src/main/resources/mapper/business/YljgKhJbxxMapper.xml

@@ -263,6 +263,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND create_user_type = '01'
             <if test="xm != null  and xm != ''"> and xm like concat('%', #{xm}, '%')</if>
             <if test="zjhm != null  and zjhm != ''"> and zjhm = #{zjhm}</if>
+            <if test="jgId != null  and jgId != ''"> and jg_id = #{jgId}</if>
             <if test="(jgmc != null and jgmc != '') and (xzqhId != null  and xzqhId != '')">
                 AND jg_id IN (select id from yljg_jcxx where szxzqh IN (
                 SELECT
@@ -336,6 +337,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND create_user_type = '01'
             <if test="xm != null  and xm != ''"> and xm like concat('%', #{xm}, '%')</if>
             <if test="zjhm != null  and zjhm != ''"> and zjhm = #{zjhm}</if>
+            <if test="jgId != null  and jgId != ''"> and jg_id = #{jgId}</if>
             <if test="(jgmc != null and jgmc != '') and (xzqhId != null  and xzqhId != '')">
                 AND jg_id IN (select id from yljg_jcxx where szxzqh IN (
                 SELECT
@@ -421,4 +423,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             </foreach>
         </where>
     </select>
+
 </mapper>

+ 58 - 0
ruoyi-modules/mz-business/src/main/resources/mapper/business/ZwywJgFwjcJcxxMapper.xml

@@ -0,0 +1,58 @@
+<?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.ZwywJgFwjcJcxxMapper">
+
+    <resultMap type="ZwywJgFwjcJcxx" id="ZwywJgFwjcJcxxResult">
+        <result property="id"    column="id"    />
+        <result property="fwjcId"    column="fwjc_id"    />
+        <result property="zbXh"    column="zb_xh"    />
+        <result property="jcMc"    column="jc_mc"    />
+        <result property="isZdx"    column="is_zdx"    />
+        <result property="jcXz"    column="jc_xz"    />
+        <result property="jcFs"    column="jc_fs"    />
+        <result property="jcJg"    column="jc_jg"    />
+        <result property="jcXgcl"    column="jc_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>
+
+    <update id="updateZwywJgFwjcJcxx" parameterType="ZwywJgFwjcJcxx">
+        update zwyw_jg_fwjc_jcxx
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="fwjcId != null">fwjc_id = #{fwjcId},</if>
+            <if test="zbXh != null">zb_xh = #{zbXh},</if>
+            <if test="jcMc != null">jc_mc = #{jcMc},</if>
+            <if test="isZdx != null">is_zdx = #{isZdx},</if>
+            <if test="jcXz != null">jc_xz = #{jcXz},</if>
+            <if test="jcFs != null">jc_fs = #{jcFs},</if>
+            <if test="jcJg != null">jc_jg = #{jcJg},</if>
+            <if test="jcXgcl != null">jc_xgcl = #{jcXgcl},</if>
+            <if test="createTimeStr != null">create_time_str = #{createTimeStr},</if>
+            <if test="createUserId != null">create_user_id = #{createUserId},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createUserType != null">create_user_type = #{createUserType},</if>
+            <if test="createUnit != null">create_unit = #{createUnit},</if>
+            <if test="createUnitName != null">create_unit_name = #{createUnitName},</if>
+            <if test="updateTimeStr != null">update_time_str = #{updateTimeStr},</if>
+            <if test="updateUserId != null">update_user_id = #{updateUserId},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateUnit != null">update_unit = #{updateUnit},</if>
+            <if test="updateUnitName != null">update_unit_name = #{updateUnitName},</if>
+            <if test="state != null">state = #{state},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+</mapper>

+ 144 - 9
ruoyi-modules/mz-business/src/main/resources/mapper/business/ZwywJgFwjcMapper.xml

@@ -7,13 +7,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="ZwywJgFwjc" id="ZwywJgFwjcResult">
         <result property="id"    column="id"    />
         <result property="jgId"    column="jg_id"    />
-        <result property="zbXh"    column="zb_xh"    />
-        <result property="jcMc"    column="jc_mc"    />
-        <result property="isZdx"    column="is_zdx"    />
-        <result property="jcXz"    column="jc_xz"    />
-        <result property="jcFs"    column="jc_fs"    />
-        <result property="jcJg"    column="jc_jg"    />
-        <result property="jcXgcl"    column="jc_xgcl"    />
+        <result property="jcCs"    column="jc_cs"    />
+        <result property="tmsydx"    column="tmsydx"    />
+        <result property="zt"    column="zt"    />
         <result property="createTimeStr"    column="create_time_str"    />
         <result property="createUserId"    column="create_user_id"    />
         <result property="createBy"    column="create_by"    />
@@ -26,11 +22,150 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateUnit"    column="update_unit"    />
         <result property="updateUnitName"    column="update_unit_name"    />
         <result property="state"    column="state"    />
+        <result property="jgmc"    column="jgmc"    />
+        <result property="tbr"    column="tbr"    />
+        <result property="tbrq"    column="tbrq"    />
+        <result property="zdxsfql"    column="zdxsfql"    />
+        <result property="fhs"    column="fhs"    />
     </resultMap>
-    <select id="selectMaxJcCs" resultType="string">
-        SELECT MAX(jc_cs) FROM zwyw_jg_fwjc GROUP BY jc_cs
+
+    <resultMap id="ZwywJgFwjcZwywJgFwjcJcxxResult" type="ZwywJgFwjc" extends="ZwywJgFwjcResult">
+        <collection property="zwywJgFwjcJcxxList" notNullColumn="sub_id" javaType="java.util.List" resultMap="ZwywJgFwjcJcxxResult" />
+    </resultMap>
+
+    <resultMap type="ZwywJgFwjcJcxx" id="ZwywJgFwjcJcxxResult">
+        <result property="id"    column="sub_id"    />
+        <result property="fwjcId"    column="sub_fwjc_id"    />
+        <result property="zbXh"    column="sub_zb_xh"    />
+        <result property="jcMc"    column="sub_jc_mc"    />
+        <result property="isZdx"    column="sub_is_zdx"    />
+        <result property="jcXz"    column="sub_jc_xz"    />
+        <result property="jcFs"    column="sub_jc_fs"    />
+        <result property="jcJg"    column="sub_jc_jg"    />
+        <result property="jcXgcl"    column="sub_jc_xgcl"    />
+        <result property="label"    column="sub_label"    />
+        <result property="createTimeStr"    column="sub_create_time_str"    />
+        <result property="createUserId"    column="sub_create_user_id"    />
+        <result property="createBy"    column="sub_create_by"    />
+        <result property="createUserType"    column="sub_create_user_type"    />
+        <result property="createUnit"    column="sub_create_unit"    />
+        <result property="createUnitName"    column="sub_create_unit_name"    />
+        <result property="updateTimeStr"    column="sub_update_time_str"    />
+        <result property="updateUserId"    column="sub_update_user_id"    />
+        <result property="updateBy"    column="sub_update_by"    />
+        <result property="updateUnit"    column="sub_update_unit"    />
+        <result property="updateUnitName"    column="sub_update_unit_name"    />
+        <result property="state"    column="sub_state"    />
+    </resultMap>
+
+<!--    <select id="selectZwywJgFwJcById" parameterType="string" resultMap="ZwywJgFwjcZwywJgFwjcJcxxResult">-->
+<!--        SELECT-->
+<!--        a.id, a.jg_id, a.jc_cs, a.tmsydx, a.zt,-->
+<!--        a.create_time_str, a.create_user_id, a.create_by, a.create_unit, a.create_unit_name,-->
+<!--        a.update_time_str, a.update_user_id, a.update_by, a.update_unit, a.update_unit_name, a.state,-->
+<!--        b.id as sub_id, b.fwjc_id as sub_fwjc_id, b.zb_xh as sub_zb_xh, b.jc_mc as sub_jc_mc, b.is_zdx as sub_is_zdx,-->
+<!--        b.jc_xz as sub_jc_xz, b.jc_fs as sub_jc_fs, b.jc_jg as sub_jc_jg, b.jc_xgcl as sub_jc_xgcl,-->
+<!--        b.create_time_str as sub_create_time_str, b.create_user_id as sub_create_user_id,-->
+<!--        b.create_by as sub_create_by, b.create_unit as sub_create_unit, b.create_unit_name as sub_create_unit_name,-->
+<!--        b.update_time_str as sub_update_time_str, b.update_user_id as sub_update_user_id,-->
+<!--        b.update_by as sub_update_by, b.update_unit as sub_update_unit, b.update_unit_name as sub_update_unit_name,-->
+<!--        b.state as sub_state-->
+<!--        FROM zwyw_jg_fwjc a-->
+<!--        LEFT JOIN zwyw_jg_fwjc_jcxx b ON b.fwjc_id = a.id-->
+<!--        WHERE a.id = #{id}-->
+<!--        ORDER BY b.zb_xh ASC-->
+<!--    </select>-->
+
+    <select id="selectZwywJgFwJcById" parameterType="string" resultMap="ZwywJgFwjcZwywJgFwjcJcxxResult">
+        SELECT
+        d.jgmc as jgmc, a.create_unit_name as tbr, SUBSTRING(a.create_time_str,1,8) as tbrq,
+        GROUP_CONCAT(c.dict_label) as sub_label,
+        a.id, a.jg_id, a.jc_cs, a.tmsydx, a.zt,
+        b.id as sub_id, b.fwjc_id as sub_fwjc_id, b.zb_xh as sub_zb_xh, b.jc_mc as sub_jc_mc, b.is_zdx as sub_is_zdx,
+        b.jc_xz as sub_jc_xz, b.jc_fs as sub_jc_fs, b.jc_jg as sub_jc_jg, b.jc_xgcl as sub_jc_xgcl,
+        b.state as sub_state
+        FROM zwyw_jg_fwjc a
+        LEFT JOIN zwyw_jg_fwjc_jcxx b ON b.fwjc_id = a.id
+        LEFT JOIN sys_dict_data c ON FIND_IN_SET(c.dict_value,b.jc_jg) AND c.dict_type  = 'XZ032'
+        LEFT JOIN yljg_jcxx d ON d.id = a.jg_id
+        WHERE a.id = #{id}
+        GROUP BY b.id
+        ORDER BY b.zb_xh ASC
     </select>
 
+    <delete id="deleteZwywJgFwjcJcxxByFwjcId" parameterType="String">
+        delete from zwyw_jg_fwjc_jcxx where fwjc_id = #{fwjcId}
+    </delete>
+
+    <delete id="deleteZwywJgFwjcJcxxByFwjcIds" parameterType="String">
+        delete from zwyw_jg_fwjc_jcxx where fwjc_id in
+        <foreach item="fwjcId" collection="array" open="(" separator="," close=")">
+            #{fwjcId}
+        </foreach>
+    </delete>
 
+    <select id="selectZwywJgFwjcList" parameterType="ZwywJgFwjc" resultMap="ZwywJgFwjcResult">
+        SELECT
+        b.jgmc , getxzqhmcbycode(b.szxzqh) as szxzqh_name,
+        (
+        IF(
+        (SELECT COUNT(*) FROM zwyw_jg_fwjc_jcxx WHERE fwjc_id = a.id AND is_zdx = '2' AND daxx in(1,2) AND daxx is not null)
+        =
+        (SELECT COUNT(*) FROM zwyw_jg_fwjc_jcxx WHERE fwjc_id = a.id AND is_zdx = '2')
+        ,1,0)
+        ) as zdxsfql,
+        ( SELECT COUNT(*) FROM zwyw_jg_fwjc_jcxx
+        WHERE fwjc_id = a.id AND daxx = '1'
+        ) as fhs,
+        SUBSTRING(a.create_time_str,1,8) as tbrq,
+        a.id, a.jg_id, a.jc_cs, a.tmsydx, a.zt, a.state
+        FROM zwyw_jg_fwjc a
+        LEFT JOIN yljg_jcxx b ON b.id =a.jg_id
+        <where>
+            <if test="jgId != null "> and a.jg_id = #{jgId}</if>
+            <if test="zt != null "> and a.zt = #{zt}</if>
+            <if test="zdxsfql != null "> and
+                (
+                IF(
+                (SELECT COUNT(*) FROM zwyw_jg_fwjc_jcxx WHERE fwjc_id = a.id AND is_zdx = '2' AND daxx in(1,2) AND daxx is not null)
+                =
+                (SELECT COUNT(*) FROM zwyw_jg_fwjc_jcxx WHERE fwjc_id = a.id AND is_zdx = '2')
+                ,1,0)
+                ) = #{zdxsfql}
+            </if>
+            <if test="params.beginTbrq != null and params.beginTbrq != '' and params.endTbrq != null and params.endTbrq != ''"> and SUBSTRING(a.create_time_str,1,8) between #{params.beginTbrq} and #{params.endTbrq}</if>
+            <if test="params.beginTbrq != null and params.beginTbrq != '' and (params.endTbrq == null or params.endTbrq == '')"> and SUBSTRING(a.create_time_str,1,8) &gt;= #{params.beginTbrq}</if>
+            <if test="(params.beginTbrq == null or params.beginTbrq == '') and params.endTbrq != null and params.endTbrq != ''"> and SUBSTRING(a.create_time_str,1,8) &lt;= #{params.endTbrq}</if>
+        </where>
+    </select>
+
+    <select id="selectZwywJgFwjcByJcCs" parameterType="ZwywJgFwjc" resultMap="ZwywJgFwjcZwywJgFwjcJcxxResult">
+        SELECT
+        a.id, a.jg_id, a.jc_cs, a.tmsydx, a.zt,
+        b.id as sub_id, b.fwjc_id as sub_fwjc_id, b.zb_xh as sub_zb_xh, b.jc_mc as sub_jc_mc, b.is_zdx as sub_is_zdx,
+        b.jc_xz as sub_jc_xz, b.jc_fs as sub_jc_fs, b.jc_jg as sub_jc_jg, b.jc_xgcl as sub_jc_xgcl,
+        b.state as sub_state
+        FROM zwyw_jg_fwjc a
+        LEFT JOIN zwyw_jg_fwjc_jcxx b ON b.fwjc_id = a.id
+        <where>
+            <if test="jgId != null  and jgId != ''"> and a.jg_id = #{jgId}</if>
+            <if test="jcCs != null  and jcCs != ''"> and a.jc_cs = #{jcCs}</if>
+        </where>
+        GROUP BY b.id
+        ORDER BY b.zb_xh ASC
+    </select>
+
+    <insert id="batchZwywJgFwjcJcxx">
+        insert into zwyw_jg_fwjc_jcxx( id, fwjc_id, zb_xh, jc_mc, is_zdx, jc_xz, jc_fs, jc_jg, jc_xgcl, create_time_str, create_user_id,create_user_type, create_by, create_unit, create_unit_name) values
+        <foreach item="item" index="index" collection="list" separator=",">
+            (REPLACE( UUID(),"-",""), #{item.fwjcId}, #{item.zbXh}, #{item.jcMc}, #{item.isZdx}, #{item.jcXz}, #{item.jcFs}, #{item.jcJg}, #{item.jcXgcl}, #{item.createTimeStr}, #{item.createUserId},#{item.createUserType}, #{item.createBy}, #{item.createUnit}, #{item.createUnitName})
+        </foreach>
+    </insert>
+
+    <select id="selectMaxJcCs" resultType="string">
+        SELECT MAX(jc_cs) FROM zwyw_jg_fwjc
+        WHERE
+        jg_id = #{jgId}
+    </select>
 
 </mapper>

+ 3 - 0
ruoyi-modules/mz-business/src/main/resources/mapper/business/ZwywLrJbxxMapper.xml

@@ -245,6 +245,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="lzzt != null  and lzzt != ''"> and lzzt = #{lzzt}</if>
             <if test="lrHjdz != null  and lrHjdz != ''"> and lr_hjdz = #{lrHjdz}</if>
             <if test="lrXjdz != null  and lrXjdz != ''"> and lr_xjdz = #{lrXjdz}</if>
+            <if test="params.beginCsrq != null and params.beginCsrq != '' and params.endCsrq != null and params.endCsrq != ''"> and substring(lr_zjhm, 7, 8) between #{params.beginCsrq} and #{params.endCsrq}</if>
+            <if test="params.beginCsrq != null and params.beginCsrq != '' and (params.endCsrq == null or params.endCsrq == '')"> and substring(lr_zjhm, 7, 8) &gt;= #{params.beginCsrq}</if>
+            <if test="(params.beginCsrq == null or params.beginCsrq == '') and params.endCsrq != null and params.endCsrq != ''"> and substring(lr_zjhm, 7, 8) &lt;= #{params.endCsrq}</if>
         </where>
         GROUP BY id
     </select>

+ 3 - 4
ruoyi-modules/mz-business/src/main/resources/mapper/business/ZwywLrJgyyMapper.xml

@@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <sql id="selectLrJgYyInfo">
         SELECT
-        (
+
         CASE
         WHEN d.is_rz = 1
         THEN 1
@@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         WHEN a.yyzt = 2
         THEN 2
         END
-        )
+
         as yyzt,
         getxzqhidbycode(a.jkdzxzqy) as jkdzxzqy,
         getxzqhmcbycode(a.jkdzxzqy) as jkdzxzqy_names,
@@ -84,7 +84,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="zjhm != null  and zjhm != ''"> and a.zjhm like concat('%', #{zjhm}, '%')</if>
             <if test="yyzt != null  and yyzt != ''">
                 and
-                (
                 CASE
                 WHEN d.is_rz = 1
                 THEN 1
@@ -93,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 WHEN a.yyzt = 2
                 THEN 2
                 END
-                ) = #{yyzt}
+                = #{yyzt}
             </if>
             <if test="yyLrYljg != null  and yyLrYljg != ''"> and a.yy_lr_yljg = #{yyLrYljg}</if>
             <if test="params.beginYyLrSj != null and params.beginYyLrSj != '' and params.endYyLrSj != null and params.endYyLrSj != ''"> and a.yy_lr_sj between #{params.beginYyLrSj} and #{params.endYyLrSj}</if>

+ 2 - 6
ruoyi-ui/src/views/business/fwjggl/jgfwjc/index.vue

@@ -60,13 +60,9 @@
               {{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}
             </template>
           </el-table-column>
-          <el-table-column label="统一社会信用代码" align="center" prop="tyshxydm" width="200"/>
+          <el-table-column label="组织代码" align="center" prop="zzjgdm" width="200"/>
           <el-table-column label="机构名称" align="center" prop="jgmc" width="240"/>
-          <el-table-column label="是否备案" align="center" prop="isBa">
-            <template slot-scope="scope">
-              <dict-tag :options="dict.type.CZ035" :value="scope.row.isBa"/>
-            </template>
-          </el-table-column>
+          <el-table-column label="所属行政区划" align="center" prop="ssxzqhName" width="240"/>
           <el-table-column label="运营状态" align="center" prop="sczt" width="200">
             <template slot-scope="scope">
               <dict-tag :options="dict.type.CH026" :value="scope.row.sczt"/>