Browse Source

Merge remote-tracking branch 'origin/master'

82064491C07A712AE32B5B57EC6EF136 3 months ago
parent
commit
12a26b0383
30 changed files with 436 additions and 143 deletions
  1. 5 5
      lib/数据更新脚本.txt
  2. 1 0
      parth5/parth5/src/app/service/user.service.ts
  3. 2 2
      src/main/java/com/ghsc/partybuild/controller/PartyTwoController.java
  4. 3 8
      src/main/java/com/ghsc/partybuild/controller/jcdzzpb/ZzAssesConfirmController.java
  5. 23 8
      src/main/java/com/ghsc/partybuild/controller/jcdzzpb/ZzAssesTemplateController.java
  6. 1 1
      src/main/java/com/ghsc/partybuild/mapper/ZzAssesConfirmCQuery.java
  7. 2 2
      src/main/java/com/ghsc/partybuild/mapper/ZzAssesTemplateCQuery.java
  8. 3 1
      src/main/java/com/ghsc/partybuild/service/ZzAssesTemplateService.java
  9. 4 4
      src/main/java/com/ghsc/partybuild/service/impl/BigDataServiceImpl.java
  10. 5 2
      src/main/java/com/ghsc/partybuild/service/impl/jcdzzpb/ZzAssesConfirmServiceImpl.java
  11. 49 16
      src/main/java/com/ghsc/partybuild/service/impl/jcdzzpb/ZzAssesTemplateServiceImpl.java
  12. 70 0
      src/main/java/com/ghsc/partybuild/util/NumberUtils.java
  13. 10 0
      src/main/java/com/ghsc/partybuild/vo/jcdzzpb/ZzAssesTemplateItemVo.java
  14. 2 2
      src/main/java/com/ghsc/partybuild/vo/jcdzzpb/ZzAssesTemplateVo.java
  15. 3 3
      src/main/resources/mapping/BigDataCQuery.xml
  16. 3 2
      src/main/resources/mapping/ZzAssesConfirmCQuery.xml
  17. 27 1
      src/main/resources/mapping/ZzAssesTemplateCQuery.xml
  18. 2 2
      src/main/resources/static/app/main/bigdata/showDjdsj/dwdt.js
  19. 1 1
      src/main/resources/static/app/main/bigdata/showDjdsj/home.html
  20. 1 1
      src/main/resources/static/app/main/css/theme1.css
  21. 2 2
      src/main/resources/static/app/main/partyTwoExt/dnpxxx/list.html
  22. 44 32
      src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesConfirm/edit.html
  23. 86 26
      src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesConfirm/edit.js
  24. 5 0
      src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesConfirm/list.html
  25. 35 0
      src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesConfirm/list.js
  26. 8 8
      src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesTemplate/detail.html
  27. 11 11
      src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesTemplate/edit.html
  28. 26 2
      src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesTemplate/edit.js
  29. 1 1
      src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesTemplate/list.html
  30. 1 0
      src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesTemplate/list.js

+ 5 - 5
lib/数据更新脚本.txt

@@ -378,7 +378,7 @@ create or replace view vw_partyduty as
 DROP TABLE IF EXISTS `zz_asses_template`;
 CREATE TABLE `zz_asses_template`  (
   `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'id',
-  `template_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '模板名称',
+  `template_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '模板名称',
   `year` int NULL DEFAULT NULL COMMENT '年度',
   `create_time` datetime NULL  DEFAULT NULL COMMENT '创建时间',
   `create_userid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
@@ -393,10 +393,10 @@ DROP TABLE IF EXISTS `zz_asses_template_item`;
 CREATE TABLE `zz_asses_template_item`  (
   `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'id',
   `asses_template_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '考核模板id',
-  `item_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '考核项目',
+  `item_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '考核项目',
   `item_score` int NULL DEFAULT NULL COMMENT '分数',
-  `content` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '评比内容',
-  `standard` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '评比标准',
+  `content` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '评比内容',
+  `standard` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '评比标准',
   `create_time` datetime NULL  DEFAULT NULL COMMENT '创建时间',
   `create_userid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
   `update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
@@ -410,7 +410,7 @@ DROP TABLE IF EXISTS `zz_asses_materials`;
 CREATE TABLE `zz_asses_materials`  (
   `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'id',
   `dzzdm` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '所在组织',
-  `materials_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '考核项目',
+  `materials_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '评比材料名称',
   `year` int NULL DEFAULT NULL COMMENT '年度',
   `create_time` datetime NULL  DEFAULT NULL COMMENT '创建时间',
   `create_userid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',

+ 1 - 0
parth5/parth5/src/app/service/user.service.ts

@@ -65,6 +65,7 @@ export class UserService {
     this.lStorage.removeItem('userExt');
     this.lStorage.removeItem(this.tokenName);
     this.lStorage.removeItem(this.openIDName);
+    this.lStorage.removeItem(this.wxUserIdName);
   }
 
   setToken(token: string) {

+ 2 - 2
src/main/java/com/ghsc/partybuild/controller/PartyTwoController.java

@@ -167,8 +167,8 @@ public class PartyTwoController {
             }
             row.add(item.get("DZZMC"));
             row.add(dateUtils.strFormat(item.get("HONOURTIME").toString()));
-            row.add(item.get("LEVELNAME"));
-            row.add(item.get("HONOURTYPENAME"));
+            row.add(item.get("LevelName"));
+            row.add(item.get("honourTypeName"));
             rows.add(row);
         }
         data.setRows(rows);

+ 3 - 8
src/main/java/com/ghsc/partybuild/controller/jcdzzpb/ZzAssesConfirmController.java

@@ -94,14 +94,9 @@ public class ZzAssesConfirmController {
             message = e.toString();
         }
 
-        if (count > 0) {
-            result.setItem(count);
-            result.setSuccess(true);
-            result.setMsg("删除成功!");
-        } else {
-            result.setSuccess(false);
-            result.setMsg("删除失败!" + message);
-        }
+        result.setItem(count);
+        result.setSuccess(count > 0);
+        result.setMsg(count > 0 ? "删除成功!" : "删除失败!" + message);
         return result;
     }
 

+ 23 - 8
src/main/java/com/ghsc/partybuild/controller/jcdzzpb/ZzAssesTemplateController.java

@@ -88,7 +88,6 @@ public class ZzAssesTemplateController {
         RequsetData<Integer> result = new RequsetData<>();
         int count = 0;
         String message = "";
-
         try {
             List<String> idList = JsonMapper.jsonToObject(reqMap.get("ids").toString(), new TypeReference<List<String>>() {
             });
@@ -98,14 +97,30 @@ public class ZzAssesTemplateController {
             message = e.toString();
         }
 
-        if (count > 0) {
-            result.setItem(count);
-            result.setSuccess(true);
-            result.setMsg("删除成功!");
-        } else {
-            result.setSuccess(false);
-            result.setMsg("删除失败!" + message);
+        result.setItem(count);
+        result.setSuccess(count > 0);
+        result.setMsg(count > 0 ? "删除成功!" : "删除失败!" + message);
+        return result;
+    }
+
+    @ResponseBody
+    @PostMapping("/deleteItem")
+    public RequsetData<Integer> deleteItem(@RequestBody Map<String, Object> reqMap) {
+        RequsetData<Integer> result = new RequsetData<>();
+        int count = 0;
+        String message = "";
+        try {
+            List<String> idList = JsonMapper.jsonToObject(reqMap.get("ids").toString(), new TypeReference<List<String>>() {
+            });
+            count = zzAssesTemplateService.deleteItem(idList);
+        } catch (Exception e) {
+            e.printStackTrace();
+            message = e.toString();
         }
+
+        result.setItem(count);
+        result.setSuccess(count > 0);
+        result.setMsg(count > 0 ? "删除成功!" : "删除失败!" + message);
         return result;
     }
 

+ 1 - 1
src/main/java/com/ghsc/partybuild/mapper/ZzAssesConfirmCQuery.java

@@ -9,5 +9,5 @@ import java.util.List;
 public interface ZzAssesConfirmCQuery {
     List<ZzAssesConfirmVo> selectZzAssesConfirmList(@Param("id") String id, @Param("dzzdm") String dzzdm, @Param("year") String year);
 
-    List<ZzAssesItemScoreVo> selectZzAssesItemScoreList(@Param("assesConfirmId") String assesConfirmId);
+    List<ZzAssesItemScoreVo> findZzAssesItemScoreList(@Param("assesConfirmId") String assesConfirmId);
 }

+ 2 - 2
src/main/java/com/ghsc/partybuild/mapper/ZzAssesTemplateCQuery.java

@@ -1,6 +1,6 @@
 package com.ghsc.partybuild.mapper;
 
-import com.ghsc.partybuild.vo.jcdzzpb.ZzAssesMaterialsVo;
+import com.ghsc.partybuild.vo.jcdzzpb.ZzAssesTemplateItemVo;
 import com.ghsc.partybuild.vo.jcdzzpb.ZzAssesTemplateVo;
 import org.apache.ibatis.annotations.Param;
 
@@ -11,6 +11,6 @@ public interface ZzAssesTemplateCQuery {
 
     List<String> selectYearList();
 
-    List<ZzAssesMaterialsVo> selectZzAssesMaterialsList(@Param("id") String id, @Param("dzzdm") String dzzdm, @Param("year") String year, @Param("materialsName") String materialsName);
+    List<ZzAssesTemplateItemVo> findZzAssesTemplateItemList(@Param("assesTemplateId") String assesTemplateId);
 
 }

+ 3 - 1
src/main/java/com/ghsc/partybuild/service/ZzAssesTemplateService.java

@@ -14,5 +14,7 @@ public interface ZzAssesTemplateService {
 
     int save(ZzAssesTemplateVo data, String userId);
 
-    int delete(List<String> idList);
+    int delete(List<String> idList) throws Exception;
+
+    int deleteItem(List<String> idList) throws Exception;
 }

+ 4 - 4
src/main/java/com/ghsc/partybuild/service/impl/BigDataServiceImpl.java

@@ -505,11 +505,11 @@ public class BigDataServiceImpl implements BigDataService {
             Integer finalYear = year;
             HashMap<String, Object> dbData = list.stream().filter(e -> e.get("year").toString().equals(finalYear.toString())).findFirst().orElse(null);
             if (dbData != null) {
-                data.put("count1", dbData.get("count1"));
-                data.put("count2", dbData.get("count2"));
+                data.put("count_partyUser", dbData.get("count_partyUser"));
+                data.put("count_workUser", dbData.get("count_workUser"));
             } else {
-                data.put("count1", 0);
-                data.put("count2", 0);
+                data.put("count_partyUser", 0);
+                data.put("count_workUser", 0);
             }
 
             result.add(data);

+ 5 - 2
src/main/java/com/ghsc/partybuild/service/impl/jcdzzpb/ZzAssesConfirmServiceImpl.java

@@ -8,6 +8,7 @@ import com.ghsc.partybuild.model.ZzAssesConfirmExample;
 import com.ghsc.partybuild.model.ZzAssesItemScore;
 import com.ghsc.partybuild.model.ZzAssesItemScoreExample;
 import com.ghsc.partybuild.service.ZzAssesConfirmService;
+import com.ghsc.partybuild.util.NumberUtils;
 import com.ghsc.partybuild.util.StringUtils;
 import com.ghsc.partybuild.vo.jcdzzpb.ZzAssesConfirmVo;
 import com.github.pagehelper.PageHelper;
@@ -29,6 +30,8 @@ public class ZzAssesConfirmServiceImpl implements ZzAssesConfirmService {
     private ZzAssesItemScoreMapper zzAssesItemScoreMapper;
     @Autowired
     private StringUtils stringUtils;
+    @Autowired
+    private NumberUtils numberUtils;
 
     @Override
     public PageInfo<ZzAssesConfirmVo> getList(int pageIndex, int pageSize, String id, String dzzdm, String year){
@@ -46,7 +49,7 @@ public class ZzAssesConfirmServiceImpl implements ZzAssesConfirmService {
 
        ZzAssesConfirmVo data = zzAssesConfirmCQuery.selectZzAssesConfirmList(id, null, null).stream().findFirst().orElse(null);
         if(data != null){
-            data.setItemScoreList(zzAssesConfirmCQuery.selectZzAssesItemScoreList(data.getId()));
+            data.setItemScoreList(zzAssesConfirmCQuery.findZzAssesItemScoreList(data.getId()));
         }
         return data;
     }
@@ -86,7 +89,7 @@ public class ZzAssesConfirmServiceImpl implements ZzAssesConfirmService {
                 scoreModel.setId(UUID.randomUUID().toString());
                 scoreModel.setAssesConfirmId(data.getId());
                 scoreModel.setAssesTemplateItemId(item.getAssesTemplateItemId());
-                scoreModel.setScore(item.getScore());
+                scoreModel.setScore(numberUtils.convertIntegerIsNullToZero(item.getScore()));
                 scoreModel.setCreateTime(new Date());
                 scoreModel.setCreateUserid(userId);
 

+ 49 - 16
src/main/java/com/ghsc/partybuild/service/impl/jcdzzpb/ZzAssesTemplateServiceImpl.java

@@ -21,6 +21,10 @@ public class ZzAssesTemplateServiceImpl implements ZzAssesTemplateService {
     @Autowired
     private ZzAssesTemplateItemMapper zzAssesTemplateItemMapper;
     @Autowired
+    private ZzAssesConfirmMapper zzAssesConfirmMapper;
+    @Autowired
+    private ZzAssesItemScoreMapper zzAssesItemScoreMapper;
+    @Autowired
     private StringUtils stringUtils;
 
     @Override
@@ -44,9 +48,7 @@ public class ZzAssesTemplateServiceImpl implements ZzAssesTemplateService {
 
         ZzAssesTemplateVo data = zzAssesTemplateCQuery.selectZzAssesTemplateList(id, null, null).stream().findFirst().orElse(null);
         if(data != null){
-            ZzAssesTemplateItemExample emp = new ZzAssesTemplateItemExample();
-            emp.or().andAssesTemplateIdEqualTo(data.getId());
-            data.setItemList(zzAssesTemplateItemMapper.selectByExample(emp));
+            data.setItemList(zzAssesTemplateCQuery.findZzAssesTemplateItemList(data.getId()));
         }
         return data;
     }
@@ -77,20 +79,31 @@ public class ZzAssesTemplateServiceImpl implements ZzAssesTemplateService {
 
         ZzAssesTemplateItemExample emp = new ZzAssesTemplateItemExample();
         emp.or().andAssesTemplateIdEqualTo(data.getId());
-        zzAssesTemplateItemMapper.deleteByExample(emp);
+        List<ZzAssesTemplateItem> itemList = zzAssesTemplateItemMapper.selectByExample(emp);
         if(data.getItemList().size() > 0){
             data.getItemList().forEach(item -> {
-                ZzAssesTemplateItem itemModel = new ZzAssesTemplateItem();
-                itemModel.setId(UUID.randomUUID().toString());
-                itemModel.setAssesTemplateId(data.getId());
-                itemModel.setItemName(item.getItemName());
-                itemModel.setItemScore(item.getItemScore());
-                itemModel.setContent(item.getContent());
-                itemModel.setStandard(item.getStandard());
-                itemModel.setCreateTime(new Date());
-                itemModel.setCreateUserid(userId);
-
-                zzAssesTemplateItemMapper.insert(itemModel);
+                ZzAssesTemplateItem itemModel =  item.getId() == null ? null : itemList.stream().filter(x -> item.getId().equals(x.getId())).findFirst().orElse(null);
+                if(itemModel == null){
+                    itemModel = new ZzAssesTemplateItem();
+                    itemModel.setId(UUID.randomUUID().toString());
+                    itemModel.setAssesTemplateId(data.getId());
+                    itemModel.setItemName(item.getItemName());
+                    itemModel.setItemScore(item.getItemScore());
+                    itemModel.setContent(item.getContent());
+                    itemModel.setStandard(item.getStandard());
+                    itemModel.setCreateTime(new Date());
+                    itemModel.setCreateUserid(userId);
+                    zzAssesTemplateItemMapper.insert(itemModel);
+                }else{
+                    itemModel.setAssesTemplateId(data.getId());
+                    itemModel.setItemName(item.getItemName());
+                    itemModel.setItemScore(item.getItemScore());
+                    itemModel.setContent(item.getContent());
+                    itemModel.setStandard(item.getStandard());
+                    itemModel.setUpdateTime(new Date());
+                    itemModel.setUpdateUserid(userId);
+                    zzAssesTemplateItemMapper.updateByPrimaryKey(itemModel);
+                }
             });
         }
 
@@ -98,7 +111,14 @@ public class ZzAssesTemplateServiceImpl implements ZzAssesTemplateService {
     }
 
     @Override
-    public int delete(List<String> idList) {
+    public int delete(List<String> idList) throws Exception{
+
+        ZzAssesConfirmExample confirmExample = new ZzAssesConfirmExample();
+        confirmExample.or().andAssesTemplateIdIn(idList);
+        if(zzAssesConfirmMapper.selectByExample(confirmExample).size() > 0){
+            throw new Exception("模板已被引用,请核查!");
+        }
+
         ZzAssesTemplateExample exp = new ZzAssesTemplateExample();
         exp.or().andIdIn(idList);
 
@@ -109,4 +129,17 @@ public class ZzAssesTemplateServiceImpl implements ZzAssesTemplateService {
         return zzAssesTemplateMapper.deleteByExample(exp);
     }
 
+    @Override
+    public int deleteItem(List<String> idList) throws Exception{
+        ZzAssesItemScoreExample scoreExample = new ZzAssesItemScoreExample();
+        scoreExample.or().andAssesTemplateItemIdIn(idList);
+        if(zzAssesItemScoreMapper.selectByExample(scoreExample).stream().count() > 0){
+            throw new Exception("项目已被引用,请核查!");
+        }
+
+        ZzAssesTemplateItemExample emp = new ZzAssesTemplateItemExample();
+        emp.or().andIdIn(idList);
+        return zzAssesTemplateItemMapper.deleteByExample(emp);
+    }
+
 }

+ 70 - 0
src/main/java/com/ghsc/partybuild/util/NumberUtils.java

@@ -0,0 +1,70 @@
+package com.ghsc.partybuild.util;
+
+import org.springframework.stereotype.Component;
+
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+
+@Component
+public class NumberUtils {
+
+    public int convertIntegerIsNullToZero(Integer value) {
+        try{
+            if(value == null){
+                value = 0;
+            }
+
+            return value.intValue();
+        }catch (Exception e){
+            e.printStackTrace();
+            return 0;
+        }
+    }
+
+    public int convertIntegerIsNullToZero(Object value) {
+        try{
+            if(value == null){
+                value = 0;
+            }
+
+            return Integer.parseInt(value.toString());
+        }catch (Exception e){
+            e.printStackTrace();
+            return 0;
+        }
+    }
+
+    public Double convertBigDecimal(BigDecimal value, int num){
+        try{
+            if(value == null){
+                String res = "0.";
+                for (int i = 0; i < num; i++){
+                    res += "0";
+                }
+                return Double.parseDouble(res);
+            }
+
+            return Double.parseDouble(value.setScale(1, RoundingMode.HALF_UP).toString());
+        }catch (Exception e){
+            e.printStackTrace();
+            return 0.0;
+        }
+    }
+
+    public Double convertBigDecimal(Object value, int num){
+        try{
+            if(value == null){
+                String res = "0.";
+                for (int i = 0; i < num; i++){
+                    res += "0";
+                }
+                return Double.parseDouble(res);
+            }
+
+            return Double.parseDouble(new BigDecimal(value.toString()).setScale(1, RoundingMode.HALF_UP).toString());
+        }catch (Exception e){
+            e.printStackTrace();
+            return 0.0;
+        }
+    }
+}

+ 10 - 0
src/main/java/com/ghsc/partybuild/vo/jcdzzpb/ZzAssesTemplateItemVo.java

@@ -0,0 +1,10 @@
+package com.ghsc.partybuild.vo.jcdzzpb;
+
+import com.ghsc.partybuild.model.ZzAssesTemplateItem;
+import lombok.Data;
+
+
+@Data
+public class ZzAssesTemplateItemVo extends ZzAssesTemplateItem {
+    public Integer isUse;
+}

+ 2 - 2
src/main/java/com/ghsc/partybuild/vo/jcdzzpb/ZzAssesTemplateVo.java

@@ -1,7 +1,6 @@
 package com.ghsc.partybuild.vo.jcdzzpb;
 
 import com.ghsc.partybuild.model.ZzAssesTemplate;
-import com.ghsc.partybuild.model.ZzAssesTemplateItem;
 import lombok.Data;
 
 import java.util.List;
@@ -9,5 +8,6 @@ import java.util.List;
 @Data
 public class ZzAssesTemplateVo extends ZzAssesTemplate {
     public String createUserName;
-    public List<ZzAssesTemplateItem> itemList;
+    public Integer isUse;
+    public List<ZzAssesTemplateItemVo> itemList;
 }

+ 3 - 3
src/main/resources/mapping/BigDataCQuery.xml

@@ -735,9 +735,9 @@
     </select>
 
     <select id="selectDnpxxxTotalList" resultType="java.util.HashMap">
-        select year(honourtime) as year,
-            sum(case when honourlevel=1 then 1 else 0 end) as count1
-            , sum(case when honourlevel=2 then 1 else 0 end) as count2
+        select year(honourtime) as year
+            , sum(case when HONOURTYPE=3 then 1 else 0 end) as count_partyUser
+            , sum(case when HONOURTYPE=4 then 1 else 0 end) as count_workUser
             from dj_dnpxxx where pxlx=1 and OPERATESTATE <![CDATA[ <> ]]> 'D' group by year(honourtime)
     </select>
     

+ 3 - 2
src/main/resources/mapping/ZzAssesConfirmCQuery.xml

@@ -15,7 +15,7 @@
         <result column="template_name" jdbcType="VARCHAR" property="templateName" />
     </resultMap>
     <select id="selectZzAssesConfirmList" resultMap="BaseResultMap">
-        select zac.id, zac.dzzdm, zac.year,
+        select zac.id, zac.dzzdm, zac.year, zac.asses_template_id,
         zac.create_time, zac.create_userid, zac.update_time, zac.update_userid,
         zz.dzzmc, zzis.sum_score, zat.template_name
         from zz_asses_confirm zac
@@ -49,12 +49,13 @@
         <result column="content" jdbcType="VARCHAR" property="content" />
         <result column="standard" jdbcType="VARCHAR" property="standard" />
     </resultMap>
-    <select id="selectZzAssesItemScoreList" resultMap="ItemScoreBaseResultMap">
+    <select id="findZzAssesItemScoreList" resultMap="ItemScoreBaseResultMap">
         select zati.item_name, zati.item_score, zati.content, zati.standard,
                zaic.id, zaic.asses_confirm_id, zaic.asses_template_item_id, zaic.score,
                zaic.create_time, zaic.create_userid, zaic.update_time, zaic.update_userid
         from zz_asses_item_score zaic
                  left join zz_asses_template_item zati on zaic.asses_template_item_id = zati.id
         where zaic.asses_confirm_id = #{assesConfirmId}
+        order by zati.item_name
     </select>
 </mapper>

+ 27 - 1
src/main/resources/mapping/ZzAssesTemplateCQuery.xml

@@ -10,13 +10,15 @@
         <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
         <result column="update_userid" jdbcType="VARCHAR" property="updateUserid" />
         <result column="create_user_name" jdbcType="VARCHAR" property="createUserName" />
+        <result column="is_use" jdbcType="VARCHAR" property="isUse" />
     </resultMap>
     <select id="selectZzAssesTemplateList" resultMap="BaseResultMap">
         select zat.id, zat.template_name,	zat.year,
         zat.create_time, zat.create_userid, zat.update_time, zat.update_userid,
-        cu.USERNAME as create_user_name
+        cu.USERNAME as create_user_name, zac.is_use
         from zz_asses_template zat
         left join cf_users cu on zat.create_userid = cu.USERID
+        left join (select asses_template_id, count(0) as is_use from zz_asses_confirm group by asses_template_id) zac on zat.id = zac.asses_template_id
         where 1=1
         <if test="id != null and id != ''">
             and zat.id = #{id}
@@ -34,4 +36,28 @@
         from zz_asses_template
         order by `YEAR`
     </select>
+
+
+    <resultMap id="ItemBaseResultMap" type="com.ghsc.partybuild.vo.jcdzzpb.ZzAssesTemplateItemVo">
+        <id column="id" jdbcType="VARCHAR" property="id" />
+        <result column="asses_template_id" jdbcType="VARCHAR" property="assesTemplateId" />
+        <result column="item_name" jdbcType="VARCHAR" property="itemName" />
+        <result column="item_score" jdbcType="INTEGER" property="itemScore" />
+        <result column="content" jdbcType="VARCHAR" property="content" />
+        <result column="standard" jdbcType="VARCHAR" property="standard" />
+        <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+        <result column="create_userid" jdbcType="VARCHAR" property="createUserid" />
+        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+        <result column="update_userid" jdbcType="VARCHAR" property="updateUserid" />
+        <result column="is_use" jdbcType="VARCHAR" property="isUse" />
+    </resultMap>
+    <select id="findZzAssesTemplateItemList" resultMap="ItemBaseResultMap">
+        select zati.id, zati.asses_template_id, zati.item_name, zati.item_score, zati.content, zati.standard,
+               zati.create_time, zati.create_userid, zati.update_time, zati.update_userid,
+               zais.is_use
+        from zz_asses_template_item zati
+                 left join (select asses_template_item_id, count(0) as is_use from zz_asses_item_score group by asses_template_item_id) zais on zati.id = zais.asses_template_item_id
+        where zati.asses_template_id = #{assesTemplateId}
+        order by item_name
+    </select>
 </mapper>

+ 2 - 2
src/main/resources/static/app/main/bigdata/showDjdsj/dwdt.js

@@ -79,8 +79,8 @@
                     if (result.data != null && result.data.length > 0) {
                         angular.forEach(result.data, function (val) {
                             $scope.pxpy_x_dataList.push(val.year);
-                            $scope.pxpy_y_dataList[0].data.push(val.count2);
-                            $scope.pxpy_y_dataList[1].data.push(val.count1);
+                            $scope.pxpy_y_dataList[0].data.push(val.count_workUser);
+                            $scope.pxpy_y_dataList[1].data.push(val.count_partyUser);
                         });
                     }
                 });

+ 1 - 1
src/main/resources/static/app/main/bigdata/showDjdsj/home.html

@@ -120,7 +120,7 @@
             </div>
         </div>
 
-        <div class="bottom" style="height: calc(100% - 90px);">
+        <div class="bottom" style="height: calc(100% - 153px);">
             <div class="box b-5 b-all" style="width: 100%;margin: 0px;">
                 <h1>发展党员</h1>
                 <div class="text-all">

+ 1 - 1
src/main/resources/static/app/main/css/theme1.css

@@ -1883,7 +1883,7 @@ span.work {
     /*text-align: right;*/
     /*padding: 10px 10px 0px 10px;*/
     position: absolute;
-    right: 10px;
+    right: 20px;
     bottom: 20px;
 }
 

+ 2 - 2
src/main/resources/static/app/main/partyTwoExt/dnpxxx/list.html

@@ -169,8 +169,8 @@
                                             ng-if="it.USERNAME.length>16">...</span></td>
                                     <td>{{it.DZZMC}}</td>
                                     <td class="text-center">{{it.HONOURTIME|date:'yyyy-MM-dd'}}</td>
-                                    <td class="text-center">{{it.LEVELNAME}}</td>
-                                    <td class="text-center">{{it.HONOURTYPENAME}}</td>
+                                    <td class="text-center">{{it.LevelName}}</td>
+                                    <td class="text-center">{{it.honourTypeName}}</td>
                                 </tr>
                                 </tbody>
                             </table>

+ 44 - 32
src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesConfirm/edit.html

@@ -37,43 +37,55 @@
                 <div class="table-responsive list-table-panel">
                     <div class="list-table-title">
                         <div class="table-title">
-                            评定总分({{sumScore}})
+                            评定总分({{totalScore}})
                         </div>
                     </div>
-                    <div class="outoflow" style="max-height: 300px;">
-                        <table class="gt-table gt-table-bordered">
+                    <div>
+                        <table class="table-bordered  js-basic-example dataTable" style="width: 100%;max-width: 100%;margin-bottom: 20px;">
                             <thead>
-                            <tr>
-                                <th class="th-rownum">序号</th>
-                                <th>所属项目</th>
-                                <th>分值</th>
-                                <th>评比内容</th>
-                                <th>评比标准</th>
-                                <th>得分</th>
-                            </tr>
+                                <tr>
+                                    <th class="th-rownum text-center">序号</th>
+                                    <th class="text-center" style="width: 150px;">所属项目</th>
+                                    <th class="text-center" style="width: 80px;">小计</th>
+                                    <th class="text-center" style="width: 70px;">分值</th>
+                                    <th class="text-center">评比内容</th>
+                                    <th class="text-center">评比标准</th>
+                                    <th class="text-center" style="width: 80px;">得分</th>
+                                </tr>
                             </thead>
                             <tbody>
-                            <tr ng-repeat="it in dataModel.itemScoreList track by $index">
-                                <td class="text-center" scope="row">{{$index + 1}}</td>
-                                <td class="text-center">{{it.itemName}}</td>
-                                <td class="text-center">{{it.itemScore}}</td>
-                                <td style="min-width:300px;white-space:pre-line;" class="text-center">{{it.content}}</td>
-                                <td style="min-width:300px;white-space:pre-line;" class="text-center">{{it.standard}}</td>
-                                <td ng-class="{ 'has-error' : invalidFee($index+1,editForm,'score') &&  this.editForm.$submitted}">
-                                    <input type="number" autocomplete="off" class="form-control text-center" name="score_{{$index+1}}"
-                                          ng-change="getSumScore()" ng-model="it.score" ng-required="true" ng-pattern="/^[0-9]+(.[1-9])?$/"/>
-                                </td>
-                            </tr>
-                            <tr>
-                                <th colspan="2" style="text-align: right">总分:</th>
-                                <th>{{sumItemScore}}</th>
-                                <td></td>
-                                <td></td>
-                                <th>{{sumScore}}</th>
-                            </tr>
-                            <tr ng-if="dataModel.itemList.length<=0">
-                                <td colspan="7" style="text-align:center">暂无数据</td>
-                            </tr>
+                                <tr ng-repeat-start="item in templateElementList track by $index">
+                                    <td class="text-center" rowspan="{{item.itemListLength}}">{{$index + 1}}</td>
+                                    <td class="text-center" rowspan="{{item.itemListLength}}">{{item.itemName}}</td>
+                                    <td class="text-center" rowspan="{{item.itemListLength}}">{{item.subTotalItemScore}}</td>
+                                    <td class="text-center">{{item.itemList[0].itemScore}}</td>
+                                    <td style="min-width:300px;white-space:pre-line;" class="text-center">{{item.itemList[0].content}}</td>
+                                    <td style="min-width:300px;white-space:pre-line;" class="text-center">{{item.itemList[0].standard}}</td>
+                                    <td ng-class="{ 'has-error' : invalidFee($index+1,editForm,'score') &&  this.editForm.$submitted}">
+                                        <input type="number" autocomplete="off" class="form-control text-center" name="score_{{$index+1}}"
+                                               ng-model="item.itemList[0].score" ng-required="true" ng-pattern="/^[0-9]+(.[1-9])?$/"/>
+                                    </td>
+                                </tr>
+                                <tr ng-repeat-end ng-repeat="it in item.itemList track by $index" ng-if="$index!=0">
+                                    <td class="text-center">{{it.itemScore}}</td>
+                                    <td style="min-width:300px;white-space:pre-line;" class="text-center">{{it.content}}</td>
+                                    <td style="min-width:300px;white-space:pre-line;" class="text-center">{{it.standard}}</td>
+                                    <td ng-class="{ 'has-error' : invalidFee($index+1,editForm,'score') &&  this.editForm.$submitted}">
+                                        <input type="number" autocomplete="off" class="form-control text-center" name="score_{{$index+1}}"
+                                               ng-model="it.score" ng-required="true" ng-pattern="/^[0-9]+(.[1-9])?$/"/>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <th colspan="2" style="text-align: right">总分:</th>
+                                    <th class="text-center">{{totalItemScore}}</th>
+                                    <td></td>
+                                    <td></td>
+                                    <td></td>
+                                    <th class="text-center">{{totalScore}}</th>
+                                </tr>
+                                <tr ng-if="templateElementList.length<=0">
+                                    <td colspan="7" style="text-align:center">暂无数据</td>
+                                </tr>
                             </tbody>
                         </table>
                     </div>

+ 86 - 26
src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesConfirm/edit.js

@@ -8,8 +8,9 @@
         };
         $scope.op = $stateParams.op;
         $scope.yearList = []
-        $scope.sumScore = 0;
-        $scope.sumItemScore = 0;
+        $scope.totalScore = 0;
+        $scope.totalItemScore = 0;
+        $scope.templateElementList = []
 
         //选择党委
         $scope.partyConfig = {
@@ -27,10 +28,23 @@
                 $scope.dataModel.dzzmc = $scope.partyConfig.selectedText;
             }
         }, true);
+
         $scope.selectParty = function () {
             $partySelect.showModal();
         };
 
+        $scope.getYearList = function () {
+            $http({
+                method: 'get',
+                url: '../../api/jcdzzpb/assestemplate/getYearList',
+                params: {}
+            }).then(function (result) {
+                $scope.yearList = result.data.item;
+            }, function (resp) {
+
+            });
+        };
+
         //获取数据
         $scope.getById = function () {
             $http.get("../../api/jcdzzpb/assesconfirm/get", {
@@ -44,33 +58,15 @@
                 }
 
                 $scope.dataModel = result.data.item;
-                $scope.getSumScore();
+                $scope.mergenRow($scope.dataModel.itemScoreList);
+                $scope.totalItemScore = $scope.sumScore($scope.dataModel.itemScoreList, function (x){
+                    return isNaN(x.itemScore) ? 0 : x.itemScore;
+                })
             }, function () {
                 $scope.showMsg('错误', '服务器错误');
             });
         };
 
-        $scope.getYearList = function () {
-            $http({
-                method: 'get',
-                url: '../../api/jcdzzpb/assestemplate/getYearList',
-                params: {}
-            }).then(function (result) {
-                $scope.yearList = result.data.item;
-            }, function (resp) {
-
-            });
-        };
-
-        $scope.getSumScore = function (){
-            $scope.sumScore = 0;
-            $scope.sumItemScore = 0;
-            $scope.dataModel.itemScoreList.forEach(x=>{
-                $scope.sumScore += x.score;
-                $scope.sumItemScore += x.itemScore;
-            })
-        }
-
         $scope.checkYear = function () {
             let id = $scope.yearList.find(x=>x.year == $scope.dataModel.year).id;
             $http.get("../../api/jcdzzpb/assestemplate/get", {
@@ -90,12 +86,60 @@
                     x.assesTemplateItemId=x.id;
                     x.id='';
                 })
-                $scope.getSumScore();
+                $scope.mergenRow($scope.dataModel.itemScoreList);
+                $scope.totalItemScore = $scope.sumScore($scope.dataModel.itemScoreList, function (x){
+                    return isNaN(x.itemScore) ? 0 : x.itemScore;
+                })
             }, function () {
                 $scope.showMsg('错误', '服务器错误');
             });
         }
 
+        $scope.mergenRow = function (sourceData) {
+            var list = [];
+            angular.forEach(sourceData, function (item) {
+                var filterData = list.filter(function (x) {
+                    return x.itemName == item.itemName;
+                });
+                if (filterData.length == 0) {
+                    list.push({
+                        itemName: item.itemName,
+                        itemList: [item]
+                    });
+                } else {
+                    filterData[0].itemList.push(item);
+                }
+            });
+
+            angular.forEach(list, function (item) {
+                item.subTotalItemScore = $scope.sumScore(item.itemList, function (x) {
+                    return isNaN(x.itemScore) ? 0 : x.itemScore;
+                })
+                item.itemListLength = item.itemList.length;
+            })
+            $scope.templateElementList = list;
+        }
+
+        $scope.$watch("templateElementList", function (p1, p2) {
+            if (p1 != undefined && p1.length > 0) {
+                let resultData = [];
+                p1.forEach(function (item) {
+                    resultData = resultData.concat(item.itemList);
+                });
+                $scope.totalScore = $scope.sumScore(resultData, function (x) {
+                    return isNaN(x.score) ? 0 : x.score;
+                });
+            }
+        }, true);
+
+        $scope.sumScore = function (list, func) {
+            if (list != undefined && list.length > 0) {
+                return list.map(func).reduce(function (x, y) {
+                    return x + y;
+                });
+            }
+        }
+
         $scope.submitData = function (isflag) {
             if (!isflag) {
                 $scope.showMsg('提示', '请填写相关信息');
@@ -103,11 +147,27 @@
             }
 
             //数据验证
-            if ($scope.dataModel.itemScoreList.length <= 0) {
+            if ($scope.templateElementList.length <= 0) {
                 $scope.showMsg('错误', '请添加考核项目');
                 return false;
             }
 
+            let resultData = [];
+            $scope.templateElementList.forEach(function (item) {
+                resultData = resultData.concat(item.itemList);
+            });
+
+            let filterDate = resultData.filter(function (item) {
+                return item.score < 0 || item.score > item.itemScore;
+            });
+
+            if (filterDate.length > 0) {
+                $scope.showMsg('提示', "评分不能大于分值");
+                return;
+            }
+
+            $scope.dataModel.itemScoreList = resultData;
+
             //保存
             if (confirm("确定提交?")) {
                 $loading.show();

+ 5 - 0
src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesConfirm/list.html

@@ -107,6 +107,11 @@
                                                 title="更新">
                                             更新
                                         </button>
+                                        <button class="btn td-btn bg-light-green waves-effect"
+                                                ng-click="delete(it.id)"
+                                                title="删除">
+                                            删除
+                                        </button>
                                     </td>
                                 </tr>
                                 <tr ng-if="pageInfo.ptotal==0">

+ 35 - 0
src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesConfirm/list.js

@@ -69,6 +69,41 @@
             }, 100);
         };
 
+        $scope.delete = function (id) {
+            var ids = [];
+            if (id)
+                ids.push(id);
+            else
+                ids = $scope.dataList.filter(it => it.rowChecked == true).map(it => it.id);
+
+            if (ids.length == 0) {
+                $scope.showMsg('消息', "请选择需要删除的数据");
+                return false;
+            }
+
+            if (confirm("确定删除?")) {
+                $loading.show();
+                $http({
+                    method: "post",
+                    url: "../../api/jcdzzpb/assesconfirm/delete",
+                    data: {
+                        ids: JSON.stringify(ids)
+                    }
+                }).then(function (result) {
+                    $loading.hide();
+                    if (result.data.success) {
+                        $scope.showMsg('成功', result.data.msg);
+                        //重新刷新列表
+                        $scope.loadData();
+                    } else {
+                        $scope.showMsg('失败', result.data.msg);
+                    }
+                }, function (resp) {
+                    $scope.showMsg('错误', '服务器错误');
+                });
+            }
+        };
+
         $scope.$watch("selectparams.pageindex", function (newVal, oldVal) {
             if ($scope.pageInfo.ptotal > 0) {
                 $scope.loadData();

+ 8 - 8
src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesTemplate/detail.html

@@ -20,15 +20,15 @@
                             考核项目({{dataModel.itemList.length}})
                         </div>
                     </div>
-                    <div class="outoflow" style="max-height: 300px;">
-                        <table class="gt-table gt-table-bordered">
+                    <div>
+                        <table class="table-bordered  js-basic-example dataTable" style="width: 100%;max-width: 100%;margin-bottom: 20px;">
                             <thead>
                             <tr>
-                                <th class="th-rownum">序号</th>
-                                <th>所属项目</th>
-                                <th>分值</th>
-                                <th>评比内容</th>
-                                <th>评比标准</th>
+                                <th class="th-rownum text-center">序号</th>
+                                <th class="text-center" style="width: 150px;">所属项目</th>
+                                <th class="text-center" style="width: 70px;">分值</th>
+                                <th class="text-center">评比内容</th>
+                                <th class="text-center">评比标准</th>
                             </tr>
                             </thead>
                             <tbody>
@@ -41,7 +41,7 @@
                             </tr>
                             <tr>
                                 <th colspan="2" style="text-align: right">总分:</th>
-                                <th>{{sumScore}}</th>
+                                <th class="text-center">{{sumScore}}</th>
                                 <td></td>
                                 <td></td>
                                 <td></td>

+ 11 - 11
src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesTemplate/edit.html

@@ -35,15 +35,15 @@
                             </button>
                         </div>
                     </div>
-                    <div class="outoflow" style="max-height: 300px;">
-                        <table class="gt-table gt-table-bordered">
+                    <div>
+                        <table class="table-bordered  js-basic-example dataTable" style="width: 100%;max-width: 100%;margin-bottom: 20px;">
                             <thead>
                             <tr>
-                                <th class="th-rownum">序号</th>
-                                <th>所属项目</th>
-                                <th>分值</th>
-                                <th>评比内容</th>
-                                <th>评比标准</th>
+                                <th class="th-rownum text-center">序号</th>
+                                <th class="text-center" style="width: 150px;">所属项目</th>
+                                <th class="text-center" style="width: 70px;">分值</th>
+                                <th class="text-center">评比内容</th>
+                                <th class="text-center">评比标准</th>
                                 <th style="width: 150px;">操作</th>
                             </tr>
                             </thead>
@@ -59,15 +59,15 @@
                                             ng-click="editItem(it,$index)" title="编辑">
                                         编辑
                                     </button>
-                                    <button class="btn td-btn bg-pink waves-effect"
-                                            ng-click="deleteItem($index)" title="删除">
+                                    <button class="btn td-btn bg-pink waves-effect" ng-if="it.isUse == null"
+                                            ng-click="deleteItem(it.id, $index)" title="删除">
                                         删除
                                     </button>
                                 </td>
                             </tr>
                             <tr>
                                 <th colspan="2" style="text-align: right">总分:</th>
-                                <th>{{sumScore}}</th>
+                                <th class="text-center">{{sumScore}}</th>
                                 <td></td>
                                 <td></td>
                                 <td></td>
@@ -80,7 +80,7 @@
                     </div>
                 </div>
             </div>
-            <div class="form_foot" style="margin-bottom: 100px;">
+            <div class="form_foot" style="margin-right: 20px;">
                 <button type="button" class="btn btn-default" ng-click="pagechange();">取消</button>
                 <button type="submit"
                         class="btn btn-primary"

+ 26 - 2
src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesTemplate/edit.js

@@ -110,8 +110,32 @@
             itemEditModal.$promise.then(itemEditModal.show);
         }
 
-        $scope.deleteItem = function (index) {
-            $scope.dataModel.itemList.splice(index, 1);
+        $scope.deleteItem = function (id, index) {
+            if (confirm("确定删除?")) {
+                if(id){
+                    $loading.show();
+                    $http({
+                        method: "post",
+                        url: "../../api/jcdzzpb/assestemplate/deleteItem",
+                        data: {
+                            ids: JSON.stringify([id])
+                        }
+                    }).then(function (result) {
+                        $loading.hide();
+                        if (result.data.success) {
+                            $scope.showMsg('成功', result.data.msg);
+                            $scope.dataModel.itemList.splice(index, 1);
+                        } else {
+                            $scope.showMsg('失败', result.data.msg);
+                        }
+                    }, function (resp) {
+                        $scope.showMsg('错误', '服务器错误');
+                    });
+                }else{
+                    $scope.showMsg('成功', "删除成功");
+                    $scope.dataModel.itemList.splice(index, 1);
+                }
+            }
         };
 
         $scope.submitData = function (isflag) {

+ 1 - 1
src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesTemplate/list.html

@@ -108,7 +108,7 @@
                                             修改
                                         </button>
                                         <button class="btn td-btn bg-light-green waves-effect"
-                                                ng-click="delete(it.id)"
+                                                ng-click="delete(it.id)" ng-if="it.isUse == null"
                                                 title="删除">
                                             删除
                                         </button>

+ 1 - 0
src/main/resources/static/app/main/partyTwoExt/jcdzzpb/assesTemplate/list.js

@@ -80,6 +80,7 @@
                         $scope.showMsg('成功', result.data.msg);
                         //重新刷新列表
                         $scope.loadData();
+                        $scope.getYearList();
                     } else {
                         $scope.showMsg('失败', result.data.msg);
                     }