Jelajahi Sumber

Merge branch '20221124_sun新增项目申报项目扩展信息子表' of sckj/mz-cloud into master

15143018065 2 tahun lalu
induk
melakukan
7055e4ca1e

+ 36 - 0
ruoyi-modules/mz-business-btgl/src/main/java/com/ruoyi/business/domain/ZwywBtglGlbtmx.java

@@ -114,6 +114,42 @@ public class ZwywBtglGlbtmx extends BaseEntity
     @Digits(integer = 10,fraction = 2,message = "{总金额}")
     @Digits(integer = 10,fraction = 2,message = "{总金额}")
     private String szje;
     private String szje;
 
 
+    @Excel(name = "发放金额")
+    @ApiModelProperty(value = "发放金额", required = true)
+    @Range(min=0,max=10000000000L,message = "{发放金额}")
+    @Digits(integer = 10,fraction = 2,message = "{发放金额}")
+    private String jffje;
+
+    @Excel(name = "补发金额")
+    @ApiModelProperty(value = "补发金额", required = true)
+    @Range(min=0,max=10000000000L,message = "{补发金额}")
+    @Digits(integer = 10,fraction = 2,message = "{补发金额}")
+    private String jbfje;
+
+    @Excel(name = "总金额")
+    @ApiModelProperty(value = "总金额", required = true)
+    @Range(min=0,max=10000000000L,message = "{总金额}")
+    @Digits(integer = 10,fraction = 2,message = "{总金额}")
+    private String jzje;
+
+    @Excel(name = "发放金额")
+    @ApiModelProperty(value = "发放金额", required = true)
+    @Range(min=0,max=10000000000L,message = "{发放金额}")
+    @Digits(integer = 10,fraction = 2,message = "{发放金额}")
+    private String qffje;
+
+    @Excel(name = "补发金额")
+    @ApiModelProperty(value = "补发金额", required = true)
+    @Range(min=0,max=10000000000L,message = "{补发金额}")
+    @Digits(integer = 10,fraction = 2,message = "{补发金额}")
+    private String qbfje;
+
+    @Excel(name = "总金额")
+    @ApiModelProperty(value = "总金额", required = true)
+    @Range(min=0,max=10000000000L,message = "{总金额}")
+    @Digits(integer = 10,fraction = 2,message = "{总金额}")
+    private String qzje;
+
     @TableField(exist = false)
     @TableField(exist = false)
     private String hj;
     private String hj;
 
 

+ 62 - 0
ruoyi-modules/mz-business-xmsb/src/main/java/com/ruoyi/business/domain/ZwywXmsbKz.java

@@ -0,0 +1,62 @@
+package com.ruoyi.business.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+import com.ruoyi.system.validate.group.AddGroup;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.Size;
+
+/**
+ * 项目申报项目类型单配置键值信息对象 zwyw_xmsb_kz
+ *
+ * @author ruoyi
+ * @date 2022-11-24
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@TableName("zwyw_xmsb_kz")
+@ApiModel("项目申报项目类型单配置键值信息")
+public class ZwywXmsbKz extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键标识 */
+    @Excel(name = "主键标识")
+    @ApiModelProperty(value = "主键标识", required = true)
+    @NotBlank(message = "{主键标识}",groups = AddGroup.class)
+    private String id;
+
+    /** 项目类型主键标识 */
+    @Excel(name = "项目类型主键标识")
+    @ApiModelProperty(value = "项目类型主键标识", required = true)
+    @NotBlank(message = "{项目类型主键标识}",groups = AddGroup.class)
+    private String xmlxId;
+
+    /** 配置主键标识 */
+    @Excel(name = "配置主键标识")
+    @ApiModelProperty(value = "配置主键标识", required = true)
+    @NotBlank(message = "{配置主键标识}",groups = AddGroup.class)
+    private String pzId;
+
+    /** 项目申报主键标识 */
+    @Excel(name = "项目申报主键标识")
+    @ApiModelProperty(value = "项目申报主键标识", required = true)
+    @NotBlank(message = "{项目申报主键标识}",groups = AddGroup.class)
+    private String xmsbId;
+
+    /** 输入值 */
+    @Excel(name = "输入值")
+    @ApiModelProperty(value = "输入值", required = true)
+    @NotBlank(message = "{输入值}",groups = AddGroup.class)
+    @Size(min = 1, max = 400, message = "{输入值}")
+    private String value;
+
+}

+ 19 - 0
ruoyi-modules/mz-business-xmsb/src/main/java/com/ruoyi/business/mapper/ZwywXmsbKzMapper.java

@@ -0,0 +1,19 @@
+package com.ruoyi.business.mapper;
+
+import com.ruoyi.business.domain.ZwywXmsbKz;
+import com.ruoyi.common.datascope.utils.BaseMapperPlus;
+
+import java.util.List;
+
+/**
+ * 项目申报项目类型单配置键值信息Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2022-11-24
+ */
+public interface ZwywXmsbKzMapper extends BaseMapperPlus<ZwywXmsbKz> {
+
+    public void insertBatchKz(List<ZwywXmsbKz> kzList);
+
+    public void deleteBatchKz(String id);
+}

+ 45 - 6
ruoyi-modules/mz-business-xmsb/src/main/java/com/ruoyi/business/service/impl/ZwywXmsbCommonServiceImpl.java

@@ -4,10 +4,7 @@ import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
 import com.alibaba.fastjson2.JSONObject;
 import com.alibaba.fastjson2.TypeReference;
 import com.alibaba.fastjson2.TypeReference;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.ruoyi.business.domain.ZwywXmsbBaxx;
-import com.ruoyi.business.domain.ZwywXmsbCommon;
-import com.ruoyi.business.domain.ZwywXmsbXmbdpz;
-import com.ruoyi.business.domain.ZwywXmsbXmlx;
+import com.ruoyi.business.domain.*;
 import com.ruoyi.business.mapper.*;
 import com.ruoyi.business.mapper.*;
 import com.ruoyi.business.service.IZwywXmsbCommonService;
 import com.ruoyi.business.service.IZwywXmsbCommonService;
 import com.ruoyi.common.core.constant.SecurityConstants;
 import com.ruoyi.common.core.constant.SecurityConstants;
@@ -41,6 +38,9 @@ public class ZwywXmsbCommonServiceImpl implements IZwywXmsbCommonService
     @Autowired
     @Autowired
     private ZwywXmsbCommonMapper zwywXmsbCommonMapper;
     private ZwywXmsbCommonMapper zwywXmsbCommonMapper;
 
 
+    @Autowired
+    private ZwywXmsbKzMapper zwywXmsbKzMapper;
+
     @Autowired
     @Autowired
     private SysDeptJlMapper sysDeptJlMapper;
     private SysDeptJlMapper sysDeptJlMapper;
 
 
@@ -159,8 +159,27 @@ public class ZwywXmsbCommonServiceImpl implements IZwywXmsbCommonService
     @Override
     @Override
     public int insertZwywXmsbCommon(ZwywXmsbCommon zwywXmsbCommon)
     public int insertZwywXmsbCommon(ZwywXmsbCommon zwywXmsbCommon)
     {
     {
+        int res = 0;
         zwywXmsbCommon.setSbzt(XmsbStatus.CG.getCode());
         zwywXmsbCommon.setSbzt(XmsbStatus.CG.getCode());
-        return zwywXmsbCommonMapper.insert(zwywXmsbCommon);
+        res = zwywXmsbCommonMapper.insert(zwywXmsbCommon);
+        List<Map<String, Object>> maps = new ArrayList<>();
+        JSONArray array = JSONArray.parseArray(zwywXmsbCommon.getKz());
+        array.forEach(a -> maps.add(JSONObject.parseObject(a.toString())));
+        List<ZwywXmsbKz> pzList = new ArrayList<>();
+        maps.forEach(m -> {
+            ZwywXmsbKz kzPz = new ZwywXmsbKz();
+            if (m.containsKey("id") && m.containsKey("value")) {
+                if (StringUtils.isNotEmpty(m.get("value").toString())) {
+                    kzPz.setPzId(m.get("id").toString());
+                    kzPz.setXmsbId(zwywXmsbCommon.getId());
+                    kzPz.setXmlxId(zwywXmsbCommon.getXmlx());
+                    kzPz.setValue(m.get("value").toString());
+                    pzList.add(kzPz);
+                }
+            }
+        });
+        zwywXmsbKzMapper.insertBatchKz(pzList);
+        return res;
     }
     }
 
 
     /**
     /**
@@ -172,7 +191,26 @@ public class ZwywXmsbCommonServiceImpl implements IZwywXmsbCommonService
     @Override
     @Override
     public int updateZwywXmsbCommon(ZwywXmsbCommon zwywXmsbCommon)
     public int updateZwywXmsbCommon(ZwywXmsbCommon zwywXmsbCommon)
     {
     {
-        return zwywXmsbCommonMapper.updateById(zwywXmsbCommon);
+        int res = zwywXmsbCommonMapper.updateById(zwywXmsbCommon);
+        zwywXmsbKzMapper.deleteBatchKz(zwywXmsbCommon.getId());
+        List<Map<String, Object>> maps = new ArrayList<>();
+        JSONArray array = JSONArray.parseArray(zwywXmsbCommon.getKz());
+        array.forEach(a -> maps.add(JSONObject.parseObject(a.toString())));
+        List<ZwywXmsbKz> pzList = new ArrayList<>();
+        maps.forEach(m -> {
+            ZwywXmsbKz kzPz = new ZwywXmsbKz();
+            if (m.containsKey("id") && m.containsKey("value")) {
+                if (StringUtils.isNotEmpty(m.get("value").toString())) {
+                    kzPz.setPzId(m.get("id").toString());
+                    kzPz.setXmsbId(zwywXmsbCommon.getId());
+                    kzPz.setXmlxId(zwywXmsbCommon.getXmlx());
+                    kzPz.setValue(m.get("value").toString());
+                    pzList.add(kzPz);
+                }
+            }
+        });
+        zwywXmsbKzMapper.insertBatchKz(pzList);
+        return res;
     }
     }
 
 
     /**
     /**
@@ -188,6 +226,7 @@ public class ZwywXmsbCommonServiceImpl implements IZwywXmsbCommonService
         String id = Arrays.asList(ids).get(0);
         String id = Arrays.asList(ids).get(0);
         //根据项目申报信息id删除关联附件信息
         //根据项目申报信息id删除关联附件信息
         zwywXmsbFjMapper.deleteFjByXmsbId(id);
         zwywXmsbFjMapper.deleteFjByXmsbId(id);
+        zwywXmsbKzMapper.deleteBatchKz(id);
         return zwywXmsbCommonMapper.deleteBatchIds(Arrays.asList(ids));
         return zwywXmsbCommonMapper.deleteBatchIds(Arrays.asList(ids));
     }
     }
 
 

+ 38 - 0
ruoyi-modules/mz-business-xmsb/src/main/resources/mapper/business/ZwywXmsbKzMapper.xml

@@ -0,0 +1,38 @@
+<?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.ZwywXmsbKzMapper">
+    
+    <resultMap type="ZwywXmsbKz" id="ZwywXmsbKzResult">
+        <result property="id"    column="id"    />
+        <result property="xmlxId"    column="xmlx_id"    />
+        <result property="pzId"    column="pz_id"    />
+        <result property="xmsbId"    column="xmsb_id"    />
+        <result property="value"    column="value"    />
+        <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="createAreaCode"    column="create_area_code"    />
+        <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>
+
+    <insert id="insertBatchKz">
+        insert into zwyw_xmsb_kz( id, xmlx_id, pz_id, xmsb_id, value ) values
+        <foreach item="item" index="index" collection="list" separator=",">
+            ( #{item.id}, #{item.xmlxId}, #{item.pzId}, #{item.xmsbId}, #{item.value} )
+        </foreach>
+    </insert>
+
+    <insert id="deleteBatchKz">
+        delete from zwyw_xmsb_kz where xmsb_id = #{id}
+    </insert>
+</mapper>

+ 0 - 1
ruoyi-ui/src/views/business/xmsb/xmsbFj/index.vue

@@ -274,7 +274,6 @@ export default {
           return delXmsbFj(ids);
           return delXmsbFj(ids);
         })
         })
         .then(() => {
         .then(() => {
-          // this.getList();
           /****** sks 需要改动的地方 ind参数需要传进来 start ******/
           /****** sks 需要改动的地方 ind参数需要传进来 start ******/
           this.xmsbFjList.splice(index, 1);
           this.xmsbFjList.splice(index, 1);
           if (this.xmsbFjList.length === 0) {
           if (this.xmsbFjList.length === 0) {