Merge remote-tracking branch 'origin/dev' into liujun-2024-01-24-一公司动火功能变更

# Conflicts:
#	src/main/java/com/zcloud/util/Warden.java
liujun-2024-05-23-接口漏洞修复
liujun 2024-03-29 08:53:42 +08:00
commit e3c3993360
121 changed files with 10026 additions and 928 deletions

View File

@ -476,6 +476,13 @@
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<!-- liteflow -->
<dependency>
<groupId>com.yomahub</groupId>
<artifactId>liteflow-spring-boot-starter</artifactId>
<version>2.11.4.2</version>
</dependency>
</dependencies>
<build>
<!-- <finalName>qa-prevention-gwj</finalName>

View File

@ -7,6 +7,7 @@ import java.util.Map;
import com.zcloud.service.system.*;
import com.zcloud.util.*;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.DisabledAccountException;
@ -397,4 +398,22 @@ public class AppUsersController extends BaseController {
map.put("result", errInfo);
return map;
}
//根据用户id查询部门
@RequestMapping(value="/getDepartmentByUserId")
@ResponseBody
public Object getDepartmentByUserId()throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
PageData data = usersService.findById(pd);
if (data == null || StringUtils.equals(data.getString("DEPARTMENT_ID"),"")) {
map.put("result", errInfo);
return map;
}
map.put("data", data);
map.put("result", errInfo);
return map;
}
}

View File

@ -34,6 +34,8 @@ public class AppHomeController extends BaseController {
@Resource
private GFBreakGroundService GFbreakGroundService;
@Resource
private GFConfinedSpaceService GFconfinedspaceService;
@Autowired
private ConfinedSpaceService confinedspaceService;
@ -77,7 +79,7 @@ public class AppHomeController extends BaseController {
pd = this.getPageData();
PageData blindboardCount = GFblindboardService.countCheck(pd);// 待办盲板作业数统计
PageData breakGroundCount = GFbreakGroundService.countCheck(pd);// 待办动土作业数统计
PageData confinedspaceCount = confinedspaceService.countCheck(pd);// 待办有限空间作业数统计
PageData confinedspaceCount = GFconfinedspaceService.countCheck(pd);// 待办有限空间作业数统计
PageData electricityCount = GFelectricityService.countCheck(pd);// 待办临时用电作业数统计
PageData highworkCount = GFhighworkService.countCheck(pd);// 待办高处作业数统计
PageData hoistingCount = GFhoistingService.countCheck(pd);// 待办吊装作业数统计

View File

@ -14,6 +14,7 @@ import com.zcloud.service.highriskwork.HotWorkSafetyMethodRecordService;
import com.zcloud.service.highriskwork.HotworkToMeasuresService;
import com.zcloud.service.system.DictionariesService;
import com.zcloud.service.system.FHlogService;
import com.zcloud.service.system.UsersService;
import com.zcloud.util.*;
import com.zcloud.util.message.MessageService;
import org.apache.commons.io.FileUtils;
@ -86,6 +87,8 @@ public class AppHotWorkApplicationController extends BaseController {
*
*/
@Autowired
private UsersService usersService;
@Autowired
private HotWorkApplicationService hotworkapplicationService;
@Autowired
private HotWorkApplicationUserService hotWorkApplicationUserService;
@ -1753,7 +1756,8 @@ public class AppHotWorkApplicationController extends BaseController {
content.put("params2", "延时监火");
content.put("params3", "处理");// 作业操作
mes.put("CONTENT", content);// 站内信内容
noticeCorpService.sendNotice(mes);
noticeCorpService.sendNoticeToDep(mes); //向部门中的所有人员发通知
// noticeCorpService.sendNotice(mes);
} else if(hot.getString("STATE").equals("30")){
PageData hotUser = hotUserList.get(0);
String userID = hotUser.getString("USER_ID");

View File

@ -274,6 +274,7 @@ public class CorpInfoController extends BaseController {
pd2.put("TYPE",2);
List<PageData> fourImgs = imgfilesService.listAll(pd2);//四色图照图片
pd.put("INDUSTRYALL", CORP_TYPEALL);
pd.put("FOURTYPE", "1");
map.put("pd", pd);
map.put("pdrelated",pdrelated);
map.put("busImgs", busImgs);

View File

@ -156,6 +156,13 @@ public class IdentificationPartsController extends BaseController {
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
List<PageData> byName = identificationpartsService.findByName(pd);
if (byName != null && byName.size() > 0) {
errInfo = "fail";
map.put("result", errInfo);
map.put("msg", "辨识部位已存在,请修改后重试");
return map;
}
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
identificationpartsService.edit(pd);

View File

@ -75,7 +75,7 @@ public class RiskUnitController extends BaseController {
//pd.put("DEPARTMENT_ID",Jurisdiction.getDEPARTMENT_ID());
List<PageData> list = riskunitService.listAll(pd);
if(list!=null&&list.size()>0) {
map.put("result", "failed");
map.put("result", "fail");
map.put("exception", "风险点(单元)已存在,请修改后重试");
return map;
}

View File

@ -0,0 +1,219 @@
package com.zcloud.controller.depository;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.depository.LabelFactoryService;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Tools;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* luoxiaobao
* 2022-12-27
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/labelFactory")
public class LabelFactoryController extends BaseController {
@Resource
private LabelFactoryService labelfactoryService;
@RequestMapping(value = "/list")
@ResponseBody
public Object list(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
page.setPd(pd);
List<PageData> varList = labelfactoryService.list(page); //列出LabelFacory列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
* description:
*
* @author sparrow
*
* @return save result
* @throws Exception all
*/
@RequestMapping(value = "/addAncestors")
@ResponseBody
public Object addAncestors() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
map.put("result", "success");
PageData pd = this.getPageData();
PageData condition = new PageData();
condition.put("NAME",pd.getString("NAME"));
List<PageData> warden = labelfactoryService.listAll(condition);
if (warden != null && warden.size() >0){
map.put("code","9999");
map.put("errorMessage","节点名重复");
return map;
}
pd.put("BUS_LABEL_FACTORY_ID", this.get32UUID()); //主键
pd.put("PARENT_ID", "0");
pd.put("ANCESTORS_ID", pd.getString("BUS_LABEL_FACTORY_ID"));
pd.put("IS_ANCESTORS_FLAG", "1");
pd.put("CREATOR_ID", Jurisdiction.getUSER_ID());
pd.put("CREATED_TIME", new Date());
pd.put("ISDELETE", "0");
pd.put("LEVEL", "0");
labelfactoryService.save(pd);
map.put("code","0");
return map;
}
@RequestMapping(value = "/getAncestors")
@ResponseBody
public Object getAncestors() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = this.getPageData();
List<PageData> list = labelfactoryService.findAllAncestors(pd);
map.put("list",list);
map.put("result", errInfo);
return map;
}
@RequestMapping(value = "/tree")
@ResponseBody
public Object tree() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
PageData pd = this.getPageData();
List<PageData> tree = labelfactoryService.getTree(pd); //列出LabelFacory列表
map.put("tree", tree);
map.put("result", "success");
return map;
}
@RequestMapping(value = "/saveTree")
@ResponseBody
public Object saveTree() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
PageData pd = this.getPageData();
// 此处一定会炸雷(解决方案见历史版本)
List<PageData> tree = labelfactoryService.saveTree(pd); //列出LabelFacory列表
map.put("tree", tree);
map.put("result", "success");
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/add")
@ResponseBody
public Object add() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = this.getPageData();
pd.put("LABELFACORY_ID", this.get32UUID()); //主键
labelfactoryService.save(pd);
map.put("result", errInfo);
return map;
}
/**
*
*
* @throws Exception
*/
@RequestMapping(value = "/delete")
@RequiresPermissions("labelfacory:del")
@ResponseBody
public Object delete() throws Exception {
Map<String, String> map = new HashMap<String, String>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
labelfactoryService.delete(pd);
map.put("result", errInfo); //返回结果
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/edit")
@RequiresPermissions("labelfacory:edit")
@ResponseBody
public Object edit() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
labelfactoryService.edit(pd);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/goEdit")
@ResponseBody
public Object goEdit() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd = labelfactoryService.findById(pd); //根据ID读取
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/deleteAll")
@RequiresPermissions("labelfacory:del")
@ResponseBody
public Object deleteAll() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String DATA_IDS = pd.getString("DATA_IDS");
if (Tools.notEmpty(DATA_IDS)) {
String ArrayDATA_IDS[] = DATA_IDS.split(",");
labelfactoryService.deleteAll(ArrayDATA_IDS);
errInfo = "success";
} else {
errInfo = "error";
}
map.put("result", errInfo); //返回结果
return map;
}
}

View File

@ -0,0 +1,34 @@
package com.zcloud.controller.depository;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.PageData;
import com.zcloud.service.depository.TermLibraryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/labelFactory")
public class TermLibraryController extends BaseController {
@Autowired
private TermLibraryService termLibraryService;
@RequestMapping(value = "/termList")
@ResponseBody
public Object list() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
List<PageData> varList = termLibraryService.listAll(pd); //列出LabelFacory列表
map.put("varList", varList);
map.put("result", errInfo);
return map;
}
}

View File

@ -0,0 +1,328 @@
package com.zcloud.controller.depository;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.bus.CorpInfoService;
import com.zcloud.service.depository.TextLibraryService;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Tools;
import com.zcloud.util.Warden;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
*
* luoxiaobao
* 2022-12-27
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/textLibrary")
public class TextLibraryController extends BaseController {
@Resource
private TextLibraryService textlibraryService;
@Resource
private CorpInfoService corpInfoService;
@RequestMapping(value = "/init")
@ResponseBody
public Object init(@RequestParam(value = "FILE", required = false) MultipartFile[] FILE) throws Exception {
Map<String, Object> response = new HashMap<>();
PageData request = this.getPageData();
textlibraryService.init(request, FILE);
response.put("result", "success");
return response;
}
@RequestMapping(value = "/list")
@ResponseBody
public Object list(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
PageData pd = this.getPageData();
String KEYWORDS = pd.getString("KEYWORDS");
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
List<String> labels_condition = new ArrayList<>();
List<String> category_condition = new ArrayList<>();
if (StringUtils.isNotEmpty(pd.getString("labels"))) {
List<PageData> _labels = Warden.getList(pd.getString("labels"));
List<String> labels = _labels.stream().map(n -> n.getString("BUS_LABEL_FACTORY_ID")).filter(StringUtils::isNotBlank).collect(Collectors.toList());
if (labels.size() > 0) labels_condition.addAll(labels);
}
if (StringUtils.isNotEmpty(pd.getString("CATEGORY_LIST"))) {
List<PageData> _category_list = Warden.getList(pd.getString("CATEGORY_LIST"));
List<String> category_list = _category_list.stream().map(n -> n.getString("DICTIONARIES_ID")).filter(StringUtils::isNotBlank).collect(Collectors.toList());
if (category_list.size() > 0) category_condition.addAll(category_list);
}
if (StringUtils.isNotEmpty(pd.getString("SPECIFICATION_TYPES"))) {
List<PageData> _SPECIFICATION_TYPES = Warden.getList(pd.getString("SPECIFICATION_TYPES"));
List<String> specification_types = _SPECIFICATION_TYPES.stream().map(n -> n.getString("DICTIONARIES_ID")).filter(StringUtils::isNotBlank).collect(Collectors.toList());
if (specification_types.size() > 0) category_condition.addAll(specification_types);
}
if (StringUtils.isNotEmpty(pd.getString("TYPES"))) {
List<PageData> _TYPES = Warden.getList(pd.getString("TYPES"));
List<String> types = _TYPES.stream().map(n -> n.getString("DICTIONARIES_ID")).filter(StringUtils::isNotBlank).collect(Collectors.toList());
if (types.size() > 0) category_condition.addAll(types);
}
if (StringUtils.isNotEmpty(pd.getString("ATTRIBUTE_LIST"))) {
List<PageData> _TYPES = Warden.getList(pd.getString("ATTRIBUTE_LIST"));
List<String> types = _TYPES.stream().map(n -> n.getString("DICTIONARIES_ID")).filter(StringUtils::isNotBlank).collect(Collectors.toList());
if (types.size() > 0) category_condition.addAll(types);
}
pd.put("LABELS", labels_condition.toArray());
pd.put("CATEGORY_IDS", category_condition.toArray());
PageData condition = new PageData();
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData corp_info = corpInfoService.findById(condition);
if (StringUtils.isEmpty(corp_info.getString("CORP_TYPE4"))) {
if (StringUtils.isEmpty(corp_info.getString("CORP_TYPE3"))) {
if (StringUtils.isEmpty(corp_info.getString("CORP_TYPE2"))) {
pd.put("CATEGORY_ID", corp_info.getString("CORP_TYPE"));
} else {
pd.put("CATEGORY_ID", corp_info.getString("CORP_TYPE2"));
}
} else {
pd.put("CATEGORY_ID", corp_info.getString("CORP_TYPE3"));
}
} else {
pd.put("CATEGORY_ID", corp_info.getString("CORP_TYPE4"));
}
if (StringUtils.isEmpty(pd.getString("CORPINFO_ID")))
pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID());
if ("3".equals(pd.getString("ASSOCIATION"))) {
pd.put("TYPE_ONE", "43ed4012090d4614bb35da60d06c8264");
pd.put("plan",pd.getString("CATEGORY_ID"));
pd.put("CATEGORY_ID","");
}
if ("2".equals(pd.getString("ASSOCIATION"))){
pd.put("TYPE_ONE", "7158f688d0f34054a28a9275139298df");
}
if ("1".equals(pd.getString("ASSOCIATION"))){
pd.put("TYPE_ONE", "691346658ed744a1bda2ed3a755f606c");
}
if ("0".equals(pd.getString("ASSOCIATION"))){
pd.put("TYPE_ONE", "8051d985a2bc406a83ea9360b64182b2");
}
pd.put("STATUS","1");
page.setPd(pd);
List<PageData> varList = textlibraryService.list(page);
map.put("varList", varList);
map.put("page", page);
map.put("result", "success");
return map;
}
/**
*
*
* @throws Exception
*/
@RequestMapping(value = "/delete")
@ResponseBody
public Object delete() throws Exception {
Map<String, String> map = new HashMap<String, String>();
map.put("result", "success");
try {
PageData pd = this.getPageData();
textlibraryService.delete(pd);
map.put("code", "0");
return map;
} catch (Exception e) {
e.printStackTrace();
map.put("code", "9999");
map.put("errorMessage", e.getMessage());
return map;
}
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/goEdit")
@ResponseBody
public Object goEdit() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd = textlibraryService.findById(pd); //根据ID读取
map.put("data", pd);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/deleteAll")
@ResponseBody
public Object deleteAll() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String DATA_IDS = pd.getString("DATA_IDS");
if (Tools.notEmpty(DATA_IDS)) {
String ArrayDATA_IDS[] = DATA_IDS.split(",");
textlibraryService.deleteAll(ArrayDATA_IDS);
errInfo = "success";
} else {
errInfo = "error";
}
map.put("result", errInfo); //返回结果
return map;
}
@RequestMapping("lock")
@ResponseBody
public Object lock() throws Exception {
Map<String, Object> response = new HashMap<>();
try {
PageData request = this.getPageData();
textlibraryService.lock(request);
response.put("code", "0");
} catch (Exception e) {
e.printStackTrace();
response.put("code", "9999");
response.put("message", e.getMessage());
}
response.put("result", "success");
return response;
}
@RequestMapping("top")
@ResponseBody
public Object top() throws Exception {
Map<String, Object> response = new HashMap<>();
try {
PageData request = this.getPageData();
textlibraryService.top(request);
response.put("code", "0");
} catch (Exception e) {
e.printStackTrace();
response.put("code", "9999");
response.put("message", e.getMessage());
}
response.put("result", "success");
return response;
}
@RequestMapping("updateFile")
@ResponseBody
public Object updateFile(@RequestParam(value = "FILE", required = false) MultipartFile[] FILE) throws Exception {
Map<String, Object> response = new HashMap<>();
try {
textlibraryService.updateFile(FILE, this.getPageData());
response.put("code", "0");
} catch (Exception e) {
e.printStackTrace();
response.put("code", "9999");
response.put("message", e.getMessage());
}
response.put("result", "success");
return response;
}
@RequestMapping("getUpdateLog")
@ResponseBody
public Object getUpdateLog() throws Exception {
Map<String, Object> response = new HashMap<>();
try {
response.put("list", textlibraryService.getUpdateLog(this.getPageData()));
response.put("code", "0");
} catch (Exception e) {
e.printStackTrace();
response.put("code", "9999");
response.put("message", e.getMessage());
}
response.put("result", "success");
return response;
}
@RequestMapping("setStatus")
@ResponseBody
public Object setStatus() throws Exception {
Map<String, Object> response = new HashMap<>();
try {
textlibraryService.setStatus(this.getPageData());
response.put("code", "0");
} catch (Exception e) {
e.printStackTrace();
response.put("code", "9999");
response.put("message", e.getMessage());
}
response.put("result", "success");
return response;
}
@RequestMapping("getTextInfo")
@ResponseBody
public Object getTextInfo() throws Exception{
Map<String, Object> response = new HashMap<>();
try {
PageData text_info = textlibraryService.getTextInfo(this.getPageData());
response.put("info",text_info);
response.put("code", "0");
} catch (Exception e) {
e.printStackTrace();
response.put("code", "9999");
response.put("message", e.getMessage());
}
response.put("result", "success");
return response;
}
@RequestMapping("exportWord")
public void exportWord(HttpServletResponse response) throws Exception{
try {
textlibraryService.exportWord(this.getPageData(),response);
} catch (Exception e) {
e.printStackTrace();
}
}
@RequestMapping("copyToOperate")
@ResponseBody
public Object copyToOperate() throws Exception{
Map<String, Object> response = new HashMap<>();
try {
textlibraryService.copyToOperate(this.getPageData());
response.put("code", "0");
} catch (Exception e) {
e.printStackTrace();
response.put("code", "9999");
response.put("message", e.getMessage());
}
response.put("result", "success");
return response;
}
}

View File

@ -23,6 +23,7 @@ import com.zcloud.entity.PageData;
import com.zcloud.service.firemanager.FireDeviceService;
import com.zcloud.util.*;
import com.zcloud.util.logAop.LogOperation;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
@ -389,4 +390,57 @@ public class FireDeviceController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* excel
* @return
* @throws Exception
*/
@RequestMapping(value = "/excelAll")
public ModelAndView excelAll() throws Exception {
ModelAndView mv = new ModelAndView();
PageData pd = new PageData();
pd = this.getPageData();
// String paramJson = pd.getString("param");
// Map<String, String> param = (Map<String, String>) JSON.parse(paramJson);
// pd.putAll(param);
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
List<PageData> varList = fireDeviceService.exportDataList(pd);
List<PageData> exportList = new ArrayList<>(); //导出的数据列表
Map<String, Object> dataMap = new HashMap<String, Object>();
List<String> titles = new ArrayList<String>();
titles.add("消防区域编码");
titles.add("消防点位名称");
titles.add("消防点位编码");
titles.add("负责部门");
titles.add("负责人手机号");
titles.add("消防器材类型");
titles.add("消防器材编码");
titles.add("有效期开始");
titles.add("结束时间");
titles.add("存放地点");
titles.add("负责人");
dataMap.put("titles", titles);
for (int i = 0; i < varList.size(); i++) {
PageData vpd = new PageData();
vpd.put("var1", varList.get(i).getString("FIRE_REGION_CODE")); //消防区域编码
vpd.put("var2", varList.get(i).getString("FIRE_POINT_NAME")); //消防点位名称
vpd.put("var3", varList.get(i).getString("FIRE_POINT_CODE")); //消防点位编码
vpd.put("var4", varList.get(i).getString("DEPARTMENTNAME")); //负责部门
vpd.put("var5", varList.get(i).getString("USER_PHONE")); //负责人手机号
vpd.put("var6", varList.get(i).getString("FIRE_DEVICE_TYPE_NAME")); //消防器材类型
vpd.put("var7", varList.get(i).getString("FIRE_DEVICE_CODE")); //消防器材编码
vpd.put("var8", varList.get(i).getString("VALIDITY_START_TIME")); //有效期开始
vpd.put("var9", varList.get(i).getString("VALIDITY_END_TIME"));//结束时间
vpd.put("var10", varList.get(i).getString("REMAKE"));//存放地点
vpd.put("var11", varList.get(i).getString("USERNAME"));//负责人
exportList.add(vpd);
}
dataMap.put("varList", exportList);
ObjectExcelView erv = new ObjectExcelView();
mv = new ModelAndView(erv, dataMap);
return mv;
}
}

View File

@ -0,0 +1,124 @@
package com.zcloud.controller.firemanager;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.map.FireResourcesService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/fireResources")
public class FireResourcesController extends BaseController {
@Resource
private FireResourcesService fireResourcesService;
@RequestMapping(value = "/list")
@ResponseBody
public Object page(Page page) {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
page.setPd(pd);
if ("00004".equals(pd.getString("GANGKOU"))) {
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
paramMap.add("FIRERESOURCES_NAME", pd.getString("FIRERESOURCES_NAME"));
paramMap.add("FIRERESOURCES_TYPE", pd.getString("FIRERESOURCES_TYPE"));
Map<String, Object> result =
restTemplate.postForObject(cfdUrl + "/sync/map/fireResources/list", paramMap, Map.class);
return result;
}
//获取当前人的公司id
List<PageData> varList = fireResourcesService.datalistPage(page);
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
@Value("${cfd.prevention.api.url}")
private String cfdUrl;
@Autowired
private RestTemplate restTemplate;
@RequestMapping(value = "/getById")
@ResponseBody
public Object getById() {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pddata = this.getPageData();
if ("00004".equals(pddata.getString("GANGKOU"))) {
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
paramMap.add("FIRERESOURCES_ID", pddata.getString("FIRERESOURCES_ID"));
Map<String, Object> result =
restTemplate.postForObject(cfdUrl + "/sync/map/fireResources/getById", paramMap, Map.class);
return result;
}
//获取当前人的公司id
PageData pd = fireResourcesService.getDataById(pddata);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
@RequestMapping(value = "/add")
@ResponseBody
public Object add(@RequestParam(value="FFILE",required=false) MultipartFile[] files) throws Exception{
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = this.getPageData();
String FIRERESOURCES_ID = this.get32UUID();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd.put("FIRERESOURCES_ID", FIRERESOURCES_ID);
pd.put("CREATIME", DateUtil.date2Str(new Date()));
pd.put("OPERATIME", DateUtil.date2Str(new Date()));
pd.put("ISDELETE", "0");
fireResourcesService.save(pd,files);
map.put("result", errInfo);
return map;
}
@RequestMapping(value = "/edit")
@ResponseBody
public Object edit(@RequestParam(value="FFILE",required=false) MultipartFile[] files) throws Exception{
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd.put("OPERATIME", DateUtil.date2Str(new Date()));
pd.put("ISDELETE", "0");
fireResourcesService.edit(pd,files);
map.put("result", errInfo);
return map;
}
@RequestMapping(value = "/delete")
@ResponseBody
public Object delete(Page page) {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
fireResourcesService.delete(pd);
map.put("result", errInfo);
return map;
}
}

View File

@ -821,6 +821,15 @@ public class HiddenApiController extends BaseController {
if ("list".equals(pd.getString("hiddenVueType"))) { // 整改隐患
pd = Jurisdiction.getUserDataJurisdiction(pd);
}
List<String> hiddenTypeList = new ArrayList<>();
for (Object key : pd.keySet()) {
if (key.toString().contains("hiddenType[")) {
hiddenTypeList.add(pd.getString(key.toString()));
}
}
if (hiddenTypeList.size() > 0) {
pd.put("hiddenTypeList", hiddenTypeList);
}
/*上方的条件选择都是 condform */
/**

View File

@ -11,6 +11,7 @@ import com.zcloud.service.keyProjects.DeviceService;
import com.zcloud.service.keyProjects.KeyprojectHiddenService;
import com.zcloud.service.system.FHlogService;
import com.zcloud.util.*;
import lombok.extern.flogger.Flogger;
import org.apache.commons.lang.StringEscapeUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -370,7 +371,7 @@ public class AIWarningController extends BaseController {
if (Tools.notEmpty(jsonObject.get("IMG_PATH").toString())) {
String imgName = this.get32UUID() + ".jpg";
String filePath = Const.FILEPATHAITP + "/" + DateUtil.getDays();
Base64Utils.decodeToFile(Const.basePath + filePath + "/" + imgName, jsonObject.get("IMG_PATH").toString().replace("data:image/jpeg;base64,", ""));
Base64Utils.decodeToFile(Smb.basePath + filePath + "/" + imgName, jsonObject.get("IMG_PATH").toString().replace("data:image/jpeg;base64,", ""));
pd.put("IMG_PATH", filePath + "/" + imgName); //报警图片(路径)
} else {
map.put("returnCode", "1001"); //缺少同步信息

View File

@ -55,7 +55,7 @@ public class PlatformvideomanagementController extends BaseController {
Map<String,Object> map = new HashMap<String,Object>();
PageData pd =this.getPageData();
map = HKUtil.camerasPreviewURLs(pd.getString("INDEXCODE"),"hls");
if(!ObjectUtils.isEmpty(map)){
if(ObjectUtils.isEmpty(map)){
map = new HashMap<String,Object>();
}
map.put("result", "success");
@ -71,7 +71,7 @@ public class PlatformvideomanagementController extends BaseController {
Map<String,Object> map = new HashMap<String,Object>();
PageData pd =this.getPageData();
map = HKUtil.camerasPreviewURLs(pd.getString("INDEXCODE"),"rtsp");
if(!ObjectUtils.isEmpty(map)){
if(ObjectUtils.isEmpty(map)){
map = new HashMap<String,Object>();
}
map.put("result", "success");
@ -87,7 +87,7 @@ public class PlatformvideomanagementController extends BaseController {
Map<String,Object> map = new HashMap<String,Object>();
PageData pd =this.getPageData();
map = HKUtil.cameraSearch(pd);
if(!ObjectUtils.isEmpty(map)){
if(ObjectUtils.isEmpty(map)){
map = new HashMap<String,Object>();
}
map.put("result", "success");

View File

@ -983,5 +983,27 @@ public class MapController extends BaseController {
r.put("pd", pd);
return r;
}
/**
*
* ,5s,,使sql,
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/listbymeteorologicalByCorpinfo")
@ResponseBody
public Object listbymeteorologicalByCorpinfo() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = this.getPageData();
//根据条件增加参数或减少参数 都没有 直接返回空
if (StringUtils.isBlank(pd.getString("CORPINFO_ID"))) {
map.put("result", errInfo);
return map;
}
pd = meteorologicalinfoService.listbymeteorologicalByCorpinfoId(pd); //列出meteorological列表
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
}

View File

@ -0,0 +1,121 @@
package com.zcloud.controller.mkmj;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.map.util.ReturnMap;
import com.zcloud.service.mkmj.MkmjAreaService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.ObjectExcelView;
import com.zcloud.util.Tools;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import java.util.*;
/**
*
* zhaoyu
* 2024-01-16
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/mkmjArea")
public class MkmjAreaController extends BaseController {
@Autowired
private MkmjAreaService mkmjAreaService;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@RequiresPermissions("mkmjArea:add")
@ResponseBody
public Object add() throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 添加时间
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 添加人
pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 添加时间
pd.put("ISDELETE", "0"); //是否删除
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));//修改时间
return mkmjAreaService.save(pd);
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/delete")
@RequiresPermissions("mkmjArea:del")
@ResponseBody
public Object delete() throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
return mkmjAreaService.delete(pd);
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/edit")
@RequiresPermissions("mkmjArea:edit")
@ResponseBody
public Object edit() throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));//修改时间
return mkmjAreaService.edit(pd);
}
/**
* @param page
* @throws Exception
*/
@RequestMapping(value="/list")
@RequiresPermissions("mkmjArea:list")
@ResponseBody
public Object list(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
page.setPd(pd);
List<PageData> varList = mkmjAreaService.list(page); //列出Coursectk列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/goEdit")
@RequiresPermissions("mkmjArea:edit")
@ResponseBody
public Object goEdit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd = mkmjAreaService.findById(pd); //根据ID读取
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
}

View File

@ -0,0 +1,134 @@
package com.zcloud.controller.mkmj;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.map.util.ReturnMap;
import com.zcloud.service.mkmj.MkmjAreaGateService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Tools;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* zhaoyu
* 2024-01-16
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/mkmjAreaGate")
public class MkmjAreaGateController extends BaseController {
@Autowired
private MkmjAreaGateService mkmjAreaGateService;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@RequiresPermissions("mkmjArea:add")
@ResponseBody
public Object add() throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 添加时间
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 添加人
pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 添加时间
pd.put("ISDELETE", "0"); //是否删除
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));//修改时间
return mkmjAreaGateService.save(pd);
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/delete")
@RequiresPermissions("mkmjArea:del")
@ResponseBody
public Object delete() throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
return mkmjAreaGateService.delete(pd);
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/edit")
@RequiresPermissions("mkmjArea:edit")
@ResponseBody
public Object edit() throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));//修改时间
return mkmjAreaGateService.edit(pd);
}
/**
* @param page
* @throws Exception
*/
@RequestMapping(value="/list")
@RequiresPermissions("mkmjArea:list")
@ResponseBody
public Object list(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
page.setPd(pd);
List<PageData> varList = mkmjAreaGateService.list(page); //列出Coursectk列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/goEdit")
@RequiresPermissions("mkmjArea:edit")
@ResponseBody
public Object goEdit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd = mkmjAreaGateService.findById(pd); //根据ID读取
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/savePosition")
@ResponseBody
public Object savePosition() throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
return mkmjAreaGateService.savePosition(pd); //根据ID读取
}
}

View File

@ -0,0 +1,122 @@
package com.zcloud.controller.mkmj;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.map.util.ReturnMap;
import com.zcloud.service.mkmj.MkmjAreaGateService;
import com.zcloud.service.mkmj.MkmjGateLogService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Tools;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* zhaoyu
* 2024-01-16
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/mkmjGateLog")
public class MkmjGateLogController extends BaseController {
@Autowired
private MkmjGateLogService mkmjGateLogService;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@RequiresPermissions("mkmjArea:add")
@ResponseBody
public ReturnMap add() throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 添加人
pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 添加时间
pd.put("ISDELETE", "0"); //是否删除
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));//修改时间
return mkmjGateLogService.save(pd);
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/delete")
@RequiresPermissions("mkmjArea:del")
@ResponseBody
public ReturnMap delete() throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
return mkmjGateLogService.delete(pd);
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/edit")
@RequiresPermissions("mkmjArea:edit")
@ResponseBody
public ReturnMap edit() throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));//修改时间
return mkmjGateLogService.edit(pd);
}
/**
* @param page
* @throws Exception
*/
@RequestMapping(value="/list")
@RequiresPermissions("mkmjArea:list")
@ResponseBody
public Object list(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
page.setPd(pd);
List<PageData> varList = mkmjGateLogService.list(page); //列出Coursectk列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/goEdit")
@RequiresPermissions("mkmjArea:edit")
@ResponseBody
public Object goEdit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd = mkmjGateLogService.findById(pd); //根据ID读取
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
}

View File

@ -0,0 +1,140 @@
package com.zcloud.controller.mkmj;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.map.util.ReturnMap;
import com.zcloud.service.mkmj.MkmjAreaGateService;
import com.zcloud.service.mkmj.MkmjGateVideoService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Tools;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* zhaoyu
* 2024-01-16
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/mkmjGateVideo")
public class MkmjGateVideoController extends BaseController {
@Autowired
private MkmjGateVideoService mkmjGateVideoService;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@RequiresPermissions("mkmjArea:add")
@ResponseBody
public Object add() throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 添加时间
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 添加人
pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 添加时间
pd.put("ISDELETE", "0"); //是否删除
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));//修改时间
return mkmjGateVideoService.save(pd);
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/delete")
@RequiresPermissions("mkmjArea:del")
@ResponseBody
public Object delete() throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
return mkmjGateVideoService.delete(pd);
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/edit")
@RequiresPermissions("mkmjArea:edit")
@ResponseBody
public Object edit() throws Exception{
PageData pd = new PageData();
pd = this.getPageData();
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));//修改时间
return mkmjGateVideoService.edit(pd);
}
/**
* @param page
* @throws Exception
*/
@RequestMapping(value="/list")
@RequiresPermissions("mkmjArea:list")
@ResponseBody
public Object list(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
page.setPd(pd);
List<PageData> varList = mkmjGateVideoService.list(page); //列出Coursectk列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/goEdit")
@RequiresPermissions("mkmjArea:edit")
@ResponseBody
public Object goEdit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd = mkmjGateVideoService.findById(pd); //根据ID读取
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/savePosition")
@ResponseBody
public Object savePosition() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
mkmjGateVideoService.savePosition(pd); //根据ID读取
map.put("result", errInfo);
return map;
}
}

View File

@ -100,7 +100,7 @@ public class FlowTrainController extends BaseController {
@RequestMapping(value = "/approveUser")
@ResponseBody
public Object approveUser() throws Exception {
Map<String,Object> map = new HashMap<String,Object>();
Map<String, Object> map = new HashMap<String, Object>();
PageData pd = this.getPageData();
trainUsersService.approveUser(pd);
map.put("result", "success");
@ -142,7 +142,7 @@ public class FlowTrainController extends BaseController {
@RequestMapping(value = "/endApproval")
@ResponseBody
public Object endApproval() throws Exception {
Map<String,Object> map = new HashMap<String,Object>();
Map<String, Object> map = new HashMap<String, Object>();
PageData pd = this.getPageData();
trainUsersService.endApproval(pd);
map.put("result", "success");
@ -164,4 +164,54 @@ public class FlowTrainController extends BaseController {
map.put("result", "success");
return map;
}
/**
*
*
* @date 2024-02-23
* @author liu jun
*/
@RequestMapping(value = "/getPintName")
@ResponseBody
public Object getPintName() throws Exception {
PageData request = this.getPageData();
if (StringUtils.isEmpty(request.getString("FLOWS_TYPE")))
throw new Exception("FLOWS_TYPE不能为空");
Map<String, Object> map = new HashMap<String, Object>();
if ("1".equals(request.getString("FLOWS_TYPE"))) {
switch (request.getString("FLOWS_STEP")) {
case "0":
map.put("Department", "指定主管部门");
map.put("User", "指定主管部门审批人");
map.put("UploadFile", "承诺书");
break;
case "2":
map.put("Department", "指定监管部门");
map.put("User", "指定监管部门审批人");
map.put("limitFlag", "1");
break;
case "1":
case "3":
case "4":
map.put("Department", "指定监管部门");
map.put("User", "指定监管部门审批人");
break;
default:
throw new Exception("FLOWS_STEP不合法");
}
} else if ("2".equals(request.getString("FLOWS_TYPE"))) {
request.getString("FLOWS_STEP");
map.put("Department", "指定监管部门");
map.put("User", "指定监管部门审批人");
} else {
if (request.getString("FLOWS_STEP").equals("0")) {
map.put("Department", "监管部门");
map.put("User", "监管部门审批人");
map.put("limitFlag", "1");
}
}
map.put("result", "success");
return map;
}
}

View File

@ -117,7 +117,6 @@ public class TrainingBatchController extends BaseController {
* @throws Exception
*/
@RequestMapping(value = "/userList")
@RequiresPermissions("trainingbatch:list")
@ResponseBody
public Object userList(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();

View File

@ -1,8 +1,12 @@
package com.zcloud.controller.xgf;
import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import com.zcloud.entity.Page;
import com.zcloud.service.bus.CorpInfoService;
import com.zcloud.service.system.DepartmentService;
import com.zcloud.util.ObjectExcelView;
import net.sf.json.JSONArray;
import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -20,6 +24,8 @@ import com.zcloud.util.HttpClientService;
import com.zcloud.util.Jurisdiction;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
@RestController
@RequestMapping("/xgf/corp")
public class XgfCorpController extends BaseController {
@ -31,6 +37,9 @@ public class XgfCorpController extends BaseController {
@Value("${qa-regulatory-gwj.api.url}")
private String regulatoryUrl;
@Resource
private DepartmentService departmentService;
/**
* -
*
@ -42,13 +51,30 @@ public class XgfCorpController extends BaseController {
public Object getCorpInfoList(Page page) throws Exception {
PageData pd = new PageData();
pd = this.getPageData();
pd.put("SUPERVISE_CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
if (Jurisdiction.getIS_MAIN().equals("1")) { //主账号
pd.put("SUPERVISE_DEPARTMENT_ID", "");
if ("1e6dbbe16004402f8d2c0e52afd9a676,3a854eefa7894e06aaa1a2611bca80f6,020578a4c1f04bc692ee25145c2efbe5,90966974de3c4b83aca6f8fd6432d5c2".contains(Jurisdiction.getCORPINFO_ID())) {
pd.put("CORP_INFO_ID", Jurisdiction.getCORPINFO_ID());
} else {
pd.put("SUPERVISE_DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID());
pd.put("SUPERVISE_CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
if (Jurisdiction.getIS_MAIN().equals("1")) { //主账号
pd.put("SUPERVISE_DEPARTMENT_ID", "");
} else {
pd.put("SUPERVISE_DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID());
}
}
Map result = HttpClientService.doPost(url + "/api/corpinfo/JiTuanTeShulist", pd);
// created by liu jun (为了不在相关方连表查询,只能在这里这么写,兼容老数据)
List<HashMap> list = (List<HashMap> )result.get("varList");
for (HashMap x : list) {
if (x.get("MAIN_DEPARTMENT") != null && x.get("MAIN_DEPARTMENT").toString().contains("]")) {
List<String> departmentIds = JSONObject.parseObject(x.get("MAIN_DEPARTMENT").toString(),List.class);
List<PageData> departmentList = departmentService.getCorpDepartmentByIds(departmentIds);
String MAIN_DEPARTMENT_NAME = departmentList.stream().map(n -> n.getString("NAME")).collect(Collectors.joining(","));
if (x.get("MAIN_DEPARTMENT").toString().contains(",0,")){
MAIN_DEPARTMENT_NAME = MAIN_DEPARTMENT_NAME + ",无";
}
x.put("MAIN_DEPARTMENT_NAME", MAIN_DEPARTMENT_NAME);
}
}
Map result = HttpClientService.doPost(url + "/api/corpinfo/list", pd);
return result;
}

View File

@ -6,10 +6,13 @@ import com.zcloud.entity.PageData;
import com.zcloud.service.xgf.TrainingBatchService;
import com.zcloud.service.xgf.XgfUserService;
import com.zcloud.util.HttpClientService;
import com.zcloud.util.Jurisdiction;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.util.HashMap;
@ -29,7 +32,6 @@ public class XgfUserController extends BaseController {
@Resource
private TrainingBatchService trainingBatchService;
@RequestMapping(value = "/list")
@ResponseBody
public Object list(Page page) throws Exception {
@ -43,6 +45,9 @@ public class XgfUserController extends BaseController {
return response;
}
/**
*
*/
@RequestMapping(value = "/approve")
@ResponseBody
public Object approve() throws Exception {
@ -54,6 +59,35 @@ public class XgfUserController extends BaseController {
return response;
}
/**
*
*/
@RequestMapping(value = "/approvePlus")
@ResponseBody
public Object approvePlus(@RequestParam(value="chengNuoShu",required=false) MultipartFile[] chengNuoShu) throws Exception {
PageData request = this.getPageData();
xgfUserService.approvePlus(request,chengNuoShu);
PageData response = new PageData();
response.put("result", "success");
response.put("data", request);
return response;
}
/**
*
*/
@RequestMapping(value = "/approveMax")
@ResponseBody
public Object approveMax(@RequestParam(value="chengNuoShu",required=false) MultipartFile[] chengNuoShu) throws Exception {
PageData request = this.getPageData();
xgfUserService.approveMax(request,chengNuoShu);
PageData response = new PageData();
response.put("result", "success");
response.put("data", request);
return response;
}
@RequestMapping(value = "/regulatoryUserList")
@ResponseBody
public Object regulatoryUserList() throws Exception{
@ -95,4 +129,56 @@ public class XgfUserController extends BaseController {
response.put("data", request);
return response;
}
@RequestMapping(value = "/getAppointApproveList")
@ResponseBody
public Object getAppointApproveList(Page page) throws Exception{
PageData request = this.getPageData();
request.put("USER_ID", Jurisdiction.getUSER_ID());
page.setPd(request);
PageData response = new PageData();
response.put("result", "success");
response.put("list", xgfUserService.getAppointApproveList(page));
response.put("page", page);
return response;
}
@RequestMapping(value = "/getWorkTask")
@ResponseBody
public Object getWorkTask() throws Exception{
PageData request = this.getPageData();
PageData response = new PageData();
response.put("result", "success");
response.put("list",xgfUserService.getWorkTask(request));
return response;
}
/**
*
*/
@RequestMapping(value = "/appointApprove")
@ResponseBody
public Object appointApprove() throws Exception{
PageData request = this.getPageData();
PageData response = new PageData();
response.put("result", "success");
response.put("data", request);
return response;
}
/**
*
*/
@RequestMapping(value = "/getApproveInfo")
@ResponseBody
public Object getApproveInfo() throws Exception{
PageData request = this.getPageData();
PageData response = new PageData();
response.put("list", xgfUserService.getApproveInfo(request));
response.put("flow", xgfUserService.getFlowInfo(request));
response.put("result", "success");
response.put("data", request);
return response;
}
}

View File

@ -0,0 +1,126 @@
package com.zcloud.flow.xgf.GuFen;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeSwitchComponent;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
import com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper;
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
import com.zcloud.service.xgf.XgfUserService;
import com.zcloud.util.DateUtil;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import org.apache.commons.lang3.StringUtils;
import javax.annotation.Resource;
@LiteflowComponent("GuFenCharge")
public class GuFenCharge extends NodeSwitchComponent {
@Resource
private XgfFlowsMapper xgfFlowsMapper;
@Resource
private XgfUserService xgfUserService;
@Resource
private XgfUserMapper xgfUserMapper;
@Resource
private XgfUserDetailsMapper xgfUserDetailsMapper;
@Override
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
info.setIterator("0");
flows.put("APPOINT_ZERO_CORP_TYPE", "0");
flows.put("APPOINT_ZERO_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_ZERO_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_ZERO_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_ZERO_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 0);
xgfFlowsMapper.edit(flows);
return false;
}
return super.isAccess();
}
@Override
public String processSwitch() throws Exception {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition);
condition.clear();
condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID"));
PageData userInfo = xgfUserDetailsMapper.findById(condition);
// 如果不是当前流程,进入下一流程判断
if (!"0".equals(info.getIterator())) {
// 根据是否有委托书判断是否走委托流程
if (userInfo.get("ATTORNEY") != null && StringUtils.isNotBlank(userInfo.getString("ATTORNEY"))) {
return "GuFenWeiTuo";
}
return "GuFenSupervise";
}
flows.put("APPOINT_ZERO_CORP_ID", "1");
flows.put("APPOINT_ZERO_CORP_NAME", "秦港股份有限公司");
flows.put("APPOINT_ZERO_TIME", DateUtil.getTime());
flows.put("APPOINT_ZERO_STATUS", info.getSTATUS());
flows.put("APPOINT_ZERO_OPINION", info.getOPINION());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows);
return "";
} else {
xgfFlowsMapper.edit(flows);
entity.put("CHECK_STATUS", 1);
entity.put("VALID_FLAG", "2");
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
// created by liu jun 2024-03-01 港务局开会后,将入场告知培训的有效期设置权限给发包单位
if (StringUtils.isNotBlank(info.getLIMIT_END_TIME())) {
entity.put("LIMIT_END_TIME", info.getLIMIT_END_TIME());
}
// created by liu jun 2024-02-04 如果有委托书则保存委托书
if (StringUtils.isNotBlank(info.getATTORNEY())) {
userInfo.put("ATTORNEY", info.getAPPOINT_ANNEX());
xgfUserDetailsMapper.edit(userInfo);
}
xgfUserMapper.edit(entity);
// 将指针清空
info.setIterator("");
}
if (StringUtils.isNotBlank(info.getATTORNEY())) {
xgfUserService.saveLog(info, "1", "0");
return "GuFenWeiTuo";
}else {
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
}
return "GuFenSupervise";
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if ("0".equals(info.getSTATUS()) && "0".equals(info.getIterator())) {
return true;
}
return super.isEnd();
}
}

View File

@ -0,0 +1,101 @@
package com.zcloud.flow.xgf.GuFen;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
import com.zcloud.service.xgf.XgfUserService;
import com.zcloud.util.DateUtil;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import org.apache.commons.lang3.StringUtils;
import javax.annotation.Resource;
@LiteflowComponent("GuFenSupervise")
@SuppressWarnings("all")
public class GuFenSupervise extends NodeComponent {
@Resource
private XgfFlowsMapper xgfFlowsMapper;
@Resource
private XgfUserService xgfUserService;
@Resource
private XgfUserMapper xgfUserMapper;
@Override
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
info.setIterator("2");
flows.put("APPOINT_ONE_CORP_TYPE", "0");
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_ONE_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_ONE_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 1);
xgfFlowsMapper.edit(flows);
return false;
}
return "1".equals(info.getIterator());
}
@Override
public void process() throws Exception {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
if (flows == null || flows.size() == 0) {
throw new RuntimeException("系统异常");
}
flows.put("APPOINT_ONE_CORP_ID", "1");
flows.put("APPOINT_ONE_CORP_NAME", "秦港股份有限公司");
flows.put("APPOINT_ONE_TIME", DateUtil.getTime());
flows.put("APPOINT_ONE_STATUS", info.getSTATUS());
flows.put("APPOINT_ONE_OPINION", info.getOPINION());
flows.put("OPINION",info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows);
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
} else {
xgfFlowsMapper.edit(flows);
condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition);
entity.put("CHECK_STATUS", 2);
entity.put("VALID_FLAG", "1");
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
entity.put("STATUS", "2");
xgfUserMapper.edit(entity);
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "1");
}
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if ("0".equals(info.getSTATUS())) {
return true;
}
return super.isEnd();
}
}

View File

@ -0,0 +1,124 @@
package com.zcloud.flow.xgf.GuFen;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
import com.zcloud.service.xgf.XgfUserService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import org.apache.commons.lang3.StringUtils;
import javax.annotation.Resource;
@LiteflowComponent("GuFenWeiTuoCharge")
public class GuFenWeiTuoCharge extends NodeComponent {
@Resource
private XgfFlowsMapper xgfFlowsMapper;
@Resource
private XgfUserService xgfUserService;
@Resource
private XgfUserMapper xgfUserMapper;
@Resource
private CorpInfoMapper corpInfoMapper;
@Override
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
info.setIterator("1");
flows.put("APPOINT_ONE_CORP_TYPE", "0");
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_ONE_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_ONE_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 1);
xgfFlowsMapper.edit(flows);
return false;
}
return "1".equals(info.getIterator());
}
@Override
public void process() throws Exception {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
info.setIterator("1");
flows.put("APPOINT_ONE_CORP_TYPE", "0");
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_ONE_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_ONE_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 1);
xgfFlowsMapper.edit(flows);
return;
}
// 如果不是当前流程,进入下一流程判断
if (!"1".equals(info.getIterator())) {
return;
}
condition.clear();
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData corpEntity = corpInfoMapper.findById(condition);
flows.put("APPOINT_ONE_CORP_ID", Jurisdiction.getCORPINFO_ID());
flows.put("APPOINT_ONE_CORP_NAME", corpEntity.getString("CORP_NAME"));
flows.put("APPOINT_ONE_TIME", DateUtil.getTime());
flows.put("APPOINT_ONE_STATUS", info.getSTATUS());
flows.put("APPOINT_ONE_OPINION", info.getOPINION());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows);
} else {
xgfFlowsMapper.edit(flows);
condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition);
entity.put("CHECK_STATUS", 1);
entity.put("VALID_FLAG", "2");
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
entity.put("LIMIT_END_TIME", info.getLIMIT_END_TIME());
xgfUserMapper.edit(entity);
// 清空指针
info.setIterator("");
}
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if ("0".equals(info.getSTATUS()) && "1".equals(info.getIterator())) {
return true;
}
return super.isEnd();
}
}

View File

@ -0,0 +1,104 @@
package com.zcloud.flow.xgf.GuFen;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
import com.zcloud.service.xgf.XgfUserService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import org.apache.commons.lang3.StringUtils;
import javax.annotation.Resource;
@LiteflowComponent("GuFenWeiTuoSupervise")
@SuppressWarnings("all")
public class GuFenWeiTuoSupervise extends NodeComponent {
@Resource
private XgfFlowsMapper xgfFlowsMapper;
@Resource
private XgfUserService xgfUserService;
@Resource
private XgfUserMapper xgfUserMapper;
@Resource
private CorpInfoMapper corpInfoMapper;
@Override
public boolean isAccess() {
System.out.println("2???????");
XgfFlowDto info = this.getRequestData();
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
info.setIterator("2");
flows.put("APPOINT_TWO_CORP_TYPE", "0");
flows.put("APPOINT_TWO_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_TWO_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_TWO_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_TWO_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 2);
xgfFlowsMapper.edit(flows);
return false;
}
return "2".equals(info.getIterator());
}
@Override
public void process() throws Exception {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
condition.clear();
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData corpEntity = corpInfoMapper.findById(condition);
flows.put("APPOINT_TWO_CORP_ID", Jurisdiction.getCORPINFO_ID());
flows.put("APPOINT_TWO_CORP_NAME", corpEntity.getString("CORP_NAME"));
flows.put("APPOINT_TWO_TIME", DateUtil.getTime());
flows.put("APPOINT_TWO_STATUS", info.getSTATUS());
flows.put("APPOINT_TWO_OPINION", info.getOPINION());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows);
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
} else {
xgfFlowsMapper.edit(flows);
condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition);
entity.put("CHECK_STATUS", 2);
entity.put("VALID_FLAG", "1");
entity.put("STATUS", "2");
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
xgfUserMapper.edit(entity);
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "1");
info.setIterator("");
}
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if ("0".equals(info.getSTATUS()) && "2".equals(info.getIterator())) {
return true;
}
return super.isEnd();
}
}

View File

@ -0,0 +1,26 @@
package com.zcloud.flow.xgf;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeSwitchComponent;
import com.zcloud.flow.xgf.util.XgfFlowDto;
@LiteflowComponent("InitCompany")
public class InitCompany extends NodeSwitchComponent {
@Override
public String processSwitch() throws Exception {
XgfFlowDto info = this.getRequestData();
// 0-一般单位处理流程
// 1-集团单位处理流程
// 2-股份端单位处理流程
if ("0".equals(info.getFLOWS_TYPE())) {
return "YiBan";
}
if ("1".equals(info.getFLOWS_TYPE())){
return "JiTuan";
}
if ("2".equals(info.getFLOWS_TYPE())){
return "GuFen";
}
throw new RuntimeException("系统异常,请联系管理员");
}
}

View File

@ -0,0 +1,126 @@
package com.zcloud.flow.xgf.JiTuan;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeSwitchComponent;
import com.zcloud.entity.PageData;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
import com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper;
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
import com.zcloud.service.xgf.XgfUserService;
import com.zcloud.util.DateUtil;
import org.apache.commons.lang3.StringUtils;
import javax.annotation.Resource;
@LiteflowComponent("JiTuanCharge")
public class JiTuanCharge extends NodeSwitchComponent {
@Resource
private XgfFlowsMapper xgfFlowsMapper;
@Resource
private XgfUserService xgfUserService;
@Resource
private XgfUserMapper xgfUserMapper;
@Resource
private XgfUserDetailsMapper xgfUserDetailsMapper;
@Override
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
info.setIterator("1");
flows.put("APPOINT_ONE_CORP_TYPE", "0");
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_ONE_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_ONE_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 1);
xgfFlowsMapper.edit(flows);
return false;
}
return super.isAccess();
}
@Override
@SuppressWarnings("all")
public String processSwitch() throws Exception {
System.out.println(getName()+ "节点");
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition);
condition.clear();
condition.put("XGF_USER_DETAILS_ID",flows.getString("FLOWS_ID"));
PageData userInfo = xgfUserDetailsMapper.findById(condition);
// 如果不是当前流程,进入下一流程判断
if (!"1".equals(info.getIterator())) {
if (userInfo.get("ATTORNEY") != null && StringUtils.isNotBlank(userInfo.getString("ATTORNEY"))){
return "WeiTuo";
}
return "JiTuanSupervise";
}
flows.put("APPOINT_ONE_CORP_ID", "1");
flows.put("APPOINT_ONE_CORP_NAME", "秦港股份有限公司");
flows.put("APPOINT_ONE_TIME", DateUtil.getTime());
flows.put("APPOINT_ONE_STATUS", info.getSTATUS());
flows.put("APPOINT_ONE_OPINION", info.getOPINION());
flows.put("OPINION",info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows);
return "";
} else {
xgfFlowsMapper.edit(flows);
entity.put("CHECK_STATUS", 1);
entity.put("VALID_FLAG", "2");
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
// created by liu jun 2024-03-01 港务局开会后,将入场告知培训的有效期设置权限给发包单位
if (StringUtils.isNotBlank(info.getLIMIT_END_TIME())) {
entity.put("LIMIT_END_TIME", info.getLIMIT_END_TIME());
}
// created by liu jun 2024-02-04 如果有委托书则保存委托书
if (StringUtils.isNotBlank(info.getATTORNEY())) {
userInfo.put("ATTORNEY", info.getATTORNEY());
xgfUserDetailsMapper.edit(userInfo);
}
xgfUserMapper.edit(entity);
// 将指针清空
info.setIterator("");
}
// 保存操作记录
if (StringUtils.isNotBlank(info.getATTORNEY())){
xgfUserService.saveLog(info, "1", "0");
return "WeiTuo";
}else {
xgfUserService.saveLog(info, info.getSTATUS(), "0");
}
return "JiTuanSupervise";
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if ("0".equals(info.getSTATUS()) && "1".equals(info.getIterator())) {
return true;
}
return super.isEnd();
}
}

View File

@ -0,0 +1,101 @@
package com.zcloud.flow.xgf.JiTuan;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.zcloud.entity.PageData;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
import com.zcloud.service.xgf.XgfUserService;
import com.zcloud.util.DateUtil;
import org.apache.commons.lang3.StringUtils;
import javax.annotation.Resource;
@LiteflowComponent("JiTuanSupervise")
public class JiTuanSupervise extends NodeComponent {
@Resource
private XgfFlowsMapper xgfFlowsMapper;
@Resource
private XgfUserService xgfUserService;
@Resource
private XgfUserMapper xgfUserMapper;
@Override
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
info.setIterator("2");
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
flows.put("APPOINT_TWO_CORP_TYPE", "0");
flows.put("APPOINT_TWO_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_TWO_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_TWO_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_TWO_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 2);
xgfFlowsMapper.edit(flows);
return false;
}
// 如果不是当前流程,进入下一流程判断
return "2".equals(info.getIterator());
}
@Override
public void process() throws Exception {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
if (flows == null || flows.size() == 0) {
throw new RuntimeException("系统异常");
}
flows.put("APPOINT_TWO_CORP_ID", "1");
flows.put("APPOINT_TWO_CORP_NAME", "秦港股份有限公司");
flows.put("APPOINT_TWO_TIME", DateUtil.getTime());
flows.put("APPOINT_TWO_STATUS", info.getSTATUS());
flows.put("APPOINT_TWO_OPINION", info.getOPINION());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows);
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
} else {
xgfFlowsMapper.edit(flows);
condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition);
entity.put("CHECK_STATUS", 2);
entity.put("VALID_FLAG", "1");
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
entity.put("STATUS", "2");
xgfUserMapper.edit(entity);
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "1");
}
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if ("0".equals(info.getSTATUS())) {
return true;
}
return super.isEnd();
}
}

View File

@ -0,0 +1,106 @@
package com.zcloud.flow.xgf.JiTuan;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.zcloud.entity.PageData;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
import com.zcloud.service.xgf.XgfUserService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import org.apache.commons.lang3.StringUtils;
import javax.annotation.Resource;
@LiteflowComponent("JiTuanWeiTuoCharge")
public class JiTuanWeiTuoCharge extends NodeComponent {
@Resource
private XgfFlowsMapper xgfFlowsMapper;
@Resource
private XgfUserService xgfUserService;
@Resource
private XgfUserMapper xgfUserMapper;
@Resource
private CorpInfoMapper corpInfoMapper;
@Override
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
info.setIterator("2");
flows.put("APPOINT_TWO_CORP_TYPE", "0");
flows.put("APPOINT_TWO_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_TWO_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_TWO_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_TWO_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 2);
xgfFlowsMapper.edit(flows);
return false;
}
return "2".equals(info.getIterator());
}
@Override
public void process() throws Exception {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
condition.clear();
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData corpEntity = corpInfoMapper.findById(condition);
flows.put("APPOINT_TWO_CORP_ID", Jurisdiction.getCORPINFO_ID());
flows.put("APPOINT_TWO_CORP_NAME", corpEntity.getString("CORP_NAME"));
flows.put("APPOINT_TWO_TIME", DateUtil.getTime());
flows.put("APPOINT_TWO_STATUS", info.getSTATUS());
flows.put("APPOINT_TWO_OPINION", info.getOPINION());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows);
} else {
xgfFlowsMapper.edit(flows);
condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition);
entity.put("CHECK_STATUS", 1);
entity.put("VALID_FLAG", "2");
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
entity.put("LIMIT_END_TIME", info.getLIMIT_END_TIME());
xgfUserMapper.edit(entity);
// 清空指针
info.setIterator("");
}
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if ("0".equals(info.getSTATUS()) && "2".equals(info.getIterator())) {
return true;
}
return super.isEnd();
}
}

View File

@ -0,0 +1,103 @@
package com.zcloud.flow.xgf.JiTuan;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.zcloud.entity.PageData;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
import com.zcloud.service.xgf.XgfUserService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import org.apache.commons.lang3.StringUtils;
import javax.annotation.Resource;
@LiteflowComponent("JiTuanWeiTuoSupervise")
public class JiTuanWeiTuoSupervise extends NodeComponent {
@Resource
private XgfFlowsMapper xgfFlowsMapper;
@Resource
private XgfUserService xgfUserService;
@Resource
private XgfUserMapper xgfUserMapper;
@Resource
private CorpInfoMapper corpInfoMapper;
@Override
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
info.setIterator("3");
flows.put("APPOINT_THREE_CORP_TYPE", "0");
flows.put("APPOINT_THREE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_THREE_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_THREE_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_THREE_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 3);
xgfFlowsMapper.edit(flows);
return false;
}
return "3".equals(info.getIterator());
}
@Override
public void process() throws Exception {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
condition.clear();
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData corpEntity = corpInfoMapper.findById(condition);
flows.put("APPOINT_THREE_CORP_ID", Jurisdiction.getCORPINFO_ID());
flows.put("APPOINT_THREE_CORP_NAME", corpEntity.getString("CORP_NAME"));
flows.put("APPOINT_THREE_TIME", DateUtil.getTime());
flows.put("APPOINT_THREE_STATUS", info.getSTATUS());
flows.put("APPOINT_THREE_OPINION", info.getOPINION());
flows.put("OPINION", info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows);
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
} else {
xgfFlowsMapper.edit(flows);
condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition);
entity.put("CHECK_STATUS", 2);
entity.put("VALID_FLAG", "1");
entity.put("STATUS", "2");
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
xgfUserMapper.edit(entity);
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "1");
}
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if ("0".equals(info.getSTATUS()) && "3".equals(info.getIterator())) {
return true;
}
return super.isEnd();
}
}

View File

@ -0,0 +1,106 @@
package com.zcloud.flow.xgf.YiBan;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
import com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper;
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import com.zcloud.service.xgf.XgfUserService;
import com.zcloud.util.DateUtil;
import org.apache.commons.lang3.StringUtils;
import javax.annotation.Resource;
@LiteflowComponent("YiBanCharge")
public class YiBanCharge extends NodeComponent {
@Resource
private XgfUserMapper xgfUserMapper;
@Resource
private XgfFlowsMapper xgfFlowsMapper;
@Resource
private XgfUserDetailsMapper xgfUserDetailsMapper;
@Resource
private XgfUserService xgfUserService;
@Override
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
info.setIterator("0");
flows.put("APPOINT_ZERO_CORP_TYPE", "0");
flows.put("APPOINT_ZERO_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_ZERO_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_ZERO_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_ZERO_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 0);
xgfFlowsMapper.edit(flows);
return false;
}
// 如果不是当前流程,进入下一流程判断
return "0".equals(info.getIterator());
}
@Override
public void process() throws Exception {
System.out.println("YiBanCharge节点");
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
if (flows == null || flows.size() == 0) {
throw new RuntimeException("系统异常");
}
flows.put("APPOINT_ZERO_TIME", DateUtil.getTime());
flows.put("APPOINT_ZERO_STATUS", info.getSTATUS());
flows.put("APPOINT_ZERO_OPINION", info.getOPINION());
flows.put("OPINION",info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows);
} else {
xgfFlowsMapper.edit(flows);
condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData user = xgfUserMapper.findById(condition);
user.put("CHECK_STEP", 1);
user.put("LIMIT_END_TIME", info.getLIMIT_END_TIME());
// created by liu jun 2024-02-26 如果有委托书则保存委托书
if (StringUtils.isNotBlank(info.getAPPOINT_ANNEX())) {
condition.clear();
condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID"));
PageData userInfo = xgfUserDetailsMapper.findById(condition);
userInfo.put("COMMITMENT_LETTER", info.getAPPOINT_ANNEX());
xgfUserDetailsMapper.edit(userInfo);
}
xgfUserMapper.edit(user);
// 将指针清空
info.setIterator("");
}
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if ("0".equals(info.getSTATUS()) && "0".equals(info.getIterator())) {
return true;
}
return super.isEnd();
}
}

View File

@ -0,0 +1,135 @@
package com.zcloud.flow.xgf.YiBan;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import com.zcloud.service.xgf.XgfUserService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import org.apache.commons.lang3.StringUtils;
import javax.annotation.Resource;
@LiteflowComponent("YiBanSupervise")
@SuppressWarnings("all")
public class YiBanSupervise extends NodeComponent {
@Resource
private XgfFlowsMapper xgfFlowsMapper;
@Resource
private XgfUserService xgfUserService;
@Resource
private XgfUserMapper xgfUserMapper;
@Resource
private CorpInfoMapper corpInfoMapper;
@Override
public boolean isAccess() {
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
info.setIterator("1");
flows.put("APPOINT_ONE_CORP_TYPE", "0");
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_ONE_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_ONE_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 1);
xgfFlowsMapper.edit(flows);
return false;
}
return "1".equals(info.getIterator());
}
@Override
public void process() throws Exception {
System.out.println(getName());
XgfFlowDto info = this.getRequestData();
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
info.setIterator("1");
flows.put("APPOINT_ONE_CORP_TYPE", "0");
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_ONE_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_ONE_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 1);
xgfFlowsMapper.edit(flows);
return;
}
// 如果不是当前流程,进入下一流程判断
if (!"1".equals(info.getIterator())) {
return;
}
condition.clear();
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData corpEntity = corpInfoMapper.findById(condition);
// 如果指针没有数据,赋值后自动结束
if (StringUtils.isBlank(info.getIterator())) {
info.setIterator("1");
flows.put("APPOINT_ONE_CORP_TYPE", "0");
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getAPPOINT_DEPARTMENT_ID());
flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getAPPOINT_DEPARTMENT_NAME());
flows.put("APPOINT_ONE_USER_ID", info.getAPPOINT_USER_ID());
flows.put("APPOINT_ONE_USER_NAME", info.getAPPOINT_USER_NAME());
flows.put("FLOWS_STEP", 1);
xgfFlowsMapper.edit(flows);
return;
}
flows.put("APPOINT_ONE_CORP_ID", Jurisdiction.getCORPINFO_ID());
flows.put("APPOINT_ONE_CORP_NAME", corpEntity.getString("CORP_NAME"));
flows.put("APPOINT_ONE_TIME", DateUtil.getTime());
flows.put("APPOINT_ONE_STATUS", info.getSTATUS());
flows.put("APPOINT_ONE_OPINION", info.getOPINION());
flows.put("OPINION",info.getOPINION());
if ("0".equals(info.getSTATUS())) {
// 打回至相关方端
xgfUserService.repulse(flows);
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
} else {
xgfFlowsMapper.edit(flows);
condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition);
entity.put("CHECK_STATUS", 2);
entity.put("VALID_FLAG", "1");
entity.put("STATUS", "2");
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
xgfUserMapper.edit(entity);
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "1");
}
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if ("0".equals(info.getSTATUS())) {
return true;
}
return super.isEnd();
}
}

View File

@ -0,0 +1,12 @@
package com.zcloud.flow.xgf.util;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
@LiteflowComponent("DefaultNode")
public class DefaultNode extends NodeComponent {
@Override
public void process() throws Exception {
System.out.println("do nothing");
}
}

View File

@ -0,0 +1,49 @@
package com.zcloud.flow.xgf.util;
import lombok.Data;
import java.util.Map;
@Data
public class XgfFlowDto {
private String iterator;
// 流程id
private String FLOWS_ID;
// 步骤编码
private String FLOWS_STEP;
private String FLOWS_TYPE;
// 审批结果0-不通过1-通过
private String STATUS;
// 审批意见
private String OPINION;
// 审批部门
private String APPOINT_DEPARTMENT_ID;
// 审批部门名称
private String APPOINT_DEPARTMENT_NAME;
// 审批人
private String APPOINT_USER_ID;
// 审批人名称
private String APPOINT_USER_NAME;
//培训有效期
private String LIMIT_END_TIME;
// 承诺书
private String APPOINT_ANNEX;
//委托书
private String ATTORNEY;
// 获取节点需要填写的信息
private Map<String,String> map;
}

View File

@ -0,0 +1,16 @@
package com.zcloud.flow.xgf.util;
import com.zcloud.entity.PageData;
public class XgfUtil {
public static void clearInfo(PageData flow){
flow.put("APPOINT_ONE_USER_ID", "");
flow.put("APPOINT_TWO_USER_ID", "");
flow.put("APPOINT_THREE_USER_ID", "");
flow.put("APPOINT_FOUR_USER_ID", "");
flow.put("APPOINT_FIVE_USER_ID", "");
flow.put("APPOINT_SIX_USER_ID", "");
flow.put("APPOINT_SEVEN_USER_ID", "");
}
}

View File

@ -84,5 +84,7 @@ public interface CorpInfoMapper{
List<PageData> datalistPageRetrieval(Page page);
List<PageData> listAllForMap(PageData pd);
PageData getInfo(PageData corpCondition);
}

View File

@ -4,7 +4,7 @@ import java.util.List;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
/**
/**
*
* luoxiaobao
* 2021-01-22
@ -17,37 +17,37 @@ public interface NoticeCorpUserMapper{
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
@ -58,7 +58,7 @@ public interface NoticeCorpUserMapper{
* @param pd
*/
void savaAll(PageData pd);
void deleteByNotId(PageData pd);
List<PageData> getTypeCountByNotId (Page page);
/**
@ -68,5 +68,11 @@ public interface NoticeCorpUserMapper{
* @throws Exception
*/
List<PageData> getReadUserlistPage(Page page);
/**
*
* @param noticeCorpUserList
*/
void batchSave(List<PageData> noticeCorpUserList);
}

View File

@ -0,0 +1,64 @@
package com.zcloud.mapper.datasource.depository;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2022-12-27
* www.zcloudchina.com
*/
public interface LabelFactoryMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
List<PageData> findByAncestors(PageData condition);
void deleteByAncestors(PageData leafInfo);
List<PageData> findAllAncestors(PageData condition);
}

View File

@ -0,0 +1,62 @@
package com.zcloud.mapper.datasource.depository;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2022-12-27
* www.zcloudchina.com
*/
public interface LibraryLabelsMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
List<PageData> findBylibraryId(PageData info);
void deleteByLibraryId(PageData condition);
}

View File

@ -0,0 +1,21 @@
package com.zcloud.mapper.datasource.depository;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2022-12-27
* www.zcloudchina.com
*/
public interface LibraryLogMapper {
void save(PageData entity) throws Exception;
PageData findById(PageData condition) throws Exception;
List<PageData> findByLogId(PageData condition) throws Exception;
}

View File

@ -0,0 +1,59 @@
package com.zcloud.mapper.datasource.depository;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2023-10-13
* www.zcloudchina.com
*/
public interface TermLibraryMapper{
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
}

View File

@ -0,0 +1,60 @@
package com.zcloud.mapper.datasource.depository;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2023-08-16
* www.zcloudchina.com
*/
public interface TextInfoMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
PageData findByMainId(PageData textInfo);
}

View File

@ -0,0 +1,59 @@
package com.zcloud.mapper.datasource.depository;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2022-12-27
* www.zcloudchina.com
*/
public interface TextLibraryMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
}

View File

@ -110,4 +110,6 @@ public interface FireDeviceMapper {
void delDevicePreparedByIds(List<PageData> fireCheckIdList);
void deleteAll(PageData pd);
List<PageData> exportDataList(PageData pd);
}

View File

@ -15,7 +15,7 @@ import java.util.Map;
public interface MapEightMapper {
List<String> getCorpinfoIds(String[] ArrayDATA_IDS);
List<String> getCorpinfoIds(String[] ArrayDATA_IDS);
/**
*
@ -359,11 +359,11 @@ public interface MapEightMapper {
*/
List<PageData> listAllMeasuresCUTROADOrder(PageData pd);
/**
*
* @param shuzu
* @return
*/
/**
*
* @param shuzu
* @return
*/
List<String> getListDongHuo(List<String> shuzu);
/**
@ -397,5 +397,45 @@ public interface MapEightMapper {
List<PageData> findByHOISTINGAcceptuserId(PageData pd);
List<PageData> findByHOISTINGAcceptuserIds(PageData pd);
/**
* @param pd
* @throws Exception
*/
PageData findByIdCONFINEDSPACEOrder(PageData pd);
/**
* @param pd
* @throws Exception
*/
List<PageData> listAllMeasuresCONFINEDSPACEOrder(PageData pd);
/**
*
* @param pd
* @return
*/
List<PageData> listAllCONFINEDSPACEOrder(PageData pd);
/**
*
* @param pd
* @return
*/
List<PageData> findByIdCONFINEDSPACEAcceptuser(PageData pd);
/**
*
* @param pd
* @return
*/
List<PageData> findByIdCONFINEDSPACEAcceptusers(PageData pd);
/**
*
* @param pd
* @return
*/
PageData findByIdCONFINEDSPACEGasWH(PageData pd);
}

View File

@ -0,0 +1,71 @@
package com.zcloud.mapper.datasource.mkmj;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* zhaoyu
* 2024-01-16
* www.zcloudchina.com
*/
public interface MkmjAreaGateMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
/**.
* id
* @param pageData
* @return
*/
PageData findByOnly(PageData pageData);
/**
*
* @param pd
*/
void savePosition(PageData pd);
}

View File

@ -0,0 +1,73 @@
package com.zcloud.mapper.datasource.mkmj;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* zhaoyu
* 2024-01-16
* www.zcloudchina.com
*/
public interface MkmjAreaMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
/**.
* id
* @param pageData
* @return
*/
PageData findByOnly(PageData pageData);
/**
*
* @param pd
* @return
*/
List<PageData> findByChild(PageData pd);
}

View File

@ -0,0 +1,59 @@
package com.zcloud.mapper.datasource.mkmj;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* zhaoyu
* 2024-01-16
* www.zcloudchina.com
*/
public interface MkmjGateLogMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
}

View File

@ -0,0 +1,71 @@
package com.zcloud.mapper.datasource.mkmj;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* zhaoyu
* 2024-01-16
* www.zcloudchina.com
*/
public interface MkmjGateVideoMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**()
* @param pd
* @throws Exception
*/
List<PageData> listAll(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
void deleteAll(String[] ArrayDATA_IDS);
/**
*
* @param pd
*/
void savePosition(PageData pd);
/**.
* id
* @param pageData
* @return
*/
PageData findByOnly(PageData pageData);
}

View File

@ -183,5 +183,7 @@ public interface DepartmentMapper{
PageData findByCorpDepartmentId(PageData condition);
List<PageData> listTreeManageAndCorp(PageData pd);
List<PageData> getCorpDepartmentByIds(List<String> departmentList);
}

View File

@ -308,4 +308,6 @@ public interface UsersMapper {
PageData getPersonByCardNo(PageData pd);
PageData findByCardNo(PageData pd);
List<PageData> listUserByDepId(PageData pd);
}

View File

@ -2,6 +2,8 @@ package com.zcloud.mapper.datasource.xgf;
import com.zcloud.entity.PageData;
import java.util.List;
public interface FlowDetailMapper {
void save(PageData flow);
@ -13,4 +15,6 @@ public interface FlowDetailMapper {
PageData findById(PageData flow);
PageData selectOne(PageData condition);
List<PageData> getList(PageData condition);
}

View File

@ -2,6 +2,8 @@ package com.zcloud.mapper.datasource.xgf;
import com.zcloud.entity.PageData;
import java.util.List;
public interface FlowMapper {
void save(PageData flow);
@ -13,4 +15,6 @@ public interface FlowMapper {
PageData findById(PageData flow);
PageData findByCondition(PageData condition);
List<PageData> getList(PageData condition);
}

View File

@ -0,0 +1,24 @@
package com.zcloud.mapper.datasource.xgf;
import java.util.List;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
/**
* (XgfFlows)访
*
* @author liu jun
* @since 2024-01-19 12:24:00
*/
public interface XgfFlowsMapper {
int save(PageData entity);
int delete(PageData entity);
int edit(PageData pd);
List<PageData> datalistPage(Page page);
PageData findById(PageData condition);
}

View File

@ -70,4 +70,8 @@ public interface XgfUserMapper {
PageData getInfoById(PageData condition);
List<PageData> findRecordList(PageData condition);
List<PageData> appointlistPage(Page page);
List<PageData> getWorkTask(PageData condition);
}

View File

@ -100,5 +100,8 @@ public interface MeteorologicalinfoMapper {
* @return
*/
List<PageData> tensList(PageData pd);
PageData listbymeteorologicalByCodes(PageData pd);
}

View File

@ -82,5 +82,12 @@ public interface NoticeCorpService{
* @param pd
*/
void sendNotice(PageData pd)throws Exception;
/**
*
* @param mes
* @throws Exception
*/
void sendNoticeToDep(PageData pd)throws Exception;
}

View File

@ -4,7 +4,7 @@ import java.util.List;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
/**
/**
*
* luoxiaobao
* 2021-01-22
@ -17,43 +17,43 @@ public interface NoticeCorpUserService{
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
public void saveAll (PageData pd) throws Exception;
void deleteByNotId (PageData pd) throws Exception;
List<PageData> getTypeCountByNotId (Page page) throws Exception;
@ -64,5 +64,12 @@ public interface NoticeCorpUserService{
* @throws Exception
*/
List<PageData> getUserReadLiser(Page page) throws Exception;
/**
*
* @param noticeCorpUserList
* @throws Exception
*/
void batchSave(List<PageData> noticeCorpUserList) throws Exception;
}

View File

@ -82,7 +82,12 @@ public class CorpInfoServiceImpl implements CorpInfoService{
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return corpinfoMapper.findById(pd);
PageData byId = corpinfoMapper.findById(pd);
if (byId.get("FOURTYPE") != null) {
String fourtype = byId.get("FOURTYPE").toString();
byId.put("FOURTYPE", fourtype);
}
return byId;
}
/**

View File

@ -4,6 +4,7 @@ import java.util.*;
import com.zcloud.service.bus.NoticeCorpUserService;
import com.zcloud.service.bus.NoticeTemplateService;
import com.zcloud.service.system.UsersService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Tools;
@ -34,6 +35,8 @@ public class NoticeCorpServiceImpl implements NoticeCorpService{
private NoticeCorpService noticeCorpService;
@Autowired
private NoticeCorpUserService noticeCorpUserService;
@Autowired
private UsersService usersService;
/**
* @param pd
@ -165,5 +168,54 @@ public class NoticeCorpServiceImpl implements NoticeCorpService{
pd1.put("TYPE",0);
noticeCorpUserService.save(pd1);
}
@Override
public void sendNoticeToDep(PageData pd) throws Exception {
PageData notice = noticeTemplateService.findByBianMa(pd);
String content = "";
if(notice!=null){
content = notice.getString("CONTENT");
PageData contentPd = (PageData) pd.get("CONTENT");
for(Object key : contentPd.keySet()){ //替换占位符
if ("number".equals(key.toString()) && Tools.notEmpty(pd.getString("WORKURL"))) {
content = content.replace("${" + key.toString() + "}", "<span style=\"color: blue; font-weight: bold;\">"+contentPd.get(key).toString()+"</span>");
} else {
content = content.replace("${" + key.toString() + "}", contentPd.get(key).toString());
}
}
}else {
content = "未维护模板,需要管理端-公告模板进行维护";
}
PageData pd1 = new PageData();
pd1.put("NOTICECORP_ID", UuidUtil.get32UUID());
pd1.put("USERNAME",pd.getString("SENDER_NAME"));
pd1.put("CREATOR", pd.getString("SENDER_ID")); //添加人
pd1.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd1.put("SYNOPSIS",pd.getString("SYNOPSIS"));
pd1.put("WORKURL",pd.getString("WORKURL"));
pd1.put("CONTENT","<p>"+content+"</p>");
pd1.put("ISALL","yes");
pd1.put("ISREPLY",0);
pd1.put("ISDELETE",0);
pd1.put("ISTOP",0);
pd1.put("STATUS",1);
pd1.put("CORP_INFO_ID",pd.getString("CORPINFO_ID"));
noticeCorpService.save(pd1);
List<PageData> userList = usersService.listUserByDepId(pd);
if (userList != null && userList.size() > 0) {
List<PageData> noticeCorpUserList = new ArrayList<>();
for (PageData user : userList) {
PageData noticeCorpUser = new PageData();
pd1.put("NOTICECORPUSERID_ID",UuidUtil.get32UUID());
pd1.put("USER_ID",user.getString("USER_ID"));
pd1.put("TYPE",0);
noticeCorpUser.putAll(pd1);
noticeCorpUserList.add(noticeCorpUser);
}
noticeCorpUserService.batchSave(noticeCorpUserList);
}
// noticeCorpUserService.save(pd1);
}
}

View File

@ -9,7 +9,7 @@ import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.bus.NoticeCorpUserMapper;
import com.zcloud.service.bus.NoticeCorpUserService;
/**
/**
*
* luoxiaobao
* 2021-01-22
@ -21,7 +21,7 @@ public class NoticeCorpUserServiceImpl implements NoticeCorpUserService{
@Autowired
private NoticeCorpUserMapper noticecorpuseridMapper;
/**
* @param pd
* @throws Exception
@ -29,7 +29,7 @@ public class NoticeCorpUserServiceImpl implements NoticeCorpUserService{
public void save(PageData pd)throws Exception{
noticecorpuseridMapper.save(pd);
}
/**
* @param pd
* @throws Exception
@ -37,7 +37,7 @@ public class NoticeCorpUserServiceImpl implements NoticeCorpUserService{
public void delete(PageData pd)throws Exception{
noticecorpuseridMapper.delete(pd);
}
/**
* @param pd
* @throws Exception
@ -45,7 +45,7 @@ public class NoticeCorpUserServiceImpl implements NoticeCorpUserService{
public void edit(PageData pd)throws Exception{
noticecorpuseridMapper.edit(pd);
}
/**
* @param page
* @throws Exception
@ -53,7 +53,7 @@ public class NoticeCorpUserServiceImpl implements NoticeCorpUserService{
public List<PageData> list(Page page)throws Exception{
return noticecorpuseridMapper.datalistPage(page);
}
/**()
* @param pd
* @throws Exception
@ -61,7 +61,7 @@ public class NoticeCorpUserServiceImpl implements NoticeCorpUserService{
public List<PageData> listAll(PageData pd)throws Exception{
return noticecorpuseridMapper.listAll(pd);
}
/**id
* @param pd
* @throws Exception
@ -69,7 +69,7 @@ public class NoticeCorpUserServiceImpl implements NoticeCorpUserService{
public PageData findById(PageData pd)throws Exception{
return noticecorpuseridMapper.findById(pd);
}
/**
* @param ArrayDATA_IDS
* @throws Exception
@ -106,6 +106,11 @@ public class NoticeCorpUserServiceImpl implements NoticeCorpUserService{
// TODO Auto-generated method stub
return noticecorpuseridMapper.getReadUserlistPage(page);
}
@Override
public void batchSave(List<PageData> noticeCorpUserList) throws Exception {
noticecorpuseridMapper.batchSave(noticeCorpUserList);
}
}

View File

@ -0,0 +1,64 @@
package com.zcloud.service.depository;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2022-12-27
* www.zcloudchina.com
*/
public interface LabelFactoryService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
List<PageData> getTree(PageData condition) throws Exception;
List<PageData> saveTree(PageData pd) throws Exception;
List<PageData> findAllAncestors(PageData condition) throws Exception;
}

View File

@ -0,0 +1,59 @@
package com.zcloud.service.depository;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* luoxiaobao
* 2023-10-13
* www.zcloudchina.com
*/
public interface TermLibraryService{
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
}

View File

@ -0,0 +1,78 @@
package com.zcloud.service.depository;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
*
* luoxiaobao
* 2022-12-27
* www.zcloudchina.com
*/
public interface TextLibraryService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
void init(PageData request, MultipartFile [] file) throws Exception;
void lock(PageData request) throws Exception;
void top(PageData request) throws Exception;
void updateFile(MultipartFile[] file, PageData pageData) throws Exception;
List<PageData> getUpdateLog(PageData pageData) throws Exception;
void setStatus(PageData pageData) throws Exception;
void exportWord(PageData pageData, HttpServletResponse response) throws Exception;
PageData getTextInfo(PageData pageData);
void copyToOperate(PageData pageData) throws Exception;
}

View File

@ -0,0 +1,249 @@
package com.zcloud.service.depository.impl;
import com.alibaba.fastjson.JSONArray;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.depository.LabelFactoryMapper;
import com.zcloud.service.depository.LabelFactoryService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Warden;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
*
* luoxiaobao
* 2022-12-27
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class LabelFacoryServiceImpl implements LabelFactoryService {
@Resource
private LabelFactoryMapper labelFactoryMapper;
/**
*
*
* @param pd
* @throws Exception
*/
public void save(PageData pd) throws Exception {
labelFactoryMapper.save(pd);
}
/**
*
*
* @param pd
* @throws Exception
*/
public void delete(PageData pd) throws Exception {
labelFactoryMapper.delete(pd);
}
/**
*
*
* @param pd
* @throws Exception
*/
public void edit(PageData pd) throws Exception {
labelFactoryMapper.edit(pd);
}
/**
*
*
* @param page
* @throws Exception
*/
public List<PageData> list(Page page) throws Exception {
return labelFactoryMapper.datalistPage(page);
}
/**
* ()
*
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd) throws Exception {
return labelFactoryMapper.listAll(pd);
}
/**
* id
*
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd) throws Exception {
return labelFactoryMapper.findById(pd);
}
/**
*
*
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS) throws Exception {
labelFactoryMapper.deleteAll(ArrayDATA_IDS);
}
@Override
public List<PageData> getTree(PageData request) throws Exception {
List<PageData> result = new ArrayList<>();
PageData condition = new PageData();
List<PageData> labels = labelFactoryMapper.findByAncestors(condition);
for (PageData label : labels) {
if ("1".equals(label.getString("IS_ANCESTORS_FLAG"))){
condition.clear();
condition.put("BUS_LABEL_FACTORY_ID",label.getString("BUS_LABEL_FACTORY_ID"));
PageData ancestors = labelFactoryMapper.findById(condition);
analysis(labels, ancestors);
if (ancestors != null) {
result.add(ancestors);
}
}
}
result = result.stream().sorted(Comparator.comparing(o -> new BigDecimal(String.valueOf(o.get("SORT").toString())))).collect(Collectors.toList());
return result;
}
@Override
@Transactional
public List<PageData> saveTree(PageData pd) throws Exception {
// 组织
List<PageData> _tree = Warden.getList(pd.getString("tree"));
PageData condition = new PageData();
// 删除所有标签
condition.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID());
condition.put("TYPE",pd.getString("TYPE"));
labelFactoryMapper.deleteByAncestors(condition);
List<PageData> result = new ArrayList<>();
for (PageData leaf : _tree) {
Warden.initDate(leaf);
leaf.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
if (leaf.get("BUS_LABEL_FACTORY_ID").toString().length() > 30) {
if ("1".equals(leaf.getString("IS_ANCESTORS_FLAG"))) {
leaf.put("NAME", leaf.getString("NAME"));
labelFactoryMapper.save(leaf);
} else {
leaf.put("ANCESTORS_ID", leaf.getString("BUS_LABEL_FACTORY_ID"));
leaf.put("NAME", leaf.getString("NAME"));
leaf.put("PARENT_ID", "0");
leaf.put("IS_ANCESTORS_FLAG", "1");
leaf.put("TYPE", pd.getString("TYPE"));
labelFactoryMapper.save(leaf);
}
} else {
leaf.put("BUS_LABEL_FACTORY_ID", Warden.get32UUID());
leaf.put("ANCESTORS_ID", leaf.getString("BUS_LABEL_FACTORY_ID"));
leaf.put("NAME", leaf.getString("NAME"));
leaf.put("PARENT_ID", "0");
leaf.put("IS_ANCESTORS_FLAG", "1");
leaf.put("TYPE", pd.getString("TYPE"));
labelFactoryMapper.save(leaf);
}
analysis(leaf, result, 1);
}
return result;
}
@Override
public List<PageData> findAllAncestors(PageData condition) throws Exception {
return labelFactoryMapper.findAllAncestors(condition);
}
private void analysis(PageData pd, List<PageData> result, Integer level) {
JSONArray children = (JSONArray) pd.get("children");
if (children == null || children.size() <= 0) {
return;
}
List<PageData> tree = Warden.getList(children);
result.addAll(tree);
for (PageData leaf : tree) {
leaf.put("BUS_LABEL_FACTORY_ID", leaf.get("BUS_LABEL_FACTORY_ID").toString().length() > 30 ? leaf.getString("BUS_LABEL_FACTORY_ID") : Warden.get32UUID());
leaf.put("ANCESTORS_ID", pd.getString("ANCESTORS_ID"));
leaf.put("PARENT_ID", pd.getString("BUS_LABEL_FACTORY_ID"));
leaf.put("IS_ANCESTORS_FLAG", "0");
leaf.put("LEVEL", level);
leaf.put("CREATOR_ID", Jurisdiction.getUSER_ID());
leaf.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
leaf.put("CREATED_TIME", DateUtil.date2Str(new Date()));
leaf.put("ISDELETE", "0");
leaf.put("TYPE", pd.getString("TYPE"));
labelFactoryMapper.save(leaf);
analysis(leaf, result, ++level);
}
}
private void analysis(List<PageData> labels, PageData parent) {
List<PageData> sons = labels.stream()
.filter(n -> n.getString("PARENT_ID").equals(parent.getString("BUS_LABEL_FACTORY_ID")))
.sorted(Comparator.comparing(o -> new BigDecimal(String.valueOf(o.get("SORT").toString()))))
.collect(Collectors.toList());
if (parent == null) {
return;
}
parent.put("children", sons);
if (sons.size() > 0) {
for (PageData son : sons) {
analysis(labels, son);
}
}
}
private PageData findParentNode(List<PageData> tree, PageData branch) throws Exception {
for (PageData root : tree) {
List<PageData> branches = (List<PageData>) root.get("children");
if (branches.size() <= 0) {
continue;
}
for (PageData _branch : branches) {
if (branch.getString("BUS_LABEL_FACTORY_ID").equals(_branch.getString("BUS_LABEL_FACTORY_ID"))) {
return root;
}
}
PageData parentNode = findParentNode(branches, branch);
if (parentNode != null && parentNode.size() > 0) {
return parentNode;
}
}
return null;
}
private void initNode(PageData info, PageData gene) {
info.put("BUS_LABEL_FACTORY_ID", info.get("BUS_LABEL_FACTORY_ID").toString().length() > 30 ? info.getString("BUS_LABEL_FACTORY_ID") : Warden.get32UUID());
info.put("PARENT_ID", gene.getString("BUS_LABEL_FACTORY_ID"));
info.put("ANCESTORS_ID", gene.getString("ANCESTORS_ID"));
info.put("IS_ANCESTORS_FLAG", "0");
info.put("LEVEL", Integer.parseInt(gene.get("LEVEL").toString()) + 1);
info.put("CREATOR_ID", Jurisdiction.getUSER_ID());
info.put("CREATED_TIME", DateUtil.date2Str(new Date()));
info.put("ISDELETE", "0");
info.put("TYPE", gene.getString("TYPE"));
JSONArray _children = (JSONArray) info.get("children");
if (_children == null || _children.size() <= 0) {
return;
}
List<PageData> children = Warden.getList(_children);
for (PageData child : children) {
initNode(child, info);
}
}
}

View File

@ -0,0 +1,83 @@
package com.zcloud.service.depository.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.depository.TermLibraryMapper;
import com.zcloud.service.depository.TermLibraryService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
*
* luoxiaobao
* 2023-10-13
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class TermLibraryServiceImpl implements TermLibraryService {
@Resource
private TermLibraryMapper termlibraryMapper;
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception{
termlibraryMapper.save(pd);
}
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception{
termlibraryMapper.delete(pd);
}
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception{
termlibraryMapper.edit(pd);
}
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return termlibraryMapper.datalistPage(page);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return termlibraryMapper.listAll(pd);
}
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return termlibraryMapper.findById(pd);
}
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
termlibraryMapper.deleteAll(ArrayDATA_IDS);
}
}

View File

@ -0,0 +1,429 @@
package com.zcloud.service.depository.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
import com.zcloud.mapper.datasource.depository.LibraryLabelsMapper;
import com.zcloud.mapper.datasource.depository.LibraryLogMapper;
import com.zcloud.mapper.datasource.depository.TextInfoMapper;
import com.zcloud.mapper.datasource.depository.TextLibraryMapper;
import com.zcloud.service.depository.TextLibraryService;
import com.zcloud.util.*;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
/**
*
* luoxiaobao
* 2022-12-27
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class TextLibraryServiceImpl implements TextLibraryService {
@Resource
private TextLibraryMapper textlibraryMapper;
@Resource
private LibraryLabelsMapper libraryLabelsMapper;
@Resource
private LibraryLogMapper libraryLogMapper;
@Resource
private CorpInfoMapper corpInfoMapper;
@Resource
private Smb smb;
@Resource
private TextInfoMapper textInfoMapper;
@Value("${heBeiQinAnFile}")
private String heBeiQinAnFile;
/**
*
*
* @param pd
* @throws Exception
*/
public void save(PageData pd) throws Exception {
textlibraryMapper.save(pd);
}
/**
*
*
* @param pd
* @throws Exception
*/
public void delete(PageData pd) throws Exception {
PageData entity = textlibraryMapper.findById(pd);
if (StringUtils.isNotBlank(entity.getString("LOCKTOOL"))) {
throw new RuntimeException("数据已被锁定,请先解锁数据");
}
textlibraryMapper.delete(pd);
}
/**
*
*
* @param pd
* @throws Exception
*/
public void edit(PageData pd) throws Exception {
textlibraryMapper.edit(pd);
}
/**
*
*
* @param page
* @throws Exception
*/
public List<PageData> list(Page page) throws Exception {
List<PageData> list = textlibraryMapper.datalistPage(page);
for (PageData entity : list) {
List<PageData> _labels = libraryLabelsMapper.findBylibraryId(entity);
// 安全操作规程
entity.put("labels", _labels.stream().filter(n -> StringUtils.isNotEmpty(n.getString("BUS_LABEL_FACTORY_ID"))).collect(Collectors.toList()));
entity.put("TYPES", _labels.stream().filter(n -> n.get("CATEGORY") != null).filter(n -> n.getString("CATEGORY").equals("TYPES")).collect(Collectors.toList()));
entity.put("SPECIFICATION_TYPES", _labels.stream().filter(n -> n.get("CATEGORY") != null).filter(n -> n.getString("CATEGORY").equals("SPECIFICATION_TYPES")).collect(Collectors.toList()));
entity.put("ATTRIBUTE_LIST", _labels.stream().filter(n -> n.get("CATEGORY") != null).filter(n -> n.getString("CATEGORY").equals("ATTRIBUTE_LIST")).collect(Collectors.toList()));
entity.put("CATEGORY_LIST", _labels.stream().filter(n -> n.get("CATEGORY") != null).filter(n -> n.getString("CATEGORY").equals("CATEGORY_LIST")).collect(Collectors.toList()));
}
// 如果是迁移数据就用河北秦安的路径
for (PageData entity : list) {
if(!"1".equals(entity.getString("MIGRATION_FLAG"))){
entity.put("PATH",heBeiQinAnFile + entity.getString("PATH"));
}
}
return list;
}
/**
* ()
*
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd) throws Exception {
return textlibraryMapper.listAll(pd);
}
/**
* id
*
* @param condition
* @throws Exception all
*/
public PageData findById(PageData condition) throws Exception {
PageData info = textlibraryMapper.findById(condition);
if (info != null && info.size() > 0) {
List<PageData> _labels = libraryLabelsMapper.findBylibraryId(info);
if ("0".equals(info.getString("ASSOCIATION")) || "1".equals(info.getString("ASSOCIATION")) || "2".equals(info.getString("ASSOCIATION"))) {
info.put("labels", _labels.stream().filter(n -> (n.get("BUS_LABEL_FACTORY_ID") != null && org.apache.commons.lang3.StringUtils.isNotBlank(n.getString("BUS_LABEL_FACTORY_ID")))).collect(Collectors.toList()));
info.put("TYPES", _labels.stream().filter(n -> n.get("CATEGORY") != null).filter(n -> n.getString("CATEGORY").equals("TYPES")).map(Warden::addDic).collect(Collectors.toList()));
info.put("SPECIFICATION_TYPES", _labels.stream().filter(n -> n.get("CATEGORY") != null).filter(n -> n.getString("CATEGORY").equals("SPECIFICATION_TYPES")).map(Warden::addDic).collect(Collectors.toList()));
info.put("CATEGORY_LIST", _labels.stream().filter(n -> n.get("CATEGORY") != null).filter(n -> n.getString("CATEGORY").equals("CATEGORY_LIST")).map(Warden::addDic).collect(Collectors.toList()));
}
if ("3".equals(info.getString("ASSOCIATION"))) {
info.put("TYPES", _labels.stream().filter(n -> n.get("CATEGORY") != null).filter(n -> n.getString("CATEGORY").equals("TYPES")).map(Warden::addDic).collect(Collectors.toList()));
info.put("labels", _labels.stream().filter(n -> n.get("BUS_LABEL_FACTORY_ID") != null).collect(Collectors.toList()));
info.put("SPECIFICATION_TYPES", _labels.stream().filter(n -> n.get("CATEGORY") != null).filter(n -> n.getString("CATEGORY").equals("SPECIFICATION_TYPES")).map(Warden::addDic).collect(Collectors.toList()));
info.put("ATTRIBUTE_LIST", _labels.stream().filter(n -> n.get("CATEGORY") != null).filter(n -> n.getString("CATEGORY").equals("ATTRIBUTE_LIST")).map(Warden::addDic).collect(Collectors.toList()));
info.put("CATEGORY_LIST", _labels.stream().filter(n -> n.get("CATEGORY") != null).filter(n -> n.getString("CATEGORY").equals("CATEGORY_LIST")).map(Warden::addDic).collect(Collectors.toList()));
}
}
return info;
}
/**
*
*
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS) throws Exception {
textlibraryMapper.deleteAll(ArrayDATA_IDS);
}
@Override
public void init(PageData condition, MultipartFile[] file) throws Exception {
if (file != null && file.length > 0) {
String path = smb.saveFile(file[0]);
condition.put("PATH", path);
}
if (StringUtils.isNotBlank(condition.getString("BUS_TEXT_LIBRARY_ID"))) {
// 保存历史文件
PageData entity = textlibraryMapper.findById(condition);
entity.put("REMOTE_FILE_NAME", Warden.getFileName(condition.getString("PATH")));
entity.put("CREATED_TIME", entity.get("CREATED_TIME"));
entity.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
entity.put("STATUS", "1");
entity.put("MIGRATION_FLAG", "1");
entity.put("REMARKS",condition.getString("REMARKS"));
textlibraryMapper.edit(entity);
libraryLabelsMapper.deleteByLibraryId(condition);
List<PageData> types = Warden.getList(condition.getString("TYPES"));
List<PageData> list = new ArrayList<>(types);
PageData corp_condition = new PageData();
corp_condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData corp = corpInfoMapper.getInfo(corp_condition);
// 国民经济类型
List<PageData> specificationTypes = Warden.initSpecificationTypes(corp);
list.addAll(specificationTypes);
List<PageData> labels = Warden.getList(condition.getString("labels"));
list.addAll(labels);
if ("3".equals(condition.getString("ASSOCIATION"))) {
List<PageData> attributeList = Warden.getList(condition.getString("ATTRIBUTE_LIST"));
list.addAll(attributeList);
List<PageData> specification_types = Warden.getList(condition.getString("SPECIFICATION_TYPES"));
list.addAll(specification_types);
PageData type = new PageData();
type.put("CATEGORY_ID", "43ed4012090d4614bb35da60d06c8264");
type.put("CATEGORY", "TYPES");
type.put("CATEGORY_NAME", "企业预案");
list.add(type);
} else {
List<PageData> category_list = Warden.getList(condition.getString("CATEGORY_LIST"));
list.addAll(category_list);
}
for (PageData _label : list) {
PageData label = new PageData();
label.put("BUS_TEXT_LIBRARY_ID", condition.getString("BUS_TEXT_LIBRARY_ID"));
label.put("BUS_LIBRARY_LABELS_ID", Warden.get32UUID());
label.put("BUS_LABEL_FACTORY_ID", _label.getString("BUS_LABEL_FACTORY_ID"));
label.put("NAME", _label.getString("NAME"));
label.put("ISDELETE", "0");
if (StringUtils.isNotEmpty(_label.getString("CATEGORY_ID")))
label.put("CATEGORY_ID", _label.getString("CATEGORY_ID"));
if (StringUtils.isNotEmpty(_label.getString("CATEGORY")))
label.put("CATEGORY", _label.getString("CATEGORY"));
if (StringUtils.isNotEmpty(_label.getString("CATEGORY_NAME")))
label.put("CATEGORY_NAME", _label.getString("CATEGORY_NAME"));
libraryLabelsMapper.save(label);
}
if (StringUtils.isNotBlank(condition.getString("TEXT_INFO"))) {
PageData text_info = new PageData();
text_info.put("BUS_TEXT_LIBRARY_ID", condition.getString("BUS_TEXT_LIBRARY_ID"));
text_info = textInfoMapper.findByMainId(text_info);
if (text_info == null || text_info.size() == 0) {
text_info = new PageData();
text_info.put("CREATED_TIME", new Date());
text_info.put("TEXT_INFO_ID", Warden.get32UUID());
text_info.put("BUS_TEXT_LIBRARY_ID", condition.getString("BUS_TEXT_LIBRARY_ID"));
text_info.put("ISDELETE", "0");
text_info.put("OPERATE_TIME", new Date());
text_info.put("TEXT_INFO", condition.getString("TEXT_INFO"));
textInfoMapper.save(text_info);
} else {
text_info.put("OPERATE_TIME", new Date());
text_info.put("TEXT_INFO", condition.getString("TEXT_INFO"));
text_info.put("ISDELETE", "0");
textInfoMapper.edit(text_info);
}
}
} else {
condition.put("BUS_TEXT_LIBRARY_ID", Warden.get32UUID());
condition.put("REMOTE_FILE_NAME", Warden.getFileName(condition.getString("PATH")));
condition.put("UPLOAD_TIME", DateUtil.date2Str(new Date()));
condition.put("UPLOAD_USER", Jurisdiction.getUSER_ID());
condition.put("UPLOAD_USER_NAME", Jurisdiction.getUsername());
condition.put("CREATED_TIME", new Date());
condition.put("ISDELETE", "0");
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
condition.put("STATUS", "1");
condition.put("MIGRATION_FLAG", "1");
textlibraryMapper.save(condition);
List<PageData> list = new ArrayList<>();
PageData corp_condition = new PageData();
corp_condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData corp = corpInfoMapper.getInfo(corp_condition);
List<PageData> specificationTypes = Warden.initSpecificationTypes(corp);
if ("3".equals(condition.getString("ASSOCIATION"))) {
List<PageData> attributeList = Warden.getList(condition.getString("ATTRIBUTE_LIST"));
list.addAll(attributeList);
List<PageData> specification_types = Warden.getList(condition.getString("SPECIFICATION_TYPES"));
list.addAll(specification_types);
PageData type = new PageData();
type.put("CATEGORY_ID", "43ed4012090d4614bb35da60d06c8264");
type.put("CATEGORY", "TYPES");
type.put("CATEGORY_NAME", "企业预案");
list.add(type);
for (PageData entity : specificationTypes) {
entity.put("CATEGORY", "CATEGORY_LIST");
}
} else {
List<PageData> category_list = Warden.getList(condition.getString("CATEGORY_LIST"));
list.addAll(category_list);
}
list.addAll(specificationTypes);
List<PageData> labels = Warden.getList(condition.getString("labels"));
List<PageData> types = Warden.getList(condition.getString("TYPES"));
list.addAll(labels);
list.addAll(types);
for (PageData _label : list) {
PageData label = new PageData();
label.put("BUS_LIBRARY_LABELS_ID", Warden.get32UUID());
label.put("BUS_TEXT_LIBRARY_ID", condition.getString("BUS_TEXT_LIBRARY_ID"));
label.put("BUS_LABEL_FACTORY_ID", _label.getString("BUS_LABEL_FACTORY_ID"));
label.put("NAME", _label.getString("NAME"));
label.put("ISDELETE", "0");
label.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
if (StringUtils.isNotEmpty(_label.getString("CATEGORY")))
label.put("CATEGORY", _label.getString("CATEGORY"));
if (StringUtils.isNotEmpty(_label.getString("CATEGORY_ID")))
label.put("CATEGORY_ID", _label.getString("CATEGORY_ID"));
if (StringUtils.isNotEmpty(_label.getString("CATEGORY_NAME")))
label.put("CATEGORY_NAME", _label.getString("CATEGORY_NAME"));
libraryLabelsMapper.save(label);
}
PageData text_info = new PageData();
text_info.put("CREATED_TIME", new Date());
text_info.put("OPERATE_TIME", new Date());
text_info.put("TEXT_INFO_ID", Warden.get32UUID());
text_info.put("BUS_TEXT_LIBRARY_ID", condition.getString("BUS_TEXT_LIBRARY_ID"));
text_info.put("TEXT_INFO", condition.getString("TEXT_INFO"));
text_info.put("ISDELETE", "0");
textInfoMapper.save(text_info);
}
}
@Override
public void lock(PageData request) throws Exception {
PageData entity = textlibraryMapper.findById(request);
Optional.ofNullable(entity).orElseThrow(() -> new RuntimeException("数据不正确"));
if ("1".equals(request.getString("isLock"))) {
entity.put("LOCKTOOL", Jurisdiction.getUSER_ID());
textlibraryMapper.edit(entity);
} else {
if (Jurisdiction.getUSER_ID().equals(entity.getString("LOCKTOOL"))) {
entity.put("LOCKTOOL", null);
textlibraryMapper.edit(entity);
} else {
throw new RuntimeException("此条数据不能解锁,因为您不是锁定数据人");
}
}
}
@Override
public void top(PageData request) throws Exception {
PageData entity = textlibraryMapper.findById(request);
Optional.ofNullable(entity).orElseThrow(() -> new RuntimeException("数据不正确"));
if ("1".equals(request.getString("isTop"))) {
entity.put("ISTOPTIME", new Date().getTime());
textlibraryMapper.edit(entity);
} else {
entity.put("ISTOPTIME", null);
textlibraryMapper.edit(entity);
}
}
@Override
public void updateFile(MultipartFile[] file, PageData pageData) throws Exception {
if (file == null || file.length <= 0) throw new RuntimeException("系统异常,没用要更新的文件");
String path = smb.saveFile(file[0]);
PageData condition = new PageData();
condition.put("BUS_TEXT_LIBRARY_ID", pageData.getString("BUS_TEXT_LIBRARY_ID"));
PageData entity = textlibraryMapper.findById(condition);
PageData log = new PageData();
log.put("LIBRARY_LOG_ID", Warden.get32UUID());
log.put("PATH", entity.getString("PATH"));
log.put("BUS_TEXT_LIBRARY_ID", condition.getString("BUS_TEXT_LIBRARY_ID"));
Warden.initDate(log);
libraryLogMapper.save(log);
entity.put("PATH", path);
textlibraryMapper.edit(entity);
}
@Override
public List<PageData> getUpdateLog(PageData pageData) throws Exception {
PageData condition = new PageData();
condition.put("BUS_TEXT_LIBRARY_ID", pageData.getString("BUS_TEXT_LIBRARY_ID"));
return libraryLogMapper.findByLogId(condition);
}
@Override
public void setStatus(PageData pageData) throws Exception {
PageData condtion = new PageData();
condtion.put("BUS_TEXT_LIBRARY_ID", pageData.getString("BUS_TEXT_LIBRARY_ID"));
PageData entity = textlibraryMapper.findById(condtion);
entity.put("STATUS", pageData.getString("STATUS"));
textlibraryMapper.edit(entity);
}
@Override
public void copyToOperate(PageData pageData) throws Exception {
PageData condition = new PageData();
condition.put("BUS_TEXT_LIBRARY_ID", pageData.getString("BUS_TEXT_LIBRARY_ID"));
PageData info = textlibraryMapper.findById(condition);
List<PageData> label_list = libraryLabelsMapper.findBylibraryId(condition);
//复制数据
info.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
info.put("BUS_TEXT_LIBRARY_ID", Warden.get32UUID());
// 2023-08-17 张志军要求,从其他企业加入库的数据自动置顶
info.put("ISTOPTIME", null);
for (PageData entity : label_list) {
entity.put("BUS_TEXT_LIBRARY_ID", info.getString("BUS_TEXT_LIBRARY_ID"));
entity.put("BUS_LIBRARY_LABELS_ID", Warden.get32UUID());
}
textlibraryMapper.save(info);
for (PageData entity : label_list) {
libraryLabelsMapper.save(entity);
}
PageData text_info = textInfoMapper.findByMainId(condition);
if (text_info != null && text_info.size() > 0){
text_info.put("TEXT_INFO_ID",Warden.get32UUID());
text_info.put("BUS_TEXT_LIBRARY_ID",info.getString("BUS_TEXT_LIBRARY_ID"));
textInfoMapper.save(text_info);
}
}
@Override
public PageData getTextInfo(PageData pageData) {
return textInfoMapper.findByMainId(pageData);
}
@Override
public void exportWord(PageData pageData, HttpServletResponse response) throws Exception {
PageData condition = new PageData();
condition.put("BUS_TEXT_LIBRARY_ID", pageData.getString("BUS_TEXT_LIBRARY_ID"));
PageData info = textInfoMapper.findByMainId(condition);
//2023-08-21 created by liu jun 解决文本样式问题
WordUtil.exportHtmlToWord(null,response,info.getString("TEXT_INFO"),"data");
}
}

View File

@ -56,4 +56,6 @@ public interface FireDeviceService {
void removeFireDeviceByIds(PageData pd);
List<PageData> exportDataList(PageData pd) throws Exception;
}

View File

@ -263,5 +263,10 @@ public class FireDeviceServiceImpl implements FireDeviceService {
}
}
@Override
public List<PageData> exportDataList(PageData pd) throws Exception {
return fireDeviceMapper.exportDataList(pd);
}
}

View File

@ -98,6 +98,9 @@ public interface MeteorologicalinfoService {
* @throws Exception
*/
Integer updateMeteorologicalinfo(PageData pageData);
/**
* @throws Exception
*/
public PageData listbymeteorologicalByCorpinfoId(PageData pd)throws Exception;
}

View File

@ -3,6 +3,7 @@ package com.zcloud.service.map.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.map.MapEightMapper;
import com.zcloud.service.bus.CorpInfoService;
import com.zcloud.service.map.MapEightService;
import com.zcloud.util.Tools;
import org.apache.commons.lang.StringUtils;
@ -12,6 +13,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
*
@ -26,8 +28,8 @@ public class MapEightServiceImpl implements MapEightService {
@Autowired
private MapEightMapper mapEightMapper;
@Override
public List<String> getCorpinfoIds(PageData pd) {
@Override
public List<String> getCorpinfoIds(PageData pd) {
String area = pd.getString("AREA");
if(StringUtils.isNotBlank(area)){
String[] ArrayDATA_IDS = area.split(",");
@ -39,12 +41,12 @@ public class MapEightServiceImpl implements MapEightService {
return mapEightMapper.getCorpinfoIds(ArrayDATA_IDS);
}
return new ArrayList<>();
}
}
@Override
@Override
public Object getEcharts(PageData pd) {
Map<String,Object> returnMap = new HashMap<>();
String errInfo = "success";
String errInfo = "success";
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
@ -108,28 +110,28 @@ public class MapEightServiceImpl implements MapEightService {
@Override
public List<PageData> listAllHighRiskWorkLocation(PageData pd) throws Exception {
List<PageData> r = new ArrayList<>();
String typeStr = pd.getString("TYPE");
//动火
if(StringUtils.equals(typeStr,"HOTWORK")){
List<PageData> r = new ArrayList<>();
String typeStr = pd.getString("TYPE");
//动火
if(StringUtils.equals(typeStr,"HOTWORK")){
// r = mapEightMapper.getHOTWORKHighRiskWorkLocation(pd);
r = mapEightMapper.getHOTWORKHighRiskWorkLocationCfd(pd);
//临时用电
}else if(StringUtils.equals(typeStr,"ELECTRICITY")){
r = mapEightMapper.getELECTRICITYHighRiskWorkLocation(pd);
//盲板
}else if(StringUtils.equals(typeStr,"BLINDBOARD")){
r = mapEightMapper.getBLINDBOARDHighRiskWorkLocation(pd);
// 高处
}else if(StringUtils.equals(typeStr,"HIGHWORK")){
r = mapEightMapper.getHIGHWORKHighRiskWorkLocation(pd);
//有限空间
}else if(StringUtils.equals(typeStr,"CONFINEDSPACE")){
r = mapEightMapper.getCONFINEDSPACEHighRiskWorkLocation(pd);
//吊装
}else if(StringUtils.equals(typeStr,"HOISTING")){
r = mapEightMapper.getHOISTINGHighRiskWorkLocation(pd);
}
//临时用电
}else if(StringUtils.equals(typeStr,"ELECTRICITY")){
r = mapEightMapper.getELECTRICITYHighRiskWorkLocationOrder(pd);
//盲板
}else if(StringUtils.equals(typeStr,"BLINDBOARD")){
r = mapEightMapper.getBLINDBOARDHighRiskWorkLocationOrder(pd);
// 高处
}else if(StringUtils.equals(typeStr,"HIGHWORK")){
r = mapEightMapper.getHIGHWORKHighRiskWorkLocationOrder(pd);
//有限空间
}else if(StringUtils.equals(typeStr,"CONFINEDSPACE")){
r = mapEightMapper.getCONFINEDSPACEHighRiskWorkLocationOrder(pd);
//吊装
}else if(StringUtils.equals(typeStr,"HOISTING")){
r = mapEightMapper.getHOISTINGHighRiskWorkLocationOrder(pd);
}
return r;
}
@ -352,7 +354,7 @@ public class MapEightServiceImpl implements MapEightService {
}else if(StringUtils.equals(typeStr,"BLINDBOARD")){
pd.put("BLINDBOARD_ID",idStr);
pd = mapEightMapper.findByIdBLINDBOARDOrder(pd);
map.put("measuresList", mapEightMapper.listAllMeasuresBLINDBOARDOrder(pd));
map.put("measuresList", mapEightMapper.listAllMeasuresBLINDBOARDOrder(pd));
PageData Info = mapEightMapper.findByIdJWDOrder(pd);
pd.put("TYPE",105);//盲板位置图
pd.put("FOREIGN_KEY",pd.getString("BLINDBOARD_ID"));
@ -368,12 +370,13 @@ public class MapEightServiceImpl implements MapEightService {
map.put("imgList1",mapEightMapper.findByHIGHWORKAcceptuserId(pd));
map.put("imgList",mapEightMapper.findByHIGHWORKAcceptuserIds(pd));
}else if(StringUtils.equals(typeStr,"CONFINEDSPACE")){
//没有有限空间作业
//pd.put("CONFINEDSPACE_ID",idStr);
//pd = mapEightMapper.findByIdCONFINEDSPACE(pd);
pd = new PageData();
map.put("measuresList", null);
map.put("gasList", null);
pd.put("CONFINEDSPACE_ID",idStr);
pd = mapEightMapper.findByIdCONFINEDSPACEOrder(pd); //根据ID读取
map.put("measuresList", mapEightMapper.listAllMeasuresCONFINEDSPACEOrder(pd));
map.put("gasList", mapEightMapper.listAllCONFINEDSPACEOrder(pd));
map.put("gas", mapEightMapper.findByIdCONFINEDSPACEGasWH(pd));
map.put("imgList",mapEightMapper.findByIdCONFINEDSPACEAcceptusers(pd));
map.put("imgList1",mapEightMapper.findByIdCONFINEDSPACEAcceptuser(pd));
}else if(StringUtils.equals(typeStr,"HOISTING")){
pd.put("HOISTING_ID",idStr);
pd = mapEightMapper.findByIdHOISTINGOrder(pd);
@ -569,18 +572,18 @@ public class MapEightServiceImpl implements MapEightService {
}
}
pd.put("specialUserList", specialUserList);
return pd;
return pd;
}
private PageData dianhuo(PageData pd){
if(StringUtils.isBlank(pd.getString("HOT_WORK_METHOD_NAME"))){
String zidian = pd.getString("HOT_WORK_METHOD_ID");
List<String> shuzu = Arrays.asList(zidian.split(","));
private PageData dianhuo(PageData pd){
if(StringUtils.isBlank(pd.getString("HOT_WORK_METHOD_NAME"))){
String zidian = pd.getString("HOT_WORK_METHOD_ID");
List<String> shuzu = Arrays.asList(zidian.split(","));
List<String> wenzi = mapEightMapper.getListDongHuo(shuzu);
String pinjie = String.join(",",wenzi);
pd.put("HOT_WORK_METHOD_NAME",pinjie);
}
return pd;
}
return pd;
}
}

View File

@ -2,6 +2,7 @@ package com.zcloud.service.map.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.map.MeteorologicalMapper;
import com.zcloud.mapper.dsno2.map.MeteorologicalinfoMapper;
import com.zcloud.service.map.DataDockingLogService;
import com.zcloud.service.map.MeteorologicalinfoService;
@ -12,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -27,7 +29,8 @@ public class MeteorologicalinfoServiceImpl implements MeteorologicalinfoService
@Autowired
private MeteorologicalinfoMapper meteorologicalinfoMapper;
@Autowired
private MeteorologicalMapper meteorologicalMapper;
@Autowired
private DataDockingLogService dataDockingLogService;
@ -218,5 +221,30 @@ public class MeteorologicalinfoServiceImpl implements MeteorologicalinfoService
public Integer updateMeteorologicalinfo(PageData pageData) {
return meteorologicalinfoMapper.updateMeteorologicalinfo(pageData);
}
/**
* @throws Exception
*/
public PageData listbymeteorologicalByCorpinfoId(PageData pd)throws Exception{
/**
* 使in
* 1.
* 2.,
*/
pd.put("OUTSOURCED_ID",pd.getString("CORPINFO_ID"));
List<PageData> getListByCorpinfoId = meteorologicalMapper.listAll(pd);
if(getListByCorpinfoId.size() > 0){
String codes = "";
for (PageData met : getListByCorpinfoId){
codes += "'" + met.getString("CODE")+"',";
}
System.out.println();
codes = codes.substring(0,codes.length()-1);
pd.put("codes",codes);
return meteorologicalinfoMapper.listbymeteorologicalByCodes(pd);
}
return null;
}
}

View File

@ -0,0 +1,66 @@
package com.zcloud.service.mkmj;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.map.util.ReturnMap;
import java.util.List;
/**
*
* zhaoyu
* 2024-01-16
* www.zcloudchina.com
*/
public interface MkmjAreaGateService {
/**
* @param pd
* @throws Exception
*/
public Object save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public Object delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public Object edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public Object deleteAll(String[] ArrayDATA_IDS)throws Exception;
/**
*
* @param pd
* @return
*/
Object savePosition(PageData pd);
}

View File

@ -0,0 +1,55 @@
package com.zcloud.service.mkmj;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.map.util.ReturnMap;
import java.util.List;
/**
*
* zhaoyu
* 2024-01-16
* www.zcloudchina.com
*/
public interface MkmjAreaService {
/**
* @param pd
* @throws Exception
*/
public Object save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public Object delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public Object edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
}

View File

@ -0,0 +1,60 @@
package com.zcloud.service.mkmj;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.map.util.ReturnMap;
import java.util.List;
/**
*
* zhaoyu
* 2024-01-16
* www.zcloudchina.com
*/
public interface MkmjGateLogService {
/**
* @param pd
* @throws Exception
*/
public ReturnMap save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public ReturnMap delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public ReturnMap edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public ReturnMap deleteAll(String[] ArrayDATA_IDS)throws Exception;
}

View File

@ -0,0 +1,66 @@
package com.zcloud.service.mkmj;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.map.util.ReturnMap;
import java.util.List;
/**
*
* zhaoyu
* 2024-01-16
* www.zcloudchina.com
*/
public interface MkmjGateVideoService {
/**
* @param pd
* @throws Exception
*/
public Object save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public Object delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public Object edit(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public Object deleteAll(String[] ArrayDATA_IDS)throws Exception;
/**
*
* @param pd
* @return
*/
Object savePosition(PageData pd);
}

View File

@ -0,0 +1,135 @@
package com.zcloud.service.mkmj.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.mkmj.MkmjAreaGateMapper;
import com.zcloud.service.map.util.ReturnMap;
import com.zcloud.service.mkmj.MkmjAreaGateService;
import com.zcloud.util.UuidUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* zhaoyu
* 2024-01-16
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class MkmjAreaGateServiceImpl implements MkmjAreaGateService {
@Autowired
private MkmjAreaGateMapper mkmjAreaGateMapper;
/**
* @param pd
* @throws Exception
*/
public Object save(PageData pd)throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
//保存校验名称不重复
PageData pageData = mkmjAreaGateMapper.findByOnly(pd);
//查询不到重复数据 开始走业务
if(ObjectUtils.isEmpty(pageData)){
pd.put("AREA_GATE_ID", UuidUtil.get32UUID());
}else {
map.put("result", "fail");
map.put("msg", "名称已存在,请修改后重新提交");
return map;
}
mkmjAreaGateMapper.save(pd);
map.put("result", errInfo);
map.put("msg", "保存成功");
return map;
}
/**
* @param pd
* @throws Exception
*/
public Object delete(PageData pd)throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
mkmjAreaGateMapper.delete(pd);
map.put("result", errInfo);
map.put("msg", "删除成功");
return map;
}
/**
* @param pd
* @throws Exception
*/
public Object edit(PageData pd)throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pageData = mkmjAreaGateMapper.findByOnly(pd);
//查询不到重复数据 开始走业务
if(!ObjectUtils.isEmpty(pageData)){
map.put("result", "fail");
map.put("msg", "名称已存在,请修改后重新提交");
return map;
}
mkmjAreaGateMapper.edit(pd);
map.put("result", errInfo);
map.put("msg", "编辑成功");
return map;
}
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return mkmjAreaGateMapper.datalistPage(page);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return mkmjAreaGateMapper.listAll(pd);
}
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return mkmjAreaGateMapper.findById(pd);
}
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public Object deleteAll(String[] ArrayDATA_IDS)throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
mkmjAreaGateMapper.deleteAll(ArrayDATA_IDS);
map.put("result", errInfo);
map.put("msg", "删除成功");
return map;
}
@Override
public Object savePosition(PageData pd) {
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
mkmjAreaGateMapper.savePosition(pd);
map.put("result", errInfo);
map.put("msg", "定位成功");
return map;
}
}

View File

@ -0,0 +1,132 @@
package com.zcloud.service.mkmj.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.mkmj.MkmjAreaGateMapper;
import com.zcloud.mapper.datasource.mkmj.MkmjAreaMapper;
import com.zcloud.service.map.util.ReturnMap;
import com.zcloud.service.mkmj.MkmjAreaService;
import com.zcloud.util.UuidUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* zhaoyu
* 2024-01-16
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class MkmjAreaServiceImpl implements MkmjAreaService {
@Autowired
private MkmjAreaMapper mkmjAreaMapper;
@Autowired
private MkmjAreaGateMapper mkmjAreaGateMapper;
/**
* @param pd
* @throws Exception
*/
public Object save(PageData pd)throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
//保存校验名称不重复
PageData pageData = mkmjAreaMapper.findByOnly(pd);
//查询不到重复数据 开始走业务
if(ObjectUtils.isEmpty(pageData)){
pd.put("AREA_ID", UuidUtil.get32UUID());
}else {
map.put("result", "fail");
map.put("msg", "名称已存在,请修改后重新提交");
return map;
}
mkmjAreaMapper.save(pd);
map.put("result", errInfo);
map.put("msg", "保存成功");
return map;
}
/**
* @param pd
* @throws Exception
*/
public Object delete(PageData pd)throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
//校验区域下是否还存在区域 存在则不让删除
List<PageData> childList = mkmjAreaMapper.findByChild(pd);
if(childList.size()>0){
map.put("result", "fail");
map.put("msg", "当前区域还存在下级区域,请删除当前区域的所有下级区域后进行删除");
return map;
}
//校验区域下是否存在闸机,存在则不让删除
List<PageData> gateList = mkmjAreaGateMapper.listAll(pd);
if(gateList.size()>0){
map.put("result", "fail");
map.put("msg", "当前区域还存在闸机,请删除当前区域的所有闸机后进行删除");
return map;
}
//两个校验都不存在 则可以删除
mkmjAreaMapper.delete(pd);
map.put("result", errInfo);
map.put("msg", "删除成功");
return map;
}
/**
* @param pd
* @throws Exception
*/
public Object edit(PageData pd)throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pageData = mkmjAreaMapper.findByOnly(pd);
//查询不到重复数据 开始走业务
if(!ObjectUtils.isEmpty(pageData)){
map.put("result", "fail");
map.put("msg", "名称已存在,请修改后重新提交");
return map;
}
mkmjAreaMapper.edit(pd);
map.put("result", errInfo);
map.put("msg", "编辑成功");
return map;
}
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return mkmjAreaMapper.datalistPage(page);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return mkmjAreaMapper.listAll(pd);
}
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return mkmjAreaMapper.findById(pd);
}
}

View File

@ -0,0 +1,92 @@
package com.zcloud.service.mkmj.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.mkmj.MkmjAreaGateMapper;
import com.zcloud.mapper.datasource.mkmj.MkmjGateLogMapper;
import com.zcloud.service.map.util.ReturnMap;
import com.zcloud.service.mkmj.MkmjAreaGateService;
import com.zcloud.service.mkmj.MkmjGateLogService;
import com.zcloud.util.UuidUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import java.util.List;
/**
*
* zhaoyu
* 2024-01-16
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class MkmjGateLogServiceImpl implements MkmjGateLogService {
@Autowired
private MkmjGateLogMapper mkmjGateLogMapper;
/**
* @param pd
* @throws Exception
*/
public ReturnMap save(PageData pd)throws Exception{
mkmjGateLogMapper.save(pd);
return ReturnMap.ok("保存成功");
}
/**
* @param pd
* @throws Exception
*/
public ReturnMap delete(PageData pd)throws Exception{
mkmjGateLogMapper.delete(pd);
return ReturnMap.ok("删除成功");
}
/**
* @param pd
* @throws Exception
*/
public ReturnMap edit(PageData pd)throws Exception{
mkmjGateLogMapper.edit(pd);
return ReturnMap.ok("编辑成功");
}
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return mkmjGateLogMapper.datalistPage(page);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return mkmjGateLogMapper.listAll(pd);
}
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return mkmjGateLogMapper.findById(pd);
}
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public ReturnMap deleteAll(String[] ArrayDATA_IDS)throws Exception{
mkmjGateLogMapper.deleteAll(ArrayDATA_IDS);
return ReturnMap.ok("删除成功");
}
}

View File

@ -0,0 +1,125 @@
package com.zcloud.service.mkmj.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.mkmj.MkmjAreaGateMapper;
import com.zcloud.mapper.datasource.mkmj.MkmjGateVideoMapper;
import com.zcloud.service.map.util.ReturnMap;
import com.zcloud.service.mkmj.MkmjAreaGateService;
import com.zcloud.service.mkmj.MkmjGateVideoService;
import com.zcloud.util.UuidUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* zhaoyu
* 2024-01-16
* www.zcloudchina.com
*/
@Service
@Transactional //开启事物
public class MkmjGateVideServiceImpl implements MkmjGateVideoService {
@Autowired
private MkmjGateVideoMapper mkmjGateVideoMapper;
/**
* @param pd
* @throws Exception
*/
public Object save(PageData pd)throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pageData = mkmjGateVideoMapper.findByOnly(pd);
if(ObjectUtils.isEmpty(pageData)){
pd.put("GATE_VIDEO_ID",UuidUtil.get32UUID());
}else {
map.put("result", "fail");
map.put("msg", "当前闸机以绑定该摄像头,无法在此绑定");
return map;
}
mkmjGateVideoMapper.save(pd);
map.put("result", errInfo);
map.put("msg", "保存成功");
return map;
}
/**
* @param pd
* @throws Exception
*/
public Object delete(PageData pd)throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
mkmjGateVideoMapper.delete(pd);
map.put("result", errInfo);
map.put("msg", "删除成功");
return map;
}
/**
* @param pd
* @throws Exception
*/
public Object edit(PageData pd)throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
mkmjGateVideoMapper.edit(pd);
map.put("result", errInfo);
map.put("msg", "编辑成功");
return map;
}
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception{
return mkmjGateVideoMapper.datalistPage(page);
}
/**()
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception{
return mkmjGateVideoMapper.listAll(pd);
}
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception{
return mkmjGateVideoMapper.findById(pd);
}
/**
* @param ArrayDATA_IDS
* @throws Exception
*/
public Object deleteAll(String[] ArrayDATA_IDS)throws Exception{
ReturnMap ReturnMap = new ReturnMap();
mkmjGateVideoMapper.deleteAll(ArrayDATA_IDS);
return ReturnMap.ok("删除成功");
}
@Override
public Object savePosition(PageData pd) {
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
mkmjGateVideoMapper.savePosition(pd);
map.put("result", errInfo);
map.put("msg", "定位成功");
return map;
}
}

View File

@ -231,5 +231,7 @@ public interface DepartmentService{
List<Department> listAllCorpDepartment(String number) throws Exception;
PageData getCorpDepartment(PageData condition) throws Exception;
List<PageData> getCorpDepartmentByIds(List<String> departmentList);
}

View File

@ -360,4 +360,6 @@ public interface UsersService {
PageData getPersonByCardNo(PageData pd) throws Exception;
PageData findByCardNo(PageData pd) throws Exception;
List<PageData> listUserByDepId(PageData pd) throws Exception;
}

View File

@ -441,6 +441,11 @@ public class DepartmentServiceImpl implements DepartmentService{
return departmentMapper.findByCorpDepartmentId(condition);
}
@Override
public List<PageData> getCorpDepartmentByIds(List<String> departmentList) {
return departmentMapper.getCorpDepartmentByIds(departmentList);
}
/**
* ID
* @param parentId

View File

@ -491,4 +491,9 @@ public class UsersServiceImpl implements UsersService {
public PageData findByCardNo(PageData pd)throws Exception{
return usersMapper.findByCardNo(pd);
}
@Override
public List<PageData> listUserByDepId(PageData pd) throws Exception {
return usersMapper.listUserByDepId(pd);
}
}

View File

@ -2,6 +2,9 @@ package com.zcloud.service.xgf;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.flow.xgf.util.XgfFlowDto;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
@ -24,4 +27,21 @@ public interface XgfUserService {
PageData findInfo(PageData condition);
List<PageData> findRecordList(PageData condition) throws Exception;
List<PageData> getAppointApproveList(Page page);
Object getApproveInfo(PageData request);
Object getFlowInfo(PageData request);
void approvePlus(PageData request, MultipartFile[] chengNuoShu) throws Exception;
void saveLog(PageData info, String status, String endFlag) throws Exception;
void saveLog(XgfFlowDto info, String status, String endFlag) throws Exception;
void repulse(PageData flows) throws Exception;
void approveMax(PageData request, MultipartFile[] chengNuoShu) throws Exception;
List<PageData> getWorkTask(PageData condition) throws Exception;
}

View File

@ -284,4 +284,25 @@ public class Smb {
channelSftp.exit();
}
public String saveFile(MultipartFile multipartFile) throws Exception{
return this.saveFile(multipartFile,Const.FILEPATHFILE);
}
public String saveFile(MultipartFile file, String cost) throws Exception{
// 生成文件名
String fileName = Warden.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
// 根据项目类型生成项目文件
String filePath;
if ("admin".equals(Jurisdiction.getUsername())) {
filePath = cost + "admin" + "/" + DateUtil.getDays();
} else {
filePath = cost + "imgFactory" + "/" + DateUtil.getDays();
}
// 保存文件
sshSftp(file, fileName, filePath);
// 返回文件保存目录
return filePath + "/" + fileName;
}
}

View File

@ -5,25 +5,33 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
import org.springframework.http.MediaType;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.io.*;
import java.net.URL;
import java.net.URLConnection;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
public class Warden {
@ -295,6 +303,182 @@ public class Warden {
}
}
public static void initDate(PageData entity) {
entity.put("CREATOR", Jurisdiction.getUSER_ID());
entity.put("CREATE_TIME", DateUtil.getTime());
entity.put("CREATOR_NAME", Jurisdiction.getName());
entity.put("CREATTIME", DateUtil.getTime());
entity.put("OPERATOR", Jurisdiction.getUSER_ID());
entity.put("OPERATOR_NAME", Jurisdiction.getName());
entity.put("OPERAT_TIME", DateUtil.getTime());
entity.put("OPERATTIME", DateUtil.getTime());
entity.put("ISDELETE", "0");
}
public static PageData addDic(PageData pageData) {
pageData.put("DICTIONARIES_ID",pageData.getString("CATEGORY_ID"));
pageData.put("NAME",pageData.getString("CATEGORY_NAME"));
return pageData;
}
public static String getFileName(String img_path) {
if (StringUtils.isBlank(img_path)) {
throw new RuntimeException("被解析路径为空");
}
String[] info = img_path.split("/");
return info[info.length - 1];
}
public static List<PageData> initSpecificationTypes(PageData corp) {
List<PageData> list = new ArrayList<>();
if (corp.get("CORP_TYPE_ONE_NAME") != null && StringUtils.isNotBlank(corp.getString("CORP_TYPE_ONE_NAME"))){
PageData one = new PageData();
one.put("CATEGORY","SPECIFICATION_TYPES");
one.put("CATEGORY_ID",corp.getString("CORP_TYPE"));
one.put("CATEGORY_NAME",corp.getString("CORP_TYPE_ONE_NAME"));
list.add(one);
}
if (corp.get("CORP_TYPE_TWO_NAME") != null && StringUtils.isNotBlank(corp.getString("CORP_TYPE_TWO_NAME"))) {
PageData two = new PageData();
two.put("CATEGORY", "SPECIFICATION_TYPES");
two.put("CATEGORY_ID", corp.getString("CORP_TYPE2"));
two.put("CATEGORY_NAME", corp.getString("CORP_TYPE_TWO_NAME"));
list.add(two);
}
if (corp.get("CORP_TYPE_THREE_NAME") != null && StringUtils.isNotBlank(corp.getString("CORP_TYPE_THREE_NAME"))) {
PageData three = new PageData();
three.put("CATEGORY", "SPECIFICATION_TYPES");
three.put("CATEGORY_ID", corp.getString("CORP_TYPE3"));
three.put("CATEGORY_NAME", corp.getString("CORP_TYPE_THREE_NAME"));
list.add(three);
}
if (corp.get("CORP_TYPE_FOUR_NAME") != null && StringUtils.isNotBlank(corp.getString("CORP_TYPE_FOUR_NAME"))) {
PageData four = new PageData();
four.put("CATEGORY", "SPECIFICATION_TYPES");
four.put("CATEGORY_ID", corp.getString("CORP_TYPE4"));
four.put("CATEGORY_NAME", corp.getString("CORP_TYPE_FOUR_NAME"));
list.add(four);
}
return list;
}
public static String saveFile(MultipartFile[] files, String number) throws Exception{
if (files.length == 0) throw new RuntimeException("文件为空");
MultipartFile file = files[0];
String ffile = DateUtil.getDays();
String fileName = get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + number + "/" + ffile);
return Const.FILEPATHFILE + number + "/" + ffile + "/" + fileName;
}
public static String saveFile(MultipartFile file, String CORPINFO_ID) throws Exception{
MultipartFile[] files = new MultipartFile[1];
files[0] = file;
return saveFile(files, CORPINFO_ID);
}
/**
*
*/
public static MultipartFile createZip(MultipartFile[] chenNuoShu) throws Exception{
return zipFiles(convertToFile(chenNuoShu));
}
public static List<File> convertToFile(MultipartFile[] files) throws Exception {
List<File> lstFile = new ArrayList<>();
if (files.length == 0) {
throw new RuntimeException("文件为空");
}
for (MultipartFile file : files) {
if (file.equals("") || file.getSize() <= 0) {
continue;
} else {
InputStream ins;
ins = file.getInputStream();
File toFile = new File(file.getOriginalFilename());
inputStreamToFile(ins, toFile);
lstFile.add(toFile);
ins.close();
}
}
return lstFile;
}
/**
*
*
* @param ins
* @param file
*/
public static void inputStreamToFile(InputStream ins, File file) {
try {
OutputStream os = Files.newOutputStream(file.toPath());
int bytesRead = 0;
byte[] buffer = new byte[8192];
while ((bytesRead = ins.read(buffer, 0, 8192)) != -1) {
os.write(buffer, 0, bytesRead);
}
os.close();
ins.close();
} catch (Exception e) {
e.printStackTrace();
}
}
public static MultipartFile zipFiles(List<File> srcFiles) throws IOException {
Date date = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dxfFileName = formatter.format(date).replace(" ", "_").replace(":", "-");
FileInputStream fileInputStream;
ByteArrayOutputStream byteOutStream = new ByteArrayOutputStream();
try (ZipOutputStream zipOut = new ZipOutputStream(byteOutStream)) {
String fileNames = "";
Random random = new Random();
for (File file : srcFiles) {
fileInputStream = new FileInputStream(file);
String fileName = file.getName();
if (fileNames.contains(fileName)){
fileName = (random.nextInt(90000) + 10000) + fileName;
} else {
fileNames = fileNames + fileName + ",";
}
ZipEntry zipEntry = new ZipEntry(fileName);
zipOut.putNextEntry(zipEntry);
int len;
byte[] buffer = new byte[1024];
while ((len = fileInputStream.read(buffer)) > 0) {
zipOut.write(buffer, 0, len);
}
fileInputStream.close();
// 删除文件
boolean isDelete = file.delete();
if (isDelete){
System.out.println("删除文件成功");
}
}
zipOut.flush();
zipOut.closeEntry();
zipOut.close();
InputStream inputStream = new ByteArrayInputStream(byteOutStream.toByteArray());
FileItemFactory factory = new DiskFileItemFactory(16, null);
FileItem item = factory.createItem("file", MediaType.MULTIPART_FORM_DATA_VALUE, true, LocalDateTime.now() + ".zip");
OutputStream os = item.getOutputStream();
IOUtils.copy(inputStream, os);
return new CommonsMultipartFile(item);
} catch (IOException e) {
e.printStackTrace();
}
throw new IOException("压缩文件失败");
}
public static Object saveFile(MultipartFile[] files,String CORPINFO_ID) throws Exception{
if (files.length == 0) throw new RuntimeException("文件为空");
MultipartFile file = files[0];

View File

@ -0,0 +1,103 @@
package com.zcloud.util;
import org.apache.poi.poifs.filesystem.DirectoryEntry;
import org.apache.poi.poifs.filesystem.DocumentEntry;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
/**
* poiword
* @author lei
* @version 1.0
* @date 2022/11/14 10:23
*/
public class WordUtil {
/**
* word
* @param request
* @param response
* @param content
* @param fileName
* @throws Exception
*/
public static void exportHtmlToWord(HttpServletRequest request, HttpServletResponse response, String content, String fileName) throws Exception {
//图片转为base64方法
//String imagebase64 = getImageStr(imagePath);
// 拼接html格式内容
StringBuffer sbf = new StringBuffer();
// 这里拼接一下html标签,便于word文档能够识别
sbf.append("<html " +
"xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:w=\"urn:schemas-microsoft-com:office:word\" xmlns:m=\"http://schemas.microsoft.com/office/2004/12/omml\" xmlns=\"http://www.w3.org/TR/REC-html40\"" + //将版式从web版式改成页面试图
">");
sbf.append("<head>" +
"<!--[if gte mso 9]><xml><w:WordDocument><w:View>Print</w:View><w:TrackMoves>false</w:TrackMoves><w:TrackFormatting/><w:ValidateAgainstSchemas/><w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid><w:IgnoreMixedContent>false</w:IgnoreMixedContent><w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText><w:DoNotPromoteQF/><w:LidThemeOther>EN-US</w:LidThemeOther><w:LidThemeAsian>ZH-CN</w:LidThemeAsian><w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript><w:Compatibility><w:BreakWrappedTables/><w:SnapToGridInCell/><w:WrapTextWithPunct/><w:UseAsianBreakRules/><w:DontGrowAutofit/><w:SplitPgBreakAndParaMark/><w:DontVertAlignCellWithSp/><w:DontBreakConstrainedForcedTables/><w:DontVertAlignInTxbx/><w:Word11KerningPairs/><w:CachedColBalance/><w:UseFELayout/></w:Compatibility><w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel><m:mathPr><m:mathFont m:val=\"Cambria Math\"/><m:brkBin m:val=\"before\"/><m:brkBinSub m:val=\"--\"/><m:smallFrac m:val=\"off\"/><m:dispDef/><m:lMargin m:val=\"0\"/> <m:rMargin m:val=\"0\"/><m:defJc m:val=\"centerGroup\"/><m:wrapIndent m:val=\"1440\"/><m:intLim m:val=\"subSup\"/><m:naryLim m:val=\"undOvr\"/></m:mathPr></w:WordDocument></xml><![endif]-->" +
"</head>");
sbf.append("<body>");
// 富文本内容
sbf.append(content);
sbf.append("</body></html>");
// 必须要设置编码,避免中文就会乱码
byte[] b = sbf.toString().getBytes("GBK");
// 将字节数组包装到流中
ByteArrayInputStream bais = new ByteArrayInputStream(b);
POIFSFileSystem poifs = new POIFSFileSystem();
DirectoryEntry directory = poifs.getRoot();
// 这代码不能省略,否则导出乱码。
DocumentEntry documentEntry = directory.createDocument("WordDocument", bais);
//输出文件
// request.setCharacterEncoding("utf-8");
// 导出word格式
response.setContentType("application/msword");
response.addHeader("Content-Disposition", "attachment;filename=" +
new String(fileName.getBytes("GB2312"),"iso8859-1") + ".doc");
ServletOutputStream ostream = response.getOutputStream();
poifs.writeFilesystem(ostream);
bais.close();
ostream.close();
}
/**
* word
* @param content
* @param fileName
* @throws Exception
*/
public static void exportHtmlToWord(String filepath, String content, String fileName) throws Exception {
// 拼接html格式内容
StringBuffer sbf = new StringBuffer();
// 这里拼接一下html标签,便于word文档能够识别
sbf.append("<html " +
"xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:w=\"urn:schemas-microsoft-com:office:word\" xmlns:m=\"http://schemas.microsoft.com/office/2004/12/omml\" xmlns=\"http://www.w3.org/TR/REC-html40\"" + //将版式从web版式改成页面试图
">");
sbf.append("<head>" +
"<!--[if gte mso 9]><xml><w:WordDocument><w:View>Print</w:View><w:TrackMoves>false</w:TrackMoves><w:TrackFormatting/><w:ValidateAgainstSchemas/><w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid><w:IgnoreMixedContent>false</w:IgnoreMixedContent><w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText><w:DoNotPromoteQF/><w:LidThemeOther>EN-US</w:LidThemeOther><w:LidThemeAsian>ZH-CN</w:LidThemeAsian><w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript><w:Compatibility><w:BreakWrappedTables/><w:SnapToGridInCell/><w:WrapTextWithPunct/><w:UseAsianBreakRules/><w:DontGrowAutofit/><w:SplitPgBreakAndParaMark/><w:DontVertAlignCellWithSp/><w:DontBreakConstrainedForcedTables/><w:DontVertAlignInTxbx/><w:Word11KerningPairs/><w:CachedColBalance/><w:UseFELayout/></w:Compatibility><w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel><m:mathPr><m:mathFont m:val=\"Cambria Math\"/><m:brkBin m:val=\"before\"/><m:brkBinSub m:val=\"--\"/><m:smallFrac m:val=\"off\"/><m:dispDef/><m:lMargin m:val=\"0\"/> <m:rMargin m:val=\"0\"/><m:defJc m:val=\"centerGroup\"/><m:wrapIndent m:val=\"1440\"/><m:intLim m:val=\"subSup\"/><m:naryLim m:val=\"undOvr\"/></m:mathPr></w:WordDocument></xml><![endif]-->" +
"</head>");
sbf.append("<body>");
// 富文本内容
sbf.append(content);
sbf.append("</body></html>");
// 必须要设置编码,避免中文就会乱码
byte[] b = sbf.toString().getBytes("GBK");
// 将字节数组包装到流中
ByteArrayInputStream bais = new ByteArrayInputStream(b);
POIFSFileSystem poifs = new POIFSFileSystem();
DirectoryEntry directory = poifs.getRoot();
// 这代码不能省略,否则导出乱码。
DocumentEntry documentEntry = directory.createDocument("WordDocument", bais);
FileOutputStream out = new FileOutputStream(new File(filepath+fileName));
poifs.writeFilesystem(out);
bais.close();
out.close();
}
}

View File

@ -1,5 +1,3 @@
datasource.no1.driver-class-name: com.mysql.cj.jdbc.Driver
datasource.no1.url=jdbc:mysql://39.101.130.96:33068/qa-gwj-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
datasource.no1.username=root
@ -60,22 +58,19 @@ spring.main.banner-mode=off
#preventionxgf.api.url=http://192.168.0.79:8088
#
#qa-regulatory-gwj.api.url=http://192.168.0.79:8008
preventionxgf.api.url=http://192.168.0.31:8992/qa-prevention-xgf/
qa-regulatory-gwj.api.url=http://192.168.0.31:8992/qa-regulatory-gwj/
preventionxgf.api.url=http://39.100.115.58:8082/qa-prevention-xgf/
qa-regulatory-gwj.api.url=http://39.100.115.58:8081/qa-regulatory-gwj/
#?????
smb.host=39.103.224.166
smb.host=39.101.130.96
smb.port=22
smb.user=root
smb.password=Zcloud@zcloud88888
smb.basePath=/mnt/qgfile/file/
smb.basePath=/mnt/wwag/file/
#Mq\u914D\u7F6E
rocketmq.consumer.group2=edu-admin-edit
rocketmq.consumer.group1=edu-admin-add
#rocketmq.name-server=10.0.140.141:9876
#rocketmq.name-server=192.168.0.70:9876
rocketmq.name-server=172.24.151.16:9876
rocketmq.name-server=39.100.115.58:8899
rocketmq.producer.group=libmiddle
rocketmq.producer.send-message-timeout=3000
rocketmq.producer.compress-message-body-threshold=4096
@ -90,16 +85,49 @@ mq.topic.eightWork=eightWork
mq.group.info=scheduled_tasks
mq.group.eightWork=scheduled_tasks_eightWork
http.file.url=https://qgqy.qhdsafety.com/file/
#数据同步topic
mq.gwj.data.topic=czks_qy_docking
mq.gwj.file.topic=czks_qy_dockingPicture
#港务局文件服务器前缀
baseimgpath=https://qgqy.qhdsafety.com/file/
cfd.prevention.api.url=http://192.168.0.31:7021/qa-regulatory-cfd
corp.default.pic-path=https://qgqy.qhdsafety.com/
corp.default.back-end-path=https://qgqy.qhdsafety.com/file/
#用户标识
# 沧州矿石
czks-useridentity=CZKS
czks-baseimgpath=https://wwag.qhdsafety.com/file/
czks-backendaddr=http://192.168.0.79:8091/
# 港务局
gwj-useridentity=GWJ
gwj-baseimgpath=https://qgqy.qhdsafety.com/file/
gwj-backendaddr=http://192.168.0.31:8991/qa-prevention-gwj/
# ??????
http.file.url=https://qgqy.qhdsafety.com/file/
perLoc.url=http://192.168.210.32:8084
perLoc.userName=qaaqadmin
perLoc.pwd=Cfd2023@
baseimgpath =http://192.168.192.201:8991/file/
mq.csy.data.topic=csy_docking
mq.csy.data.group=scheduled_tasks_csy_docking
mq.csy.file.topic=csy_dockingPicture
mq.csy.file.group=scheduled_tasks_csy_dockingPicture
mq.cmt.data.topic=cmt_docking
mq.cmt.data.group=scheduled_tasks_cmt_docking
mq.cmt.file.topic=cmt_dockingPicture
mq.cmt.file.group=scheduled_tasks_cmt_dockingPicture
mq.czks.data.topic=czks_docking
mq.czks.data.group=scheduled_tasks_czks_docking
mq.czks.file.topic=czks_dockingPicture
mq.czks.file.group=scheduled_tasks_czks_dockingPicture
mq.gwj.data.topic=czks_docking
mq.gwj.file.topic=czks_dockingPicture
#港务局文件服务器前缀
cfd.prevention.api.url=http://192.168.0.31:7021/qa-regulatory-cfd
#河北秦安文件服务器前缀
heBeiQinAnFile=https://file.zcloudchina.com/YTHFile
liteflow.rule-source=flow.xml
liteflow.print-execution-log=false

View File

@ -93,6 +93,12 @@ mq.gwj.file.topic=czks_dockingPicture
#港务局文件服务器前缀
baseimgpath=http://192.168.192.201:8991/file/
cfd.prevention.api.url=http://192.168.0.31:7021/qa-regulatory-cfd
cfd.prevention.api.url=http://10.100.106.2:8991/qa-prevention-csy/
http.file.url=http://192.168.192.201:8991/file/
#河北秦安文件服务器前缀
heBeiQinAnFile=https://file.zcloudchina.com/YTHFile
liteflow.rule-source=flow.xml
liteflow.print-execution-log=false

View File

@ -6,7 +6,7 @@ server.port=8091
#<23><><EFBFBD><EFBFBD>31ʱʹ<CAB1><CAB9>
#spring.profiles.active=dev
#??
spring.profiles.active=master
#spring.profiles.active=master

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<flow id="one">
<chain name="chain1">
SWITCH(InitCompany).to(
THEN(YiBanCharge,YiBanSupervise).id("YiBan"),
THEN(
YiBanCharge,
SWITCH(JiTuanCharge).to(
JiTuanSupervise,
THEN(JiTuanWeiTuoCharge,JiTuanWeiTuoSupervise).id("WeiTuo")
).DEFAULT(DefaultNode)
).id("JiTuan"),
SWITCH(GuFenCharge).to(
GuFenSupervise,
THEN(GuFenWeiTuoCharge,GuFenWeiTuoSupervise).id("GuFenWeiTuo")
).DEFAULT(DefaultNode).id("GuFen")
);
</chain>
</flow>

View File

@ -222,6 +222,7 @@
CODE = #{CODE},
COMPANY_AREA = #{COMPANY_AREA},
ADDRESS = #{ADDRESS},
ADDRESS_BUSINESS = #{ADDRESS_BUSINESS},
CREATE_DATE = #{CREATE_DATE},
SCALE = #{SCALE},
LONGITUDE = #{LONGITUDE},
@ -682,4 +683,53 @@
where USER_ID = #{USER_ID}
</update>
<select id="getInfo" resultType="com.zcloud.entity.PageData">
select
f.*,
s.NAME as SCALE_NAME,
r.CORPINFO_ID,
r.AQ_BZ_LEVEL,
r.AQ_BZ_NO,
r.AQ_BZ_UNIT,
r.AQ_BZ_TIME,
r.WHETHER_HYGIENE,
r.WHETHER_HAZARDS,
r.WHETHER_SCARCE,
r.WHETHER_CHEMICALS,
r.WHETHER_SPECIALEQUIPMENT,
r.WHETHER_SPECIALPEOPLE,
r.WHETHER_COALGAS,
r.WHETHER_FIRE,
r.WHETHER_CONFINED,
r.WHETHER_POWDER,
r.WHETHER_LIGHTNING,
r.WHETHER_ACTINOGEN,
r.WHETHER_LIQUIDAMMONIA,
r.WHETHER_PIPELINE,
cs.NAME CORP_STATE_NAME,
sub.NAME SUBORDINATIONNAME,
abl.NAME AQ_BZ_LEVEL_NAME,
dicT.NAME as TRAINTYPE_NAME,
b.ISSTOP,
cto.NAME as CORP_TYPE_ONE_NAME,
ctt.NAME as CORP_TYPE_TWO_NAME,
ctth.NAME as CORP_TYPE_THREE_NAME,
ctf.NAME as CORP_TYPE_FOUR_NAME
from
<include refid="tableName"></include> f
left join bus_corp_stop b on b.CORPINFO_ID = f.CORPINFO_ID and b.ISDELETE = '0'
left join SYS_DICTIONARIES s on s.DICTIONARIES_ID = f.SCALE
LEFT JOIN bus_corp_info_related r on r.CORPINFO_ID =f.CORPINFO_ID
LEFT JOIN SYS_DICTIONARIES cs on cs.DICTIONARIES_ID = f.CORP_STATE
LEFT JOIN SYS_DICTIONARIES sub on sub.DICTIONARIES_ID = f.SUBORDINATION
LEFT JOIN SYS_DICTIONARIES abl on abl.DICTIONARIES_ID = r.AQ_BZ_LEVEL
left join SYS_DICTIONARIES dicT on dicT.DICTIONARIES_ID = f.TRAINTYPE
left join SYS_DICTIONARIES cto on cto.DICTIONARIES_ID = f.CORP_TYPE
left join SYS_DICTIONARIES ctt on ctt.DICTIONARIES_ID = f.CORP_TYPE2
left join SYS_DICTIONARIES ctth on ctth.DICTIONARIES_ID = f.CORP_TYPE3
left join SYS_DICTIONARIES ctf on ctf.DICTIONARIES_ID = f.CORP_TYPE4
where
f.CORPINFO_ID = #{CORPINFO_ID}
</select>
</mapper>

View File

@ -147,7 +147,18 @@
</foreach>
</insert>
<!-- 清除关系信息-->
<!--批量添加关系信息-->
<insert id="batchSave">
insert into <include refid="tableName"></include>
(
<include refid="Field2"></include>
) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.NOTICECORP_ID}, #{item.USER_ID},0, #{item.NOTICECORPUSERID_ID} )
</foreach>
</insert>
<!-- 清除关系信息-->
<delete id="deleteByNotId" parameterType="pd">
delete from <include refid="tableName"></include> where NOTICECORP_ID = #{NOTICECORP_ID}
</delete>

View File

@ -0,0 +1,278 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.datasource.depository.HiddenLibraryMapper">
<!--表名 -->
<sql id="tableName">
BUS_HIDDEN_LIBRARY
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.INDUSTRY_TYPE_ONE,
f.INDUSTRY_TYPE_TWO,
f.INDUSTRY_TYPE_THREE,
f.INDUSTRY_TYPE_FOUR,
f.HIDDEN_TYPES,
f.RISK_UNIT_ID,
f.RISK_UNIT_NAME,
f.HIDDEN_PART,
f.HIDDEN_DESCR,
f.CREATOR_ID,
f.CREATOR_NAME,
f.CREATED_TIME,
f.OPERATOR_ID,
f.OPERATOR_NAME,
f.OPERATE_TIME,
f.INSPECTION_BASIS,
f.INSPECTION_INFO,
f.RECTIFYDESCR,
f.CORP_INFO_ID,
f.ISDELETE,
f.STATUS,
f.HIDDEN_LIBRARY_ID,
f.SOURCE,
f.HIDDEN_TYPE_ONE,
f.HIDDEN_TYPE_TWO,
f.HIDDEN_TYPE_THREE
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
INDUSTRY_TYPE_ONE,
INDUSTRY_TYPE_TWO,
INDUSTRY_TYPE_THREE,
INDUSTRY_TYPE_FOUR,
HIDDEN_TYPES,
RISK_UNIT_ID,
RISK_UNIT_NAME,
HIDDEN_PART,
HIDDEN_DESCR,
CREATOR_ID,
CREATOR_NAME,
CREATED_TIME,
OPERATOR_ID,
OPERATOR_NAME,
OPERATE_TIME,
INSPECTION_BASIS,
INSPECTION_INFO,
RECTIFYDESCR,
CORP_INFO_ID,
ISDELETE,
STATUS,
HIDDEN_LIBRARY_ID,
SOURCE,
HIDDEN_TYPE_ONE,
HIDDEN_TYPE_TWO,
HIDDEN_TYPE_THREE
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{INDUSTRY_TYPE_ONE},
#{INDUSTRY_TYPE_TWO},
#{INDUSTRY_TYPE_THREE},
#{INDUSTRY_TYPE_FOUR},
#{HIDDEN_TYPES},
#{RISK_UNIT_ID},
#{RISK_UNIT_NAME},
#{HIDDEN_PART},
#{HIDDEN_DESCR},
#{CREATOR_ID},
#{CREATOR_NAME},
#{CREATED_TIME},
#{OPERATOR_ID},
#{OPERATOR_NAME},
#{OPERATE_TIME},
#{INSPECTION_BASIS},
#{INSPECTION_INFO},
#{RECTIFYDESCR},
#{CORP_INFO_ID},
#{ISDELETE},
#{STATUS},
#{HIDDEN_LIBRARY_ID},
#{SOURCE},
#{HIDDEN_TYPE_ONE},
#{HIDDEN_TYPE_TWO},
#{HIDDEN_TYPE_THREE}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
HIDDEN_LIBRARY_ID = #{HIDDEN_LIBRARY_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
INDUSTRY_TYPE_ONE = #{INDUSTRY_TYPE_ONE},
INDUSTRY_TYPE_TWO = #{INDUSTRY_TYPE_TWO},
INDUSTRY_TYPE_THREE = #{INDUSTRY_TYPE_THREE},
INDUSTRY_TYPE_FOUR = #{INDUSTRY_TYPE_FOUR},
HIDDEN_TYPES = #{HIDDEN_TYPES},
RISK_UNIT_ID = #{RISK_UNIT_ID},
RISK_UNIT_NAME = #{RISK_UNIT_NAME},
HIDDEN_PART = #{HIDDEN_PART},
HIDDEN_DESCR = #{HIDDEN_DESCR},
CREATOR_ID = #{CREATOR_ID},
CREATOR_NAME = #{CREATOR_NAME},
CREATED_TIME = #{CREATED_TIME},
OPERATOR_ID = #{OPERATOR_ID},
OPERATOR_NAME = #{OPERATOR_NAME},
OPERATE_TIME = #{OPERATE_TIME},
INSPECTION_BASIS = #{INSPECTION_BASIS},
INSPECTION_INFO = #{INSPECTION_INFO},
RECTIFYDESCR = #{RECTIFYDESCR},
CORP_INFO_ID = #{CORP_INFO_ID},
ISDELETE = #{ISDELETE},
STATUS = #{STATUS},
SOURCE = #{SOURCE},
HIDDEN_TYPE_ONE = #{HIDDEN_TYPE_ONE},
HIDDEN_TYPE_TWO = #{HIDDEN_TYPE_TWO},
HIDDEN_TYPE_THREE = #{HIDDEN_TYPE_THREE},
HIDDEN_LIBRARY_ID = HIDDEN_LIBRARY_ID
where
HIDDEN_LIBRARY_ID = #{HIDDEN_LIBRARY_ID}
</update>
<!-- 修改 -->
<update id="addToLibrary" parameterType="pd">
update
<include refid="tableName"></include>
set
STATUS = '1'
where
HIDDEN_LIBRARY_ID in
<foreach item="item" index="index" collection="HIDDEN_LIBRARY_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.HIDDEN_LIBRARY_ID = #{HIDDEN_LIBRARY_ID}
</select>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
ito.NAME as INDUSTRY_TYPE_ONE_NAME,
a.INDUSTRY_TYPE_ONE,
itt.NAME as INDUSTRY_TYPE_TWO_NAME,
a.INDUSTRY_TYPE_TWO,
itth.NAME as INDUSTRY_TYPE_THREE_NAME,
a.INDUSTRY_TYPE_THREE,
itf.NAME as INDUSTRY_TYPE_FOUR_NAME,
a.INDUSTRY_TYPE_FOUR,
hto.NAME as HIDDEN_TYPE_ONE_NAME,
a.HIDDEN_TYPE_ONE,
htt.NAME as HIDDEN_TYPE_TWO_NAME,
a.HIDDEN_TYPE_TWO,
htth.NAME as HIDDEN_TYPE_THREE_NAME,
a.HIDDEN_TYPE_THREE,
a.HIDDEN_TYPES,
a.HIDDEN_PART,
a.HIDDEN_DESCR,
a.INSPECTION_BASIS,
a.INSPECTION_INFO,
a.RECTIFYDESCR,
a.RISK_UNIT_NAME,
a.RISK_UNIT_ID,
a.CORP_INFO_ID,
ci.CORP_NAME as CORP_INFO_NAME,
a.HIDDEN_LIBRARY_ID
from
<include refid="tableName"></include> a
left join sys_dictionaries ito on ito.DICTIONARIES_ID = a.INDUSTRY_TYPE_ONE
left join sys_dictionaries itt on itt.DICTIONARIES_ID = a.INDUSTRY_TYPE_TWO
left join sys_dictionaries itth on itth.DICTIONARIES_ID = a.INDUSTRY_TYPE_THREE
left join sys_dictionaries itf on itf.DICTIONARIES_ID = a.INDUSTRY_TYPE_FOUR
left join sys_dictionaries hto on hto.DICTIONARIES_ID = a.HIDDEN_TYPE_ONE
left join sys_dictionaries htt on htt.DICTIONARIES_ID = a.HIDDEN_TYPE_TWO
left join sys_dictionaries htth on htth.DICTIONARIES_ID = a.HIDDEN_TYPE_THREE
left join bus_corp_info ci on ci.CORPINFO_ID = a.CORP_INFO_ID
where a.ISDELETE = '0'
<if test="pd.STATUS != null and pd.STATUS != ''">
and a.STATUS = #{pd.STATUS}
</if>
<if test="pd.HIDDEN_TYPES != null and pd.HIDDEN_TYPES != ''">
and a.HIDDEN_TYPES = #{pd.HIDDEN_TYPES}
</if>
<if test="pd.HIDDEN_DESCR != null and pd.HIDDEN_DESCR != ''">
and a.HIDDEN_DESCR like CONCAT(CONCAT('%', #{pd.HIDDEN_DESCR}),'%')
</if>
<if test="pd.HIDDEN_PART != null and pd.HIDDEN_PART != ''">
and a.HIDDEN_PART like CONCAT(CONCAT('%', #{pd.HIDDEN_PART}),'%')
</if>
<if test="pd.RISK_UNIT_NAME != null and pd.RISK_UNIT_NAME != ''">
and a.RISK_UNIT_NAME like CONCAT(CONCAT('%', #{pd.RISK_UNIT_NAME}),'%')
</if>
<if test="pd.INDUSTRY_TYPE_FOUR != '' and pd.INDUSTRY_TYPE_FOUR != null">
and a.INDUSTRY_TYPE_FOUR = #{pd.INDUSTRY_TYPE_FOUR}
</if>
<if test="pd.HIDDEN_TYPE_ONE != '' and pd.HIDDEN_TYPE_ONE != null">
and a.HIDDEN_TYPE_ONE = #{pd.HIDDEN_TYPE_ONE}
</if>
<if test="pd.HIDDEN_TYPE_TWO != '' and pd.HIDDEN_TYPE_TWO != null">
and a.HIDDEN_TYPE_TWO = #{pd.HIDDEN_TYPE_TWO}
</if>
<if test="pd.HIDDEN_TYPE_THREE != '' and pd.HIDDEN_TYPE_THREE != null">
and a.HIDDEN_TYPE_THREE = #{pd.HIDDEN_TYPE_THREE}
</if>
<if test="pd.INSPECTION_BASIS != null and pd.INSPECTION_BASIS != ''">
and a.INSPECTION_BASIS like CONCAT(CONCAT('%', #{pd.INSPECTION_BASIS}),'%')
</if>
order by date(a.OPERATE_TIME) desc
</select>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
</select>
<!-- 批量删除 -->
<delete id="deleteAll" parameterType="String">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
HIDDEN_LIBRARY_ID in
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,197 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.datasource.depository.LabelFactoryMapper">
<!--表名 -->
<sql id="tableName">
BUS_LABEL_FACTORY
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.PARENT_ID,
f.ANCESTORS_ID,
f.IS_ANCESTORS_FLAG,
f.LEVEL,
f.NAME,
f.CREATOR_ID,
f.CREATED_TIME,
f.ISDELETE,
f.SORT,
f.TYPE,
f.BUS_LABEL_FACTORY_ID,
f.CORPINFO_ID
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
PARENT_ID,
ANCESTORS_ID,
IS_ANCESTORS_FLAG,
LEVEL,
NAME,
CREATOR_ID,
CREATED_TIME,
ISDELETE,
SORT,
TYPE,
BUS_LABEL_FACTORY_ID,
CORPINFO_ID
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{PARENT_ID},
#{ANCESTORS_ID},
#{IS_ANCESTORS_FLAG},
#{LEVEL},
#{NAME},
#{CREATOR_ID},
#{CREATED_TIME},
#{ISDELETE},
#{SORT},
#{TYPE},
#{BUS_LABEL_FACTORY_ID},
#{CORPINFO_ID}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
BUS_LABEL_FACTORY_ID = #{BUS_LABEL_FACTORY_ID}
</delete>
<delete id="deleteByAncestors" parameterType="pd">
delete from
<include refid="tableName"></include>
where TYPE = #{TYPE}
<if test="CORPINFO_ID != '' and CORPINFO_ID != null">
and CORPINFO_ID = #{CORPINFO_ID}
</if>
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
PARENT_ID = #{PARENT_ID},
ANCESTORS_ID = #{ANCESTORS_ID},
IS_ANCESTORS_FLAG = #{IS_ANCESTORS_FLAG},
LEVEL = #{LEVEL},
NAME = #{NAME},
CREATOR_ID = #{CREATOR_ID},
CREATED_TIME = #{CREATED_TIME},
SORT = #{SORT},
TYPE = #{TYPE},
CORPINFO_ID = #{CORPINFO_ID},
BUS_LABEL_FACTORY_ID = BUS_LABEL_FACTORY_ID
where
BUS_LABEL_FACTORY_ID = #{BUS_LABEL_FACTORY_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.BUS_LABEL_FACTORY_ID = #{BUS_LABEL_FACTORY_ID}
</select>
<select id="findByAncestors" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include>
f
where f.ISDELETE = '0'
<if test="ANCESTORS_ID != null and ANCESTORS_ID != ''">
and f.ANCESTORS_ID = #{ANCESTORS_ID}
</if>
<if test="TYPE != null and TYPE != ''">
and f.TYPE = #{TYPE}
</if>
<if test="CORPINFO_ID != '' and CORPINFO_ID != null">
and f.CORPINFO_ID = #{CORPINFO_ID}
</if>
<if test="IS_ANCESTORS_FLAG != null and IS_ANCESTORS_FLAG != ''">
and f.IS_ANCESTORS_FLAG = #{IS_ANCESTORS_FLAG}
</if>
</select>
<select id="findAllAncestors" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.IS_ANCESTORS_FLAG = '1' and f.ISDELETE = '0' and TYPE = #{TYPE}
<if test="NAME != null and NAME != ''">
and f.NAME LIKE CONCAT(CONCAT('%', #{NAME}),'%')
</if>
</select>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include>
f
where f.ISDELETE = '0'
<if test="pd.NAME != null and pd.NAME != ''"><!-- 关键词检索 -->
and f.NAME LIKE CONCAT(CONCAT('%', #{pd.NAME}),'%')
</if>
<if test="pd.IS_ANCESTORS_FLAG != null and pd.IS_ANCESTORS_FLAG != ''"><!-- 关键词检索 -->
and f.IS_ANCESTORS_FLAG = #{pd.IS_ANCESTORS_FLAG}
</if>
<if test="pd.TYPE != null and pd.TYPE != ''">
and f.TYPE = #{pd.TYPE}
</if>
</select>
<!-- 列表(全部) -->
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f where f.ISDELETE = '0'
<if test="NAME != '' and NAME != null">
and f.NAME = #{NAME}
</if>
</select>
<!-- 批量删除 -->
<delete id="deleteAll" parameterType="String">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
BUS_LABEL_FACTORY_ID in
<foreach item="item" index="index" collection="array" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>

Some files were not shown because too many files have changed in this diff Show More