新的责任状模板

0927cmt
zhaoyu 2024-03-18 16:18:15 +08:00
parent e2d229241d
commit 795a50361c
31 changed files with 3055 additions and 0 deletions

View File

@ -0,0 +1,232 @@
package com.zcloud.controller.app;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.bus.*;
import com.zcloud.service.system.UsersService;
import com.zcloud.util.Const;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Smb;
import com.zcloud.util.Tools;
import com.zcloud.util.message.MessageService;
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.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* yangming
* 2022-12-29
*/
@Controller
@RequestMapping("/app/corpresponsibility")
public class AppResponsibilityController extends BaseController {
@Autowired
private CorpResponsibilityPeopleService corpResponsibilityPeopleService;
@Autowired
private CorpResponsibilityService corpResponsibilityService;
@Autowired
private CorpResponsibilityDetailsService corpResponsibilityDetailsService;
@Autowired
private CorpResponsibilityFinalsService corpResponsibilityFinalsService;
@Autowired
private MessageService messageService;
@Autowired
private UsersService usersService;
@Autowired
private NoticeRegulatoryService noticeRegulatoryService;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/ISSIGN")
@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 = corpResponsibilityPeopleService.findByUserId(pd); //查询是否有未签字数据
if(varList.size()>0){
map.put("ISSIGN", 1);
}else {
map.put("ISSIGN", 0);
}
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/responsibility")
@ResponseBody
public Object responsibility() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
List<PageData> varList = corpResponsibilityPeopleService.findByUserId(pd); //查询是否有未签字数据
if(varList.size()>0){
pd.put("RESPONSIBILITY_ID",varList.get(0).getString("RESPONSIBILITY_ID"));
PageData TEXT = corpResponsibilityService.findById(pd);
List<PageData> COLLATERAL = corpResponsibilityDetailsService.findByResponsibilityId(pd);
List<PageData> FINALTEXT = corpResponsibilityFinalsService.findByResponsibilityId(pd); //细则
List<PageData> COVERPEOPLE = corpResponsibilityPeopleService.findByCoverResponsibilityId(pd); //被承诺人
map.put("TEXT",TEXT);
map.put("COLLATERAL",COLLATERAL);
map.put("FINALTEXT",FINALTEXT);
map.put("COVERPEOPLE",COVERPEOPLE);
map.put("RESPONSIBILITYPEOPLE_ID",varList.get(0).getString("RESPONSIBILITYPEOPLE_ID")); //当前承诺人数据
}
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/editpeople")
@ResponseBody
public Object editpeople(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String ffile = DateUtil.getDays();
if (file != null){
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
errInfo = "fail";
map.put("result", errInfo);
map.put("msg", "文件格式不正确!");
return map;
}
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
pd.put("FILEPATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
pd.put("SIGNTIME", pd.getString("SIGNTIME"));
pd.put("ISSIGN",1);
pd.put("ISREAD","0");
pd.put("SIGNTIME", DateUtil.date2Str(new Date()));
corpResponsibilityPeopleService.editSign(pd); //存承诺书签字图片信息
PageData responsibility = corpResponsibilityPeopleService.findById(pd); //查询出承诺书ID
pd.put("RESPONSIBILITY_ID",responsibility.getString("RESPONSIBILITY_ID"));
List<PageData> cover = corpResponsibilityPeopleService.findByCoverResponsibilityId(pd); //获取被承诺人数据
pd.put("USER_ID",cover.get(0).getString("USER_ID"));
PageData user = usersService.findById(pd);
if(user != null){
messageService.sendMessageByParameter("RESPONSIBILITY_001","友情提示:有一条承诺书需要查看",pd.getString("CORPINFO_ID"),
cover.get(0).getString("USER_ID"),responsibility.getString("RESPONSIBILITYPEOPLE_ID"),
"我的-安全承诺-接收承诺列表","","","","");
} else {
if(Tools.notEmpty(cover.get(0).getString("USER_ID"))){
PageData mes = new PageData();
mes.put("SENDER_ID", responsibility.getString("USER_ID")); // 发送人员ID
mes.put("SENDER_NAME", responsibility.getString("USER_ID")); // 发送人员姓名
mes.put("SYNOPSIS", "友情提示:有一条承诺书需要查看"); // 站内信标题
mes.put("RECEIVER_ID",cover.get(0).getString("USER_ID")); // 接收人员ID
mes.put("CONTENT", "有一条承诺书数据在“我的-安全承诺-接收承诺列表”,等您查看");// 站内信内容
noticeRegulatoryService.sendMessage(mes);
}
}
}
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/responsibilitylist")
@ResponseBody
public Object responsibilitylist(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 = corpResponsibilityPeopleService.responsibilitylist(page);
map.put("varList",varList);
map.put("page",page);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/receiveResponsibilityList")
@ResponseBody
public Object receiveResponsibilityList(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 = corpResponsibilityPeopleService.receiveResponsibilitylist(page);
map.put("varList",varList);
map.put("page",page);
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();
PageData responsibility = corpResponsibilityService.findById(pd);
List<PageData> promistDetail = corpResponsibilityDetailsService.findByResponsibilityId(pd);
List<PageData> promistFinal = corpResponsibilityFinalsService.findByResponsibilityId(pd);
List<PageData> coverpeople = corpResponsibilityPeopleService.findByCoverResponsibilityId(pd); //被承诺人
pd.put("ISSIGN",1);
PageData people = corpResponsibilityPeopleService.findById(pd);//承诺人
map.put("promistDetail",promistDetail);
map.put("promistFinal",promistFinal);
map.put("varList", responsibility);
map.put("people",people);
map.put("coverpeople",coverpeople);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/editIsRead")
@ResponseBody
public Object editIsRead() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("ISREAD","1");
corpResponsibilityPeopleService.editIsRead(pd); //阅读状态修改为已阅
map.put("result", errInfo);
return map;
}
}

View File

@ -0,0 +1,508 @@
package com.zcloud.controller.bus;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.bus.ImgFilesService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.ReturnMap;
import com.zcloud.util.Tools;
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.*;
/**
*
* yangming
* 2022-12-29
*/
@Controller
@RequestMapping("/corpResponsibility")
public class CorpResponsibilityController extends BaseController {
@Autowired
private CorpResponsibilityService corpResponsibilityService;
@Autowired
private CorpResponsibilityDetailsService corpResponsibilityDetailsService;
@Autowired
private CorpResponsibilityPeopleService corpResponsibilityPeopleService;
@Autowired
private CorpResponsibilityFinalsService corpResponsibilityFinalsService;
@Autowired
private ImgFilesService imgFilesService;
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/add")
@ResponseBody
public Object add() throws Exception {
PageData dockData = new PageData();
ArrayList<PageData> corpResponsibilityDetails = new ArrayList<>();
ArrayList<PageData> corpResponsibilityPeoples = new ArrayList<>();
ArrayList<PageData> coverPeoples = new ArrayList<>();
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("RESPONSIBILITY_ID", this.get32UUID()); //主键
pd.put("ISDELETE", 0);
pd.put("STATE", "0");
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
List<JSONObject> people = (List<JSONObject>) JSON.parse(pd.getString("people"));
pd.put("PEOPLENUM_INVOLVED", String.valueOf(people.size()));//获取人数
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //创建人
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //创建时间
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //创建人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //创建时间
pd.put("RELEASE_PLATFORM", "1");//企业端发布
corpResponsibilityService.save(pd);
dockData.put("corpResponsibilitySave", JSON.toJSONString(pd));
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.getString("DETAIL")); //副文内容
List<JSONObject> finalList = (List<JSONObject>) JSON.parse(pd.getString("FINAL"));
if (list.size() > 0) {
for (int i = 0; i < list.size(); i++) {
PageData responsibility = new PageData();
responsibility.put("RESPONSIBILITYDETAIL_ID", this.get32UUID()); //主键
responsibility.put("RESPONSIBILITY_ID", pd.getString("RESPONSIBILITY_ID")); //外键ID
responsibility.put("COLLATERAL", list.get(i).get("value"));
responsibility.put("SORTINDEX", list.get(i).get("index"));
corpResponsibilityDetailsService.save(responsibility);
if (finalList.size() > 0) {
for (int j = 0;j<finalList.size();j++) {
if (list.get(i).getString("id").equals(finalList.get(j).getString("pid"))){
PageData responsibilityFinal = new PageData();
responsibilityFinal.put("RESPONSIBILITYFINAL_ID", this.get32UUID()); //主键
responsibilityFinal.put("RESPONSIBILITYDETAIL_ID", responsibility.getString("RESPONSIBILITYDETAIL_ID")); //主键
responsibilityFinal.put("RESPONSIBILITY_ID", pd.getString("RESPONSIBILITY_ID")); //外键ID
responsibilityFinal.put("FINALTEXT", finalList.get(j).get("value"));
responsibilityFinal.put("SORTINDEX", finalList.get(j).get("index"));
corpResponsibilityFinalsService.save(responsibilityFinal);
}
}
}
corpResponsibilityDetails.add(responsibility);
}
dockData.put("corpResponsibilityDetailsSave", JSON.toJSONString(corpResponsibilityDetails));
}
if (people.size() > 0) { //承诺人数据
int num = 0;
for (int i = 0; i < people.size(); i++) {
PageData responsibility = new PageData();
responsibility.put("RESPONSIBILITY_ID", pd.getString("RESPONSIBILITY_ID")); //外键ID
responsibility.put("DEPARTMENT_ID", people.get(i).get("DEPARTMENT_ID"));
responsibility.put("POST_ID", people.get(i).get("POST_ID"));
List<JSONObject> user = (List<JSONObject>) people.get(i).get("USER_ID"); //同部门、同岗位下有可能选择多个人
responsibility.put("ISSIGN", 0);
if (user.size() > 0) {
for (int j = 0; j < user.size(); j++) {
responsibility.put("USER_ID", user.get(j));
responsibility.put("RESPONSIBILITYPEOPLE_ID", this.get32UUID()); //主键
responsibility.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
responsibility.put("ISRESPONSIBILITY_PEOPLE", "0");
corpResponsibilityPeopleService.save(responsibility);
corpResponsibilityPeoples.add(responsibility);
num++;
}
dockData.put("corpResponsibilityPeopleSave", JSON.toJSONString(corpResponsibilityPeoples));
}
}
pd.put("PEOPLENUM_INVOLVED", num);
corpResponsibilityService.editpeople(pd);
dockData.put("editPeople", JSON.toJSONString(pd));
}
List<JSONObject> coverpeople = (List<JSONObject>) JSON.parse(pd.getString("coverpeople"));
if (coverpeople.size() > 0) { //被承诺人数据
for (int i = 0; i < coverpeople.size(); i++) {
PageData responsibility = new PageData();
responsibility.put("RESPONSIBILITY_ID", pd.getString("RESPONSIBILITY_ID")); //外键ID
responsibility.put("DEPARTMENT_ID", coverpeople.get(i).get("DEPARTMENT_ID"));
responsibility.put("POST_ID", coverpeople.get(i).get("POST_ID"));
List<JSONObject> user = (List<JSONObject>) coverpeople.get(i).get("USER_ID"); //同部门、同岗位下有可能选择多个人
responsibility.put("ISSIGN", 0);
if (user.size() > 0) {
for (int j = 0; j < user.size(); j++) {
responsibility.put("USER_ID", user.get(j));
responsibility.put("RESPONSIBILITYPEOPLE_ID", this.get32UUID()); //主键
responsibility.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
responsibility.put("ISRESPONSIBILITY_PEOPLE", "1");
corpResponsibilityPeopleService.save(responsibility);
coverPeoples.add(responsibility);
}
dockData.put("coverPeopleList", JSON.toJSONString(coverPeoples));
}
}
}
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(dockData));
return map;
}
/**
*
*
* @param page
* @throws Exception
*/
@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();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
pd = Jurisdiction.getUserDataJurisdiction(pd);
if(!Tools.isEmpty(pd.getString("DEPARTMENT_ID"))){
String [] deptIds = pd.getString("DEPARTMENT_ID").split(",");
pd.put("departIds",deptIds);
pd.put("DEPARTMENT_ID","");
}
page.setPd(pd);
if (Tools.notEmpty(pd.getString("DEPARTMENT_IDS"))) {
String[] departmentIds = pd.getString("DEPARTMENT_IDS").split(",");
StringBuilder valueBuilder = new StringBuilder();
for (String departmentId : departmentIds) {
valueBuilder.append("'").append(departmentId).append("'").append(",");
}
valueBuilder.deleteCharAt(valueBuilder.length()-1);
pd.put("DEPARTMENT_IDS", valueBuilder.toString());
}
List<PageData> varList = corpResponsibilityService.list(page); //列出Notice列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/editdelete")
@ResponseBody
public Object editdelete() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
if (Tools.notEmpty(pd.getString("dockData"))) {
// 咱们的对接流程 如有异常 使用 throw new BizException();
PageData dockData = JSON.parseObject(pd.getString("dockData"), PageData.class);
corpResponsibilityService.editdelete(dockData);
// 正常返回
return ReturnMap.ok();
}
corpResponsibilityService.editdelete(pd);
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(pd));
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.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData responsibility = corpResponsibilityService.findById(pd);
List<PageData> responsibilityDetail = corpResponsibilityDetailsService.findByResponsibilityId(pd);
List<PageData> responsibilityFinal = corpResponsibilityFinalsService.findByResponsibilityId(pd);
List<PageData> coverpeople = corpResponsibilityPeopleService.findByCoverResponsibilityId(pd); //被承诺人
List<PageData> people = corpResponsibilityPeopleService.findByResponsibilityId(pd);//承诺人
Map<String, List<String>> keyMap = new HashMap<>();
for (PageData pageData : people) {
String key = pageData.getString("DEPARTMENT_ID") + "---" + pageData.getString("POST_ID");
List<String> userIdsList = new ArrayList<>();
if (keyMap.containsKey(key)) {
userIdsList = keyMap.get(key);
}
userIdsList.add(pageData.getString("USER_ID"));
keyMap.put(key, userIdsList);
}
List<Map<String, Object>> pMap = new ArrayList<>();
for (String key : keyMap.keySet()) {
Map<String, Object> mapKey = new HashMap<>();
String[] k = key.split("---");
mapKey.put("DEPARTMENT_ID", k[0]);
mapKey.put("POST_ID", k[1]);
mapKey.put("USER_ID", keyMap.get(key));
mapKey.put("userList", keyMap.get(key));
pMap.add(mapKey);
// String value = map.get(key);
// System.out.println("key:" + key + ",value:" + value);
}
map.put("people", pMap);
map.put("responsibilityDetail", responsibilityDetail);
map.put("responsibilityFinal", responsibilityFinal);
map.put("varList", responsibility);
map.put("people2", people);
map.put("coverpeople", coverpeople);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/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();
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //创建时间
PageData dockData = new PageData();
ArrayList<PageData> corpResponsibilityDetails = new ArrayList<>();
ArrayList<PageData> corpResponsibilityPeoples = new ArrayList<>();
ArrayList<PageData> coverPeoples = new ArrayList<>();
corpResponsibilityService.edit(pd);
corpResponsibilityDetailsService.deleteResponsibilityId(pd);
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.getString("DETAIL"));
if (list.size() > 0) {
for (int i = 0; i < list.size(); i++) {
PageData responsibility = new PageData();
responsibility.put("RESPONSIBILITYDETAIL_ID", this.get32UUID()); //主键
responsibility.put("RESPONSIBILITY_ID", pd.getString("RESPONSIBILITY_ID")); //外键ID
responsibility.put("COLLATERAL", list.get(i).get("value"));
responsibility.put("SORTINDEX", list.get(i).get("index"));
corpResponsibilityDetailsService.save(responsibility);
corpResponsibilityDetails.add(responsibility);
}
dockData.put("corpResponsibilityDetails", JSON.toJSONString(corpResponsibilityDetails));
}
corpResponsibilityPeopleService.deleteResponsibilityId(pd); //先删除承诺人数据,再新增
dockData.put("baseData", JSON.toJSONString(pd));
List<JSONObject> people = (List<JSONObject>) JSON.parse(pd.getString("people"));
if (people.size() > 0) { //承诺人数据
int num = 0;
for (int i = 0; i < people.size(); i++) {
PageData responsibility = new PageData();
responsibility.put("RESPONSIBILITY_ID", pd.getString("RESPONSIBILITY_ID")); //外键ID
responsibility.put("DEPARTMENT_ID", people.get(i).get("DEPARTMENT_ID"));
responsibility.put("POST_ID", people.get(i).get("POST_ID"));
List<JSONObject> user = (List<JSONObject>) people.get(i).get("USER_ID"); //同部门、同岗位下有可能选择多个人
responsibility.put("ISSIGN", 0);
if (user.size() > 0) {
for (int j = 0; j < user.size(); j++) {
responsibility.put("USER_ID", user.get(j));
responsibility.put("RESPONSIBILITYPEOPLE_ID", this.get32UUID()); //主键
responsibility.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
responsibility.put("ISRESPONSIBILITY_PEOPLE", "0");
corpResponsibilityPeopleService.save(responsibility);
num++;
corpResponsibilityPeoples.add(responsibility);
}
dockData.put("corpResponsibilityPeoples", JSON.toJSONString(corpResponsibilityPeoples));
}
}
pd.put("PEOPLENUM_INVOLVED", num);
corpResponsibilityService.editpeople(pd);
dockData.put("editData", JSON.toJSONString(pd));
}
List<JSONObject> coverpeople = (List<JSONObject>) JSON.parse(pd.getString("coverpeople"));
if (coverpeople.size() > 0) { //被承诺人数据
for (int i = 0; i < coverpeople.size(); i++) {
PageData responsibility = new PageData();
responsibility.put("RESPONSIBILITY_ID", pd.getString("RESPONSIBILITY_ID")); //外键ID
responsibility.put("DEPARTMENT_ID", coverpeople.get(i).get("DEPARTMENT_ID"));
responsibility.put("POST_ID", coverpeople.get(i).get("POST_ID"));
List<JSONObject> user = (List<JSONObject>) coverpeople.get(i).get("USER_ID"); //同部门、同岗位下有可能选择多个人
responsibility.put("ISSIGN", 0);
if (user.size() > 0) {
for (int j = 0; j < user.size(); j++) {
responsibility.put("USER_ID", user.get(j));
responsibility.put("RESPONSIBILITYPEOPLE_ID", this.get32UUID()); //主键
responsibility.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
responsibility.put("ISRESPONSIBILITY_PEOPLE", "1");
corpResponsibilityPeopleService.save(responsibility);
coverPeoples.add(responsibility);
}
dockData.put("coverPeoples", JSON.toJSONString(coverPeoples));
}
}
}
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(dockData));
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/showtemplatetext")
@ResponseBody
public Object showtemplate(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
page.setPd(pd);
List<PageData> varList = corpResponsibilityService.listAll(page); //列出Notice列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/collateral")
@ResponseBody
public Object collateral() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
List<PageData> varList = corpResponsibilityService.collateralall(pd); //列出Notice列表
List<PageData> finalList = corpResponsibilityService.collateralAllFinal(pd); //列出Notice列表
map.put("varList", varList);
map.put("finalList", finalList);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/peopledetails")
@ResponseBody
public Object peopledetails(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("ISRESPONSIBILITY_PEOPLE", "0");
page.setPd(pd);
List<PageData> varList = corpResponsibilityPeopleService.list(page); //列出Notice列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
*
*/
@RequestMapping(value = "/removeUnsignedPeopleDetail")
@ResponseBody
public Object removeUnsignedPeopleDetail() {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = this.getPageData();
if (!"1".equals(Jurisdiction.getIS_MAIN())) {
map.put("result", "error");
map.put("msg", "只有企业主账号可删除");
return map;
}
corpResponsibilityPeopleService.removeUnsignedPeopleDetails(pd);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/peopleview")
@ResponseBody
public Object peopleview() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
PageData TEXT = corpResponsibilityService.findById(pd); //正文
List<PageData> COLLATERAL = corpResponsibilityDetailsService.findByResponsibilityId(pd); //副文
List<PageData> FINALTEXT = corpResponsibilityFinalsService.findByResponsibilityId(pd); //细则
PageData ISGN = corpResponsibilityPeopleService.findById(pd);
List<PageData> coverpeople = corpResponsibilityPeopleService.findByCoverResponsibilityId(pd); //被承诺人
map.put("varList", TEXT);
map.put("COLLATERAL", COLLATERAL);
map.put("FINALTEXT", FINALTEXT);
map.put("COVERPEOPLE", coverpeople);
map.put("ISGN", ISGN);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/delete")
@ResponseBody
public Object delete() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
PageData dockData = new PageData();
List<PageData> corpResponsibilityPeopleList = new ArrayList<>();
List<PageData> responsibilityList = corpResponsibilityPeopleService.getListAllByResponsibilityId(pd);
for (PageData pageData : responsibilityList) {
corpResponsibilityPeopleService.delete(pageData);
corpResponsibilityPeopleList.add(pageData);
}
corpResponsibilityService.delete(pd);
dockData.put("removeData", JSON.toJSONString(pd));
dockData.put("corpResponsibilityPeopleList", JSON.toJSONString(corpResponsibilityPeopleList));
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(dockData));
return map;
}
}

View File

@ -0,0 +1,244 @@
package com.zcloud.controller.bus;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.zcloud.aspect.DockAnnotation;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.bus.CorpResponsibilityPeopleService;
import com.zcloud.service.bus.ResponsibilityDetailsService;
import com.zcloud.service.bus.ResponsibilityFinalsService;
import com.zcloud.service.bus.ResponsibilityService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Tools;
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.*;
/**
*
* yangming
* 2022-12-29
*/
@Controller
@RequestMapping("/responsibility")
public class ResponsibilityController extends BaseController {
@Autowired
private ResponsibilityService responsibilityService;
@Autowired
private ResponsibilityDetailsService responsibilityDetailsService;
@Autowired
private ResponsibilityFinalsService responsibilityFinalsService;
@Autowired
private CorpResponsibilityPeopleService corpResponsibilityPeopleService;
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/add")
@ResponseBody
@DockAnnotation
public Object add() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("RESPONSIBILITY_ID", this.get32UUID()); //主键
pd.put("ISDELETE", 0);
pd.put("CREATOR", "admin"); //创建人
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //创建时间
pd.put("OPERATOR", "admin"); //创建人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //创建时间
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
responsibilityService.save(pd);
ArrayList<PageData> responsibilityDetailList = new ArrayList<>();
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.getString("DETAIL"));
List<JSONObject> finalList = (List<JSONObject>) JSON.parse(pd.getString("FINAL"));
if (list.size() > 0) {
for (int i = 0; i < list.size(); i++) {
PageData responsibility = new PageData();
responsibility.put("RESPONSIBILITYDETAIL_ID", this.get32UUID()); //主键
responsibility.put("RESPONSIBILITY_ID", pd.getString("RESPONSIBILITY_ID")); //外键ID
responsibility.put("COLLATERAL", list.get(i).get("value"));
responsibility.put("SORTINDEX", list.get(i).get("index"));
responsibilityDetailsService.save(responsibility);
responsibilityDetailList.add(responsibility);
if (finalList.size() > 0) {
for (int j = 0;j<finalList.size();j++) {
if (list.get(i).getString("id").equals(finalList.get(j).getString("pid"))){
PageData responsibilityFinal = new PageData();
responsibilityFinal.put("RESPONSIBILITYFINAL_ID", this.get32UUID()); //主键
responsibilityFinal.put("RESPONSIBILITYDETAIL_ID", responsibility.getString("RESPONSIBILITYDETAIL_ID")); //主键
responsibilityFinal.put("RESPONSIBILITY_ID", pd.getString("RESPONSIBILITY_ID")); //外键ID
responsibilityFinal.put("FINALTEXT", finalList.get(j).get("value"));
responsibilityFinal.put("SORTINDEX", finalList.get(j).get("index"));
responsibilityFinalsService.save(responsibilityFinal);
}
}
}
}
pd.put("responsibilityDetailList", JSON.toJSONString(responsibilityDetailList));
}
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(pd));
return map;
}
/**
*
*
* @param page
* @throws Exception
*/
@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();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
page.setPd(pd);
List<PageData> varList = responsibilityService.list(page); //列出Notice列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/editdelete")
@ResponseBody
@DockAnnotation
public Object editdelete() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
responsibilityService.editdelete(pd);
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(pd));
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();
PageData responsibility = responsibilityService.findById(pd);
List<PageData> promistDetail = responsibilityDetailsService.findByResponsibilityId(pd);
List<PageData> promistDetailFinal = responsibilityFinalsService.findByResponsibilityId(pd);
map.put("promistDetailFinal",promistDetailFinal);
map.put("promistDetail", promistDetail);
map.put("varList", responsibility);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/edit")
@ResponseBody
@DockAnnotation
public Object edit() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //创建时间
responsibilityService.edit(pd);
responsibilityDetailsService.deleteResponsibilityId(pd);
ArrayList<PageData> responsibilityDetailList = new ArrayList<>();
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.getString("DETAIL"));
List<JSONObject> finalList = (List<JSONObject>) JSON.parse(pd.getString("FINAL"));
if (list.size() > 0) {
for (int i = 0; i < list.size(); i++) {
PageData responsibility = new PageData();
responsibility.put("RESPONSIBILITYDETAIL_ID", this.get32UUID()); //主键
responsibility.put("RESPONSIBILITY_ID", pd.getString("RESPONSIBILITY_ID")); //外键ID
responsibility.put("COLLATERAL", list.get(i).get("value"));
responsibility.put("SORTINDEX", list.get(i).get("index"));
responsibilityDetailsService.save(responsibility);
responsibilityDetailList.add(responsibility);
if (finalList.size() > 0) {
for (int j = 0;j<finalList.size();j++) {
if (list.get(i).getString("id").equals(finalList.get(j).getString("pid"))){
PageData responsibilityFinal = new PageData();
responsibilityFinal.put("RESPONSIBILITYFINAL_ID", this.get32UUID()); //主键
responsibilityFinal.put("RESPONSIBILITYDETAIL_ID", responsibility.getString("RESPONSIBILITYDETAIL_ID")); //主键
responsibilityFinal.put("RESPONSIBILITY_ID", pd.getString("RESPONSIBILITY_ID")); //外键ID
responsibilityFinal.put("FINALTEXT", finalList.get(j).get("value"));
responsibilityFinal.put("SORTINDEX", finalList.get(j).get("index"));
responsibilityFinalsService.save(responsibilityFinal);
}
}
}
}
}
pd.put("responsibilityDetailList", JSON.toJSONString(responsibilityDetailList));
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(pd));
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/delete")
@ResponseBody
@DockAnnotation
public Object delete() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
List<PageData> coverpeople = corpResponsibilityPeopleService.findByCoverResponsibilityId(pd); //被承诺人
List<PageData> people = corpResponsibilityPeopleService.findByResponsibilityId(pd);//承诺人
if (coverpeople.size() > 0) {
map.put("result", "fail");
map.put("msg", "该承诺书有被承诺人,删除失败!");
return map;
} else if (people.size() > 0) {
map.put("result", "fail");
map.put("msg", "该承诺书有承诺人,删除失败!");
return map;
} else {
responsibilityService.delete(pd); // 删除
}
map.put("dockData", JSON.toJSONString(pd));
map.put("result", errInfo);
return map;
}
}

View File

@ -0,0 +1,34 @@
package com.zcloud.mapper.datasource.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* shaojie
* 2021-03-26
* www.qdkjchina.com
*/
public interface CorpResponsibilityDetailsMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
List<PageData> findByResponsibilityId(PageData pd);
void deleteResponsibilityId(PageData pd);
PageData findByCoverPromiseId(PageData pd);
}

View File

@ -0,0 +1,32 @@
package com.zcloud.mapper.datasource.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* shaojie
* 2021-03-26
* www.qdkjchina.com
*/
public interface CorpResponsibilityFinalsMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
List<PageData> findByResponsibilityId(PageData pd);
void deleteResponsibilityId(PageData pd);
}

View File

@ -0,0 +1,46 @@
package com.zcloud.mapper.datasource.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* shaojie
* 2021-03-26
* www.qdkjchina.com
*/
public interface CorpResponsibilityMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
void editdelete(PageData pd);
PageData findById(PageData pd);
void edit(PageData pd);
List<PageData> dataAlllistPage(Page page);
List<PageData> collateralall(PageData pd);
List<PageData> collateralAllFinal(PageData pd);
void editpeople(PageData pd);
void delete(PageData pd);
void decPeoplenumInvolved(PageData pd);
}

View File

@ -0,0 +1,54 @@
package com.zcloud.mapper.datasource.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* shaojie
* 2021-03-26
* www.qdkjchina.com
*/
public interface CorpResponsibilityPeopleMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
void editdelete(PageData pd);
PageData findById(PageData pd);
void edit(PageData pd);
List<PageData> findByResponsibilityId(PageData pd);
void deleteResponsibilityId(PageData pd);
List<PageData> findByCoverResponsibilityId(PageData pd);
List<PageData> findByUserId(PageData pd);
void editSign(PageData pd);
List<PageData> ResponsibilitylistPage(Page page);
List<PageData> receiveResponsibilitylistPage(Page page);
void editIsRead(PageData pd);
void delete(PageData pd);
List<PageData> getListAllByResponsibilityId(PageData pd);
void removeUnsignedPeopleDetails(PageData pd);
}

View File

@ -0,0 +1,32 @@
package com.zcloud.mapper.datasource.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* shaojie
* 2021-03-26
* www.qdkjchina.com
*/
public interface ResponsibilityDetailsMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
List<PageData> findByResponsibilityId(PageData pd);
void deleteResponsibilityId(PageData pd);
}

View File

@ -0,0 +1,32 @@
package com.zcloud.mapper.datasource.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* shaojie
* 2021-03-26
* www.qdkjchina.com
*/
public interface ResponsibilityFinalsMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
List<PageData> findByResponsibilityId(PageData pd);
void deleteResponsibilityId(PageData pd);
}

View File

@ -0,0 +1,35 @@
package com.zcloud.mapper.datasource.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* shaojie
* 2021-03-26
* www.qdkjchina.com
*/
public interface ResponsibilityMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
void editdelete(PageData pd);
PageData findById(PageData pd);
void edit(PageData pd);
void delete(PageData pd);
}

View File

@ -0,0 +1,35 @@
package com.zcloud.service.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* yangming
* 2022-12-29
*/
public interface CorpResponsibilityDetailsService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/*
* @param pd
* @throws Exception
*/
List<PageData> findByResponsibilityId(PageData pd)throws Exception;
void deleteResponsibilityId(PageData pd)throws Exception;
}

View File

@ -0,0 +1,35 @@
package com.zcloud.service.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* yangming
* 2022-12-29
*/
public interface CorpResponsibilityFinalsService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/*
* @param pd
* @throws Exception
*/
List<PageData> findByResponsibilityId(PageData pd)throws Exception;
void deleteResponsibilityId(PageData pd)throws Exception;
}

View File

@ -0,0 +1,77 @@
package com.zcloud.service.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* yangming
* 2022-12-29
*/
public interface CorpResponsibilityPeopleService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**
* @param pd
* @throws Exception
*/
void editdelete(PageData pd)throws Exception;
/**ID
* @param pd
* @throws Exception
*/
PageData findById(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd)throws Exception;
List<PageData> findByResponsibilityId(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
void deleteResponsibilityId(PageData pd)throws Exception;
List<PageData> findByCoverResponsibilityId(PageData pd)throws Exception;
List<PageData> findByUserId(PageData pd)throws Exception;
void editSign(PageData pd)throws Exception;
List<PageData> responsibilitylist(Page page)throws Exception;
List<PageData> receiveResponsibilitylist(Page page)throws Exception;
void editIsRead(PageData pd)throws Exception;
/**
*
* @param pd
* @throws Exception
*/
void delete(PageData pd)throws Exception;
List<PageData> getListAllByResponsibilityId(PageData pd)throws Exception;
void removeUnsignedPeopleDetails(PageData pd);
}

View File

@ -0,0 +1,59 @@
package com.zcloud.service.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* yangming
* 2022-12-29
*/
public interface CorpResponsibilityService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**
* @param pd
* @throws Exception
*/
void editdelete(PageData pd)throws Exception;
/**ID
* @param pd
* @throws Exception
*/
PageData findById(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd)throws Exception;
List<PageData> listAll(Page page)throws Exception;
List<PageData> collateralall(PageData pd)throws Exception;
List<PageData> collateralAllFinal(PageData pd) throws Exception;
void editpeople(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd)throws Exception;
}

View File

@ -0,0 +1,35 @@
package com.zcloud.service.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* yangming
* 2022-12-29
*/
public interface ResponsibilityDetailsService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/*
* @param pd
* @throws Exception
*/
List<PageData> findByResponsibilityId(PageData pd)throws Exception;
void deleteResponsibilityId(PageData pd)throws Exception;
}

View File

@ -0,0 +1,35 @@
package com.zcloud.service.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* yangming
* 2022-12-29
*/
public interface ResponsibilityFinalsService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/*
* @param pd
* @throws Exception
*/
List<PageData> findByResponsibilityId(PageData pd)throws Exception;
void deleteResponsibilityId(PageData pd)throws Exception;
}

View File

@ -0,0 +1,50 @@
package com.zcloud.service.bus;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
* yangming
* 2022-12-29
*/
public interface ResponsibilityService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**
* @param pd
* @throws Exception
*/
void editdelete(PageData pd)throws Exception;
/**ID
* @param pd
* @throws Exception
*/
PageData findById(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd)throws Exception;
/**,
* @param pd
* @throws Exception
*/
void delete(PageData pd)throws Exception;
}

View File

@ -0,0 +1,47 @@
package com.zcloud.service.bus.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.bus.CorpResponsibilityDetailsMapper;
import com.zcloud.service.bus.CorpResponsibilityDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* yangming
* 2022-12-29
*/
@Service
@Transactional //开启事物
public class CorpResponsibilityDetailsServiceImpl implements CorpResponsibilityDetailsService {
@Autowired
private CorpResponsibilityDetailsMapper corpPromiseDetailsMapper;
@Override
public void save(PageData pd) throws Exception {
corpPromiseDetailsMapper.save(pd);
}
@Override
public List<PageData> list(Page page) throws Exception {
return corpPromiseDetailsMapper.datalistPage(page);
}
@Override
public List<PageData> findByResponsibilityId(PageData pd) throws Exception {
return corpPromiseDetailsMapper.findByResponsibilityId(pd);
}
@Override
public void deleteResponsibilityId(PageData pd) throws Exception {
corpPromiseDetailsMapper.deleteResponsibilityId(pd);
}
}

View File

@ -0,0 +1,46 @@
package com.zcloud.service.bus.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.bus.CorpResponsibilityFinalsMapper;
import com.zcloud.service.bus.CorpResponsibilityFinalsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* yangming
* 2022-12-29
*/
@Service
@Transactional //开启事物
public class CorpResponsibilityFinalsServiceImpl implements CorpResponsibilityFinalsService {
@Autowired
private CorpResponsibilityFinalsMapper corpResponsibilityFinalsMapper;
@Override
public void save(PageData pd) throws Exception {
corpResponsibilityFinalsMapper.save(pd);
}
@Override
public List<PageData> list(Page page) throws Exception {
return corpResponsibilityFinalsMapper.datalistPage(page);
}
@Override
public List<PageData> findByResponsibilityId(PageData pd) throws Exception {
return corpResponsibilityFinalsMapper.findByResponsibilityId(pd);
}
@Override
public void deleteResponsibilityId(PageData pd) throws Exception {
corpResponsibilityFinalsMapper.deleteResponsibilityId(pd);
}
}

View File

@ -0,0 +1,115 @@
package com.zcloud.service.bus.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.bus.CorpPromiseMapper;
import com.zcloud.mapper.datasource.bus.CorpResponsibilityPeopleMapper;
import com.zcloud.service.bus.CorpResponsibilityPeopleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* yangming
* 2022-12-29
*/
@Service
@Transactional //开启事物
public class CorpResponsibilityPeopleServiceImpl implements CorpResponsibilityPeopleService {
@Autowired
private CorpResponsibilityPeopleMapper corpPromisePeopleMapper;
@Autowired
private CorpPromiseMapper corpPromiseMapper;
@Override
public void save(PageData pd) throws Exception {
corpPromisePeopleMapper.save(pd);
}
@Override
public List<PageData> list(Page page) throws Exception {
return corpPromisePeopleMapper.datalistPage(page);
}
@Override
public void editdelete(PageData pd) throws Exception {
corpPromisePeopleMapper.editdelete(pd);
}
@Override
public PageData findById(PageData pd) throws Exception {
return corpPromisePeopleMapper.findById(pd);
}
@Override
public void edit(PageData pd) throws Exception {
corpPromisePeopleMapper.edit(pd);
}
@Override
public List<PageData> findByResponsibilityId(PageData pd) throws Exception {
return corpPromisePeopleMapper.findByResponsibilityId(pd);
}
@Override
public void deleteResponsibilityId(PageData pd) throws Exception {
corpPromisePeopleMapper.deleteResponsibilityId(pd);
}
@Override
public List<PageData> findByCoverResponsibilityId(PageData pd) throws Exception {
return corpPromisePeopleMapper.findByCoverResponsibilityId(pd);
}
@Override
public List<PageData> findByUserId(PageData pd) throws Exception {
return corpPromisePeopleMapper.findByUserId(pd);
}
@Override
public void editSign(PageData pd) throws Exception {
corpPromisePeopleMapper.editSign(pd);
}
@Override
public List<PageData> responsibilitylist(Page page) throws Exception {
return corpPromisePeopleMapper.ResponsibilitylistPage(page);
}
@Override
public List<PageData> receiveResponsibilitylist(Page page) throws Exception {
return corpPromisePeopleMapper.receiveResponsibilitylistPage(page);
}
@Override
public void editIsRead(PageData pd) throws Exception {
corpPromisePeopleMapper.editIsRead(pd);
}
/**
*
* @param pd
* @throws Exception
*/
public void delete(PageData pd) throws Exception {
corpPromisePeopleMapper.delete(pd);
}
public List<PageData> getListAllByResponsibilityId(PageData pd) throws Exception {
return corpPromisePeopleMapper.getListAllByResponsibilityId(pd);
}
@Override
public void removeUnsignedPeopleDetails(PageData pd) {
// PROMISEPEOPLE_ID
corpPromisePeopleMapper.removeUnsignedPeopleDetails(pd);
// PROMISE_ID
corpPromiseMapper.decPeoplenumInvolved(pd);
}
}

View File

@ -0,0 +1,74 @@
package com.zcloud.service.bus.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.bus.CorpResponsibilityMapper;
import com.zcloud.service.bus.CorpResponsibilityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* yangming
* 2022-12-29
*/
@Service
@Transactional //开启事物
public class CorpResponsibilityServiceImpl implements CorpResponsibilityService {
@Autowired
private CorpResponsibilityMapper corpPromiseMapper;
@Override
public void save(PageData pd) throws Exception {
corpPromiseMapper.save(pd);
}
@Override
public List<PageData> list(Page page) throws Exception {
return corpPromiseMapper.datalistPage(page);
}
@Override
public void editdelete(PageData pd) throws Exception {
corpPromiseMapper.editdelete(pd);
}
@Override
public PageData findById(PageData pd) throws Exception {
return corpPromiseMapper.findById(pd);
}
@Override
public void edit(PageData pd) throws Exception {
corpPromiseMapper.edit(pd);
}
@Override
public List<PageData> listAll(Page page) throws Exception {
return corpPromiseMapper.dataAlllistPage(page);
}
@Override
public List<PageData> collateralall(PageData pd) throws Exception {
return corpPromiseMapper.collateralall(pd);
}
@Override
public List<PageData> collateralAllFinal(PageData pd) throws Exception {
return corpPromiseMapper.collateralAllFinal(pd);
}
@Override
public void editpeople(PageData pd) throws Exception {
corpPromiseMapper.editpeople(pd);
}
public void delete(PageData pd) throws Exception {
corpPromiseMapper.delete(pd);
}
}

View File

@ -0,0 +1,46 @@
package com.zcloud.service.bus.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.bus.ResponsibilityDetailsMapper;
import com.zcloud.service.bus.ResponsibilityDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* yangming
* 2022-12-29
*/
@Service
@Transactional //开启事物
public class ResponsibilityDetailsServiceImpl implements ResponsibilityDetailsService {
@Autowired
private ResponsibilityDetailsMapper responsibilityDetailsMapper;
@Override
public void save(PageData pd) throws Exception {
responsibilityDetailsMapper.save(pd);
}
@Override
public List<PageData> list(Page page) throws Exception {
return responsibilityDetailsMapper.datalistPage(page);
}
@Override
public List<PageData> findByResponsibilityId(PageData pd) throws Exception {
return responsibilityDetailsMapper.findByResponsibilityId(pd);
}
@Override
public void deleteResponsibilityId(PageData pd) throws Exception {
responsibilityDetailsMapper.deleteResponsibilityId(pd);
}
}

View File

@ -0,0 +1,46 @@
package com.zcloud.service.bus.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.bus.ResponsibilityFinalsMapper;
import com.zcloud.service.bus.ResponsibilityFinalsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* yangming
* 2022-12-29
*/
@Service
@Transactional //开启事物
public class ResponsibilityFinalsServiceImpl implements ResponsibilityFinalsService {
@Autowired
private ResponsibilityFinalsMapper responsibilityFinalsMapper;
@Override
public void save(PageData pd) throws Exception {
responsibilityFinalsMapper.save(pd);
}
@Override
public List<PageData> list(Page page) throws Exception {
return responsibilityFinalsMapper.datalistPage(page);
}
@Override
public List<PageData> findByResponsibilityId(PageData pd) throws Exception {
return responsibilityFinalsMapper.findByResponsibilityId(pd);
}
@Override
public void deleteResponsibilityId(PageData pd) throws Exception {
responsibilityFinalsMapper.deleteResponsibilityId(pd);
}
}

View File

@ -0,0 +1,59 @@
package com.zcloud.service.bus.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.bus.ResponsibilityMapper;
import com.zcloud.service.bus.ResponsibilityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
* yangming
* 2022-12-29
*/
@Service
@Transactional //开启事物
public class ResponsibilityServiceImpl implements ResponsibilityService {
@Autowired
private ResponsibilityMapper responsibilityMapper;
@Override
public void save(PageData pd) throws Exception {
responsibilityMapper.save(pd);
}
@Override
public List<PageData> list(Page page) throws Exception {
return responsibilityMapper.datalistPage(page);
}
@Override
public void editdelete(PageData pd) throws Exception {
responsibilityMapper.editdelete(pd);
}
@Override
public PageData findById(PageData pd) throws Exception {
return responsibilityMapper.findById(pd);
}
@Override
public void edit(PageData pd) throws Exception {
responsibilityMapper.edit(pd);
}
/**,
* @param pd
* @throws Exception
*/
@Override
public void delete(PageData pd)throws Exception{
responsibilityMapper.delete(pd);
}
}

View File

@ -0,0 +1,90 @@
<?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.bus.CorpResponsibilityDetailsMapper">
<!--表名 -->
<sql id="tableName">
BUS_CORPRESPONSIBILITY_DETAILS
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
`qa-cmt-prevention`.sys_dictionaries
</sql>
<!-- 字段 -->
<sql id="Field">
f.RESPONSIBILITYDETAIL_ID,
f.RESPONSIBILITY_ID,
f.COLLATERAL,
f.SORTINDEX
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
RESPONSIBILITYDETAIL_ID,
RESPONSIBILITY_ID,
COLLATERAL,
SORTINDEX
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{RESPONSIBILITYDETAIL_ID},
#{RESPONSIBILITY_ID},
#{COLLATERAL},
#{SORTINDEX}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>,d.NAME
from
<include refid="tableName"></include> f
left join
<include refid="dicTableName"></include> d on f.LEVEL = d.BIANMA
where 1=1
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
</if>
<if test="pd.CREATOR != null and pd.CREATOR != ''"><!-- 关键词检索 -->
</if>
order by CREATTIME desc
</select>
<!-- 列表 -->
<select id="findByResponsibilityId" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where 1=1
<if test="RESPONSIBILITY_ID != null and RESPONSIBILITY_ID != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</if>
ORDER BY f.SORTINDEX asc
</select>
<!-- 删除-->
<delete id="deleteResponsibilityId" parameterType="pd">
delete from
<include refid="tableName"></include>
where
RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</delete>
</mapper>

View File

@ -0,0 +1,95 @@
<?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.bus.CorpResponsibilityFinalsMapper">
<!--表名 -->
<sql id="tableName">
`qa-cmt-prevention`.BUS_CORPRESPONSIBILITY_FINAL
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
`qa-cmt-prevention`.sys_dictionaries
</sql>
<!-- 字段 -->
<sql id="Field">
f.RESPONSIBILITYFINAL_ID,
f.RESPONSIBILITYDETAIL_ID,
f.RESPONSIBILITY_ID,
f.FINALTEXT,
f.SORTINDEX
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
RESPONSIBILITYFINAL_ID,
RESPONSIBILITYDETAIL_ID,
RESPONSIBILITY_ID,
FINALTEXT,
SORTINDEX
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{RESPONSIBILITYFINAL_ID},
#{RESPONSIBILITYDETAIL_ID},
#{RESPONSIBILITY_ID},
#{FINALTEXT},
#{SORTINDEX}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>,d.NAME
from
<include refid="tableName"></include> f
left join
<include refid="dicTableName"></include> d on f.LEVEL = d.BIANMA
where 1=1
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
</if>
<if test="pd.CREATOR != null and pd.CREATOR != ''"><!-- 关键词检索 -->
</if>
order by CREATTIME desc
</select>
<!-- 列表 -->
<select id="findByResponsibilityId" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where 1=1
<if test="RESPONSIBILITY_ID != null and RESPONSIBILITY_ID != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</if>
<if test="RESPONSIBILITYDETAIL_ID != null and RESPONSIBILITYDETAIL_ID != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITYDETAIL_ID = #{RESPONSIBILITYDETAIL_ID}
</if>
ORDER BY f.SORTINDEX asc
</select>
<!-- 删除-->
<delete id="deleteResponsibilityId" parameterType="pd">
delete from
<include refid="tableName"></include>
where
RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</delete>
</mapper>

View File

@ -0,0 +1,248 @@
<?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.bus.CorpResponsibilityMapper">
<!--表名 -->
<sql id="tableName">
BUS_CORPRESPONSIBILITY
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
`qa-cmt-prevention`.sys_dictionaries
</sql>
<!-- 字段 -->
<sql id="Field">
f.RESPONSIBILITY_ID,
f.RESPONSIBILITY_NAME,
f.RESPONSIBILITY_TERM_START,
f.RESPONSIBILITY_TERM_END,
f.LEVEL,
f.PEOPLENUM_INVOLVED,
f.CORPINFO_ID,
f.STATE,
f.ISDELETE,
f.CREATOR,
f.CREATTIME,
f.OPERATOR,
f.OPERATTIME,
f.TEXT,
f.TYPE,
f.RELEASE_PLATFORM
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
RESPONSIBILITY_ID,
RESPONSIBILITY_NAME,
RESPONSIBILITY_TERM_START,
RESPONSIBILITY_TERM_END,
LEVEL,
PEOPLENUM_INVOLVED,
CORPINFO_ID,
STATE,
ISDELETE,
CREATOR,
CREATTIME,
OPERATOR,
OPERATTIME,
TEXT,
TYPE,
RELEASE_PLATFORM
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{RESPONSIBILITY_ID},
#{RESPONSIBILITY_NAME},
#{RESPONSIBILITY_TERM_START},
#{RESPONSIBILITY_TERM_END},
#{LEVEL},
#{PEOPLENUM_INVOLVED},
#{CORPINFO_ID},
#{STATE},
#{ISDELETE},
#{CREATOR},
#{CREATTIME},
#{OPERATOR},
#{OPERATTIME},
#{TEXT},
#{TYPE},
#{RELEASE_PLATFORM}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<update id="decPeoplenumInvolved">
update <include refid="tableName"></include> set PEOPLENUM_INVOLVED = PEOPLENUM_INVOLVED - 1 where RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</update>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>,
d.NAME as LEVELNAME,
GROUP_CONCAT(DISTINCT dept.NAME) as DEPTNAME,
GROUP_CONCAT(DISTINCT post.NAME) as POSTNAME,
(select COUNT(*) from BUS_CORPRESPONSIBILITY_PEOPLE a WHERE a.ISSIGN = 1 and ISDELETE = 0 AND a.RESPONSIBILITY_ID = f.RESPONSIBILITY_ID ) as ISSIGN
from
<include refid="tableName"></include> f
left join
<include refid="dicTableName"></include> d on f.LEVEL = d.BIANMA and d.PARENT_ID = '8c5064693fba4dbca1cbfea631cd097a'
left JOIN (SELECT DISTINCT RESPONSIBILITY_ID from BUS_CORPRESPONSIBILITY_PEOPLE where ISDELETE = 0
<if test="pd.DEPARTMENT_IDS != null and pd.DEPARTMENT_IDS != '' "><!-- 关键词检索 -->
and DEPARTMENT_ID in (${pd.DEPARTMENT_IDS})
</if>
) t on f.RESPONSIBILITY_ID = t.RESPONSIBILITY_ID
left join BUS_CORPRESPONSIBILITY_PEOPLE people on people.RESPONSIBILITY_ID = t.RESPONSIBILITY_ID
left join OA_DEPARTMENT dept on dept.DEPARTMENT_ID = people.DEPARTMENT_ID
left join SYS_POST post on post.POST_ID = people.POST_ID
left join sys_user creUser on creUser.USER_ID = f.CREATOR
where 1=1 and f.CORPINFO_ID = #{pd.CORPINFO_ID} and f.ISDELETE = 0
<if test="pd.roleLevel != null and pd.roleLevel != ''"><!-- 权限显示 -->
<choose>
<when test='pd.roleLevel == "0"'>
</when>
<when test='pd.roleLevel == "1"'>
and creUser.DEPARTMENT_ID in (${pd.supDeparIds})
</when>
<when test='pd.roleLevel == "2"'>
and creUser.USER_ID = #{pd.loginUserId}
</when>
</choose>
</if>
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITY_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
</if>
<if test="pd.LEVEL != null and pd.LEVEL != ''"><!-- 关键词检索 -->
and f.LEVEL = #{pd.LEVEL}
</if>
<if test="pd.STATUS != null and pd.STATUS != ''"><!-- 关键词检索 -->
and f.STATE = #{pd.STATUS}
</if>
<if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''"><!-- 关键词检索 -->
and dept.DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
</if>
and dept.`NAME` is not null
GROUP BY
f.RESPONSIBILITY_ID
order by CREATTIME desc
</select>
<!-- 禁用启用-->
<delete id="editdelete" parameterType="pd">
update
<include refid="tableName"></include>
set
STATE = #{STATE}
where
RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</delete>
<!-- 列表 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>,d.NAME as LEVELNAME
from
<include refid="tableName"></include> f
left join
<include refid="dicTableName"></include> d on f.LEVEL = d.BIANMA
where 1=1
<if test="RESPONSIBILITY_ID != null and RESPONSIBILITY_ID != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</if>
order by CREATTIME desc
</select>
<!-- 修改承诺书-->
<delete id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = #{ISDELETE},
OPERATTIME = #{OPERATTIME},
RESPONSIBILITY_NAME =#{RESPONSIBILITY_NAME},
LEVEL = #{LEVEL},
TEXT = #{TEXT},
RESPONSIBILITY_TERM_START = #{RESPONSIBILITY_TERM_START},
RESPONSIBILITY_TERM_END = #{RESPONSIBILITY_TERM_END}
where
RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</delete>
<!-- 列表 -->
<select id="dataAlllistPage" parameterType="page" resultType="pd">
select
f.RESPONSIBILITY_ID,f.RESPONSIBILITY_NAME,f.TEXT,f.TYPE
from
`qa-cmt-regulatory`.BUS_RESPONSIBILITY f
where 1=1 and f.ISDELETE = 0
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITY_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
</if>
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
and( f.CORPINFO_ID = #{pd.CORPINFO_ID} or f.CORPINFO_ID is null)
</if>
order by CREATTIME desc
</select>
<!-- 副文列表 -->
<select id="collateralall" parameterType="page" resultType="pd">
select
f.RESPONSIBILITYDETAIL_ID,
f.RESPONSIBILITY_ID,
f.COLLATERAL
from
`qa-cmt-regulatory`.BUS_RESPONSIBILITY_DETAILS f
<if test="RESPONSIBILITY_ID != null and RESPONSIBILITY_ID != ''"><!-- 关键词检索 -->
where f.RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</if>
ORDER BY f.SORTINDEX asc
</select>
<!-- 副文列表 -->
<select id="collateralAllFinal" parameterType="page" resultType="pd">
select
f.RESPONSIBILITYFINAL_ID,
f.RESPONSIBILITYDETAIL_ID,
f.RESPONSIBILITY_ID,
f.FINALTEXT
from
`qa-cmt-regulatory`.bus_responsibility_final f
<if test="RESPONSIBILITY_ID != null and RESPONSIBILITY_ID != ''"><!-- 关键词检索 -->
where f.RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</if>
ORDER BY f.SORTINDEX asc
</select>
<!-- 修改涉及人数-->
<delete id="editpeople" parameterType="pd">
update
<include refid="tableName"></include>
set
PEOPLENUM_INVOLVED = #{PEOPLENUM_INVOLVED}
where
RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</delete>
<delete id="delete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = 1
where
RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</delete>
</mapper>

View File

@ -0,0 +1,290 @@
<?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.bus.CorpResponsibilityPeopleMapper">
<!--表名 -->
<sql id="tableName">
BUS_CORPRESPONSIBILITY_PEOPLE
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
`qa-cmt-prevention`.sys_dictionaries
</sql>
<!-- 字段 -->
<sql id="Field">
f.RESPONSIBILITYPEOPLE_ID,
f.RESPONSIBILITY_ID,
f.DEPARTMENT_ID,
f.POST_ID,
f.USER_ID,
f.ISSIGN,
f.SIGNTIME,
f.CORPINFO_ID,
f.FILEPATH,
f.ISRESPONSIBILITY_PEOPLE,
f.ISREAD
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
RESPONSIBILITYPEOPLE_ID,
RESPONSIBILITY_ID,
DEPARTMENT_ID,
POST_ID,
USER_ID,
ISSIGN,
SIGNTIME,
CORPINFO_ID,
FILEPATH,
ISRESPONSIBILITY_PEOPLE,
ISREAD
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{RESPONSIBILITYPEOPLE_ID},
#{RESPONSIBILITY_ID},
#{DEPARTMENT_ID},
#{POST_ID},
#{USER_ID},
#{ISSIGN},
#{SIGNTIME},
#{CORPINFO_ID},
#{FILEPATH},
#{ISRESPONSIBILITY_PEOPLE},
#{ISREAD}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>,u.NAME USERNAME,d.NAME DEPTNAME,p.NAME POST_NAME
from
<include refid="tableName"></include> f
left join
SYS_USER u on u.USER_ID = f.USER_ID
left join
OA_DEPARTMENT d on d.DEPARTMENT_ID = f.DEPARTMENT_ID
left join
SYS_POST p on p.POST_ID = f.POST_ID
where 1=1 and f.ISDELETE =0
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITY_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
</if>
<if test="pd.RESPONSIBILITY_ID != null and pd.RESPONSIBILITY_ID != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITY_ID = #{pd.RESPONSIBILITY_ID}
</if>
<if test="pd.ISRESPONSIBILITY_PEOPLE != null and pd.ISRESPONSIBILITY_PEOPLE != ''"><!-- 关键词检索 -->
and f.ISRESPONSIBILITY_PEOPLE = #{pd.ISRESPONSIBILITY_PEOPLE}
</if>
</select>
<!-- 禁用启用-->
<delete id="editdelete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = #{ISDELETE}
where
RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</delete>
<!-- 列表 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where 1=1
<if test="RESPONSIBILITYPEOPLE_ID != null and RESPONSIBILITYPEOPLE_ID != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITYPEOPLE_ID = #{RESPONSIBILITYPEOPLE_ID}
</if>
</select>
<!-- 修改承诺书-->
<delete id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = #{ISDELETE},
OPERATTIME = #{OPERATTIME},
RESPONSIBILITY_NAME =#{RESPONSIBILITY_NAME},
LEVEL = #{LEVEL},
TEXT = #{TEXT}
where
RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</delete>
<!-- 承诺人列表 -->
<select id="findByResponsibilityId" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>,u.NAME as USERNAME,o.NAME as DEPTNAME,p.NAME as POSTNAME
from
<include refid="tableName"></include> f
left join SYS_USER u on u.USER_ID = f.USER_ID
left join OA_DEPARTMENT o on o.DEPARTMENT_ID = f.DEPARTMENT_ID
left join SYS_POST p on p.POST_ID = f.POST_ID
where 1=1 and f.ISRESPONSIBILITY_PEOPLE = '0' and f.ISDELETE =0
<if test="RESPONSIBILITY_ID != null and RESPONSIBILITY_ID != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</if>
<if test="ISSIGN != null and ISSIGN != ''"><!-- 关键词检索 -->
and f.ISSIGN = #{ISSIGN}
</if>
order by p.POST_ID, CREATTIME desc
</select>
<!-- 承诺人列表 -->
<select id="findByCoverResponsibilityId" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>,u.NAME as USERNAME,o.NAME as DEPTNAME,p.NAME as POSTNAME
from
<include refid="tableName"></include> f
left join
vi_user_all u on u.USER_ID = f.USER_ID
left join
OA_DEPARTMENT o on o.DEPARTMENT_ID = f.DEPARTMENT_ID
left join
SYS_POST p on p.POST_ID = f.POST_ID
where 1=1 and f.ISRESPONSIBILITY_PEOPLE = '1' and f.ISDELETE =0
<if test="RESPONSIBILITY_ID != null and RESPONSIBILITY_ID != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</if>
order by CREATTIME desc
</select>
<select id="findByUserId" parameterType="pd" resultType="pd">
select
*
from
<include refid="tableName"></include> f
left join bus_corpresponsibility c on c.RESPONSIBILITY_ID = f.RESPONSIBILITY_ID
where 1=1 and f.ISRESPONSIBILITY_PEOPLE = '0'
and f.ISDELETE =0
and f.ISSIGN = 0
and c.STATE = 0
and f.USER_ID = #{USER_ID}
</select>
<!-- 删除-->
<delete id="deleteResponsibilityId" parameterType="pd">
delete from
<include refid="tableName"></include>
where
RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</delete>
<update id="editSign" parameterType="pd">
update
<include refid="tableName"></include>
set
FILEPATH = #{FILEPATH},
SIGNTIME = #{SIGNTIME},
ISSIGN =#{ISSIGN},
ISREAD = #{ISREAD}
where
RESPONSIBILITYPEOPLE_ID = #{RESPONSIBILITYPEOPLE_ID}
</update>
<!-- 列表 -->
<select id="ResponsibilitylistPage" parameterType="page" resultType="pd">
select
f.RESPONSIBILITYPEOPLE_ID,
u.NAME,
f.SIGNTIME,
f.RESPONSIBILITY_ID,
(select u.NAME from bus_corpresponsibility_people c left join vi_user_all u on c.USER_ID = u.USER_ID where c.ISRESPONSIBILITY_PEOPLE = '1' and f.RESPONSIBILITY_ID=c.RESPONSIBILITY_ID) as coverpeople
from
<include refid="tableName"></include> f
left join
vi_user_all u on u.USER_ID = f.USER_ID
where 1=1 and f.ISSIGN = 1 and f.ISDELETE =0
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITY_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
</if>
<if test="pd.USER_ID != null and pd.USER_ID != ''"><!-- 关键词检索 -->
and f.USER_ID = #{pd.USER_ID}
</if>
AND f.ISRESPONSIBILITY_PEOPLE = '0'
ORDER BY f.SIGNTIME desc
</select>
<!-- 接收承诺列表 -->
<select id="receiveResponsibilitylistPage" parameterType="page" resultType="pd">
select
f.RESPONSIBILITYPEOPLE_ID,
u.NAME,
f.SIGNTIME,
f.RESPONSIBILITY_ID,
f.ISREAD,
(select u.NAME from bus_corpresponsibility_people c left join vi_user_all u on c.USER_ID = u.USER_ID where c.ISRESPONSIBILITY_PEOPLE = '1' and f.RESPONSIBILITY_ID=c.RESPONSIBILITY_ID) as coverpeople
from
<include refid="tableName"></include> f
left join
vi_user_all u on u.USER_ID = f.USER_ID
where f.RESPONSIBILITY_ID in (select RESPONSIBILITY_ID from bus_corpresponsibility_people where USER_ID = #{pd.USER_ID} and ISRESPONSIBILITY_PEOPLE = '1')
and f.ISSIGN = 1 and f.ISDELETE =0
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITY_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
</if>
AND f.ISRESPONSIBILITY_PEOPLE = '0'
ORDER BY f.SIGNTIME desc
</select>
<update id="editIsRead" parameterType="pd">
update
<include refid="tableName"></include>
set
ISREAD = #{ISREAD}
where
RESPONSIBILITYPEOPLE_ID = #{RESPONSIBILITYPEOPLE_ID}
</update>
<update id="delete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = 1
where
RESPONSIBILITYPEOPLE_ID = #{RESPONSIBILITYPEOPLE_ID}
</update>
<update id="removeUnsignedPeopleDetails">
update
<include refid="tableName"></include>
set
ISDELETE = 1
where
RESPONSIBILITYPEOPLE_ID = #{RESPONSIBILITYPEOPLE_ID}
</update>
<!-- 承诺人列表 -->
<select id="getListAllByResponsibilityId" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where 1=1
<if test="RESPONSIBILITY_ID != null and RESPONSIBILITY_ID != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</if>
<if test="ISSIGN != null and ISSIGN != ''"><!-- 关键词检索 -->
and f.ISSIGN = #{ISSIGN}
</if>
</select>
</mapper>

View File

@ -0,0 +1,89 @@
<?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.bus.ResponsibilityDetailsMapper">
<!--表名 -->
<sql id="tableName">
`qa-cmt-regulatory`.BUS_RESPONSIBILITY_DETAILS
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
`qa-cmt-prevention`.sys_dictionaries
</sql>
<!-- 字段 -->
<sql id="Field">
f.RESPONSIBILITYDETAIL_ID,
f.RESPONSIBILITY_ID,
f.COLLATERAL,
f.SORTINDEX
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
RESPONSIBILITYDETAIL_ID,
RESPONSIBILITY_ID,
COLLATERAL,
SORTINDEX
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{RESPONSIBILITYDETAIL_ID},
#{RESPONSIBILITY_ID},
#{COLLATERAL},
#{SORTINDEX}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>,d.NAME
from
<include refid="tableName"></include> f
left join
<include refid="dicTableName"></include> d on f.LEVEL = d.BIANMA
where 1=1
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
</if>
<if test="pd.CREATOR != null and pd.CREATOR != ''"><!-- 关键词检索 -->
</if>
order by CREATTIME desc
</select>
<!-- 列表 -->
<select id="findByResponsibilityId" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where 1=1
<if test="RESPONSIBILITY_ID != null and RESPONSIBILITY_ID != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</if>
ORDER BY f.SORTINDEX asc
</select>
<!-- 删除-->
<delete id="deleteResponsibilityId" parameterType="pd">
delete from
<include refid="tableName"></include>
where
RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</delete>
</mapper>

View File

@ -0,0 +1,95 @@
<?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.bus.ResponsibilityFinalsMapper">
<!--表名 -->
<sql id="tableName">
`qa-cmt-regulatory`.BUS_RESPONSIBILITY_FINAL
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
`qa-cmt-prevention`.sys_dictionaries
</sql>
<!-- 字段 -->
<sql id="Field">
f.RESPONSIBILITYFINAL_ID,
f.RESPONSIBILITYDETAIL_ID,
f.RESPONSIBILITY_ID,
f.FINALTEXT,
f.SORTINDEX
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
RESPONSIBILITYFINAL_ID,
RESPONSIBILITYDETAIL_ID,
RESPONSIBILITY_ID,
FINALTEXT,
SORTINDEX
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{RESPONSIBILITYFINAL_ID},
#{RESPONSIBILITYDETAIL_ID},
#{RESPONSIBILITY_ID},
#{FINALTEXT},
#{SORTINDEX}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>,d.NAME
from
<include refid="tableName"></include> f
left join
<include refid="dicTableName"></include> d on f.LEVEL = d.BIANMA
where 1=1
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
</if>
<if test="pd.CREATOR != null and pd.CREATOR != ''"><!-- 关键词检索 -->
</if>
order by CREATTIME desc
</select>
<!-- 列表 -->
<select id="findByResponsibilityId" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where 1=1
<if test="RESPONSIBILITY_ID != null and RESPONSIBILITY_ID != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</if>
<if test="RESPONSIBILITYDETAIL_ID != null and RESPONSIBILITYDETAIL_ID != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITYDETAIL_ID = #{RESPONSIBILITYDETAIL_ID}
</if>
ORDER BY f.SORTINDEX asc
</select>
<!-- 删除-->
<delete id="deleteResponsibilityId" parameterType="pd">
delete from
<include refid="tableName"></include>
where
RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</delete>
</mapper>

View File

@ -0,0 +1,140 @@
<?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.bus.ResponsibilityMapper">
<!--表名 -->
<sql id="tableName">
`qa-cmt-regulatory`.BUS_RESPONSIBILITY
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
`qa-cmt-prevention`.sys_dictionaries
</sql>
<!-- 字段 -->
<sql id="Field">
f.RESPONSIBILITY_ID,
f.RESPONSIBILITY_NAME,
f.LEVEL,
f.TEXT,
f.ISDELETE,
f.CREATOR,
f.CREATTIME,
f.OPERATOR,
f.OPERATTIME,
f.CORPINFO_ID,
f.TYPE
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
RESPONSIBILITY_ID,
RESPONSIBILITY_NAME,
LEVEL,
TEXT,
ISDELETE,
CREATOR,
CREATTIME,
OPERATOR,
OPERATTIME,
CORPINFO_ID,
TYPE
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{RESPONSIBILITY_ID},
#{RESPONSIBILITY_NAME},
#{LEVEL},
#{TEXT},
#{ISDELETE},
#{CREATOR},
#{CREATTIME},
#{OPERATOR},
#{OPERATTIME},
#{CORPINFO_ID},
#{TYPE}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>,d.NAME as LEVELNAME
from
<include refid="tableName"></include> f
left join
<include refid="dicTableName"></include> d on f.LEVEL = d.BIANMA
where 1=1
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITY_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
</if>
<if test="pd.CREATOR != null and pd.CREATOR != ''"><!-- 关键词检索 -->
</if>
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
and( f.CORPINFO_ID = #{pd.CORPINFO_ID} or f.CORPINFO_ID is null)
</if>
order by CREATTIME desc
</select>
<!-- 禁用启用-->
<delete id="editdelete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = #{ISDELETE}
where
RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</delete>
<!-- 列表 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>,d.NAME as LEVELNAME
from
<include refid="tableName"></include> f
left join
<include refid="dicTableName"></include> d on f.LEVEL = d.BIANMA
where 1=1
<if test="RESPONSIBILITY_ID != null and RESPONSIBILITY_ID != ''"><!-- 关键词检索 -->
and f.RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</if>
order by CREATTIME desc
</select>
<!-- 修改承诺书-->
<delete id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = #{ISDELETE},
OPERATTIME = #{OPERATTIME},
RESPONSIBILITY_NAME =#{RESPONSIBILITY_NAME},
LEVEL = #{LEVEL},
<if test="TYPE != null and TYPE != ''"><!-- 类型 -->
TYPE = #{TYPE},
</if>
TEXT = #{TEXT}
where
RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</delete>
<delete id="delete" parameterType="pd">
delete from
<include refid="tableName"></include>
where
RESPONSIBILITY_ID = #{RESPONSIBILITY_ID}
</delete>
</mapper>