Parcourir la source

添加联合审核意见

tianwu.sun il y a 2 mois
Parent
commit
d8a088e3c1

+ 26 - 0
src/main/java/com/bootdo/datas/controller/DataUnionController.java

@@ -3,7 +3,9 @@ package com.bootdo.datas.controller;
 import com.alibaba.fastjson.JSONArray;
 import com.bootdo.common.annotation.Log;
 import com.bootdo.common.utils.*;
+
 import com.bootdo.datas.domain.GyDataExcelDO;
+import com.bootdo.datas.domain.UnionOpinionDO;
 import com.bootdo.datas.dto.ExamineLogDTO;
 import com.bootdo.datas.dto.GyDataImportDTO;
 import com.bootdo.datas.service.ExamineLogService;
@@ -104,6 +106,30 @@ public class DataUnionController {
         return "datas/unionVerify/edit";
     }
 
+
+    @GetMapping("/unionOpinion/{id}")
+    @RequiresPermissions("datas:unionVerify:addUnionOpinion")
+    String unionOpinion(@PathVariable("id") Long id, Model model) {
+        model.addAttribute("id", id);
+        return "datas/unionVerify/unionOpinion";
+    }
+
+    /**
+     * @Description: 联合审核意见
+     * @Author: stw
+     * @Date: 2024/10/13 14:10
+     * @param unionOpinionDO
+     * @Return: R
+     */
+    @PostMapping("/addUnionOpinion")
+    @ResponseBody
+    @RequiresPermissions("datas:unionVerify:addUnionOpinion")
+    public R addUnionOpinion(UnionOpinionDO unionOpinionDO) {
+        log.info("联合审核意见 备案主键 id:" + unionOpinionDO.getId());
+        gyDataService.addUnionOpinion(unionOpinionDO);
+        return R.ok();
+    }
+
     /**
      * @param id
      * @Description: 列表页面 审核通过

+ 35 - 0
src/main/java/com/bootdo/datas/domain/UnionOpinionDO.java

@@ -0,0 +1,35 @@
+package com.bootdo.datas.domain;
+
+import java.io.Serializable;
+
+
+/**
+ * 
+ * 
+ * @author admin
+ * @email admin@163.com
+ * @date 2022-03-01 17:56:11
+ */
+public class UnionOpinionDO implements Serializable {
+	private static final long serialVersionUID = 1L;
+	//
+	private Long id;
+	//
+	private String opinion;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public String getOpinion() {
+		return opinion;
+	}
+
+	public void setOpinion(String opinion) {
+		this.opinion = opinion;
+	}
+}

+ 3 - 0
src/main/java/com/bootdo/datas/service/GyDataService.java

@@ -3,6 +3,7 @@ package com.bootdo.datas.service;
 import com.bootdo.datas.domain.ExpertOpinionDO;
 import com.bootdo.datas.domain.GbDataExcelDO;
 import com.bootdo.datas.domain.GyDataExcelDO;
+import com.bootdo.datas.domain.UnionOpinionDO;
 import com.bootdo.datas.dto.GyDataImportDTO;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -34,6 +35,8 @@ public interface GyDataService {
 
     void addExpertOpinion(ExpertOpinionDO expertOpinionDO);
 
+    void addUnionOpinion(UnionOpinionDO unionOpinionDO);
+
     String dec(MultipartFile file);
 
 

+ 15 - 0
src/main/java/com/bootdo/datas/service/impl/GyDataServiceImpl.java

@@ -627,6 +627,21 @@ public class GyDataServiceImpl implements GyDataService {
         }
     }
 
+
+    @Override
+    public void addUnionOpinion(UnionOpinionDO unionOpinionDO) {
+        GyDataImportDTO gyDataImportDTO = get(unionOpinionDO.getId());
+        RoleDO roleDO = roleService.get(gyDataImportDTO.getRoleId());
+        if (roleDO != null) {
+            ExamineLogDTO dto = new ExamineLogDTO();
+            dto.setUniqueKey(String.valueOf(unionOpinionDO.getId()));
+            dto.setDataType("DI_OPER");
+            dto.setMessage(roleDO.getRoleName() + "的联合审核意见为: " + unionOpinionDO.getOpinion());
+            examineLogService.save(dto);
+        }
+    }
+
+
     @Override
     public void batchRemove(Long[] ids) {
         gyDataDao.batchRemove(ids);

+ 1 - 1
src/main/resources/static/js/appjs/datas/expertVerify/data.js

@@ -112,7 +112,7 @@ myColumns.push(
             var g = '<a class="btn btn-success btn-sm ' + s_rebut_h + '" href="#" title="驳回"  mce_href="#" onclick="rebut(\''
                 + row.id
                 + '\')"><i class="fa fa-reply"></i></a> ';
-            var h = '<a class="btn btn-success btn-sm ' + s_expertOpinion_h + '" href="#" title="专家意见"  mce_href="#" onclick="expertOpinion(\''
+            var h = '<a class="btn btn-success btn-sm ' + s_opinion_h + '" href="#" title="专家意见"  mce_href="#" onclick="expertOpinion(\''
                 + row.id
                 + '\')"><i class="fa fa-edit"></i></a> ';
             if (row.dataStatus == '3' || row.dataStatus == '4' || row.dataStatus == '5' || row.dataStatus == '6') {

+ 1 - 1
src/main/resources/static/js/appjs/datas/expertVerify/expertOpinion.js

@@ -44,7 +44,7 @@ function validateRule() {
 		messages : {
 
 			opinion : {
-				required : icon + "请输入姓名专家意见"
+				required : icon + "请输入专家意见"
 			}
 		},
 		ignore:":hidden:not(select)",

+ 16 - 2
src/main/resources/static/js/appjs/datas/unionVerify/data.js

@@ -105,7 +105,7 @@ myColumns.push(
         title: '操作',
         field: 'id',
         align: 'center',
-        width: '160px',
+        width: '200px',
         formatter: function (value, row, index) {
             var e = '<a class="btn btn-primary btn-sm ' + s_edit_h + '" href="#" mce_href="#" title="详情" onclick="edit(\''
                 + row.id
@@ -119,10 +119,13 @@ myColumns.push(
             var g = '<a class="btn btn-success btn-sm ' + s_rebut_h + '" href="#" title="驳回"  mce_href="#" onclick="rebut(\''
                 + row.id
                 + '\')"><i class="fa fa-reply"></i></a> ';
+            var h = '<a class="btn btn-success btn-sm ' + s_opinion_h + '" href="#" title="专家意见"  mce_href="#" onclick="unionOpinion(\''
+                + row.id
+                + '\')"><i class="fa fa-edit"></i></a> ';
             if (row.dataStatus == '3' || row.dataStatus == '4' || row.dataStatus == '5' || row.dataStatus == '6') {
                 return e + d;
             } else if (row.dataStatus == '2') {
-                return e + f + g + d;
+                return e + f + g + d + h;
             }
         }
     });
@@ -228,6 +231,17 @@ function add() {
     });
 }
 
+function unionOpinion(id) {
+    layer.open({
+        type: 2,
+        title: '联合审核意见',
+        maxmin: true,
+        shadeClose: false, // 点击遮罩关闭层
+        area: ['800px', '500px'],
+        content: prefix + '/unionOpinion/'+ id  // iframe的url
+    });
+}
+
 function edit(id) {
     layer.open({
         type: 2,

+ 59 - 0
src/main/resources/static/js/appjs/datas/unionVerify/unionOpinion.js

@@ -0,0 +1,59 @@
+$().ready(function() {
+	validateRule();
+});
+
+$.validator.setDefaults({
+	submitHandler : function() {
+		save();
+	}
+});
+
+function save() {
+	$.ajax({
+		cache : true,
+		type : "POST",
+		url : "/datas/unionVerify/addUnionOpinion",
+		data : $('#signupForm').serialize(),// 你的formid
+		async : false,
+		error : function(request) {
+			parent.layer.alert("Connection error");
+		},
+		success : function(data) {
+			if (data.code == 0) {
+				parent.layer.msg("操作成功");
+				parent.reLoad();
+				var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
+				parent.layer.close(index);
+
+			} else {
+				parent.layer.alert(data.msg)
+			}
+
+		}
+	});
+
+}
+function validateRule() {
+	var icon = "<i class='fa fa-times-circle'></i> ";
+	$("#signupForm").validate({
+		rules : {
+			opinion : {
+				required : true
+			}
+		},
+		messages : {
+
+			opinion : {
+				required : icon + "请输入联合审核意见"
+			}
+		},
+		ignore:":hidden:not(select)",
+	})
+}
+
+
+//返回
+$("#go_back").click(function () {
+	var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
+	parent.layer.close(index);
+});

+ 2 - 2
src/main/resources/templates/datas/expertVerify/data.html

@@ -92,7 +92,7 @@
         var s_resetPwd_h = 'hidden';
         var s_verify_h = 'hidden';
         var s_rebut_h = 'hidden';
-        var s_expertOpinion_h = 'hidden';
+        var s_opinion_h = 'hidden';
     </script>
 </div>
 <div shiro:hasPermission="datas:expertVerify:edit">
@@ -127,7 +127,7 @@
 </div>
 <div shiro:hasPermission="datas:expertVerify:addExpertOpinion">
     <script type="text/javascript">
-        s_expertOpinion_h = '';
+        s_opinion_h = '';
     </script>
 </div>
 </div>

+ 6 - 0
src/main/resources/templates/datas/unionVerify/data.html

@@ -111,6 +111,7 @@
         var s_resetPwd_h = 'hidden';
         var s_verify_h = 'hidden';
         var s_rebut_h = 'hidden';
+        var s_opinion_h = 'hidden';
     </script>
 </div>
 <div shiro:hasPermission="datas:unionVerify:edit">
@@ -143,6 +144,11 @@
         s_nextVerify_h = '';
     </script>
 </div>
+<div shiro:hasPermission="datas:unionVerify:addUnionOpinion">
+    <script type="text/javascript">
+        s_opinion_h = '';
+    </script>
+</div>
 </div>
 <div th:include="include :: footer"></div>
 <script type="text/javascript" src="/js/plugins/distpicker/distpicker.data.min.js"></script>

+ 37 - 0
src/main/resources/templates/datas/unionVerify/unionOpinion.html

@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<meta charset="utf-8">
+<head th:include="include :: header"></head>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content ">
+		<div class="row">
+			<div class="col-sm-12">
+				<div class="ibox float-e-margins">
+					<div class="ibox-content">
+						<form class="form-horizontal m-t" id="signupForm">
+							<input id="id" name="id" th:value="${id}" type="hidden">
+							<div class="form-group">
+								<label class="col-sm-3 control-label">联合审核意见:</label>
+								<div class="col-sm-8">
+									<input id="opinion" name="opinion" class="form-control" type="text">
+								</div>
+							</div>
+
+							<div class="form-group">
+								<div class="col-sm-8 col-sm-offset-3">
+									<button type="reset" class="btn btn-outline-secondary" id="go_back">返回</button>
+									<button type="submit" class="btn btn-primary">提交</button>
+								</div>
+							</div>
+						</form>
+					</div>
+				</div>
+			</div>
+		</div>
+
+	</div>
+	<div th:include="include::footer"></div>
+	<script type="text/javascript" src="/js/appjs/datas/unionVerify/unionOpinion.js">
+	</script>
+</body>
+</html>