代码恢复
parent
b4c3061e84
commit
ca39da851b
6
pom.xml
6
pom.xml
|
@ -5,11 +5,11 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.zcloud</groupId>
|
||||
<artifactId>qa-prevention-czks</artifactId>
|
||||
<artifactId>qa-prevention-gwj</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>war</packaging><!-- 以war运行是改成war -->
|
||||
|
||||
<name>qa-prevention-czks</name>
|
||||
<name>qa-prevention-gwj</name>
|
||||
<description>qa-prevention-gwj for Spring Boot</description>
|
||||
|
||||
<parent>
|
||||
|
@ -507,7 +507,7 @@
|
|||
</includes>
|
||||
</resource>
|
||||
</resources> -->
|
||||
<finalName>qa-prevention-czks</finalName>
|
||||
<finalName>qa-prevention-gwj</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|||
import com.zcloud.dto.TenCorpDto;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.docking.DockingRelationService;
|
||||
import com.zcloud.service.mq.DockSendMessageService;
|
||||
import com.zcloud.service.mq.SendMessageService;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.Tools;
|
||||
|
@ -28,7 +29,7 @@ import java.util.Map;
|
|||
@Aspect
|
||||
public class DockingAspect {
|
||||
@Autowired
|
||||
private SendMessageService sendMessageService;
|
||||
private DockSendMessageService sendMessageService;
|
||||
@Autowired
|
||||
private DockingRelationService dockingRelationService;
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import com.zcloud.entity.system.User;
|
||||
import com.zcloud.service.bus.*;
|
||||
import com.zcloud.util.*;
|
||||
|
@ -83,6 +84,7 @@ public class CheckRecordController extends BaseController {
|
|||
@RequiresPermissions("checkrecord:add")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@DockAnnotation(isAdd = true)
|
||||
public Object add() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -97,8 +99,6 @@ public class CheckRecordController extends BaseController {
|
|||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
pd.put("FINISHED", '1'); // 修改时间
|
||||
pd.put("TYPE", '1');
|
||||
|
||||
|
||||
PageData sysdate = new PageData();
|
||||
sysdate.put("DATE", pd.get("CHECK_TIME"));
|
||||
sysdate = sysDateService.findByDate(sysdate);
|
||||
|
|
|
@ -7,6 +7,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import com.zcloud.service.bus.CorpInfoRelatedService;
|
||||
import com.zcloud.service.system.DictionariesService;
|
||||
import com.zcloud.util.*;
|
||||
|
@ -150,6 +151,7 @@ public class CorpInfoController extends BaseController {
|
|||
@RequestMapping(value="/edit", headers = "content-type=multipart/form-data")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@DockAnnotation(hasAnnex = true)
|
||||
public Object edit(
|
||||
@RequestParam(value="imgFiles",required=false) MultipartFile[] imgFiles,
|
||||
@RequestParam(value="fourFiles",required=false) MultipartFile[] fourFiles) throws Exception{
|
||||
|
@ -344,6 +346,7 @@ public class CorpInfoController extends BaseController {
|
|||
*/
|
||||
@RequestMapping(value="/resetPwd")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object resetPwd (Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
|
|
@ -14,6 +14,7 @@ import com.alibaba.fastjson.JSON;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
||||
import com.mysql.cj.xdevapi.UpdateParams;
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
@ -116,6 +117,7 @@ public class HiddenController extends BaseController {
|
|||
@RequestMapping(value = "/add")
|
||||
@RequiresPermissions("hidden:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation(isAdd = true)
|
||||
public Object add() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -260,6 +262,7 @@ public class HiddenController extends BaseController {
|
|||
// }
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
map.put("dockData",JSON.toJSONString(pd));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.zcloud.controller.bus;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
@ -27,6 +29,7 @@ public class HiddenRegionController extends BaseController {
|
|||
private HiddenRegionService hiddenRegionService;
|
||||
@Autowired
|
||||
private DepartmentService departmentService;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param page
|
||||
|
@ -34,6 +37,7 @@ public class HiddenRegionController extends BaseController {
|
|||
*/
|
||||
@RequestMapping(value = "/save")
|
||||
@ResponseBody
|
||||
@DockAnnotation(isAdd = true)
|
||||
public Object add(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -56,6 +60,7 @@ public class HiddenRegionController extends BaseController {
|
|||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
hiddenRegionService.save(pd);
|
||||
map.put("result",errInfo);
|
||||
map.put("dockData", JSON.toJSONString(pd));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -67,6 +72,7 @@ public class HiddenRegionController extends BaseController {
|
|||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object delete(@RequestParam String HIDDENREGION_ID) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -94,6 +100,7 @@ public class HiddenRegionController extends BaseController {
|
|||
*/
|
||||
@RequestMapping(value = "/edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object edit(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
|
|
|
@ -13,6 +13,8 @@ import java.util.Set;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.Null;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import com.zcloud.entity.system.User;
|
||||
import org.apache.fop.layoutmgr.PaddingElement;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
@ -74,6 +76,7 @@ public class IdentificationPartsController extends BaseController {
|
|||
private RiskCheckItemService riskcheckitemService;
|
||||
@Autowired
|
||||
private ResourceCorpService resourceCorpService;
|
||||
|
||||
/**新增
|
||||
* @param
|
||||
* @throws Exception
|
||||
|
@ -81,6 +84,7 @@ public class IdentificationPartsController extends BaseController {
|
|||
@RequestMapping(value="/add")
|
||||
@RequiresPermissions("identificationparts:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation(isAdd = true)
|
||||
public Object add() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -97,6 +101,7 @@ public class IdentificationPartsController extends BaseController {
|
|||
pd.put("ISMATCHING", "0");
|
||||
identificationpartsService.save(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("dockData", JSON.toJSONString(pd));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -126,6 +131,7 @@ public class IdentificationPartsController extends BaseController {
|
|||
@RequestMapping(value="/delete")
|
||||
@RequiresPermissions("identificationparts:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
|
@ -151,6 +157,7 @@ public class IdentificationPartsController extends BaseController {
|
|||
@RequestMapping(value="/edit")
|
||||
@RequiresPermissions("identificationparts:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object edit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -266,6 +273,7 @@ public class IdentificationPartsController extends BaseController {
|
|||
@RequestMapping(value="/deleteAll")
|
||||
@RequiresPermissions("identificationparts:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object deleteAll() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
|
|
@ -9,6 +9,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import com.zcloud.entity.system.User;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.fop.render.afp.modca.PageDescriptor;
|
||||
|
@ -75,6 +76,7 @@ public class ListManagerController extends BaseController {
|
|||
@RequiresPermissions("listmanager:add")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@DockAnnotation(isAdd = true)
|
||||
public Object add() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -88,7 +90,11 @@ public class ListManagerController extends BaseController {
|
|||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
if(pd.get("USER_IDS") != null && Tools.notEmpty(pd.get("USER_IDS").toString())) {
|
||||
String[] userIds = pd.get("USER_IDS").toString().split(",");
|
||||
Map<String,String> listmanagerMap = new HashMap<>();
|
||||
int count = 1;
|
||||
for(int i = 0; i < userIds.length; i++) {
|
||||
int itmeCount = 1;
|
||||
Map<String,String> itmeMap = new HashMap<>();
|
||||
pd.put("LISTMANAGER_ID", this.get32UUID()); //主键
|
||||
pd.put("USER_ID", userIds[i]);
|
||||
if(pd.get("LISTITEM")!=null && !pd.get("LISTITEM").equals("")) {
|
||||
|
@ -111,10 +117,13 @@ public class ListManagerController extends BaseController {
|
|||
itme.put("CREATTIME", DateUtil.date2Str(new Date())); //创建时间
|
||||
itme.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
itme.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
itmeMap.put("itme"+itmeCount,JSON.toJSONString(itme));
|
||||
itmeCount+=1;
|
||||
listcheckitemService.save(itme);
|
||||
set.add(json.get("RISKPOINT_ID").toString());
|
||||
}
|
||||
}
|
||||
pd.put("itmeMap",JSON.toJSONString(itmeMap));
|
||||
for (String str : set) {
|
||||
PageData rpd= new PageData();
|
||||
rpd.put("RISKPOINT_ID", str);
|
||||
|
@ -134,6 +143,8 @@ public class ListManagerController extends BaseController {
|
|||
pd.put("CCOUNT", ccount);
|
||||
pd.put("DCOUNT", dcount);
|
||||
}
|
||||
listmanagerMap.put("listmanager"+count, JSON.toJSONString(pd));
|
||||
count+=1;
|
||||
listmanagerService.save(pd);
|
||||
// 修改清单统计
|
||||
if(pd.get("TYPE") != null && Tools.notEmpty(pd.get("TYPE").toString())) { //清单类型 是节假日
|
||||
|
@ -227,8 +238,10 @@ public class ListManagerController extends BaseController {
|
|||
}
|
||||
}
|
||||
}
|
||||
pd.put("listmanagerMap",JSON.toJSONString(listmanagerMap));
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
map.put("dockData",JSON.toJSONString(pd));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -239,6 +252,7 @@ public class ListManagerController extends BaseController {
|
|||
@RequestMapping(value="/delete")
|
||||
@RequiresPermissions("listmanager:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation(isAdd = true)
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
|
@ -261,6 +275,7 @@ public class ListManagerController extends BaseController {
|
|||
disPd.put("OPERATTIME", DateUtil.date2Str(new Date())); //操作时间
|
||||
disPd.put("CREATOR", Jurisdiction.getUsername()); //创建人
|
||||
disPd.put("CREATTIME", DateUtil.date2Str(new Date())); //创建时间
|
||||
pd.put("disPd",JSON.toJSONString(disPd));
|
||||
listdisabletimeService.save(disPd);
|
||||
// 修改清单统计
|
||||
if(pd.get("TYPE") != null && Tools.notEmpty(pd.get("TYPE").toString())) {
|
||||
|
@ -355,6 +370,7 @@ public class ListManagerController extends BaseController {
|
|||
}
|
||||
// 将本频率内已检查的记录,改为不计入
|
||||
map.put("result", errInfo); //返回结果
|
||||
map.put("dockData", JSON.toJSONString(pd));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -365,6 +381,7 @@ public class ListManagerController extends BaseController {
|
|||
@RequestMapping(value="/enable")
|
||||
@RequiresPermissions("listmanager:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object enable() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
|
@ -486,6 +503,7 @@ public class ListManagerController extends BaseController {
|
|||
@RequestMapping(value="/edit")
|
||||
@RequiresPermissions("listmanager:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation(isAdd = true)
|
||||
public Object edit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -516,6 +534,8 @@ public class ListManagerController extends BaseController {
|
|||
int ccount=0;//一般风险数
|
||||
int dcount=0;//低风险数
|
||||
List<JSONObject> list = (List<JSONObject>)JSON.parse(pd.get("LISTITEM").toString());
|
||||
Map<String,String> itmeMap = new HashMap<String,String>();
|
||||
int count = 1;
|
||||
for (JSONObject json : list) {
|
||||
if(json.get("RISKCHECKITEM_ID")!=null && json.get("RISKCHECKITEM_ID")!="" && json.get("RISKPOINT_ID")!=null && json.get("RISKPOINT_ID")!="") {
|
||||
PageData itme = new PageData();
|
||||
|
@ -529,10 +549,13 @@ public class ListManagerController extends BaseController {
|
|||
itme.put("CREATTIME", DateUtil.date2Str(new Date())); //创建时间
|
||||
itme.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
itme.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
itmeMap.put("itme" + count, JSON.toJSONString(itme));
|
||||
count+=1;
|
||||
listcheckitemService.save(itme);
|
||||
set.add(json.get("RISKPOINT_ID").toString());
|
||||
}
|
||||
}
|
||||
pd.put("itmeMap",JSON.toJSONString(itmeMap));
|
||||
for (String str : set) {
|
||||
PageData rpd= new PageData();
|
||||
rpd.put("RISKPOINT_ID", str);
|
||||
|
@ -743,6 +766,7 @@ public class ListManagerController extends BaseController {
|
|||
|
||||
|
||||
map.put("result", errInfo);
|
||||
map.put("dockData", JSON.toJSONString(pd));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -946,6 +970,7 @@ public class ListManagerController extends BaseController {
|
|||
@RequestMapping(value="/deleteAll")
|
||||
@RequiresPermissions("listmanager:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object deleteAll() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
|
|
@ -7,6 +7,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -81,6 +82,7 @@ public class RiskCheckItemController extends BaseController {
|
|||
*/
|
||||
@RequestMapping(value="/edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object edit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
|
|
@ -11,6 +11,7 @@ import java.util.Map;
|
|||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import com.zcloud.entity.system.User;
|
||||
import org.apache.shiro.session.Session;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -82,6 +83,7 @@ public class RiskPointController extends BaseController {
|
|||
private DictionariesService dictionariesService;
|
||||
@Autowired
|
||||
private IdentificationPartsService identificationpartsService;
|
||||
|
||||
/**新增
|
||||
* @param
|
||||
* @throws Exception
|
||||
|
@ -90,6 +92,7 @@ public class RiskPointController extends BaseController {
|
|||
@RequiresPermissions("riskpoint:add")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@DockAnnotation(isAdd = true)
|
||||
public Object add() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -122,7 +125,8 @@ public class RiskPointController extends BaseController {
|
|||
}
|
||||
}
|
||||
PageData item = new PageData();
|
||||
item.put("RISKCHECKITEM_ID", this.get32UUID()); //主键
|
||||
String uuid = this.get32UUID();
|
||||
item.put("RISKCHECKITEM_ID", uuid); //主键
|
||||
item.put("RISKPOINT_ID", pd.get("RISKPOINT_ID")); //风险点主键
|
||||
item.put("ISDELETE", "0"); //是否删除
|
||||
item.put("CREATOR",Jurisdiction.getUsername()); //添加人
|
||||
|
@ -132,6 +136,8 @@ public class RiskPointController extends BaseController {
|
|||
item.put("CHECK_CONTENT", pd.get("CHECK_CONTENT")); //检查内容
|
||||
riskcheckitemService.save(item);
|
||||
map.put("result", errInfo);
|
||||
pd.put("RISKCHECKITEM_ID",uuid);
|
||||
map.put("dockData", JSON.toJSONString(pd));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -186,6 +192,7 @@ public class RiskPointController extends BaseController {
|
|||
@RequestMapping(value="/delete")
|
||||
@RequiresPermissions("riskpoint:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
|
@ -204,6 +211,7 @@ public class RiskPointController extends BaseController {
|
|||
@RequiresPermissions("riskpoint:edit")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@DockAnnotation
|
||||
public Object edit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -401,6 +409,7 @@ public class RiskPointController extends BaseController {
|
|||
@RequestMapping(value="/deleteAll")
|
||||
@RequiresPermissions("riskpoint:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object deleteAll() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
|
|
@ -9,6 +9,8 @@ import java.util.Map;
|
|||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import com.zcloud.entity.system.User;
|
||||
import org.apache.shiro.session.Session;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -65,6 +67,7 @@ public class RiskUnitController extends BaseController {
|
|||
@RequestMapping(value="/add")
|
||||
@RequiresPermissions("riskunit:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation(isAdd = true)
|
||||
public Object add() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -88,6 +91,7 @@ public class RiskUnitController extends BaseController {
|
|||
pd.put("ISDELETE", "0"); //是否删除 1-是 0-否
|
||||
riskunitService.save(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("dockData", JSON.toJSONString(pd));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -136,6 +140,7 @@ public class RiskUnitController extends BaseController {
|
|||
@RequestMapping(value="/delete")
|
||||
@RequiresPermissions("riskunit:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
|
@ -160,6 +165,7 @@ public class RiskUnitController extends BaseController {
|
|||
@RequestMapping(value="/edit")
|
||||
@RequiresPermissions("riskunit:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object edit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -259,6 +265,7 @@ public class RiskUnitController extends BaseController {
|
|||
@RequestMapping(value="/deleteAll")
|
||||
@RequiresPermissions("riskunit:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object deleteAll() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
|
|
@ -2,7 +2,9 @@ package com.zcloud.controller.system;
|
|||
|
||||
import java.util.*;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import com.zcloud.entity.system.User;
|
||||
import com.zcloud.service.system.PostService;
|
||||
import com.zcloud.service.system.SupervisionDepartmentService;
|
||||
|
@ -58,6 +60,7 @@ public class DepartmentController extends BaseController {
|
|||
@RequestMapping(value = "/add")
|
||||
@RequiresPermissions("department:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation(isAdd = true)
|
||||
public Object add(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -100,6 +103,7 @@ public class DepartmentController extends BaseController {
|
|||
}
|
||||
}
|
||||
map.put("result", errInfo); //返回结果
|
||||
map.put("dockData", JSON.toJSONString(pd));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -157,6 +161,7 @@ public class DepartmentController extends BaseController {
|
|||
@RequestMapping(value = "/delete")
|
||||
@RequiresPermissions("department:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object delete(@RequestParam String DEPARTMENT_ID) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -193,6 +198,7 @@ public class DepartmentController extends BaseController {
|
|||
@RequestMapping(value = "/edit")
|
||||
@RequiresPermissions("department:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object edit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -576,6 +582,7 @@ public class DepartmentController extends BaseController {
|
|||
@RequestMapping(value = "/goEditByLeaderOrCharge")
|
||||
@RequiresPermissions("department:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object goEditByLeader() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "fail";
|
||||
|
|
|
@ -6,6 +6,8 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
@ -45,16 +47,12 @@ public class PostController extends BaseController {
|
|||
@RequestMapping(value="/add")
|
||||
@RequiresPermissions("post:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation(isAdd = true)
|
||||
public Object add() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
pd.put("POST_ID", this.get32UUID()); //主键
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
||||
pd.put("ISDELETE", "0"); //是否删除
|
||||
|
@ -64,6 +62,7 @@ public class PostController extends BaseController {
|
|||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
postService.save(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("dockData", JSON.toJSONString(pd));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -74,6 +73,7 @@ public class PostController extends BaseController {
|
|||
@RequestMapping(value="/delete")
|
||||
@RequiresPermissions("post:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
|
@ -97,6 +97,7 @@ public class PostController extends BaseController {
|
|||
@RequestMapping(value="/edit")
|
||||
@RequiresPermissions("post:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object edit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
|
|
|
@ -6,6 +6,8 @@ import java.util.*;
|
|||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import com.zcloud.entity.system.Dictionaries;
|
||||
import com.zcloud.entity.system.User;
|
||||
import com.zcloud.service.bus.*;
|
||||
|
@ -494,6 +496,7 @@ public class UsersController extends BaseController {
|
|||
@RequestMapping(value = "/editUserScheduling")
|
||||
@RequiresPermissions("user:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object editUserScheduling(String USER_ID) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -512,6 +515,7 @@ public class UsersController extends BaseController {
|
|||
@RequestMapping(value = "/editUser")
|
||||
@RequiresPermissions("user:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object editUser() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -891,6 +895,7 @@ public class UsersController extends BaseController {
|
|||
@RequestMapping(value = "/saveUser")
|
||||
@RequiresPermissions("user:add")
|
||||
@ResponseBody
|
||||
@DockAnnotation(isAdd = true)
|
||||
public Object saveUser() throws Exception {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
String errInfo = "success";
|
||||
|
@ -924,6 +929,7 @@ public class UsersController extends BaseController {
|
|||
}else {
|
||||
pd.put("CARDNO",null);
|
||||
}
|
||||
pd.put("USER_IDENTITY","czks");
|
||||
usersService.saveUser(pd);
|
||||
//执行保存
|
||||
if ("true".equals(pd.getString("ISSTUDENT"))) {
|
||||
|
@ -1003,6 +1009,7 @@ public class UsersController extends BaseController {
|
|||
}
|
||||
FHLOG.save(Jurisdiction.getUsername(), "新增用户:" + pd.getString("USERNAME")); //记录日志
|
||||
map.put("result", errInfo); //返回结果
|
||||
map.put("dockData", JSON.toJSONString(pd));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -1014,6 +1021,7 @@ public class UsersController extends BaseController {
|
|||
@RequestMapping(value = "/deleteUser")
|
||||
@RequiresPermissions("user:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object deleteUser() throws Exception {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
PageData pd = new PageData();
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
package com.zcloud.service.mq;
|
||||
|
||||
import com.zcloud.dto.TenCorpDto;
|
||||
|
||||
public interface DockSendMessageService {
|
||||
|
||||
void sendMessage(TenCorpDto tenCorpDto) throws Exception;
|
||||
|
||||
void SendDelayQueue(TenCorpDto tenCorpDto);
|
||||
void SendDelayQueue(String message);
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
package com.zcloud.service.mq.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zcloud.dto.TenCorpDto;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.mq.MqErrorMessageLogMapper;
|
||||
import com.zcloud.mapper.datasource.mq.MqMessageLogMapper;
|
||||
import com.zcloud.service.mq.DockSendMessageService;
|
||||
import com.zcloud.service.mq.LogService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Warden;
|
||||
import com.zcloud.util.mq.MqUtil;
|
||||
import org.apache.rocketmq.client.producer.SendResult;
|
||||
import org.apache.rocketmq.client.producer.SendStatus;
|
||||
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.messaging.support.GenericMessage;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Service
|
||||
public class DockSendMessageServiceImpl implements DockSendMessageService {
|
||||
|
||||
@Value("${mq.topic.docking}")
|
||||
private String docking;
|
||||
|
||||
@Resource
|
||||
private RocketMQTemplate rocketMQTemplate;
|
||||
|
||||
@Resource
|
||||
private MqErrorMessageLogMapper mqErrorMessageLogMapper;
|
||||
|
||||
@Resource
|
||||
private LogService logService;
|
||||
|
||||
@Resource
|
||||
private MqMessageLogMapper mqMessageLogMapper;
|
||||
|
||||
public void sendMessage(TenCorpDto tenCorpDto) throws Exception {
|
||||
try {
|
||||
PageData log = tenCorpDto.getPd();
|
||||
log.put("MESSAGE_LOG_ID", Warden.get32UUID());
|
||||
log.put("CREATE_TIME", DateUtil.getTime());
|
||||
mqMessageLogMapper.save(log);
|
||||
System.out.println("生产者:" + tenCorpDto.toString());
|
||||
SendResult sendResult = rocketMQTemplate.syncSend(this.docking, tenCorpDto.toString());
|
||||
if (!sendResult.getSendStatus().equals(SendStatus.SEND_OK)) {
|
||||
throw new RuntimeException("产品入栈失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
PageData log = tenCorpDto.getPd();
|
||||
log.put("MESSAGE_ERROR_LOG_ID", Warden.get32UUID());
|
||||
log.put("ERROR_MESSAGE", e.getMessage());
|
||||
log.put("TYPE", "0");
|
||||
log.put("TIME", DateUtil.getTime());
|
||||
mqErrorMessageLogMapper.save(log);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void SendDelayQueue(TenCorpDto tenCorpDto) {
|
||||
PageData log = tenCorpDto.getPd();
|
||||
log.put("MESSAGE_LOG_ID", Warden.get32UUID());
|
||||
try {
|
||||
log.put("CREATE_TIME", DateUtil.getTime());
|
||||
log.put("PRODUCER_NAME",tenCorpDto.getProducer_name());
|
||||
log.put("TYPE","0");
|
||||
log.put("PLAN_TIME",tenCorpDto.getTime_stamp());
|
||||
mqMessageLogMapper.save(log);
|
||||
System.out.println("生产者:" + tenCorpDto.toString());
|
||||
// 推送消息
|
||||
SendResult sendResult = rocketMQTemplate.syncSend(
|
||||
MqUtil.analysistopic(tenCorpDto.getTopic()),
|
||||
new GenericMessage<>(tenCorpDto.toString()),
|
||||
3000,
|
||||
MqUtil.analysisTime(tenCorpDto.getTime_stamp()));
|
||||
|
||||
if (!sendResult.getSendStatus().equals(SendStatus.SEND_OK)) {
|
||||
throw new RuntimeException("产品入栈失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.put("ERROR_MESSAGE", e.getMessage());
|
||||
log.put("MESSAGE_ERROR_LOG_ID", Warden.get32UUID());
|
||||
log.put("TYPE", "0");
|
||||
log.put("TIME", DateUtil.getTime());
|
||||
mqErrorMessageLogMapper.save(log);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void SendDelayQueue(String message) {
|
||||
TenCorpDto tenCorpDto = JSONObject.parseObject(message,TenCorpDto.class);
|
||||
try {
|
||||
PageData log = tenCorpDto.getPd();
|
||||
log.put("CREATE_TIME", DateUtil.getTime());
|
||||
log.put("PRODUCER_NAME",tenCorpDto.getProducer_name());
|
||||
log.put("MESSAGE_LOG_ID", Warden.get32UUID());
|
||||
mqMessageLogMapper.save(log);
|
||||
System.out.println("生产者:" + tenCorpDto.toString());
|
||||
// 推送消息
|
||||
SendResult sendResult = rocketMQTemplate.syncSend(
|
||||
MqUtil.analysistopic(tenCorpDto.getTopic()),
|
||||
new GenericMessage<>(message),
|
||||
3000,
|
||||
MqUtil.analysisTime(tenCorpDto.getTime_stamp()));
|
||||
|
||||
if (!sendResult.getSendStatus().equals(SendStatus.SEND_OK)) {
|
||||
throw new RuntimeException("产品入栈失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
PageData log = tenCorpDto.getPd();
|
||||
logService.saveErrorMessage(log,e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
System.out.println(MqUtil.analysisTime("2023-06-30 14:30:00:000"));
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -170,6 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{JCR},
|
||||
#{CORPINFO_ID},
|
||||
#{CARDNO},
|
||||
#{USER_IDENTITY},
|
||||
#{ISDELETE}
|
||||
</sql>
|
||||
|
||||
|
|
Loading…
Reference in New Issue