wyz 4 päivää sitten
vanhempi
commit
0ac2005f34
32 muutettua tiedostoa jossa 552 lisäystä ja 10 poistoa
  1. 9 4
      src/main/java/org/springblade/common/controller/ParamsConvert.java
  2. 50 4
      src/main/java/org/springblade/modules/appmenu/controller/AppMenuController.java
  3. 6 0
      src/main/java/org/springblade/modules/appmenu/mapper/AppMenuMapper.java
  4. 10 0
      src/main/java/org/springblade/modules/appmenu/mapper/AppMenuMapper.xml
  5. 7 0
      src/main/java/org/springblade/modules/appmenu/service/IAppMenuService.java
  6. 13 0
      src/main/java/org/springblade/modules/appmenu/service/impl/AppMenuServiceImpl.java
  7. 11 0
      src/main/java/org/springblade/modules/appmenu/vo/RwtxListVO.java
  8. 12 0
      src/main/java/org/springblade/modules/appmenu/vo/RwtxVO.java
  9. 8 0
      src/main/java/org/springblade/modules/auth/endpoint/BladeTokenEndPoint.java
  10. 13 0
      src/main/java/org/springblade/modules/cdglinfos/controller/GlInfoController.java
  11. 1 0
      src/main/java/org/springblade/modules/cdglinfos/entity/GlInfoEntity.java
  12. 5 0
      src/main/java/org/springblade/modules/cdglinfos/mapper/GlInfoMapper.java
  13. 18 0
      src/main/java/org/springblade/modules/cdglinfos/mapper/GlinfoMapper.xml
  14. 5 0
      src/main/java/org/springblade/modules/cdglinfos/service/IGlInfoService.java
  15. 11 0
      src/main/java/org/springblade/modules/cdglinfos/service/impl/GlinfoServiceImpl.java
  16. 13 0
      src/main/java/org/springblade/modules/cdglinfos/vo/AppMenuVO.java
  17. 5 0
      src/main/java/org/springblade/modules/mdjfdj/mapper/MdjfDjMapper.java
  18. 40 0
      src/main/java/org/springblade/modules/mdjfdj/mapper/MdjfDjMapper.xml
  19. 5 0
      src/main/java/org/springblade/modules/mdjfdj/service/IMdjfDjService.java
  20. 11 0
      src/main/java/org/springblade/modules/mdjfdj/service/impl/MdjfDjServiceImpl.java
  21. 27 2
      src/main/java/org/springblade/modules/sqmy/controller/FzrhyInfoController.java
  22. 96 0
      src/main/java/org/springblade/modules/sqmy/controller/FzrhyRyController.java
  23. 3 0
      src/main/java/org/springblade/modules/sqmy/mapper/FzrhyInfoMapper.java
  24. 4 0
      src/main/java/org/springblade/modules/sqmy/mapper/FzrhyInfoMapper.xml
  25. 31 0
      src/main/java/org/springblade/modules/sqmy/mapper/FzrhyRyMapper.java
  26. 21 0
      src/main/java/org/springblade/modules/sqmy/mapper/FzrhyRyMapper.xml
  27. 5 0
      src/main/java/org/springblade/modules/sqmy/pojo/entity/FzrhyInfoEntity.java
  28. 42 0
      src/main/java/org/springblade/modules/sqmy/pojo/entity/FzrhyRyEntity.java
  29. 3 0
      src/main/java/org/springblade/modules/sqmy/service/IFzrhyInfoService.java
  30. 29 0
      src/main/java/org/springblade/modules/sqmy/service/IFzrhyRyService.java
  31. 6 0
      src/main/java/org/springblade/modules/sqmy/service/impl/FzrhyInfoServiceImpl.java
  32. 32 0
      src/main/java/org/springblade/modules/sqmy/service/impl/FzrhyRyServiceImpl.java

+ 9 - 4
src/main/java/org/springblade/common/controller/ParamsConvert.java

@@ -29,10 +29,7 @@ import org.springblade.modules.sign.entity.SignEntity;
 import org.springblade.modules.sign.vo.SignVO;
 import org.springblade.modules.sqjw.sydw.pojo.entity.CyryEntity;
 import org.springblade.modules.sqjw.sydw.pojo.entity.SydwEntity;
-import org.springblade.modules.sqmy.pojo.entity.FzrhyInfoEntity;
-import org.springblade.modules.sqmy.pojo.entity.JmhInfoEntity;
-import org.springblade.modules.sqmy.pojo.entity.SqmyInfoEntity;
-import org.springblade.modules.sqmy.pojo.entity.ZatbInfoEntity;
+import org.springblade.modules.sqmy.pojo.entity.*;
 import org.springblade.modules.sqmy.pojo.vo.JmhInfoVO;
 import org.springblade.modules.sqmy.pojo.vo.SqmyInfoVO;
 import org.springblade.modules.system.entity.User;
@@ -71,6 +68,8 @@ public class ParamsConvert {
 				return method.invoke(proxyObject, params);
 			} else if (method.getName().equals("getDbsx")) {
 				return method.invoke(proxyObject, params);
+			} else if (method.getName().equals("getRwtx")) {
+				return method.invoke(proxyObject);
 			} else if (method.getName().equals("list")) {
 				Query query = new Query();
 				AppMenu appMenu = new AppMenu();
@@ -567,6 +566,8 @@ public class ParamsConvert {
 		} else if (className.equals("glInfoController")) { // ***************************************** glInfoController
 			if (method.getName().equals("getAppByUserRole")) {
 				return method.invoke(proxyObject, params);
+			} else if (method.getName().equals("getAppByUserRoleNew")) {
+				return method.invoke(proxyObject, params);
 			}
 		} else if (className.equals("rhzfFwqzController")) { // ************************************* rhzfFwqzController
 			if (method.getName().equals("save")) {
@@ -705,6 +706,10 @@ public class ParamsConvert {
 				query.setSize(Integer.valueOf(params.get("size").toString()));
 				query.setCurrent(Integer.valueOf(params.get("current").toString()));
 				return method.invoke(proxyObject, params, query);
+			} else if (method.getName().equals("detail")) {
+				jsonObject.putAll(params);
+				FzrhyInfoEntity entity = jsonObject.toJavaObject(FzrhyInfoEntity.class);
+				return method.invoke(proxyObject, entity);
 			}
 		} else if (className.equals("sydwController")) { // ********************************************* sydwController
 			if (method.getName().equals("sydwSave")) {

+ 50 - 4
src/main/java/org/springblade/modules/appmenu/controller/AppMenuController.java

@@ -18,10 +18,7 @@ import org.springblade.modules.appmenu.entity.AppMenu;
 import org.springblade.modules.appmenu.entity.FileBase64;
 import org.springblade.modules.appmenu.service.IAppMenuService;
 import org.springblade.modules.appmenu.service.IFileBase64Service;
-import org.springblade.modules.appmenu.vo.AppMenuVO;
-import org.springblade.modules.appmenu.vo.DbsxVO;
-import org.springblade.modules.appmenu.vo.QzgxVO;
-import org.springblade.modules.appmenu.vo.SssjVO;
+import org.springblade.modules.appmenu.vo.*;
 import org.springblade.modules.csInfo.service.ICsInfoService;
 import org.springblade.modules.log.userLogin.entity.UserLoginEntity;
 import org.springblade.modules.log.userLogin.service.IUserLoginService;
@@ -109,6 +106,55 @@ public class AppMenuController extends BladeController {
 	}
 
 	/**
+	 * 任务提醒
+	 */
+	@GetMapping("/getRwtx")
+	public R getRwtx() {
+		List<RwtxVO> rwtxVO = appMenuService.getRwtxList();
+		for (RwtxVO rwtx : rwtxVO) {
+			List<RwtxListVO> rwtxListVO = new ArrayList<>();
+			String deptId = AuthUtil.getDeptId();
+			if ("消防检查".equals(rwtx.getDictValue())) {
+				if (deptId.contains(",")) {
+					Integer total = 0;
+					String[] split = deptId.split(",");
+                    for (String str : split) {
+                        Dept dept = deptService.getById(Long.valueOf(str));
+                        RwtxListVO rwtxList = appMenuService.getRwtx(dept.getId());
+                        total += rwtxList.getTotal();
+						rwtxList.setDeptId(dept.getId());
+                        rwtxList.setDeptName(dept.getDeptName());
+                        rwtxList.setBz(dept.getDeptName() + "-" + rwtxList.getTotal() + "个消防检查任务");
+                        rwtxListVO.add(rwtxList);
+                    }
+					rwtx.setTotal(total);
+				} else {
+					Dept dept = deptService.getById(Long.valueOf(deptId));
+					RwtxListVO rwtxList = appMenuService.getRwtx(Long.valueOf(deptId));
+					rwtxList.setDeptId(Long.valueOf(deptId));
+					rwtxList.setDeptName(dept.getDeptName());
+					rwtxList.setBz(dept.getDeptName() + "-" + rwtxList.getTotal() + "个消防检查任务");
+					rwtxListVO.add(rwtxList);
+					rwtx.setTotal(rwtxList.getTotal());
+				}
+			}
+			if ("矛盾纠纷".equals(rwtx.getDictValue())) {
+				// 查需调解的矛盾纠纷数量
+				RwtxListVO rwtxVOtj = mdjfDjService.getRwtxVOtj(deptId);
+				rwtxVOtj.setBz("您有" + rwtxVOtj.getTotal() + "起矛盾纠纷待调解");
+				rwtxListVO.add(rwtxVOtj);
+				// 查需回访的矛盾纠纷数量
+				RwtxListVO rwtxVOhf = mdjfDjService.getRwtxVOhf(deptId);
+				rwtxVOhf.setBz("您有" + rwtxVOhf.getTotal() + "起矛盾纠纷待回访");
+				rwtxListVO.add(rwtxVOhf);
+				rwtx.setTotal(rwtxVOtj.getTotal() + rwtxVOhf.getTotal());
+			}
+			rwtx.setRwtxList(rwtxListVO);
+		}
+		return R.data(rwtxVO);
+	}
+
+	/**
 	 * 详情
 	 */
 	@GetMapping("/detail")

+ 6 - 0
src/main/java/org/springblade/modules/appmenu/mapper/AppMenuMapper.java

@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.apache.ibatis.annotations.Param;
 import org.springblade.modules.appmenu.entity.AppMenu;
 import org.springblade.modules.appmenu.vo.AppMenuVO;
+import org.springblade.modules.appmenu.vo.RwtxListVO;
+import org.springblade.modules.appmenu.vo.RwtxVO;
 
 import java.util.List;
 import java.util.Map;
@@ -28,4 +30,8 @@ public interface AppMenuMapper extends BaseMapper<AppMenu> {
 
 
 	Integer getQzgx(@Param("params") Map<String, Object> params);
+
+	List<RwtxVO> getRwtxList();
+
+	RwtxListVO getRwtx(Long deptId);
 }

+ 10 - 0
src/main/java/org/springblade/modules/appmenu/mapper/AppMenuMapper.xml

@@ -36,4 +36,14 @@
             create_time > ( SELECT create_time FROM jdrh.ydjw_app_history WHERE app_bbh = #{params.appBbh} )
     </select>
 
+    <select id="getRwtxList" resultType="org.springblade.modules.appmenu.vo.RwtxVO">
+        select dict_value from blade_dict_biz where code = 'rwtx' and parent_id != 0 order by sort
+    </select>
+
+    <select id="getRwtx" resultType="org.springblade.modules.appmenu.vo.RwtxListVO">
+        select count(0) as total from jdrh.csjc_info jc
+        left join jdrh.cs_info info on info.id = jc.cs_id
+        left join jdrh.blade_dept bd on bd.id = info.create_dept
+        where info.is_deleted = 0 and jc.zgzt != 0 and jc.is_deleted = 0 and ((#{deptId} LIKE '%' || bd.id || '%') OR (bd.ancestors LIKE '%' || #{deptId} || '%'))
+    </select>
 </mapper>

+ 7 - 0
src/main/java/org/springblade/modules/appmenu/service/IAppMenuService.java

@@ -4,7 +4,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.springblade.modules.appmenu.entity.AppMenu;
 import org.springblade.modules.appmenu.vo.AppMenuVO;
+import org.springblade.modules.appmenu.vo.RwtxListVO;
+import org.springblade.modules.appmenu.vo.RwtxVO;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -25,4 +28,8 @@ public interface IAppMenuService extends IService<AppMenu> {
 	IPage<AppMenuVO> selectAppMenuPage(IPage<AppMenuVO> page, AppMenuVO appMenu);
 
 	Integer getQzgx(Map<String, Object> params);
+
+	List<RwtxVO> getRwtxList();
+
+	RwtxListVO getRwtx(Long deptId);
 }

+ 13 - 0
src/main/java/org/springblade/modules/appmenu/service/impl/AppMenuServiceImpl.java

@@ -6,8 +6,11 @@ import org.springblade.modules.appmenu.entity.AppMenu;
 import org.springblade.modules.appmenu.mapper.AppMenuMapper;
 import org.springblade.modules.appmenu.service.IAppMenuService;
 import org.springblade.modules.appmenu.vo.AppMenuVO;
+import org.springblade.modules.appmenu.vo.RwtxListVO;
+import org.springblade.modules.appmenu.vo.RwtxVO;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -30,4 +33,14 @@ public class AppMenuServiceImpl extends ServiceImpl<AppMenuMapper, AppMenu> impl
 		return baseMapper.getQzgx(params);
 	}
 
+	@Override
+	public List<RwtxVO> getRwtxList() {
+		return baseMapper.getRwtxList();
+	}
+
+	@Override
+	public RwtxListVO getRwtx(Long deptId) {
+		return baseMapper.getRwtx(deptId);
+	}
+
 }

+ 11 - 0
src/main/java/org/springblade/modules/appmenu/vo/RwtxListVO.java

@@ -0,0 +1,11 @@
+package org.springblade.modules.appmenu.vo;
+
+import lombok.Data;
+
+@Data
+public class RwtxListVO {
+	private Long deptId;
+	private String deptName;
+	private Integer total;
+	private String bz;
+}

+ 12 - 0
src/main/java/org/springblade/modules/appmenu/vo/RwtxVO.java

@@ -0,0 +1,12 @@
+package org.springblade.modules.appmenu.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class RwtxVO {
+	private String dictValue;
+	private Integer total;
+	private List<RwtxListVO> rwtxList;
+}

+ 8 - 0
src/main/java/org/springblade/modules/auth/endpoint/BladeTokenEndPoint.java

@@ -265,6 +265,14 @@ public class BladeTokenEndPoint {
 
 		ITokenGranter granter = TokenGranterBuilder.getGranter(grantType);
 		UserInfo userInfo = granter.grant(tokenParameter);
+		User user = userService.selectAccountByUserName(username);
+		if (user != null){
+			if (userInfo != null){
+				userInfo.setZp(user.getZp());
+			}
+		} else {
+			return authInfo.set("error_code", HttpServletResponse.SC_BAD_REQUEST).set("error_description", "用户未注册");
+		}
 
 		if (userInfo == null || userInfo.getUser() == null) {
 			return authInfo.set("error_code", HttpServletResponse.SC_BAD_REQUEST).set("error_description", "用户名或密码不正确");

+ 13 - 0
src/main/java/org/springblade/modules/cdglinfos/controller/GlInfoController.java

@@ -32,11 +32,13 @@ import org.springblade.core.tool.utils.Func;
 import org.springblade.modules.cdglinfos.entity.GlInfoEntity;
 import org.springblade.modules.cdglinfos.service.CdUserRoleGxbService;
 import org.springblade.modules.cdglinfos.service.IGlInfoService;
+import org.springblade.modules.cdglinfos.vo.AppMenuVO;
 import org.springblade.modules.cdglinfos.vo.GlInfoVO;
 import org.springblade.modules.cdglinfos.wrapper.GlInfoWrapper;
 import org.springblade.modules.system.entity.Dept;
 import org.springblade.modules.system.entity.Role;
 import org.springblade.modules.system.service.IDeptService;
+import org.springblade.modules.system.service.IDictBizService;
 import org.springblade.modules.system.service.IRoleService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -156,6 +158,17 @@ public class GlInfoController extends BladeController {
 		return R.data(glinfoService.getAppByUserRole(dept.getAncestors(), AuthUtil.getUser().getRoleName(), params.get("appName")));
 	}
 
+	@GetMapping("getAppByUserRoleNew")
+	public R getAppByUserRoleNew(@RequestParam Map<String, String> params){
+		Dept dept = deptService.getById(Long.valueOf(AuthUtil.getDeptId().split(",")[0]));
+		List<AppMenuVO> menuVO = glinfoService.getDictValueList();
+		for (AppMenuVO appMenuVO : menuVO) {
+			List<GlInfoEntity> list = glinfoService.getAppByUserRoleNew(dept.getAncestors(), AuthUtil.getUser().getRoleName(), params.get("appName"), appMenuVO.getDictKey());
+			appMenuVO.setMenuList(list);
+		}
+		return R.data(menuVO);
+	}
+
 	/**
 	 * 菜单信息表 删除
 	 */

+ 1 - 0
src/main/java/org/springblade/modules/cdglinfos/entity/GlInfoEntity.java

@@ -64,5 +64,6 @@ public class GlInfoEntity extends BaseEntity {
 
 	private String roles;
 	private String ssbm;
+	private String yylx;
 
 }

+ 5 - 0
src/main/java/org/springblade/modules/cdglinfos/mapper/GlInfoMapper.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.apache.ibatis.annotations.Param;
 import org.springblade.modules.cdglinfos.entity.GlInfoEntity;
+import org.springblade.modules.cdglinfos.vo.AppMenuVO;
 import org.springblade.modules.cdglinfos.vo.GlInfoVO;
 import org.springblade.modules.sqjw.sydw.pojo.vo.SydwMenuVO;
 
@@ -23,5 +24,9 @@ public interface GlInfoMapper  extends BaseMapper<GlInfoEntity> {
 	List<GlInfoEntity> getAppByUserRole(@Param("ancestors")String ancestors, @Param("userRole")String userRole, @Param("appName")String appName);
 
     List<SydwMenuVO> getSydwMenu(@Param("flag") String flag, @Param("appName") String appName);
+
+	List<GlInfoEntity> getAppByUserRoleNew(String ancestors, String roleName, String appName, String dictKey);
+
+	List<AppMenuVO> getDictValueList();
 }
 

+ 18 - 0
src/main/java/org/springblade/modules/cdglinfos/mapper/GlinfoMapper.xml

@@ -60,4 +60,22 @@
         ORDER BY cg.sort
     </select>
 
+    <select id="getAppByUserRoleNew" resultType="org.springblade.modules.cdglinfos.entity.GlInfoEntity">
+        SELECT
+            name,
+            sort,
+            img,
+            flag
+        FROM
+            cd_glinfo
+        WHERE yylx = #{dictKey}
+        <if test="null != appName and '' != appName">
+            AND name LIKE '%' || #{appName} || '%'
+        </if>
+        AND flag = '1'
+    </select>
+
+    <select id="getDictValueList" resultType="org.springblade.modules.cdglinfos.vo.AppMenuVO">
+        select dict_key, dict_value from blade_dict_biz where code = 'yylx' and parent_id != 0
+    </select>
 </mapper>

+ 5 - 0
src/main/java/org/springblade/modules/cdglinfos/service/IGlInfoService.java

@@ -1,6 +1,7 @@
 package org.springblade.modules.cdglinfos.service;
 
 import org.springblade.modules.cdglinfos.entity.GlInfoEntity;
+import org.springblade.modules.cdglinfos.vo.AppMenuVO;
 import org.springblade.modules.cdglinfos.vo.GlInfoVO;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.core.mp.base.BaseService;
@@ -28,4 +29,8 @@ public interface IGlInfoService extends BaseService<GlInfoEntity> {
 	List<GlInfoEntity> getAppByUserRole(String ancestors, String userRole, String appName);
 
 	List<SydwMenuVO> getSydwMenu(String flag, String appName);
+
+	List<GlInfoEntity> getAppByUserRoleNew(String ancestors, String roleName, String appName, String dictKey);
+
+	List<AppMenuVO> getDictValueList();
 }

+ 11 - 0
src/main/java/org/springblade/modules/cdglinfos/service/impl/GlinfoServiceImpl.java

@@ -5,6 +5,7 @@ import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.modules.cdglinfos.entity.GlInfoEntity;
 import org.springblade.modules.cdglinfos.mapper.GlInfoMapper;
 import org.springblade.modules.cdglinfos.service.IGlInfoService;
+import org.springblade.modules.cdglinfos.vo.AppMenuVO;
 import org.springblade.modules.cdglinfos.vo.GlInfoVO;
 import org.springblade.modules.sqjw.sydw.pojo.vo.SydwMenuVO;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -31,4 +32,14 @@ public class GlinfoServiceImpl extends BaseServiceImpl<GlInfoMapper, GlInfoEntit
 	public List<SydwMenuVO> getSydwMenu(String flag, String appName) {
 		return baseMapper.getSydwMenu(flag, appName);
 	}
+
+	@Override
+	public List<GlInfoEntity> getAppByUserRoleNew(String ancestors, String roleName, String appName, String dictKey) {
+		return baseMapper.getAppByUserRoleNew(ancestors, roleName, appName, dictKey);
+	}
+
+	@Override
+	public List<AppMenuVO> getDictValueList() {
+		return baseMapper.getDictValueList();
+	}
 }

+ 13 - 0
src/main/java/org/springblade/modules/cdglinfos/vo/AppMenuVO.java

@@ -0,0 +1,13 @@
+package org.springblade.modules.cdglinfos.vo;
+
+import lombok.Data;
+import org.springblade.modules.cdglinfos.entity.GlInfoEntity;
+
+import java.util.List;
+
+@Data
+public class AppMenuVO {
+	private String dictKey;
+	private String dictValue;
+	private List<GlInfoEntity> menuList;
+}

+ 5 - 0
src/main/java/org/springblade/modules/mdjfdj/mapper/MdjfDjMapper.java

@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.apache.ibatis.annotations.Param;
 import org.springblade.modules.appmenu.vo.DbsxVO;
+import org.springblade.modules.appmenu.vo.RwtxListVO;
 import org.springblade.modules.mdjfdj.entity.MdjfDjEntity;
 import org.springblade.modules.mdjfdj.excel.MdjfDjExcel;
 import org.springblade.modules.mdjfdj.vo.JqVO;
@@ -75,4 +76,8 @@ public interface MdjfDjMapper extends BaseMapper<MdjfDjEntity> {
 
 	@DS("jl")
     void saveJl(MdjfDjEntity mdjfDjEntity);
+
+	RwtxListVO getRwtxVOtj(String deptId);
+
+	RwtxListVO getRwtxVOhf(String deptId);
 }

+ 40 - 0
src/main/java/org/springblade/modules/mdjfdj/mapper/MdjfDjMapper.xml

@@ -573,4 +573,44 @@
         #{fkdbh},
         #{jjdbh});
     </insert>
+
+    <select id="getRwtxVOtj" resultType="org.springblade.modules.appmenu.vo.RwtxListVO">
+        SELECT COUNT (0) AS total
+        FROM
+            (
+                SELECT ROW_NUMBER() OVER ( PARTITION BY md.id ORDER BY mt.create_time DESC ) maxRow,
+                    mt.tjzt
+                FROM
+                    mdjf_dj md
+                        LEFT JOIN mdjf_tj mt ON mt.jf_id = md.id
+                        LEFT JOIN blade_dept sq ON sq.id = md.jfsssq
+                WHERE
+                    md.is_deleted = 0
+                  AND ((#{deptId} LIKE '%' || sq.id || '%') OR (sq.ancestors LIKE '%' || #{deptId} || '%'))
+            ) TEMP
+        WHERE
+            TEMP.maxRow = 1
+          AND ( TEMP.tjzt IS NULL OR TEMP.tjzt = '调解未果' )
+    </select>
+
+    <select id="getRwtxVOhf" resultType="org.springblade.modules.appmenu.vo.RwtxListVO">
+        SELECT COUNT (0) AS total
+        FROM
+            (
+                SELECT ROW_NUMBER() OVER ( PARTITION BY md.ID ORDER BY mt.create_time DESC ) maxRow,
+                    mt.tjzt,
+                       ( SELECT COUNT ( 1 ) FROM mdjf_hf hf WHERE hf.jf_id = md.id ) AS hfzt
+                FROM
+                    mdjf_dj md
+                        LEFT JOIN mdjf_tj mt ON mt.jf_id = md.id
+                        LEFT JOIN blade_dept sq ON sq.id = md.jfsssq
+                WHERE
+                    md.is_deleted = 0
+                  AND ((#{deptId} LIKE '%' || sq.id || '%') OR (sq.ancestors LIKE '%' || #{deptId} || '%'))
+            ) TEMP
+        WHERE
+            TEMP.maxRow = 1
+          AND TEMP.tjzt = '已调解'
+          AND TEMP.hfzt = 0
+    </select>
 </mapper>

+ 5 - 0
src/main/java/org/springblade/modules/mdjfdj/service/IMdjfDjService.java

@@ -19,6 +19,7 @@ package org.springblade.modules.mdjfdj.service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.core.mp.base.BaseService;
 import org.springblade.modules.appmenu.vo.DbsxVO;
+import org.springblade.modules.appmenu.vo.RwtxListVO;
 import org.springblade.modules.mdjfdj.entity.MdjfDjEntity;
 import org.springblade.modules.mdjfdj.excel.MdjfDjExcel;
 import org.springblade.modules.mdjfdj.vo.JqVO;
@@ -79,4 +80,8 @@ public interface IMdjfDjService extends BaseService<MdjfDjEntity> {
     void updateByIdToJl(MdjfDjEntity mdjfdj);
 
 	void saveOrUpdateJl(MdjfDjEntity mdjfDjEntity);
+
+	RwtxListVO getRwtxVOtj(String deptId);
+
+	RwtxListVO getRwtxVOhf(String deptId);
 }

+ 11 - 0
src/main/java/org/springblade/modules/mdjfdj/service/impl/MdjfDjServiceImpl.java

@@ -23,6 +23,7 @@ import org.springblade.common.cache.DictBizCache;
 import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.modules.appmenu.vo.DbsxVO;
+import org.springblade.modules.appmenu.vo.RwtxListVO;
 import org.springblade.modules.mdjfdj.entity.MdjfDjEntity;
 import org.springblade.modules.mdjfdj.excel.MdjfDjExcel;
 import org.springblade.modules.mdjfdj.mapper.MdjfDjMapper;
@@ -361,4 +362,14 @@ public class MdjfDjServiceImpl extends BaseServiceImpl<MdjfDjMapper, MdjfDjEntit
 		baseMapper.updateById(mdjfDjEntity);
 	}
 
+	@Override
+	public RwtxListVO getRwtxVOtj(String deptId) {
+		return baseMapper.getRwtxVOtj(deptId);
+	}
+
+	@Override
+	public RwtxListVO getRwtxVOhf(String deptId) {
+		return baseMapper.getRwtxVOhf(deptId);
+	}
+
 }

+ 27 - 2
src/main/java/org/springblade/modules/sqmy/controller/FzrhyInfoController.java

@@ -19,8 +19,11 @@ import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.modules.sqmy.excel.FzrhyInfoExcel;
 import org.springblade.modules.sqmy.pojo.entity.FzrhyInfoEntity;
+import org.springblade.modules.sqmy.pojo.entity.FzrhyRyEntity;
+import org.springblade.modules.sqmy.pojo.entity.JmhRyEntity;
 import org.springblade.modules.sqmy.pojo.vo.FzrhyInfoVO;
 import org.springblade.modules.sqmy.service.IFzrhyInfoService;
+import org.springblade.modules.sqmy.service.IFzrhyRyService;
 import org.springblade.modules.sqmy.wrapper.FzrhyInfoWrapper;
 import org.springframework.web.bind.annotation.*;
 
@@ -43,6 +46,8 @@ public class FzrhyInfoController extends BladeController {
 
 	private final IFzrhyInfoService fzrhyInfoService;
 
+	private final IFzrhyRyService fzrhyRyService;
+
 	/**
 	 * 每月安全负责人会议 详情
 	 */
@@ -51,6 +56,8 @@ public class FzrhyInfoController extends BladeController {
 	@ApiOperation(value = "详情", notes = "传入fzrhyInfo")
 	public R<FzrhyInfoVO> detail(FzrhyInfoEntity fzrhyInfo) {
 		FzrhyInfoEntity detail = fzrhyInfoService.getOne(Condition.getQueryWrapper(fzrhyInfo));
+		List<FzrhyRyEntity> fzrhyRy = fzrhyInfoService.selectFzrhyRy(detail.getId());
+		detail.setFzrhyRyList(fzrhyRy);
 		return R.data(FzrhyInfoWrapper.build().entityVO(detail));
 	}
 
@@ -84,7 +91,14 @@ public class FzrhyInfoController extends BladeController {
 	@ApiOperationSupport(order = 4)
 	@ApiOperation(value = "新增", notes = "传入fzrhyInfo")
 	public R save(@Valid @RequestBody FzrhyInfoEntity fzrhyInfo) {
-		return R.status(fzrhyInfoService.save(fzrhyInfo));
+		fzrhyInfoService.save(fzrhyInfo);
+		if (null != fzrhyInfo.getFzrhyRyList() && fzrhyInfo.getFzrhyRyList().size() > 0) {
+			for (FzrhyRyEntity fzrhyRyEntity : fzrhyInfo.getFzrhyRyList()) {
+				fzrhyRyEntity.setFzrhyId(fzrhyInfo.getId());
+				fzrhyRyService.save(fzrhyRyEntity);
+			}
+		}
+		return R.status(true);
 	}
 
 	/**
@@ -94,7 +108,18 @@ public class FzrhyInfoController extends BladeController {
 	@ApiOperationSupport(order = 5)
 	@ApiOperation(value = "修改", notes = "传入fzrhyInfo")
 	public R update(@Valid @RequestBody FzrhyInfoEntity fzrhyInfo) {
-		return R.status(fzrhyInfoService.updateById(fzrhyInfo));
+		fzrhyInfoService.updateById(fzrhyInfo);
+		if (null != fzrhyInfo.getFzrhyRyList() && fzrhyInfo.getFzrhyRyList().size() > 0) {
+			for (FzrhyRyEntity fzrhyRyEntity : fzrhyInfo.getFzrhyRyList()) {
+				if (null != fzrhyRyEntity.getIsDeleted() && fzrhyRyEntity.getIsDeleted() == 1) {
+					fzrhyRyService.removeById(fzrhyRyEntity.getId());
+				} else {
+					fzrhyRyEntity.setFzrhyId(fzrhyInfo.getId());
+					fzrhyRyService.saveOrUpdate(fzrhyRyEntity);
+				}
+			}
+		}
+		return R.status(true);
 	}
 
 	/**

+ 96 - 0
src/main/java/org/springblade/modules/sqmy/controller/FzrhyRyController.java

@@ -0,0 +1,96 @@
+package org.springblade.modules.sqmy.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.sqmy.pojo.entity.FzrhyRyEntity;
+import org.springblade.modules.sqmy.service.IFzrhyRyService;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.Map;
+
+/**
+ * 每月安全负责人会议_参会人员 控制器
+ *
+ * @author wth
+ * @since 2024-11-12
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/fzrhyRy")
+@Api(value = "每月安全负责人会议_参会人员", tags = "每月安全负责人会议_参会人员接口")
+public class FzrhyRyController extends BladeController {
+
+	private final IFzrhyRyService fzrhyRyService;
+
+	/**
+	 * 每月安全负责人会议_参会人员 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes  = "传入fzrhyRy")
+	public R<FzrhyRyEntity> detail(FzrhyRyEntity fzrhyRy) {
+		FzrhyRyEntity detail = fzrhyRyService.getOne(Condition.getQueryWrapper(fzrhyRy));
+		return R.data(detail);
+	}
+
+
+	/**
+	 * 每月安全负责人会议_参会人员 自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes  = "传入fzrhyRy")
+	public R<IPage<FzrhyRyEntity>> page(Map<String, Object> params, Query query) {
+		IPage<FzrhyRyEntity> pages = fzrhyRyService.selectFzrhyRyPage(Condition.getPage(query), params);
+		return R.data(pages);
+	}
+
+	/**
+	 * 每月安全负责人会议_参会人员 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes  = "传入fzrhyRy")
+	public R save(@Valid @RequestBody FzrhyRyEntity fzrhyRy) {
+		return R.status(fzrhyRyService.save(fzrhyRy));
+	}
+
+	/**
+	 * 每月安全负责人会议_参会人员 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes  = "传入fzrhyRy")
+	public R update(@Valid @RequestBody FzrhyRyEntity fzrhyRy) {
+		return R.status(fzrhyRyService.updateById(fzrhyRy));
+	}
+
+	/**
+	 * 每月安全负责人会议_参会人员 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes  = "传入fzrhyRy")
+	public R submit(@Valid @RequestBody FzrhyRyEntity fzrhyRy) {
+		return R.status(fzrhyRyService.saveOrUpdate(fzrhyRy));
+	}
+
+	/**
+	 * 每月安全负责人会议_参会人员 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes  = "传入ids")
+	public R remove(@RequestParam String ids) {
+		return R.status(fzrhyRyService.deleteLogic(Func.toLongList(ids)));
+	}
+}

+ 3 - 0
src/main/java/org/springblade/modules/sqmy/mapper/FzrhyInfoMapper.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.apache.ibatis.annotations.Param;
 import org.springblade.modules.sqmy.excel.FzrhyInfoExcel;
 import org.springblade.modules.sqmy.pojo.entity.FzrhyInfoEntity;
+import org.springblade.modules.sqmy.pojo.entity.FzrhyRyEntity;
 import org.springblade.modules.sqmy.pojo.vo.FzrhyInfoVO;
 
 import java.util.List;
@@ -37,4 +38,6 @@ public interface FzrhyInfoMapper extends BaseMapper<FzrhyInfoEntity> {
 	List<FzrhyInfoExcel> exportFzrhyInfo(@Param("ew") Wrapper<FzrhyInfoEntity> queryWrapper);
 
 	FzrhyInfoEntity getByFzrhy(@Param("params") Map<String, Object> params);
+
+	List<FzrhyRyEntity> selectFzrhyRy(Long id);
 }

+ 4 - 0
src/main/java/org/springblade/modules/sqmy/mapper/FzrhyInfoMapper.xml

@@ -37,4 +37,8 @@
         ORDER BY fi.create_time DESC
         LIMIT 1
     </select>
+
+    <select id="selectFzrhyRy" resultType="org.springblade.modules.sqmy.pojo.entity.FzrhyRyEntity">
+        select * from sqmy.fzrhy_ry where is_deleted = 0 and fzrhy_id = #{id}
+    </select>
 </mapper>

+ 31 - 0
src/main/java/org/springblade/modules/sqmy/mapper/FzrhyRyMapper.java

@@ -0,0 +1,31 @@
+package org.springblade.modules.sqmy.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.modules.sqmy.excel.FzrhyInfoExcel;
+import org.springblade.modules.sqmy.pojo.entity.FzrhyInfoEntity;
+import org.springblade.modules.sqmy.pojo.entity.FzrhyRyEntity;
+import org.springblade.modules.sqmy.pojo.vo.FzrhyInfoVO;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 每月安全负责人会议 Mapper 接口
+ *
+ * @author wth
+ * @since 2024-11-12
+ */
+public interface FzrhyRyMapper extends BaseMapper<FzrhyRyEntity> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page   分页参数
+	 * @param params 查询参数
+	 * @return List<FzrhyInfoVO>
+	 */
+	List<FzrhyRyEntity> selectFzrhyRyPage(IPage page, @Param("params") Map<String, Object> params);
+}

+ 21 - 0
src/main/java/org/springblade/modules/sqmy/mapper/FzrhyRyMapper.xml

@@ -0,0 +1,21 @@
+<?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="org.springblade.modules.sqmy.mapper.FzrhyRyMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="fzrhyRyResultMap" type="org.springblade.modules.sqmy.pojo.entity.FzrhyRyEntity">
+        <result column="fzrhy_id" property="fzrhyId"/>
+        <result column="xm" property="xm"/>
+        <result column="dw" property="dw"/>
+        <result column="lxdh" property="lxdh"/>
+    </resultMap>
+
+    <select id="selectFzrhyRyPage" resultMap="fzrhyRyResultMap">
+        SELECT
+            *
+        FROM
+            sqmy.fzrhy_ry
+        WHERE
+            is_deleted = 0
+    </select>
+</mapper>

+ 5 - 0
src/main/java/org/springblade/modules/sqmy/pojo/entity/FzrhyInfoEntity.java

@@ -1,11 +1,14 @@
 package org.springblade.modules.sqmy.pojo.entity;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import org.springblade.core.mp.base.BaseEntity;
 
+import java.util.List;
+
 /**
  * 每月安全负责人会议 实体类
  *
@@ -39,4 +42,6 @@ public class FzrhyInfoEntity extends BaseEntity {
 	 */
 	@ApiModelProperty(value = "会议时间")
 	private String hysj;
+	@TableField(exist = false)
+	private List<FzrhyRyEntity> fzrhyRyList;
 }

+ 42 - 0
src/main/java/org/springblade/modules/sqmy/pojo/entity/FzrhyRyEntity.java

@@ -0,0 +1,42 @@
+package org.springblade.modules.sqmy.pojo.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+
+/**
+ * 每周见面会_参会人员 实体类
+ *
+ * @author wth
+ * @since 2024-11-12
+ */
+@Data
+@TableName("sqmy.fzrhy_ry")
+@EqualsAndHashCode(callSuper = true)
+public class FzrhyRyEntity extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 姓名
+	 */
+	@ApiModelProperty(value = "姓名")
+	private String xm;
+	/**
+	 * 单位
+	 */
+	@ApiModelProperty(value = "单位")
+	private String dw;
+	/**
+	 * 联系电话
+	 */
+	@ApiModelProperty(value = "联系电话")
+	private String lxdh;
+	/**
+	 * fzrhy_info表id
+	 */
+	@ApiModelProperty(value = "fzrhy_info表id")
+	private Long fzrhyId;
+}

+ 3 - 0
src/main/java/org/springblade/modules/sqmy/service/IFzrhyInfoService.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.core.mp.base.BaseService;
 import org.springblade.modules.sqmy.excel.FzrhyInfoExcel;
 import org.springblade.modules.sqmy.pojo.entity.FzrhyInfoEntity;
+import org.springblade.modules.sqmy.pojo.entity.FzrhyRyEntity;
 import org.springblade.modules.sqmy.pojo.vo.FzrhyInfoVO;
 
 import java.util.List;
@@ -35,4 +36,6 @@ public interface IFzrhyInfoService extends BaseService<FzrhyInfoEntity> {
 	List<FzrhyInfoExcel> exportFzrhyInfo(Wrapper<FzrhyInfoEntity> queryWrapper);
 
     FzrhyInfoEntity getByFzrhy(Map<String, Object> params);
+
+	List<FzrhyRyEntity> selectFzrhyRy(Long id);
 }

+ 29 - 0
src/main/java/org/springblade/modules/sqmy/service/IFzrhyRyService.java

@@ -0,0 +1,29 @@
+package org.springblade.modules.sqmy.service;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.modules.sqmy.excel.FzrhyInfoExcel;
+import org.springblade.modules.sqmy.pojo.entity.FzrhyInfoEntity;
+import org.springblade.modules.sqmy.pojo.entity.FzrhyRyEntity;
+import org.springblade.modules.sqmy.pojo.vo.FzrhyInfoVO;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 每月安全负责人会议 服务类
+ *
+ * @author wth
+ * @since 2024-11-12
+ */
+public interface IFzrhyRyService extends BaseService<FzrhyRyEntity> {
+	/**
+	 * 自定义分页
+	 *
+	 * @param page 分页参数
+	 * @param params 查询参数
+	 * @return IPage<FzrhyInfoVO>
+	 */
+	IPage<FzrhyRyEntity> selectFzrhyRyPage(IPage<FzrhyRyEntity> page, Map<String, Object> params);
+}

+ 6 - 0
src/main/java/org/springblade/modules/sqmy/service/impl/FzrhyInfoServiceImpl.java

@@ -6,6 +6,7 @@ import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.modules.sqmy.excel.FzrhyInfoExcel;
 import org.springblade.modules.sqmy.mapper.FzrhyInfoMapper;
 import org.springblade.modules.sqmy.pojo.entity.FzrhyInfoEntity;
+import org.springblade.modules.sqmy.pojo.entity.FzrhyRyEntity;
 import org.springblade.modules.sqmy.pojo.vo.FzrhyInfoVO;
 import org.springblade.modules.sqmy.service.IFzrhyInfoService;
 import org.springframework.stereotype.Service;
@@ -41,4 +42,9 @@ public class FzrhyInfoServiceImpl extends BaseServiceImpl<FzrhyInfoMapper, Fzrhy
 		return baseMapper.getByFzrhy(params);
 	}
 
+	@Override
+	public List<FzrhyRyEntity> selectFzrhyRy(Long id) {
+		return baseMapper.selectFzrhyRy(id);
+	}
+
 }

+ 32 - 0
src/main/java/org/springblade/modules/sqmy/service/impl/FzrhyRyServiceImpl.java

@@ -0,0 +1,32 @@
+package org.springblade.modules.sqmy.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.modules.sqmy.excel.FzrhyInfoExcel;
+import org.springblade.modules.sqmy.mapper.FzrhyInfoMapper;
+import org.springblade.modules.sqmy.mapper.FzrhyRyMapper;
+import org.springblade.modules.sqmy.pojo.entity.FzrhyInfoEntity;
+import org.springblade.modules.sqmy.pojo.entity.FzrhyRyEntity;
+import org.springblade.modules.sqmy.pojo.vo.FzrhyInfoVO;
+import org.springblade.modules.sqmy.service.IFzrhyInfoService;
+import org.springblade.modules.sqmy.service.IFzrhyRyService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 每月安全负责人会议 服务实现类
+ *
+ * @author wth
+ * @since 2024-11-12
+ */
+@Service
+public class FzrhyRyServiceImpl extends BaseServiceImpl<FzrhyRyMapper, FzrhyRyEntity> implements IFzrhyRyService {
+
+	@Override
+	public IPage<FzrhyRyEntity> selectFzrhyRyPage(IPage<FzrhyRyEntity> page, Map<String, Object> params) {
+		return page.setRecords(baseMapper.selectFzrhyRyPage(page, params));
+	}
+}