Procházet zdrojové kódy

节点安排催报、项目附件催报

LIVE_YE před 2 roky
rodič
revize
6fd658e32f

+ 14 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/fgw/FgwJdapController.java

@@ -112,7 +112,20 @@ public class FgwJdapController extends BaseController
     @GetMapping("/cb/{id}")
     public AjaxResult cb(@PathVariable Long id)
     {
-        return toAjax(fgwJdapService.cb(id));
+        return fgwJdapService.cb(id);
+    }
+
+    /**
+     * 发改委_项目详情附件_催报
+     * id 项目id
+     * time 催办时限
+     * name 附件类型名称
+     */
+    @PreAuthorize("@ss.hasPermi('fgw:xmxq:fjcb')")
+    @GetMapping("/fj/cb")
+    public AjaxResult fjcb(Long id,String time,String name)
+    {
+        return fgwJdapService.fjcb(id,time,name);
     }
 
 

+ 109 - 3
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/fgw/FgwJdapServiceImpl.java → ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/FgwJdapServiceImpl.java

@@ -1,16 +1,27 @@
-package com.ruoyi.system.service.impl.fgw;
+package com.ruoyi.framework.web.service;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
+import java.util.stream.Collectors;
 
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.jPush.JPushToolUtil;
+import com.ruoyi.framework.manager.AsyncManager;
+import com.ruoyi.framework.manager.factory.AsyncFactory;
 import com.ruoyi.system.domain.fgw.FgwJdapDw;
 import com.ruoyi.system.domain.fgw.FgwJdapFj;
+import com.ruoyi.system.domain.fgw.FgwXmsb;
+import com.ruoyi.system.domain.projectV2.common.SendSmsConfig;
 import com.ruoyi.system.domain.vo.JdapVo;
+import com.ruoyi.system.mapper.SysUserMapper;
 import com.ruoyi.system.mapper.fgw.FgwJdapDwMapper;
 import com.ruoyi.system.mapper.fgw.FgwJdapFjMapper;
+import com.ruoyi.system.mapper.fgw.FgwXmsbMapper;
+import com.ruoyi.system.service.ISysUserService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.fgw.FgwJdapMapper;
@@ -32,6 +43,10 @@ public class FgwJdapServiceImpl implements IFgwJdapService {
     private FgwJdapDwMapper fgwJdapDwMapper;
     @Autowired
     private FgwJdapFjMapper fgwJdapFjMapper;
+    @Autowired
+    private FgwXmsbMapper fgwXmsbMapper;
+    @Autowired
+    private SysUserMapper userMapper;
 
     /**
      * 查询发改委_节点安排
@@ -319,7 +334,98 @@ public class FgwJdapServiceImpl implements IFgwJdapService {
     }
 
     @Override
-    public int cb(Long id) {
-        return 0;
+    public AjaxResult cb(Long id) {
+        //查找节点信息
+        FgwJdap fgwJdap = fgwJdapMapper.selectFgwJdapById(id);
+        //查询当前项目的所有人员
+        FgwJdapDw fgwJdapDw = new FgwJdapDw();
+        fgwJdapDw.setJdapId(id);
+        List<FgwJdapDw> fgwJdapDwList = fgwJdapDwMapper.selectFgwJdapDwList(fgwJdapDw);
+        //查找项目信息
+        FgwXmsb fgwXmsb = fgwXmsbMapper.selectFgwXmsbById(fgwJdap.getXmId());
+        //将消息推送给相关人员
+        List<SendSmsConfig> sendSmsConfigs = new ArrayList<>();
+        //发送短信
+        List<Long> deptIdList = new ArrayList<>();
+        for (FgwJdapDw jdapDw : fgwJdapDwList) {
+            deptIdList.add(jdapDw.getDeptId());
+        }
+
+        List<SysUser> sysUsers = userMapper.selectUserByDeptIdList(deptIdList);
+        SysUser sysUse = userMapper.selectUserById(fgwXmsb.getUserId());
+        sysUsers.add(sysUse);
+        if (sysUsers != null) {
+            //发极光推送
+            String notificationTitle = "消息通知";
+            String msgTitle = "节点催办";
+            String msgContent = "您有一条节点催办信息,请及时处理!节点时间:"+fgwJdap.getJdsj();
+            String jPushVO = "";
+            List<String> listS = sysUsers.stream().map(SysUser::getJgId).collect(Collectors.toList());
+            listS.removeAll(Collections.singleton(null));
+            if(listS!=null && listS.size()>0){
+                String[]  registrationId = listS.toArray(new String[listS.size()]);
+                JPushToolUtil.sendToRegistrationId(notificationTitle,msgTitle,msgContent,jPushVO,registrationId);
+            }
+
+            for (SysUser sysUser : sysUsers) {
+                if (StringUtils.isNotEmpty(sysUser.getPhonenumber())) {
+                    SendSmsConfig sendSmsConfig = new SendSmsConfig();
+                    sendSmsConfig.setPhone(sysUser.getPhonenumber());
+                    sendSmsConfigs.add(sendSmsConfig);
+                }
+            }
+            if (sendSmsConfigs.size() > 0) {
+                //TOdo 模板
+                //AsyncManager.me().execute(AsyncFactory.sendSms(sendSmsConfigs, "SMS_272470945"));
+            }
+        }
+
+        return AjaxResult.success("成功");
+    }
+
+    /**
+     * 发改委_项目详情附件_催报
+     * id 项目id
+     * time 催办时限
+     * name 附件类型名称
+     */
+    @Override
+    public AjaxResult fjcb(Long id, String time, String name) {
+
+        //查找项目信息
+        FgwXmsb fgwXmsb = fgwXmsbMapper.selectFgwXmsbById(id);
+        //将消息推送给相关人员
+        List<SendSmsConfig> sendSmsConfigs = new ArrayList<>();
+        //发送短信
+        List<SysUser> sysUsers = new ArrayList<>();
+        SysUser sysUse = userMapper.selectUserById(fgwXmsb.getUserId());
+        sysUsers.add(sysUse);
+        if (sysUsers != null) {
+            //发极光推送
+            String notificationTitle = "消息通知";
+            String msgTitle = "附件催办";
+            String msgContent = "您有一条项目文件催办信息,请及时处理!附件类型:"+name+",截止时间:"+time;
+            String jPushVO = "";
+            List<String> listS = sysUsers.stream().map(SysUser::getJgId).collect(Collectors.toList());
+            listS.removeAll(Collections.singleton(null));
+            if(listS!=null && listS.size()>0){
+                String[]  registrationId = listS.toArray(new String[listS.size()]);
+                JPushToolUtil.sendToRegistrationId(notificationTitle,msgTitle,msgContent,jPushVO,registrationId);
+            }
+
+            for (SysUser sysUser : sysUsers) {
+                if (StringUtils.isNotEmpty(sysUser.getPhonenumber())) {
+                    SendSmsConfig sendSmsConfig = new SendSmsConfig();
+                    sendSmsConfig.setPhone(sysUser.getPhonenumber());
+                    sendSmsConfigs.add(sendSmsConfig);
+                }
+            }
+            if (sendSmsConfigs.size() > 0) {
+                //TOdo 模板
+                //AsyncManager.me().execute(AsyncFactory.sendSms(sendSmsConfigs, "SMS_272470945"));
+            }
+        }
+
+        return AjaxResult.success("成功");
     }
 }

+ 5 - 0
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/Task.java

@@ -898,4 +898,9 @@ public class Task {
     }
 
 
+    /***
+     * 发改委节点安排未完成数据推送
+     */
+
+
 }

+ 0 - 40
ruoyi-system/src/main/java/com/ruoyi/system/domain/fgw/FgwDbd.java

@@ -20,25 +20,15 @@ public class FgwDbd extends BaseEntity
     /** ID */
     private Long id;
 
-    /** 督办单号(自动生成) */
-    @Excel(name = "督办单号(自动生成)")
-    private String dh;
-
     /** 项目ID */
     @Excel(name = "项目ID")
     private Long xmId;
 
-    /** 项目编号 */
-    @Excel(name = "项目编号")
-    private String xmbh;
 
     /** 项目名称 */
     @Excel(name = "项目名称")
     private String xmmc;
 
-    /** 督办内容编号 */
-    @Excel(name = "督办内容编号")
-    private Long dbnrId;
 
     /** 督办内容名称 */
     @Excel(name = "督办内容名称")
@@ -90,15 +80,6 @@ public class FgwDbd extends BaseEntity
     {
         return id;
     }
-    public void setDh(String dh) 
-    {
-        this.dh = dh;
-    }
-
-    public String getDh() 
-    {
-        return dh;
-    }
     public void setXmId(Long xmId) 
     {
         this.xmId = xmId;
@@ -108,15 +89,6 @@ public class FgwDbd extends BaseEntity
     {
         return xmId;
     }
-    public void setXmbh(String xmbh) 
-    {
-        this.xmbh = xmbh;
-    }
-
-    public String getXmbh() 
-    {
-        return xmbh;
-    }
     public void setXmmc(String xmmc) 
     {
         this.xmmc = xmmc;
@@ -126,15 +98,6 @@ public class FgwDbd extends BaseEntity
     {
         return xmmc;
     }
-    public void setDbnrId(Long dbnrId) 
-    {
-        this.dbnrId = dbnrId;
-    }
-
-    public Long getDbnrId() 
-    {
-        return dbnrId;
-    }
     public void setDbnrName(String dbnrName) 
     {
         this.dbnrName = dbnrName;
@@ -203,11 +166,8 @@ public class FgwDbd extends BaseEntity
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("id", getId())
-            .append("dh", getDh())
             .append("xmId", getXmId())
-            .append("xmbh", getXmbh())
             .append("xmmc", getXmmc())
-            .append("dbnrId", getDbnrId())
             .append("dbnrName", getDbnrName())
             .append("deptId", getDeptId())
             .append("deptName", getDeptName())

+ 11 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/fgw/FgwJzqk.java

@@ -95,6 +95,17 @@ public class FgwJzqk extends BaseEntity
         this.isJg = isJg;
     }
 
+    /** 节点ID */
+    private Long jdId;
+
+    public Long getJdId() {
+        return jdId;
+    }
+
+    public void setJdId(Long jdId) {
+        this.jdId = jdId;
+    }
+
     public String getIsSh() {
         return isSh;
     }

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java

@@ -125,4 +125,6 @@ public interface SysUserMapper
      */
     public SysUser checkEmailUnique(String email);
     public List<SysUser> selectUserByDeptId(Long deptId);
+
+    List<SysUser> selectUserByDeptIdList(List<Long> deptIdList);
 }

+ 3 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/fgw/IFgwJdapService.java

@@ -64,5 +64,7 @@ public interface IFgwJdapService
 
     int jdsh(String ids, String shyj,String shjg);
 
-    int cb(Long id);
+    AjaxResult cb(Long id);
+
+    AjaxResult fjcb(Long id, String time, String name);
 }

+ 0 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/fgw/FgwDbdServiceImpl.java

@@ -62,7 +62,6 @@ public class FgwDbdServiceImpl implements IFgwDbdService
         //查询督办的附件是否存在,附件存在不生成督办信息
         FgwFj fgwFj = new FgwFj();
         fgwFj.setXmId(fgwDbd.getXmId());
-        fgwFj.setType(String.valueOf(fgwDbd.getDbnrId()));
         List<FgwFj> fgwFjs = fgwFjMapper.selectFgwFjList(fgwFj);
         if(fgwFjs.size()>0){
             return AjaxResult.error("当前督办内容附件已上传");

+ 15 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/fgw/FgwJzqkServiceImpl.java

@@ -4,9 +4,12 @@ import java.util.List;
 
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.system.domain.fgw.FgwFj;
+import com.ruoyi.system.domain.fgw.FgwJdap;
 import com.ruoyi.system.domain.fgw.FgwJzqk;
 import com.ruoyi.system.mapper.fgw.FgwFjMapper;
+import com.ruoyi.system.mapper.fgw.FgwJdapMapper;
 import com.ruoyi.system.mapper.fgw.FgwJzqkMapper;
 import com.ruoyi.system.service.fgw.IFgwJzqkService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -26,6 +29,9 @@ public class FgwJzqkServiceImpl implements IFgwJzqkService {
 
     @Autowired
     private FgwFjMapper fgwFjMapper;
+    @Autowired
+    private FgwJdapMapper fgwJdapMapper;
+
 
     /**
      * 查询发改委_进展情况
@@ -85,6 +91,15 @@ public class FgwJzqkServiceImpl implements IFgwJzqkService {
      */
     @Override
     public int insertFgwJzqk(FgwJzqk fgwJzqk) {
+
+        if(StringUtils.isNotEmpty(fgwJzqk.getIsJd())){
+            //修改节点安排完成情况
+            FgwJdap fgwJdap = new FgwJdap();
+            fgwJdap.setId(fgwJzqk.getJdId());
+            fgwJdap.setSfwc("1");
+            fgwJdapMapper.updateFgwJdap(fgwJdap);
+        }
+
         fgwJzqk.setHbTime(DateUtils.getNowDate());
         fgwJzqk.setDeptId(SecurityUtils.getDeptId());
         int i = fgwJzqkMapper.insertFgwJzqk(fgwJzqk);

+ 26 - 8
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/fgw/FgwShyjServiceImpl.java

@@ -6,17 +6,12 @@ import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.system.domain.fgw.FgwFj;
-import com.ruoyi.system.domain.fgw.FgwJzqk;
-import com.ruoyi.system.domain.fgw.FgwShyj;
-import com.ruoyi.system.domain.fgw.FgwXmsb;
-import com.ruoyi.system.mapper.fgw.FgwFjMapper;
-import com.ruoyi.system.mapper.fgw.FgwJzqkMapper;
-import com.ruoyi.system.mapper.fgw.FgwShyjMapper;
-import com.ruoyi.system.mapper.fgw.FgwXmsbMapper;
+import com.ruoyi.system.domain.fgw.*;
+import com.ruoyi.system.mapper.fgw.*;
 import com.ruoyi.system.service.fgw.IFgwShyjService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import static com.ruoyi.common.constant.CommonConstants.*;
 
@@ -39,6 +34,8 @@ public class FgwShyjServiceImpl implements IFgwShyjService {
 
     @Autowired
     private FgwJzqkMapper fgwJzqkMapper;
+    @Autowired
+    private FgwJdapMapper fgwJdapMapper;
 
     /**
      * 查询发改委_审核意见
@@ -251,6 +248,7 @@ public class FgwShyjServiceImpl implements IFgwShyjService {
      * @return
      */
     @Override
+    @Transactional
     public AjaxResult jzqksh(FgwShyj fgwShyj) {
         //id 就是进展情况id
         Long id = fgwShyj.getId();
@@ -278,8 +276,28 @@ public class FgwShyjServiceImpl implements IFgwShyjService {
                 //修改主表状态
                 fgwXmsbMapper.updateFgwXmsbStatus(fgwXmsb);
             }
+            if(StringUtils.isNotEmpty(fgwJzqk.getIsJd())){
+                //修改节点安排完成情况
+                FgwJdap fgwJdap = new FgwJdap();
+                fgwJdap.setId(fgwJzqk.getJdId());
+                fgwJdap.setUpdateTime(DateUtils.getNowDate());
+                if("N".equals(fgwJzqk.getIsJd())){
+                    fgwJdap.setSfwc("2");
+                }else{
+                    fgwJdap.setSfwc("3");
+                }
+                fgwJdapMapper.updateFgwJdap(fgwJdap);
+            }
+
         } else if (THR.equals(shjg)) {
             fgwJzqk.setIsSh(THR);
+            if(StringUtils.isNotEmpty(fgwJzqk.getIsJd())){
+                //修改节点安排完成情况
+                FgwJdap fgwJdap = new FgwJdap();
+                fgwJdap.setId(fgwJzqk.getJdId());
+                fgwJdap.setSfwc("0");
+                fgwJdapMapper.updateFgwJdap(fgwJdap);
+            }
         }
         fgwJzqkMapper.updateFgwJzqk(fgwJzqk);
         fgwShyj.setCreateTime(DateUtils.getNowDate());

+ 6 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/fgw/FgwXmsbServiceImpl.java

@@ -8,7 +8,9 @@ import java.util.stream.Collectors;
 
 import com.ruoyi.common.annotation.DataScope;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.system.domain.fgw.FgwDbd;
 import com.ruoyi.system.domain.fgw.FgwFj;
 import com.ruoyi.system.domain.fgw.FgwXmsb;
@@ -90,7 +92,11 @@ public class FgwXmsbServiceImpl implements IFgwXmsbService
     @Override
     public int insertFgwXmsb(FgwXmsb fgwXmsb)
     {
+        SysUser user = SecurityUtils.getLoginUser().getUser();
         fgwXmsb.setCreateTime(DateUtils.getNowDate());
+        fgwXmsb.setUserId(user.getUserId());
+        fgwXmsb.setDeptId(user.getDeptId());
+        fgwXmsb.setDeptName(user.getDept().getDeptName());
         return fgwXmsbMapper.insertFgwXmsb(fgwXmsb);
     }
 
@@ -122,8 +128,6 @@ public class FgwXmsbServiceImpl implements IFgwXmsbService
                 if (id != null){
                     fgwFjMapper.insertFgwFj(fgwFj);
                 }
-                //修改督办的状态
-                fgwDbdMapper.updateFgwDbdByDbnrId(fgwXmsb.getId(),fgwFj.getType());
             }
         }
         return fgwXmsbMapper.updateFgwXmsb(fgwXmsb);

+ 8 - 1
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -146,8 +146,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectUserByDeptId" parameterType="Long" resultMap="SysUserResult">
 		select user_name, phonenumber from sys_user where dept_id = #{deptId} and del_flag = '0'  and status = '0'
 	</select>
+	<select id="selectUserByDeptIdList" resultMap="SysUserResult">
+		select user_name, phonenumber from sys_user where dept_id in
+		<foreach collection="array" item="deptId" open="(" separator="," close=")">
+			#{deptId}
+		</foreach>
+		and del_flag = '0'  and status = '0'
+	</select>
 
-    <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
+	<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
  		insert into sys_user(
  			<if test="userId != null and userId != 0">user_id,</if>
  			<if test="deptId != null and deptId != 0">dept_id,</if>

+ 2 - 23
ruoyi-system/src/main/resources/mapper/system/fgw/FgwDbdMapper.xml

@@ -6,11 +6,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <resultMap type="FgwDbd" id="FgwDbdResult">
         <result property="id"    column="id"    />
-        <result property="dh"    column="dh"    />
         <result property="xmId"    column="xm_id"    />
-        <result property="xmbh"    column="xmbh"    />
         <result property="xmmc"    column="xmmc"    />
-        <result property="dbnrId"    column="dbnr_id"    />
         <result property="dbnrName"    column="dbnr_name"    />
         <result property="deptId"    column="dept_id"    />
         <result property="deptName"    column="dept_name"    />
@@ -29,17 +26,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectFgwDbdVo">
-        select id, dh, xm_id, xmbh, xmmc, dbnr_id, dbnr_name, dept_id, dept_name, dbdj, yqwcsj, cqts, is_wc, create_by, create_time, update_by, update_time, remark from fgw_dbd
+        select id,  xm_id, xmmc, dbnr_name, dept_id, dept_name, dbdj, yqwcsj, cqts, is_wc, create_by, create_time, update_by, update_time, remark from fgw_dbd
     </sql>
 
     <select id="selectFgwDbdList" parameterType="FgwDbd" resultMap="FgwDbdResult">
         SELECT
         id,
-        dh,
         xm_id,
-        xmbh,
         xmmc,
-        dbnr_id,
         dbnr_name,
         dept_id,
         dept_name,
@@ -63,12 +57,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         remark
         FROM
         fgw_dbd
-        <where>  
-            <if test="dh != null  and dh != ''"> and dh = #{dh}</if>
+        <where>
             <if test="xmId != null "> and xm_id = #{xmId}</if>
-            <if test="xmbh != null  and xmbh != ''"> and xmbh = #{xmbh}</if>
             <if test="xmmc != null  and xmmc != ''"> and xmmc = #{xmmc}</if>
-            <if test="dbnrId != null "> and dbnr_id = #{dbnrId}</if>
             <if test="dbnrName != null  and dbnrName != ''"> and dbnr_name like concat('%', #{dbnrName}, '%')</if>
             <if test="deptId != null "> and dept_id = #{deptId}</if>
             <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
@@ -82,11 +73,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectFgwDbdById" parameterType="Long" resultMap="FgwDbdResult">
         SELECT
             id,
-            dh,
             xm_id,
-            xmbh,
             xmmc,
-            dbnr_id,
             dbnr_name,
             dept_id,
             dept_name,
@@ -139,11 +127,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="insertFgwDbd" parameterType="FgwDbd" useGeneratedKeys="true" keyProperty="id">
         insert into fgw_dbd
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="dh != null and dh != ''">dh,</if>
             <if test="xmId != null">xm_id,</if>
-            <if test="xmbh != null">xmbh,</if>
             <if test="xmmc != null and xmmc != ''">xmmc,</if>
-            <if test="dbnrId != null">dbnr_id,</if>
             <if test="dbnrName != null and dbnrName != ''">dbnr_name,</if>
             <if test="deptId != null">dept_id,</if>
             <if test="deptName != null and deptName != ''">dept_name,</if>
@@ -158,11 +143,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remark != null">remark,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="dh != null and dh != ''">#{dh},</if>
             <if test="xmId != null">#{xmId},</if>
-            <if test="xmbh != null">#{xmbh},</if>
             <if test="xmmc != null and xmmc != ''">#{xmmc},</if>
-            <if test="dbnrId != null">#{dbnrId},</if>
             <if test="dbnrName != null and dbnrName != ''">#{dbnrName},</if>
             <if test="deptId != null">#{deptId},</if>
             <if test="deptName != null and deptName != ''">#{deptName},</if>
@@ -181,11 +163,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateFgwDbd" parameterType="FgwDbd">
         update fgw_dbd
         <trim prefix="SET" suffixOverrides=",">
-            <if test="dh != null and dh != ''">dh = #{dh},</if>
             <if test="xmId != null">xm_id = #{xmId},</if>
-            <if test="xmbh != null">xmbh = #{xmbh},</if>
             <if test="xmmc != null and xmmc != ''">xmmc = #{xmmc},</if>
-            <if test="dbnrId != null">dbnr_id = #{dbnrId},</if>
             <if test="dbnrName != null and dbnrName != ''">dbnr_name = #{dbnrName},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>

+ 8 - 2
ruoyi-system/src/main/resources/mapper/system/fgw/FgwJzqkMapper.xml

@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <resultMap type="FgwJzqk" id="FgwJzqkResult">
         <result property="id"    column="id"    />
+        <result property="jdId"    column="jd_id"    />
         <result property="xmId"    column="xm_id"    />
         <result property="xmbh"    column="xmbh"    />
         <result property="xmmc"    column="xmmc"    />
@@ -28,12 +29,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectFgwJzqkVo">
-        select id, xm_id, xmbh,is_nt,is_js,is_jd,is_jg,nttz,is_sh, xmmc, dept_id, dept_name, jzqk, sgll, hb_time, create_by, create_time, update_by, update_time, remark from fgw_jzqk
+        select id,jd_id, xm_id, xmbh,is_nt,is_js,is_jd,is_jg,nttz,is_sh, xmmc, dept_id, dept_name, jzqk, sgll, hb_time, create_by, create_time, update_by, update_time, remark from fgw_jzqk
     </sql>
 
     <select id="selectFgwJzqkList" parameterType="FgwJzqk" resultMap="FgwJzqkResult">
         <include refid="selectFgwJzqkVo"/>
-        <where>  
+        <where>
+            <if test="jdId != null "> and jd_id = #{jdId}</if>
             <if test="xmId != null "> and xm_id = #{xmId}</if>
             <if test="xmbh != null  and xmbh != ''"> and xmbh = #{xmbh}</if>
             <if test="xmmc != null  and xmmc != ''"> and xmmc = #{xmmc}</if>
@@ -60,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectFgwJzqkTj" parameterType="FgwJzqk" resultMap="FgwJzqkResult">
         <include refid="selectFgwJzqkVo"/>
         <where>
+            <if test="jdId != null "> and jd_id = #{jdId}</if>
             <if test="xmId != null "> and xm_id = #{xmId}</if>
             <if test="xmbh != null  and xmbh != ''"> and xmbh = #{xmbh}</if>
             <if test="xmmc != null  and xmmc != ''"> and xmmc = #{xmmc}</if>
@@ -85,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="insertFgwJzqk" parameterType="FgwJzqk" useGeneratedKeys="true" keyProperty="id">
         insert into fgw_jzqk
         <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="jdId != null "> jd_id,</if>
             <if test="xmId != null">xm_id,</if>
             <if test="xmbh != null">xmbh,</if>
             <if test="xmmc != null and xmmc != ''">xmmc,</if>
@@ -106,6 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remark != null">remark,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="jdId != null ">#{jdId},</if>
             <if test="xmId != null">#{xmId},</if>
             <if test="xmbh != null">#{xmbh},</if>
             <if test="xmmc != null and xmmc != ''">#{xmmc},</if>
@@ -131,6 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateFgwJzqk" parameterType="FgwJzqk">
         update fgw_jzqk
         <trim prefix="SET" suffixOverrides=",">
+            <if test="jdId != null ">jd_id = #{jdId},</if>
             <if test="xmId != null">xm_id = #{xmId},</if>
             <if test="xmbh != null">xmbh = #{xmbh},</if>
             <if test="xmmc != null and xmmc != ''">xmmc = #{xmmc},</if>