Merge remote-tracking branch 'origin/liujun-2024-03-18-相关方新需求' into dev
commit
0d33500a5e
7
pom.xml
7
pom.xml
|
|
@ -476,6 +476,13 @@
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- liteflow -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.yomahub</groupId>
|
||||||
|
<artifactId>liteflow-spring-boot-starter</artifactId>
|
||||||
|
<version>2.11.4.2</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<!-- <finalName>qa-prevention-gwj</finalName>
|
<!-- <finalName>qa-prevention-gwj</finalName>
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
package com.zcloud.controller.xgf;
|
package com.zcloud.controller.xgf;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
|
import com.zcloud.service.bus.CorpInfoService;
|
||||||
|
import com.zcloud.service.system.DepartmentService;
|
||||||
import com.zcloud.util.ObjectExcelView;
|
import com.zcloud.util.ObjectExcelView;
|
||||||
import net.sf.json.JSONArray;
|
import net.sf.json.JSONArray;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
@ -20,6 +24,8 @@ import com.zcloud.util.HttpClientService;
|
||||||
import com.zcloud.util.Jurisdiction;
|
import com.zcloud.util.Jurisdiction;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/xgf/corp")
|
@RequestMapping("/xgf/corp")
|
||||||
public class XgfCorpController extends BaseController {
|
public class XgfCorpController extends BaseController {
|
||||||
|
|
@ -31,6 +37,9 @@ public class XgfCorpController extends BaseController {
|
||||||
@Value("${qa-regulatory-gwj.api.url}")
|
@Value("${qa-regulatory-gwj.api.url}")
|
||||||
private String regulatoryUrl;
|
private String regulatoryUrl;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DepartmentService departmentService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 相关方单位账号管理-列表
|
* 相关方单位账号管理-列表
|
||||||
*
|
*
|
||||||
|
|
@ -53,6 +62,19 @@ public class XgfCorpController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Map result = HttpClientService.doPost(url + "/api/corpinfo/JiTuanTeShulist", pd);
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,20 @@ public class XgfUserController extends BaseController {
|
||||||
return response;
|
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")
|
@RequestMapping(value = "/regulatoryUserList")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object regulatoryUserList() throws Exception{
|
public Object regulatoryUserList() throws Exception{
|
||||||
|
|
@ -129,6 +143,17 @@ public class XgfUserController extends BaseController {
|
||||||
return response;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人员指定审核
|
* 人员指定审核
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return super.isEnd();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,103 @@
|
||||||
|
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() {
|
||||||
|
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())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return super.isEnd();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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("系统异常,请联系管理员");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
@ -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", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -84,5 +84,7 @@ public interface CorpInfoMapper{
|
||||||
List<PageData> datalistPageRetrieval(Page page);
|
List<PageData> datalistPageRetrieval(Page page);
|
||||||
|
|
||||||
List<PageData> listAllForMap(PageData pd);
|
List<PageData> listAllForMap(PageData pd);
|
||||||
|
|
||||||
|
PageData getInfo(PageData corpCondition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -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);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -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);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -183,5 +183,7 @@ public interface DepartmentMapper{
|
||||||
PageData findByCorpDepartmentId(PageData condition);
|
PageData findByCorpDepartmentId(PageData condition);
|
||||||
|
|
||||||
List<PageData> listTreeManageAndCorp(PageData pd);
|
List<PageData> listTreeManageAndCorp(PageData pd);
|
||||||
|
|
||||||
|
List<PageData> getCorpDepartmentByIds(List<String> departmentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,4 +72,6 @@ public interface XgfUserMapper {
|
||||||
List<PageData> findRecordList(PageData condition);
|
List<PageData> findRecordList(PageData condition);
|
||||||
|
|
||||||
List<PageData> appointlistPage(Page page);
|
List<PageData> appointlistPage(Page page);
|
||||||
|
|
||||||
|
List<PageData> getWorkTask(PageData condition);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -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");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -231,5 +231,7 @@ public interface DepartmentService{
|
||||||
List<Department> listAllCorpDepartment(String number) throws Exception;
|
List<Department> listAllCorpDepartment(String number) throws Exception;
|
||||||
|
|
||||||
PageData getCorpDepartment(PageData condition) throws Exception;
|
PageData getCorpDepartment(PageData condition) throws Exception;
|
||||||
|
|
||||||
|
List<PageData> getCorpDepartmentByIds(List<String> departmentList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -441,6 +441,11 @@ public class DepartmentServiceImpl implements DepartmentService{
|
||||||
return departmentMapper.findByCorpDepartmentId(condition);
|
return departmentMapper.findByCorpDepartmentId(condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PageData> getCorpDepartmentByIds(List<String> departmentList) {
|
||||||
|
return departmentMapper.getCorpDepartmentByIds(departmentList);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过ID获取其子级列表
|
* 通过ID获取其子级列表
|
||||||
* @param parentId
|
* @param parentId
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ package com.zcloud.service.xgf;
|
||||||
|
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.flow.xgf.util.XgfFlowDto;
|
||||||
|
import org.springframework.dao.EmptyResultDataAccessException;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -33,4 +35,13 @@ public interface XgfUserService {
|
||||||
Object getFlowInfo(PageData request);
|
Object getFlowInfo(PageData request);
|
||||||
|
|
||||||
void approvePlus(PageData request, MultipartFile[] chengNuoShu) throws Exception;
|
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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
package com.zcloud.service.xgf.impl;
|
package com.zcloud.service.xgf.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.yomahub.liteflow.core.FlowExecutor;
|
||||||
|
import com.yomahub.liteflow.flow.LiteflowResponse;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.flow.xgf.util.XgfFlowDto;
|
||||||
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
|
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
|
||||||
import com.zcloud.mapper.datasource.xgf.*;
|
import com.zcloud.mapper.datasource.xgf.*;
|
||||||
import com.zcloud.service.system.DepartmentService;
|
import com.zcloud.service.system.DepartmentService;
|
||||||
|
|
@ -14,6 +18,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.net.PasswordAuthentication;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -47,6 +52,9 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
@Value("${preventionxgf.api.url}")
|
@Value("${preventionxgf.api.url}")
|
||||||
private String prevention_xgf_url;
|
private String prevention_xgf_url;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private FlowExecutor flowExecutor;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void save(PageData pd) throws Exception {
|
public void save(PageData pd) throws Exception {
|
||||||
xgfUserMapper.save(pd);
|
xgfUserMapper.save(pd);
|
||||||
|
|
@ -93,12 +101,30 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 主管部门 */
|
/* 主管部门 */
|
||||||
condition.clear();
|
// 2024-03-20 liu jun :为了兼容新老数据这里做特殊处理
|
||||||
condition.put("DEPARTMENT_ID", x.get("MAIN_DEPARTMENT_ID"));
|
if (x.get("MAIN_DEPARTMENT_ID") != null && StringUtils.isNotBlank(x.get("MAIN_DEPARTMENT_ID").toString())) {
|
||||||
regDepartmentEntity = departmentService.getCorpDepartment(condition);
|
if (x.getString("MAIN_DEPARTMENT_ID").contains("]")) {
|
||||||
x.put("MAIN_DEPARTMENT_NAME", regDepartmentEntity.get("NAME"));
|
List<String> mainDepartmentIds = JSONObject.parseArray(x.getString("MAIN_DEPARTMENT_ID"),String.class);
|
||||||
if (regDepartmentEntity.size() > 0) {
|
List<String> mainDepartmentNames = new ArrayList<>();
|
||||||
x.put("MAIN_DEPARTMENT_NAME", regDepartmentEntity.get("NAME"));
|
for (String mainDepartmentId : mainDepartmentIds) {
|
||||||
|
condition.clear();
|
||||||
|
condition.put("DEPARTMENT_ID", mainDepartmentId);
|
||||||
|
regDepartmentEntity = departmentService.getCorpDepartment(condition);
|
||||||
|
if (regDepartmentEntity != null && regDepartmentEntity.size() > 0) {
|
||||||
|
mainDepartmentNames.add(regDepartmentEntity.getString("NAME"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
x.put("MAIN_DEPARTMENT_NAME", StringUtils.join(mainDepartmentNames, ","));
|
||||||
|
}else {
|
||||||
|
condition.clear();
|
||||||
|
condition.put("DEPARTMENT_ID", x.get("MAIN_DEPARTMENT_ID"));
|
||||||
|
regDepartmentEntity = departmentService.getCorpDepartment(condition);
|
||||||
|
if (regDepartmentEntity != null && regDepartmentEntity.size() > 0) {
|
||||||
|
x.put("MAIN_DEPARTMENT_NAME", regDepartmentEntity.get("NAME"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new RuntimeException("主管部门ID不能为空");
|
||||||
}
|
}
|
||||||
entity = new PageData();
|
entity = new PageData();
|
||||||
entity.putAll(x);
|
entity.putAll(x);
|
||||||
|
|
@ -119,12 +145,30 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
x.put("MANAGER_DEPARTMENT_NAME", regDepartmentEntity.get("NAME"));
|
x.put("MANAGER_DEPARTMENT_NAME", regDepartmentEntity.get("NAME"));
|
||||||
}
|
}
|
||||||
/* 主管部门 */
|
/* 主管部门 */
|
||||||
condition.clear();
|
// 2024-03-20 liu jun :为了兼容新老数据这里做特殊处理
|
||||||
condition.put("DEPARTMENT_ID", x.get("MAIN_DEPARTMENT_ID"));
|
if (x.get("MAIN_DEPARTMENT_ID") != null && StringUtils.isNotBlank(x.get("MAIN_DEPARTMENT_ID").toString())) {
|
||||||
regDepartmentEntity = departmentService.getCorpDepartment(condition);
|
if (x.getString("MAIN_DEPARTMENT_ID").contains("]")) {
|
||||||
x.put("MAIN_DEPARTMENT_NAME", regDepartmentEntity.get("NAME"));
|
List<String> mainDepartmentIds = JSONObject.parseArray(x.getString("MAIN_DEPARTMENT_ID"), String.class);
|
||||||
if (regDepartmentEntity.size() > 0) {
|
List<String> mainDepartmentNames = new ArrayList<>();
|
||||||
x.put("MAIN_DEPARTMENT_NAME", regDepartmentEntity.get("NAME"));
|
for (String mainDepartmentId : mainDepartmentIds) {
|
||||||
|
condition.clear();
|
||||||
|
condition.put("DEPARTMENT_ID", mainDepartmentId);
|
||||||
|
regDepartmentEntity = departmentService.getCorpDepartment(condition);
|
||||||
|
if (regDepartmentEntity != null && regDepartmentEntity.size() > 0) {
|
||||||
|
mainDepartmentNames.add(regDepartmentEntity.getString("NAME"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
x.put("MAIN_DEPARTMENT_NAME", StringUtils.join(mainDepartmentNames, ","));
|
||||||
|
} else {
|
||||||
|
condition.clear();
|
||||||
|
condition.put("DEPARTMENT_ID", x.get("MAIN_DEPARTMENT_ID"));
|
||||||
|
regDepartmentEntity = departmentService.getCorpDepartment(condition);
|
||||||
|
if (regDepartmentEntity != null && regDepartmentEntity.size() > 0) {
|
||||||
|
x.put("MAIN_DEPARTMENT_NAME", regDepartmentEntity.get("NAME"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new RuntimeException("主管部门ID不能为空");
|
||||||
}
|
}
|
||||||
x.put("IS_DELETE", "0");
|
x.put("IS_DELETE", "0");
|
||||||
x.put("VALID_FLAG", "1");
|
x.put("VALID_FLAG", "1");
|
||||||
|
|
@ -193,7 +237,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
flow.put("CREATOR_TIME", DateUtil.getTime());
|
flow.put("CREATOR_TIME", DateUtil.getTime());
|
||||||
flow.put("VALID_FLAG", "1");
|
flow.put("VALID_FLAG", "1");
|
||||||
flow.put("ISDELETE", "0");
|
flow.put("ISDELETE", "0");
|
||||||
flow.put("END_FLAG","0");
|
flow.put("END_FLAG", "0");
|
||||||
flow.put("FOREIGN_KEY", x.getString("XGF_USER_ID"));
|
flow.put("FOREIGN_KEY", x.getString("XGF_USER_ID"));
|
||||||
flowMapper.save(flow);
|
flowMapper.save(flow);
|
||||||
/* 保存审批流程明细信息 */
|
/* 保存审批流程明细信息 */
|
||||||
|
|
@ -201,7 +245,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
flowDetail.put("FLOW_DETAIL_ID", Warden.get32UUID());
|
flowDetail.put("FLOW_DETAIL_ID", Warden.get32UUID());
|
||||||
flowDetail.put("FLOW_ID", flow.getString("FLOW_ID"));
|
flowDetail.put("FLOW_ID", flow.getString("FLOW_ID"));
|
||||||
flowDetail.put("STEP_FLAG", "1");
|
flowDetail.put("STEP_FLAG", "1");
|
||||||
flowDetail.put("STEP_NAME", "相关方数据将人员信息发送给企业端");
|
flowDetail.put("STEP_NAME", "相关方提交人员信息到发包单位");
|
||||||
flowDetail.put("SORT", 0);
|
flowDetail.put("SORT", 0);
|
||||||
flowDetail.put("APPROVER_ID", "");
|
flowDetail.put("APPROVER_ID", "");
|
||||||
flowDetail.put("APPROVER_NAME", "");
|
flowDetail.put("APPROVER_NAME", "");
|
||||||
|
|
@ -224,7 +268,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
nextNode.put("FLOW_DETAIL_ID", Warden.get32UUID());
|
nextNode.put("FLOW_DETAIL_ID", Warden.get32UUID());
|
||||||
nextNode.put("SORT", Integer.parseInt(currentNode.get("SORT").toString()) + 1);
|
nextNode.put("SORT", Integer.parseInt(currentNode.get("SORT").toString()) + 1);
|
||||||
nextNode.put("PARENT_ID", currentNode.getString("FLOW_DETAIL_ID"));
|
nextNode.put("PARENT_ID", currentNode.getString("FLOW_DETAIL_ID"));
|
||||||
nextNode.put("STEP_NAME", "相关方数据将人员打回后重新发送给企业端");
|
nextNode.put("STEP_NAME", "相关方重新提交人员信息给发包单位");
|
||||||
nextNode.put("PASS_FLAG", "1");
|
nextNode.put("PASS_FLAG", "1");
|
||||||
nextNode.put("APPROVER_TIME", DateUtil.getTime());
|
nextNode.put("APPROVER_TIME", DateUtil.getTime());
|
||||||
nextNode.put("APPROVER_ID", "");
|
nextNode.put("APPROVER_ID", "");
|
||||||
|
|
@ -295,7 +339,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
condition.put("APPOINT_DEPARTMENT_NAME", request.getString("APPOINT_DEPARTMENT_NAME"));
|
condition.put("APPOINT_DEPARTMENT_NAME", request.getString("APPOINT_DEPARTMENT_NAME"));
|
||||||
condition.put("APPOINT_USER_ID", request.getString("APPOINT_USER_ID"));
|
condition.put("APPOINT_USER_ID", request.getString("APPOINT_USER_ID"));
|
||||||
condition.put("APPOINT_USER_NAME", request.getString("APPOINT_USER_NAME"));
|
condition.put("APPOINT_USER_NAME", request.getString("APPOINT_USER_NAME"));
|
||||||
condition.put("LIMIT_END_TIME",request.get("LIMIT_END_TIME"));
|
condition.put("LIMIT_END_TIME", request.get("LIMIT_END_TIME"));
|
||||||
if (request.get("APPOINT_ANNEX") != null) {
|
if (request.get("APPOINT_ANNEX") != null) {
|
||||||
condition.put("APPOINT_ANNEX", request.getString("APPOINT_ANNEX"));
|
condition.put("APPOINT_ANNEX", request.getString("APPOINT_ANNEX"));
|
||||||
}
|
}
|
||||||
|
|
@ -331,10 +375,10 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
condition.put("FOREIGN_KEY", request.getString("XGF_USER_ID"));
|
condition.put("FOREIGN_KEY", request.getString("XGF_USER_ID"));
|
||||||
condition.put("TYPE", "1");
|
condition.put("TYPE", "1");
|
||||||
List<PageData> list = flowMapper.getList(condition);
|
List<PageData> list = flowMapper.getList(condition);
|
||||||
for(PageData x : list){
|
for (PageData x : list) {
|
||||||
condition.clear();
|
condition.clear();
|
||||||
condition.put("FLOW_ID", x.getString("FLOW_ID"));
|
condition.put("FLOW_ID", x.getString("FLOW_ID"));
|
||||||
x.put("flow",flowDetailMapper.getList(condition));
|
x.put("flow", flowDetailMapper.getList(condition));
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
@ -350,7 +394,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
|
|
||||||
PageData zero = new PageData();
|
PageData zero = new PageData();
|
||||||
int index = Integer.parseInt(entity.getString("FLOWS_STEP"));
|
int index = Integer.parseInt(entity.getString("FLOWS_STEP"));
|
||||||
if (index >= 0){
|
if (index >= 0) {
|
||||||
zero.put("INDEX", "0");
|
zero.put("INDEX", "0");
|
||||||
zero.put("APPOINT_CORP_ID", entity.getString("APPOINT_ZERO_CORP_ID"));
|
zero.put("APPOINT_CORP_ID", entity.getString("APPOINT_ZERO_CORP_ID"));
|
||||||
zero.put("APPOINT_CORP_NAME", entity.getString("APPOINT_ZERO_CORP_NAME"));
|
zero.put("APPOINT_CORP_NAME", entity.getString("APPOINT_ZERO_CORP_NAME"));
|
||||||
|
|
@ -465,7 +509,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
@Transactional
|
@Transactional
|
||||||
public void approvePlus(PageData request, MultipartFile[] chengNuoShu) throws Exception {
|
public void approvePlus(PageData request, MultipartFile[] chengNuoShu) throws Exception {
|
||||||
if (chengNuoShu != null && chengNuoShu.length > 0) {
|
if (chengNuoShu != null && chengNuoShu.length > 0) {
|
||||||
request.put("APPOINT_ANNEX", Warden.saveFile(Warden.createZip(chengNuoShu),Jurisdiction.getCORPINFO_ID()));
|
request.put("APPOINT_ANNEX", Warden.saveFile(Warden.createZip(chengNuoShu), Jurisdiction.getCORPINFO_ID()));
|
||||||
}
|
}
|
||||||
this.approve(request);
|
this.approve(request);
|
||||||
}
|
}
|
||||||
|
|
@ -566,7 +610,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
|
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
|
||||||
PageData user = xgfUserMapper.findById(condition);
|
PageData user = xgfUserMapper.findById(condition);
|
||||||
user.put("CHECK_STEP", 1);
|
user.put("CHECK_STEP", 1);
|
||||||
user.put("LIMIT_END_TIME",info.get("LIMIT_END_TIME"));
|
user.put("LIMIT_END_TIME", info.get("LIMIT_END_TIME"));
|
||||||
// created by liu jun 2024-02-26 如果有委托书则保存委托书
|
// created by liu jun 2024-02-26 如果有委托书则保存委托书
|
||||||
if (StringUtils.isNotBlank(info.getString("APPOINT_ANNEX"))) {
|
if (StringUtils.isNotBlank(info.getString("APPOINT_ANNEX"))) {
|
||||||
condition.clear();
|
condition.clear();
|
||||||
|
|
@ -674,7 +718,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
entity.put("CHECK_STATUS", 1);
|
entity.put("CHECK_STATUS", 1);
|
||||||
entity.put("VALID_FLAG", "2");
|
entity.put("VALID_FLAG", "2");
|
||||||
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
||||||
entity.put("LIMIT_END_TIME",info.get("LIMIT_END_TIME"));
|
entity.put("LIMIT_END_TIME", info.get("LIMIT_END_TIME"));
|
||||||
xgfUserMapper.edit(entity);
|
xgfUserMapper.edit(entity);
|
||||||
|
|
||||||
flows.put("APPOINT_THREE_CORP_ID", info.getString("APPOINT_CORP_ID"));
|
flows.put("APPOINT_THREE_CORP_ID", info.getString("APPOINT_CORP_ID"));
|
||||||
|
|
@ -872,7 +916,7 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clearInfo(PageData flow){
|
private void clearInfo(PageData flow) {
|
||||||
flow.put("APPOINT_ONE_USER_ID", "");
|
flow.put("APPOINT_ONE_USER_ID", "");
|
||||||
flow.put("APPOINT_TWO_USER_ID", "");
|
flow.put("APPOINT_TWO_USER_ID", "");
|
||||||
flow.put("APPOINT_THREE_USER_ID", "");
|
flow.put("APPOINT_THREE_USER_ID", "");
|
||||||
|
|
@ -881,7 +925,8 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
flow.put("APPOINT_SIX_USER_ID", "");
|
flow.put("APPOINT_SIX_USER_ID", "");
|
||||||
flow.put("APPOINT_SEVEN_USER_ID", "");
|
flow.put("APPOINT_SEVEN_USER_ID", "");
|
||||||
}
|
}
|
||||||
private void saveLog(PageData info, String status, String endFlag) throws Exception {
|
|
||||||
|
public void saveLog(PageData info, String status, String endFlag) throws Exception {
|
||||||
/* 保存审批记录 */
|
/* 保存审批记录 */
|
||||||
PageData condition = new PageData();
|
PageData condition = new PageData();
|
||||||
condition.clear();
|
condition.clear();
|
||||||
|
|
@ -931,7 +976,98 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
flowMapper.edit(flow);
|
flowMapper.edit(flow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void saveLog(XgfFlowDto info, String status, String endFlag) throws Exception {
|
||||||
|
PageData _info = new PageData();
|
||||||
|
_info.put("OPINION", info.getOPINION());
|
||||||
|
_info.put("APPOINT_ANNEX", info.getAPPOINT_ANNEX());
|
||||||
|
_info.put("FLOWS_ID", info.getFLOWS_ID());
|
||||||
|
this.saveLog(_info, status, endFlag);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void repulse(PageData flows) throws Exception {
|
||||||
|
PageData condition = new PageData();
|
||||||
|
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
|
||||||
|
PageData entity = xgfUserMapper.findById(condition);
|
||||||
|
entity.put("STATUS", "0");
|
||||||
|
entity.put("VALID_FLAG", "0");
|
||||||
|
entity.put("CHECK_STATUS", "-2");
|
||||||
|
PageData key = new PageData();
|
||||||
|
key.putAll(entity);
|
||||||
|
key.put("USER_ID", condition.get("XGF_USER_ID"));
|
||||||
|
key.put("STATUS", "1");
|
||||||
|
key.put("OPINION", flows.get("OPINION"));
|
||||||
|
Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/user/approve", key);
|
||||||
|
if (result == null || !"succeed".equals(result.get("result"))) {
|
||||||
|
throw new RuntimeException("请求失败");
|
||||||
|
}
|
||||||
|
xgfUserMapper.edit(entity);
|
||||||
|
this.clearInfo(flows);
|
||||||
|
xgfFlowsMapper.edit(flows);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void approveMax(PageData request, MultipartFile[] chengNuoShu) throws Exception {
|
||||||
|
if (chengNuoShu != null && chengNuoShu.length > 0) {
|
||||||
|
request.put("APPOINT_ANNEX", Warden.saveFile(Warden.createZip(chengNuoShu), Jurisdiction.getCORPINFO_ID()));
|
||||||
|
}
|
||||||
|
|
||||||
|
List<PageData> _list = Warden.getList(request.getString("list"));
|
||||||
|
if (_list == null || _list.size() == 0) {
|
||||||
|
throw new RuntimeException("请求数据异常");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> list = _list.stream().map(x -> x.getString("XGF_USER_ID")).collect(Collectors.toList());
|
||||||
|
PageData condition = new PageData();
|
||||||
|
for (String x : list) {
|
||||||
|
condition.put("FLOWS_ID", x);
|
||||||
|
PageData flows = xgfFlowsMapper.findById(condition);
|
||||||
|
if (flows == null || flows.size() == 0) {
|
||||||
|
throw new RuntimeException("未找到该用户详细信息");
|
||||||
|
}
|
||||||
|
XgfFlowDto info = new XgfFlowDto();
|
||||||
|
info.setFLOWS_STEP(flows.getString("FLOWS_STEP"));
|
||||||
|
info.setIterator(flows.getString("FLOWS_STEP"));
|
||||||
|
info.setFLOWS_TYPE(flows.getString("FLOWS_TYPE"));
|
||||||
|
info.setFLOWS_ID(x);
|
||||||
|
info.setSTATUS(request.getString("STATUS"));
|
||||||
|
info.setOPINION(request.getString("OPINION"));
|
||||||
|
info.setAPPOINT_DEPARTMENT_ID(request.getString("APPOINT_DEPARTMENT_ID"));
|
||||||
|
info.setAPPOINT_DEPARTMENT_NAME(request.getString("APPOINT_DEPARTMENT_NAME"));
|
||||||
|
info.setAPPOINT_USER_ID(request.getString("APPOINT_USER_ID"));
|
||||||
|
info.setAPPOINT_USER_NAME(request.getString("APPOINT_USER_NAME"));
|
||||||
|
if (request.get("LIMIT_END_TIME") != null) {
|
||||||
|
info.setLIMIT_END_TIME(request.getString("LIMIT_END_TIME"));
|
||||||
|
}
|
||||||
|
if (request.get("APPOINT_ANNEX") != null) {
|
||||||
|
info.setAPPOINT_ANNEX(request.getString("APPOINT_ANNEX"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 进行数据审核
|
||||||
|
LiteflowResponse response = flowExecutor.execute2Resp("chain1", info);
|
||||||
|
if (!response.isSuccess()) {
|
||||||
|
Exception e = response.getCause();
|
||||||
|
e.printStackTrace();
|
||||||
|
System.out.println(response.getMessage());
|
||||||
|
throw new RuntimeException("系统异常");
|
||||||
|
} else {
|
||||||
|
System.out.println("流程信息:" + response.getExecuteStepStrWithTime());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PageData> getWorkTask(PageData condition) throws Exception {
|
||||||
|
return xgfUserMapper.getWorkTask(condition);
|
||||||
|
}
|
||||||
|
|
||||||
private String getType(String corpInfoId) {
|
private String getType(String corpInfoId) {
|
||||||
|
// created bu liu jun - 港务局要求,可以直接指定集团单位
|
||||||
|
if ("1".equals(corpInfoId)) {
|
||||||
|
return "2";
|
||||||
|
}
|
||||||
// 集团单位id
|
// 集团单位id
|
||||||
// (河港机械 jtdw002 1e6dbbe16004402f8d2c0e52afd9a676),
|
// (河港机械 jtdw002 1e6dbbe16004402f8d2c0e52afd9a676),
|
||||||
// (河港港工 jtdw003 3a854eefa7894e06aaa1a2611bca80f6),
|
// (河港港工 jtdw003 3a854eefa7894e06aaa1a2611bca80f6),
|
||||||
|
|
@ -940,8 +1076,8 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
String jituandanwei = "1e6dbbe16004402f8d2c0e52afd9a676,3a854eefa7894e06aaa1a2611bca80f6,020578a4c1f04bc692ee25145c2efbe5,90966974de3c4b83aca6f8fd6432d5c2";
|
String jituandanwei = "1e6dbbe16004402f8d2c0e52afd9a676,3a854eefa7894e06aaa1a2611bca80f6,020578a4c1f04bc692ee25145c2efbe5,90966974de3c4b83aca6f8fd6432d5c2";
|
||||||
if (jituandanwei.contains(corpInfoId)) {
|
if (jituandanwei.contains(corpInfoId)) {
|
||||||
return "1";
|
return "1";
|
||||||
} else {
|
|
||||||
return "0";
|
|
||||||
}
|
}
|
||||||
|
return "0";
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -284,4 +284,25 @@ public class Smb {
|
||||||
channelSftp.exit();
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import org.apache.commons.fileupload.FileItem;
|
||||||
import org.apache.commons.fileupload.FileItemFactory;
|
import org.apache.commons.fileupload.FileItemFactory;
|
||||||
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
|
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.http.HttpResponse;
|
import org.apache.http.HttpResponse;
|
||||||
import org.apache.http.HttpStatus;
|
import org.apache.http.HttpStatus;
|
||||||
import org.apache.http.client.methods.HttpPost;
|
import org.apache.http.client.methods.HttpPost;
|
||||||
|
|
@ -302,6 +303,69 @@ 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{
|
public static String saveFile(MultipartFile[] files, String number) throws Exception{
|
||||||
if (files.length == 0) throw new RuntimeException("文件为空");
|
if (files.length == 0) throw new RuntimeException("文件为空");
|
||||||
MultipartFile file = files[0];
|
MultipartFile file = files[0];
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* poi操作word工具类
|
||||||
|
* @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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -70,7 +70,7 @@ smb.basePath=/mnt/wwag/file/
|
||||||
#Mq\u914D\u7F6E
|
#Mq\u914D\u7F6E
|
||||||
rocketmq.consumer.group2=edu-admin-edit
|
rocketmq.consumer.group2=edu-admin-edit
|
||||||
rocketmq.consumer.group1=edu-admin-add
|
rocketmq.consumer.group1=edu-admin-add
|
||||||
rocketmq.name-server=39.100.115.58:9876
|
rocketmq.name-server=39.100.115.58:8899
|
||||||
rocketmq.producer.group=libmiddle
|
rocketmq.producer.group=libmiddle
|
||||||
rocketmq.producer.send-message-timeout=3000
|
rocketmq.producer.send-message-timeout=3000
|
||||||
rocketmq.producer.compress-message-body-threshold=4096
|
rocketmq.producer.compress-message-body-threshold=4096
|
||||||
|
|
@ -126,3 +126,8 @@ mq.gwj.file.topic=czks_dockingPicture
|
||||||
|
|
||||||
#港务局文件服务器前缀
|
#港务局文件服务器前缀
|
||||||
cfd.prevention.api.url=http://192.168.0.31:7021/qa-regulatory-cfd
|
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
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -683,4 +683,53 @@
|
||||||
where USER_ID = #{USER_ID}
|
where USER_ID = #{USER_ID}
|
||||||
</update>
|
</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>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -0,0 +1,164 @@
|
||||||
|
<?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.LibraryLabelsMapper">
|
||||||
|
|
||||||
|
<!--表名 -->
|
||||||
|
<sql id="tableName">
|
||||||
|
BUS_LIBRARY_LABELS
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!--数据字典表名 -->
|
||||||
|
<sql id="dicTableName">
|
||||||
|
SYS_DICTIONARIES
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 字段 -->
|
||||||
|
<sql id="Field">
|
||||||
|
f.BUS_TEXT_LIBRARY_ID,
|
||||||
|
f.NAME,
|
||||||
|
f.BUS_LABEL_FACTORY_ID,
|
||||||
|
f.CREATED_TIME,
|
||||||
|
f.LABEL_NAME,
|
||||||
|
f.ISDELETE,
|
||||||
|
f.BUS_LIBRARY_LABELS_ID,
|
||||||
|
f.CORPINFO_ID,
|
||||||
|
f.CATEGORY,
|
||||||
|
f.CATEGORY_ID,
|
||||||
|
f.CATEGORY_NAME
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 字段用于新增 -->
|
||||||
|
<sql id="Field2">
|
||||||
|
BUS_TEXT_LIBRARY_ID,
|
||||||
|
NAME,
|
||||||
|
BUS_LABEL_FACTORY_ID,
|
||||||
|
CREATED_TIME,
|
||||||
|
LABEL_NAME,
|
||||||
|
ISDELETE,
|
||||||
|
BUS_LIBRARY_LABELS_ID,
|
||||||
|
CORPINFO_ID,
|
||||||
|
CATEGORY,
|
||||||
|
CATEGORY_ID,
|
||||||
|
CATEGORY_NAME
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 字段值 -->
|
||||||
|
<sql id="FieldValue">
|
||||||
|
#{BUS_TEXT_LIBRARY_ID},
|
||||||
|
#{NAME},
|
||||||
|
#{BUS_LABEL_FACTORY_ID},
|
||||||
|
#{CREATED_TIME},
|
||||||
|
#{LABEL_NAME},
|
||||||
|
#{ISDELETE},
|
||||||
|
#{BUS_LIBRARY_LABELS_ID},
|
||||||
|
#{CORPINFO_ID},
|
||||||
|
#{CATEGORY},
|
||||||
|
#{CATEGORY_ID},
|
||||||
|
#{CATEGORY_NAME}
|
||||||
|
</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_LIBRARY_LABELS_ID = #{BUS_LIBRARY_LABELS_ID}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByLibraryId" parameterType="pd">
|
||||||
|
delete from
|
||||||
|
<include refid="tableName"></include>
|
||||||
|
where
|
||||||
|
BUS_TEXT_LIBRARY_ID = #{BUS_TEXT_LIBRARY_ID}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<!-- 修改 -->
|
||||||
|
<update id="edit" parameterType="pd">
|
||||||
|
update
|
||||||
|
<include refid="tableName"></include>
|
||||||
|
set
|
||||||
|
BUS_TEXT_LIBRARY_ID = #{BUS_TEXT_LIBRARY_ID},
|
||||||
|
NAME = #{NAME},
|
||||||
|
CREATED_TIME = #{CREATED_TIME},
|
||||||
|
LABEL_NAME = #{LABEL_NAME},
|
||||||
|
ISDELETE = #{ISDELETE},
|
||||||
|
CORPINFO_ID = #{CORPINFO_ID},
|
||||||
|
CATEGORY = #{CATEGORY},
|
||||||
|
CATEGORY_ID = #{CATEGORY_ID},
|
||||||
|
CATEGORY_NAME = #{CATEGORY_NAME},
|
||||||
|
BUS_LIBRARY_LABELS_ID = BUS_LIBRARY_LABELS_ID
|
||||||
|
where
|
||||||
|
BUS_LIBRARY_LABELS_ID = #{BUS_LIBRARY_LABELS_ID}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 通过ID获取数据 -->
|
||||||
|
<select id="findById" parameterType="pd" resultType="pd">
|
||||||
|
select
|
||||||
|
<include refid="Field"></include>
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include> f
|
||||||
|
where
|
||||||
|
f.BUS_LIBRARY_LABELS_ID = #{BUS_LIBRARY_LABELS_ID}
|
||||||
|
</select>
|
||||||
|
<select id="findBylibraryId" parameterType="pd" resultType="pd">
|
||||||
|
select
|
||||||
|
<include refid="Field"></include>
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include> f
|
||||||
|
where
|
||||||
|
f.BUS_TEXT_LIBRARY_ID = #{BUS_TEXT_LIBRARY_ID}
|
||||||
|
</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.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||||
|
and
|
||||||
|
(
|
||||||
|
<!-- 根据需求自己加检索条件
|
||||||
|
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||||
|
or
|
||||||
|
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||||
|
-->
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</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
|
||||||
|
BUS_LIBRARY_LABELS_ID in
|
||||||
|
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
<?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.LibraryLogMapper">
|
||||||
|
|
||||||
|
<!--表名 -->
|
||||||
|
<sql id="tableName">
|
||||||
|
BUS_LIBRARY_LOG
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!--数据字典表名 -->
|
||||||
|
<sql id="dicTableName">
|
||||||
|
SYS_DICTIONARIES
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 字段 -->
|
||||||
|
<sql id="Field">
|
||||||
|
f.LIBRARY_LOG_ID,
|
||||||
|
f.PATH,
|
||||||
|
f.CREATOR,
|
||||||
|
f.CREATOR_NAME,
|
||||||
|
f.CREATE_TIME,
|
||||||
|
f.BUS_TEXT_LIBRARY_ID
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="Field2">
|
||||||
|
LIBRARY_LOG_ID,
|
||||||
|
PATH,
|
||||||
|
CREATOR,
|
||||||
|
CREATOR_NAME,
|
||||||
|
CREATE_TIME,
|
||||||
|
BUS_TEXT_LIBRARY_ID
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="FieldValue">
|
||||||
|
#{LIBRARY_LOG_ID},
|
||||||
|
#{PATH},
|
||||||
|
#{CREATOR},
|
||||||
|
#{CREATOR_NAME},
|
||||||
|
#{CREATE_TIME},
|
||||||
|
#{BUS_TEXT_LIBRARY_ID}
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 新增-->
|
||||||
|
<insert id="save" parameterType="pd">
|
||||||
|
insert into
|
||||||
|
<include refid="tableName"></include>
|
||||||
|
(
|
||||||
|
<include refid="Field2"></include>
|
||||||
|
) values (
|
||||||
|
<include refid="FieldValue"></include>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<select id="findById" parameterType="pd" resultType="pd">
|
||||||
|
select
|
||||||
|
<include refid="Field"></include>
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include> f
|
||||||
|
where
|
||||||
|
f.LIBRARY_LOG_ID = #{LIBRARY_LOG_ID}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="findByLogId" parameterType="pd" resultType="pd">
|
||||||
|
select
|
||||||
|
<include refid="Field"></include>
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include> f
|
||||||
|
where
|
||||||
|
f.BUS_TEXT_LIBRARY_ID = #{BUS_TEXT_LIBRARY_ID}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,138 @@
|
||||||
|
<?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.TextInfoMapper">
|
||||||
|
|
||||||
|
<!--表名 -->
|
||||||
|
<sql id="tableName">
|
||||||
|
BUS_TEXT_INFO
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!--数据字典表名 -->
|
||||||
|
<sql id="dicTableName">
|
||||||
|
SYS_DICTIONARIES
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 字段 -->
|
||||||
|
<sql id="Field">
|
||||||
|
f.TEXT_INFO,
|
||||||
|
f.BUS_TEXT_LIBRARY_ID,
|
||||||
|
f.ISDELETE,
|
||||||
|
f.CREATED_TIME,
|
||||||
|
f.OPERATE_TIME,
|
||||||
|
f.TEXT_INFO_ID
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 字段用于新增 -->
|
||||||
|
<sql id="Field2">
|
||||||
|
TEXT_INFO,
|
||||||
|
BUS_TEXT_LIBRARY_ID,
|
||||||
|
ISDELETE,
|
||||||
|
CREATED_TIME,
|
||||||
|
OPERATE_TIME,
|
||||||
|
TEXT_INFO_ID
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 字段值 -->
|
||||||
|
<sql id="FieldValue">
|
||||||
|
#{TEXT_INFO},
|
||||||
|
#{BUS_TEXT_LIBRARY_ID},
|
||||||
|
#{ISDELETE},
|
||||||
|
#{CREATED_TIME},
|
||||||
|
#{OPERATE_TIME},
|
||||||
|
#{TEXT_INFO_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
|
||||||
|
TEXT_INFO_ID = #{TEXT_INFO_ID}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<!-- 修改 -->
|
||||||
|
<update id="edit" parameterType="pd">
|
||||||
|
update
|
||||||
|
<include refid="tableName"></include>
|
||||||
|
set
|
||||||
|
TEXT_INFO = #{TEXT_INFO},
|
||||||
|
BUS_TEXT_LIBRARY_ID = #{BUS_TEXT_LIBRARY_ID},
|
||||||
|
ISDELETE = #{ISDELETE},
|
||||||
|
OPERATE_TIME = #{OPERATE_TIME},
|
||||||
|
TEXT_INFO_ID = TEXT_INFO_ID
|
||||||
|
where
|
||||||
|
TEXT_INFO_ID = #{TEXT_INFO_ID}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 通过ID获取数据 -->
|
||||||
|
<select id="findById" parameterType="pd" resultType="pd">
|
||||||
|
select
|
||||||
|
<include refid="Field"></include>
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include> f
|
||||||
|
where
|
||||||
|
f.TEXT_INFO_ID = #{TEXT_INFO_ID}
|
||||||
|
</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.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||||
|
and
|
||||||
|
(
|
||||||
|
<!-- 根据需求自己加检索条件
|
||||||
|
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||||
|
or
|
||||||
|
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||||
|
-->
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 列表(全部) -->
|
||||||
|
<select id="listAll" parameterType="pd" resultType="pd">
|
||||||
|
select
|
||||||
|
<include refid="Field"></include>
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include> f
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="findByMainId" resultType="com.zcloud.entity.PageData">
|
||||||
|
select
|
||||||
|
<include refid="Field"></include>
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include> f
|
||||||
|
where f.BUS_TEXT_LIBRARY_ID = #{BUS_TEXT_LIBRARY_ID}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 批量删除 -->
|
||||||
|
<delete id="deleteAll" parameterType="String">
|
||||||
|
update
|
||||||
|
<include refid="tableName"></include>
|
||||||
|
set
|
||||||
|
ISDELETE = '1'
|
||||||
|
where
|
||||||
|
TEXT_INFO_ID in
|
||||||
|
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,206 @@
|
||||||
|
<?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.TextLibraryMapper">
|
||||||
|
|
||||||
|
<!--表名 -->
|
||||||
|
<sql id="tableName">
|
||||||
|
BUS_TEXT_LIBRARY
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!--数据字典表名 -->
|
||||||
|
<sql id="dicTableName">
|
||||||
|
SYS_DICTIONARIES
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 字段 -->
|
||||||
|
<sql id="Field">
|
||||||
|
f.REMARKS,
|
||||||
|
f.TYPE,
|
||||||
|
f.TYPE_NAME,
|
||||||
|
f.FILE_NAME,
|
||||||
|
f.UPLOAD_TIME,
|
||||||
|
f.UPLOAD_USER,
|
||||||
|
f.UPLOAD_USER_NAME,
|
||||||
|
f.PATH,
|
||||||
|
f.REMOTE_PATH,
|
||||||
|
f.CREATED_TIME,
|
||||||
|
f.ISDELETE,
|
||||||
|
f.REMOTE_FILE_NAME,
|
||||||
|
f.LOCKTOOL,
|
||||||
|
f.ISTOPTIME,
|
||||||
|
f.ASSOCIATION,
|
||||||
|
f.STATUS,
|
||||||
|
f.BUS_TEXT_LIBRARY_ID,
|
||||||
|
f.MIGRATION_FLAG,
|
||||||
|
f.CORPINFO_ID
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 字段用于新增 -->
|
||||||
|
<sql id="Field2">
|
||||||
|
REMARKS,
|
||||||
|
TYPE,
|
||||||
|
TYPE_NAME,
|
||||||
|
FILE_NAME,
|
||||||
|
UPLOAD_TIME,
|
||||||
|
UPLOAD_USER,
|
||||||
|
UPLOAD_USER_NAME,
|
||||||
|
PATH,
|
||||||
|
REMOTE_PATH,
|
||||||
|
CREATED_TIME,
|
||||||
|
ISDELETE,
|
||||||
|
REMOTE_FILE_NAME,
|
||||||
|
LOCKTOOL,
|
||||||
|
ISTOPTIME,
|
||||||
|
ASSOCIATION,
|
||||||
|
STATUS,
|
||||||
|
BUS_TEXT_LIBRARY_ID,
|
||||||
|
CORPINFO_ID,
|
||||||
|
MIGRATION_FLAG
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 字段值 -->
|
||||||
|
<sql id="FieldValue">
|
||||||
|
#{REMARKS},
|
||||||
|
#{TYPE},
|
||||||
|
#{TYPE_NAME},
|
||||||
|
#{FILE_NAME},
|
||||||
|
#{UPLOAD_TIME},
|
||||||
|
#{UPLOAD_USER},
|
||||||
|
#{UPLOAD_USER_NAME},
|
||||||
|
#{PATH},
|
||||||
|
#{REMOTE_PATH},
|
||||||
|
#{CREATED_TIME},
|
||||||
|
#{ISDELETE},
|
||||||
|
#{REMOTE_FILE_NAME},
|
||||||
|
#{LOCKTOOL},
|
||||||
|
#{ISTOPTIME},
|
||||||
|
#{ASSOCIATION},
|
||||||
|
#{STATUS},
|
||||||
|
#{BUS_TEXT_LIBRARY_ID},
|
||||||
|
#{CORPINFO_ID},
|
||||||
|
#{MIGRATION_FLAG}
|
||||||
|
</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_TEXT_LIBRARY_ID = #{BUS_TEXT_LIBRARY_ID}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<!-- 修改 -->
|
||||||
|
<update id="edit" parameterType="pd">
|
||||||
|
update
|
||||||
|
<include refid="tableName"></include>
|
||||||
|
set
|
||||||
|
REMARKS = #{REMARKS},
|
||||||
|
TYPE = #{TYPE},
|
||||||
|
FILE_NAME = #{FILE_NAME},
|
||||||
|
REMOTE_FILE_NAME = #{REMOTE_FILE_NAME},
|
||||||
|
UPLOAD_TIME = #{UPLOAD_TIME},
|
||||||
|
UPLOAD_USER = #{UPLOAD_USER},
|
||||||
|
UPLOAD_USER_NAME = #{UPLOAD_USER_NAME},
|
||||||
|
PATH = #{PATH},
|
||||||
|
REMOTE_PATH = #{REMOTE_PATH},
|
||||||
|
CREATED_TIME = #{CREATED_TIME},
|
||||||
|
LOCKTOOL = #{LOCKTOOL},
|
||||||
|
ISTOPTIME = #{ISTOPTIME},
|
||||||
|
TYPE_NAME = #{TYPE_NAME},
|
||||||
|
ASSOCIATION = #{ASSOCIATION},
|
||||||
|
STATUS = #{STATUS},
|
||||||
|
CORPINFO_ID = #{CORPINFO_ID},
|
||||||
|
MIGRATION_FLAG = #{MIGRATION_FLAG},
|
||||||
|
BUS_TEXT_LIBRARY_ID = BUS_TEXT_LIBRARY_ID
|
||||||
|
where
|
||||||
|
BUS_TEXT_LIBRARY_ID = #{BUS_TEXT_LIBRARY_ID}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 通过ID获取数据 -->
|
||||||
|
<select id="findById" parameterType="pd" resultType="pd">
|
||||||
|
select
|
||||||
|
<include refid="Field"></include>
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include> f
|
||||||
|
where
|
||||||
|
f.BUS_TEXT_LIBRARY_ID = #{BUS_TEXT_LIBRARY_ID}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 列表 -->
|
||||||
|
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||||
|
select
|
||||||
|
<include refid="Field"></include>,
|
||||||
|
bci.CORP_NAME
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include> f
|
||||||
|
left join sys_user su on f.UPLOAD_USER = su.USER_ID
|
||||||
|
left join bus_corp_info bci on bci.CORPINFO_ID = su.CORPINFO_ID
|
||||||
|
where f.ISDELETE = '0'
|
||||||
|
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||||
|
and f.REMARKS LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="pd.LABELS != null and pd.LABELS.length > 0">
|
||||||
|
and exists(select 1 from bus_library_labels b where b.BUS_TEXT_LIBRARY_ID = f.BUS_TEXT_LIBRARY_ID and
|
||||||
|
b.BUS_LABEL_FACTORY_ID in
|
||||||
|
<foreach item="item" index="index" collection="pd.LABELS" open="(" separator="," close=")">
|
||||||
|
#{pd.LABELS[${index}]}
|
||||||
|
</foreach>)
|
||||||
|
</if>
|
||||||
|
<if test="pd.ASSOCIATION != null and pd.ASSOCIATION != ''">
|
||||||
|
and f.ASSOCIATION = #{pd.ASSOCIATION}
|
||||||
|
</if>
|
||||||
|
<if test="pd.STATUS != null and pd.STATUS != ''">
|
||||||
|
and f.STATUS = #{pd.STATUS}
|
||||||
|
</if>
|
||||||
|
<if test="pd.CATEGORY_IDS != null and pd.CATEGORY_IDS.length > 0">
|
||||||
|
and exists(select 1 from bus_library_labels b where b.BUS_TEXT_LIBRARY_ID = f.BUS_TEXT_LIBRARY_ID and
|
||||||
|
b.CATEGORY_ID in
|
||||||
|
<foreach item="item" index="index" collection="pd.CATEGORY_IDS" open="(" separator="," close=")">
|
||||||
|
#{pd.CATEGORY_IDS[${index}]}
|
||||||
|
</foreach>)
|
||||||
|
</if>
|
||||||
|
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != null">
|
||||||
|
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||||
|
</if>
|
||||||
|
<if test="pd.ENTERPRISE_SIDE != null and pd.ENTERPRISE_SIDE != ''">
|
||||||
|
and f.CORPINFO_ID != #{pd.ENTERPRISE_SIDE}
|
||||||
|
</if>
|
||||||
|
order by f.ISTOPTIME desc,f.CREATED_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
|
||||||
|
BUS_TEXT_LIBRARY_ID in
|
||||||
|
<foreach item="item" index="index" collection="array" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
and LOCKTOOL is null
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -627,4 +627,11 @@
|
||||||
(COR_ORDER+0) asc,
|
(COR_ORDER+0) asc,
|
||||||
NAME,DEP_ORDER asc
|
NAME,DEP_ORDER asc
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getCorpDepartmentByIds" parameterType="List" resultType="pd" >
|
||||||
|
select * from `qa-gwj-regulatory`.SYS_DEPARTMENT
|
||||||
|
where DEPARTMENT_ID in
|
||||||
|
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -360,5 +360,27 @@
|
||||||
and a.CHECK_STEP = #{pd.CHECK_STEP}
|
and a.CHECK_STEP = #{pd.CHECK_STEP}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getWorkTask" resultType="com.zcloud.entity.PageData">
|
||||||
|
select a.XGF_USER_ID,
|
||||||
|
a.BELONG_TO_CORP,
|
||||||
|
a.BELONG_TO_CORP_NAME,
|
||||||
|
a.USERNAME,
|
||||||
|
a.NAME,
|
||||||
|
a.CHECK_STEP,
|
||||||
|
c.*
|
||||||
|
from xgf_user a
|
||||||
|
left join xgf_flows c on a.XGF_USER_ID = c.FLOWS_ID
|
||||||
|
where a.IS_DELETE = '0'
|
||||||
|
and ((c.APPOINT_ZERO_USER_ID = #{USER_ID} and c.FLOWS_STEP = '0')
|
||||||
|
or (c.APPOINT_ONE_USER_ID = #{USER_ID} and c.FLOWS_STEP = '1')
|
||||||
|
or (c.APPOINT_TWO_USER_ID = #{USER_ID} and c.FLOWS_STEP = '2')
|
||||||
|
or (c.APPOINT_THREE_USER_ID = #{USER_ID} and c.FLOWS_STEP = '3')
|
||||||
|
or (c.APPOINT_FOUR_USER_ID = #{USER_ID} and c.FLOWS_STEP = '4')
|
||||||
|
or (c.APPOINT_FIVE_USER_ID = #{USER_ID} and c.FLOWS_STEP = '5')
|
||||||
|
or (c.APPOINT_SIX_USER_ID = #{USER_ID} and c.FLOWS_STEP = '6')
|
||||||
|
or (c.APPOINT_SEVEN_USER_ID = #{USER_ID} and c.FLOWS_STEP = '7')
|
||||||
|
)
|
||||||
|
and (a.VALID_FLAG = '1' or a.VALID_FLAG = '2')
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue