diff --git a/src/main/java/com/zcloud/controller/app/AppResponsibilityController.java b/src/main/java/com/zcloud/controller/app/AppResponsibilityController.java new file mode 100644 index 00000000..2a980926 --- /dev/null +++ b/src/main/java/com/zcloud/controller/app/AppResponsibilityController.java @@ -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 map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + List 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 map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + List varList = corpResponsibilityPeopleService.findByUserId(pd); //查询是否有未签字数据 + if(varList.size()>0){ + pd.put("RESPONSIBILITY_ID",varList.get(0).getString("RESPONSIBILITY_ID")); + PageData TEXT = corpResponsibilityService.findById(pd); + List COLLATERAL = corpResponsibilityDetailsService.findByResponsibilityId(pd); + List FINALTEXT = corpResponsibilityFinalsService.findByResponsibilityId(pd); //细则 + List 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 map = new HashMap(); + 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 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 map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + page.setPd(pd); + List 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 map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + page.setPd(pd); + List 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 map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData responsibility = corpResponsibilityService.findById(pd); + List promistDetail = corpResponsibilityDetailsService.findByResponsibilityId(pd); + List promistFinal = corpResponsibilityFinalsService.findByResponsibilityId(pd); + List 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 map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("ISREAD","1"); + corpResponsibilityPeopleService.editIsRead(pd); //阅读状态修改为已阅 + map.put("result", errInfo); + return map; + } +} diff --git a/src/main/java/com/zcloud/controller/bus/CorpResponsibilityController.java b/src/main/java/com/zcloud/controller/bus/CorpResponsibilityController.java new file mode 100644 index 00000000..08e15ded --- /dev/null +++ b/src/main/java/com/zcloud/controller/bus/CorpResponsibilityController.java @@ -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 corpResponsibilityDetails = new ArrayList<>(); + ArrayList corpResponsibilityPeoples = new ArrayList<>(); + ArrayList coverPeoples = new ArrayList<>(); + + Map map = new HashMap(); + 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 people = (List) 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 list = (List) JSON.parse(pd.getString("DETAIL")); //副文内容 + List finalList = (List) 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 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 user = (List) 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 coverpeople = (List) 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 user = (List) 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 map = new HashMap(); + 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 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 map = new HashMap(); + 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 map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + PageData responsibility = corpResponsibilityService.findById(pd); + List responsibilityDetail = corpResponsibilityDetailsService.findByResponsibilityId(pd); + List responsibilityFinal = corpResponsibilityFinalsService.findByResponsibilityId(pd); + List coverpeople = corpResponsibilityPeopleService.findByCoverResponsibilityId(pd); //被承诺人 + List people = corpResponsibilityPeopleService.findByResponsibilityId(pd);//承诺人 + Map> keyMap = new HashMap<>(); + + for (PageData pageData : people) { + String key = pageData.getString("DEPARTMENT_ID") + "---" + pageData.getString("POST_ID"); + List userIdsList = new ArrayList<>(); + if (keyMap.containsKey(key)) { + userIdsList = keyMap.get(key); + } + userIdsList.add(pageData.getString("USER_ID")); + keyMap.put(key, userIdsList); + } + + + List> pMap = new ArrayList<>(); + + for (String key : keyMap.keySet()) { + Map 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 map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //创建时间 + PageData dockData = new PageData(); + ArrayList corpResponsibilityDetails = new ArrayList<>(); + ArrayList corpResponsibilityPeoples = new ArrayList<>(); + ArrayList coverPeoples = new ArrayList<>(); + corpResponsibilityService.edit(pd); + corpResponsibilityDetailsService.deleteResponsibilityId(pd); + List list = (List) 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 people = (List) 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 user = (List) 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 coverpeople = (List) 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 user = (List) 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 map = new HashMap(); + 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 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 map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + List varList = corpResponsibilityService.collateralall(pd); //列出Notice列表 + List 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 map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("ISRESPONSIBILITY_PEOPLE", "0"); + page.setPd(pd); + List 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 map = new HashMap(); + 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 map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData TEXT = corpResponsibilityService.findById(pd); //正文 + List COLLATERAL = corpResponsibilityDetailsService.findByResponsibilityId(pd); //副文 + List FINALTEXT = corpResponsibilityFinalsService.findByResponsibilityId(pd); //细则 + PageData ISGN = corpResponsibilityPeopleService.findById(pd); + List 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 map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData dockData = new PageData(); + List corpResponsibilityPeopleList = new ArrayList<>(); + List 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; + } +} diff --git a/src/main/java/com/zcloud/controller/bus/ResponsibilityController.java b/src/main/java/com/zcloud/controller/bus/ResponsibilityController.java new file mode 100644 index 00000000..2bb66b60 --- /dev/null +++ b/src/main/java/com/zcloud/controller/bus/ResponsibilityController.java @@ -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 map = new HashMap(); + 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 responsibilityDetailList = new ArrayList<>(); + List list = (List) JSON.parse(pd.getString("DETAIL")); + List finalList = (List) 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 map = new HashMap(); + 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 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 map = new HashMap(); + 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 map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData responsibility = responsibilityService.findById(pd); + List promistDetail = responsibilityDetailsService.findByResponsibilityId(pd); + List 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 map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //创建时间 + responsibilityService.edit(pd); + responsibilityDetailsService.deleteResponsibilityId(pd); + ArrayList responsibilityDetailList = new ArrayList<>(); + List list = (List) JSON.parse(pd.getString("DETAIL")); + List finalList = (List) 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 map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + List coverpeople = corpResponsibilityPeopleService.findByCoverResponsibilityId(pd); //被承诺人 + List 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; + } +} diff --git a/src/main/java/com/zcloud/mapper/datasource/bus/CorpResponsibilityDetailsMapper.java b/src/main/java/com/zcloud/mapper/datasource/bus/CorpResponsibilityDetailsMapper.java new file mode 100644 index 00000000..d1bac17a --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/bus/CorpResponsibilityDetailsMapper.java @@ -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 datalistPage(Page page); + + List findByResponsibilityId(PageData pd); + + void deleteResponsibilityId(PageData pd); + + PageData findByCoverPromiseId(PageData pd); +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/bus/CorpResponsibilityFinalsMapper.java b/src/main/java/com/zcloud/mapper/datasource/bus/CorpResponsibilityFinalsMapper.java new file mode 100644 index 00000000..39170d0d --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/bus/CorpResponsibilityFinalsMapper.java @@ -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 datalistPage(Page page); + + List findByResponsibilityId(PageData pd); + + void deleteResponsibilityId(PageData pd); +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/bus/CorpResponsibilityMapper.java b/src/main/java/com/zcloud/mapper/datasource/bus/CorpResponsibilityMapper.java new file mode 100644 index 00000000..ca85b6bf --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/bus/CorpResponsibilityMapper.java @@ -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 datalistPage(Page page); + + void editdelete(PageData pd); + + PageData findById(PageData pd); + + void edit(PageData pd); + + List dataAlllistPage(Page page); + + List collateralall(PageData pd); + + List collateralAllFinal(PageData pd); + + void editpeople(PageData pd); + void delete(PageData pd); + + void decPeoplenumInvolved(PageData pd); + +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/bus/CorpResponsibilityPeopleMapper.java b/src/main/java/com/zcloud/mapper/datasource/bus/CorpResponsibilityPeopleMapper.java new file mode 100644 index 00000000..65fd3442 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/bus/CorpResponsibilityPeopleMapper.java @@ -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 datalistPage(Page page); + + void editdelete(PageData pd); + + PageData findById(PageData pd); + + void edit(PageData pd); + + List findByResponsibilityId(PageData pd); + + void deleteResponsibilityId(PageData pd); + + List findByCoverResponsibilityId(PageData pd); + + List findByUserId(PageData pd); + + void editSign(PageData pd); + + List ResponsibilitylistPage(Page page); + + List receiveResponsibilitylistPage(Page page); + + void editIsRead(PageData pd); + void delete(PageData pd); + List getListAllByResponsibilityId(PageData pd); + + void removeUnsignedPeopleDetails(PageData pd); +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/bus/ResponsibilityDetailsMapper.java b/src/main/java/com/zcloud/mapper/datasource/bus/ResponsibilityDetailsMapper.java new file mode 100644 index 00000000..6c8c0752 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/bus/ResponsibilityDetailsMapper.java @@ -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 datalistPage(Page page); + + List findByResponsibilityId(PageData pd); + + void deleteResponsibilityId(PageData pd); +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/bus/ResponsibilityFinalsMapper.java b/src/main/java/com/zcloud/mapper/datasource/bus/ResponsibilityFinalsMapper.java new file mode 100644 index 00000000..8ae64ea4 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/bus/ResponsibilityFinalsMapper.java @@ -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 datalistPage(Page page); + + List findByResponsibilityId(PageData pd); + + void deleteResponsibilityId(PageData pd); +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/bus/ResponsibilityMapper.java b/src/main/java/com/zcloud/mapper/datasource/bus/ResponsibilityMapper.java new file mode 100644 index 00000000..980d3b0f --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/bus/ResponsibilityMapper.java @@ -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 datalistPage(Page page); + + void editdelete(PageData pd); + + PageData findById(PageData pd); + + void edit(PageData pd); + void delete(PageData pd); +} + diff --git a/src/main/java/com/zcloud/service/bus/CorpResponsibilityDetailsService.java b/src/main/java/com/zcloud/service/bus/CorpResponsibilityDetailsService.java new file mode 100644 index 00000000..dcd1ff84 --- /dev/null +++ b/src/main/java/com/zcloud/service/bus/CorpResponsibilityDetailsService.java @@ -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 list(Page page)throws Exception; + + /*通过承诺书查询副文 + * @param pd + * @throws Exception + */ + List findByResponsibilityId(PageData pd)throws Exception; + + void deleteResponsibilityId(PageData pd)throws Exception; +} diff --git a/src/main/java/com/zcloud/service/bus/CorpResponsibilityFinalsService.java b/src/main/java/com/zcloud/service/bus/CorpResponsibilityFinalsService.java new file mode 100644 index 00000000..819019fe --- /dev/null +++ b/src/main/java/com/zcloud/service/bus/CorpResponsibilityFinalsService.java @@ -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 list(Page page)throws Exception; + + /*通过承诺书查询副文 + * @param pd + * @throws Exception + */ + List findByResponsibilityId(PageData pd)throws Exception; + + void deleteResponsibilityId(PageData pd)throws Exception; +} diff --git a/src/main/java/com/zcloud/service/bus/CorpResponsibilityPeopleService.java b/src/main/java/com/zcloud/service/bus/CorpResponsibilityPeopleService.java new file mode 100644 index 00000000..078638fe --- /dev/null +++ b/src/main/java/com/zcloud/service/bus/CorpResponsibilityPeopleService.java @@ -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 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 findByResponsibilityId(PageData pd)throws Exception; + + /**删除承诺人 + * @param pd + * @throws Exception + */ + void deleteResponsibilityId(PageData pd)throws Exception; + + List findByCoverResponsibilityId(PageData pd)throws Exception; + + List findByUserId(PageData pd)throws Exception; + + void editSign(PageData pd)throws Exception; + + List responsibilitylist(Page page)throws Exception; + + List receiveResponsibilitylist(Page page)throws Exception; + + void editIsRead(PageData pd)throws Exception; + + /** + * 删除安全承诺人员 + * @param pd + * @throws Exception + */ + void delete(PageData pd)throws Exception; + + + List getListAllByResponsibilityId(PageData pd)throws Exception; + + void removeUnsignedPeopleDetails(PageData pd); +} diff --git a/src/main/java/com/zcloud/service/bus/CorpResponsibilityService.java b/src/main/java/com/zcloud/service/bus/CorpResponsibilityService.java new file mode 100644 index 00000000..ba862952 --- /dev/null +++ b/src/main/java/com/zcloud/service/bus/CorpResponsibilityService.java @@ -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 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 listAll(Page page)throws Exception; + + List collateralall(PageData pd)throws Exception; + + List collateralAllFinal(PageData pd) throws Exception; + + void editpeople(PageData pd)throws Exception; + + /** 删除安全承诺书 + * @param pd + * @throws Exception + */ + void delete(PageData pd)throws Exception; +} diff --git a/src/main/java/com/zcloud/service/bus/ResponsibilityDetailsService.java b/src/main/java/com/zcloud/service/bus/ResponsibilityDetailsService.java new file mode 100644 index 00000000..371f649b --- /dev/null +++ b/src/main/java/com/zcloud/service/bus/ResponsibilityDetailsService.java @@ -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 list(Page page)throws Exception; + + /*通过承诺书查询副文 + * @param pd + * @throws Exception + */ + List findByResponsibilityId(PageData pd)throws Exception; + + void deleteResponsibilityId(PageData pd)throws Exception; +} diff --git a/src/main/java/com/zcloud/service/bus/ResponsibilityFinalsService.java b/src/main/java/com/zcloud/service/bus/ResponsibilityFinalsService.java new file mode 100644 index 00000000..75b17846 --- /dev/null +++ b/src/main/java/com/zcloud/service/bus/ResponsibilityFinalsService.java @@ -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 list(Page page)throws Exception; + + /*通过承诺书查询副文 + * @param pd + * @throws Exception + */ + List findByResponsibilityId(PageData pd)throws Exception; + + void deleteResponsibilityId(PageData pd)throws Exception; +} diff --git a/src/main/java/com/zcloud/service/bus/ResponsibilityService.java b/src/main/java/com/zcloud/service/bus/ResponsibilityService.java new file mode 100644 index 00000000..b5d00b9e --- /dev/null +++ b/src/main/java/com/zcloud/service/bus/ResponsibilityService.java @@ -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 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; +} diff --git a/src/main/java/com/zcloud/service/bus/impl/CorpResponsibilityDetailsServiceImpl.java b/src/main/java/com/zcloud/service/bus/impl/CorpResponsibilityDetailsServiceImpl.java new file mode 100644 index 00000000..8a51be00 --- /dev/null +++ b/src/main/java/com/zcloud/service/bus/impl/CorpResponsibilityDetailsServiceImpl.java @@ -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 list(Page page) throws Exception { + return corpPromiseDetailsMapper.datalistPage(page); + } + + @Override + public List findByResponsibilityId(PageData pd) throws Exception { + return corpPromiseDetailsMapper.findByResponsibilityId(pd); + } + + @Override + public void deleteResponsibilityId(PageData pd) throws Exception { + corpPromiseDetailsMapper.deleteResponsibilityId(pd); + } + +} diff --git a/src/main/java/com/zcloud/service/bus/impl/CorpResponsibilityFinalsServiceImpl.java b/src/main/java/com/zcloud/service/bus/impl/CorpResponsibilityFinalsServiceImpl.java new file mode 100644 index 00000000..9b10acf9 --- /dev/null +++ b/src/main/java/com/zcloud/service/bus/impl/CorpResponsibilityFinalsServiceImpl.java @@ -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 list(Page page) throws Exception { + return corpResponsibilityFinalsMapper.datalistPage(page); + } + + @Override + public List findByResponsibilityId(PageData pd) throws Exception { + return corpResponsibilityFinalsMapper.findByResponsibilityId(pd); + } + + @Override + public void deleteResponsibilityId(PageData pd) throws Exception { + corpResponsibilityFinalsMapper.deleteResponsibilityId(pd); + } +} diff --git a/src/main/java/com/zcloud/service/bus/impl/CorpResponsibilityPeopleServiceImpl.java b/src/main/java/com/zcloud/service/bus/impl/CorpResponsibilityPeopleServiceImpl.java new file mode 100644 index 00000000..7030b456 --- /dev/null +++ b/src/main/java/com/zcloud/service/bus/impl/CorpResponsibilityPeopleServiceImpl.java @@ -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 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 findByResponsibilityId(PageData pd) throws Exception { + return corpPromisePeopleMapper.findByResponsibilityId(pd); + } + + @Override + public void deleteResponsibilityId(PageData pd) throws Exception { + corpPromisePeopleMapper.deleteResponsibilityId(pd); + } + + @Override + public List findByCoverResponsibilityId(PageData pd) throws Exception { + return corpPromisePeopleMapper.findByCoverResponsibilityId(pd); + } + + @Override + public List findByUserId(PageData pd) throws Exception { + return corpPromisePeopleMapper.findByUserId(pd); + } + + @Override + public void editSign(PageData pd) throws Exception { + corpPromisePeopleMapper.editSign(pd); + } + + @Override + public List responsibilitylist(Page page) throws Exception { + return corpPromisePeopleMapper.ResponsibilitylistPage(page); + } + + @Override + public List 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 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); + } +} diff --git a/src/main/java/com/zcloud/service/bus/impl/CorpResponsibilityServiceImpl.java b/src/main/java/com/zcloud/service/bus/impl/CorpResponsibilityServiceImpl.java new file mode 100644 index 00000000..4fc47109 --- /dev/null +++ b/src/main/java/com/zcloud/service/bus/impl/CorpResponsibilityServiceImpl.java @@ -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 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 listAll(Page page) throws Exception { + return corpPromiseMapper.dataAlllistPage(page); + } + + @Override + public List collateralall(PageData pd) throws Exception { + return corpPromiseMapper.collateralall(pd); + } + + @Override + public List 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); + } +} diff --git a/src/main/java/com/zcloud/service/bus/impl/ResponsibilityDetailsServiceImpl.java b/src/main/java/com/zcloud/service/bus/impl/ResponsibilityDetailsServiceImpl.java new file mode 100644 index 00000000..3e453638 --- /dev/null +++ b/src/main/java/com/zcloud/service/bus/impl/ResponsibilityDetailsServiceImpl.java @@ -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 list(Page page) throws Exception { + return responsibilityDetailsMapper.datalistPage(page); + } + + @Override + public List findByResponsibilityId(PageData pd) throws Exception { + return responsibilityDetailsMapper.findByResponsibilityId(pd); + } + + @Override + public void deleteResponsibilityId(PageData pd) throws Exception { + responsibilityDetailsMapper.deleteResponsibilityId(pd); + } +} diff --git a/src/main/java/com/zcloud/service/bus/impl/ResponsibilityFinalsServiceImpl.java b/src/main/java/com/zcloud/service/bus/impl/ResponsibilityFinalsServiceImpl.java new file mode 100644 index 00000000..0d0f4370 --- /dev/null +++ b/src/main/java/com/zcloud/service/bus/impl/ResponsibilityFinalsServiceImpl.java @@ -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 list(Page page) throws Exception { + return responsibilityFinalsMapper.datalistPage(page); + } + + @Override + public List findByResponsibilityId(PageData pd) throws Exception { + return responsibilityFinalsMapper.findByResponsibilityId(pd); + } + + @Override + public void deleteResponsibilityId(PageData pd) throws Exception { + responsibilityFinalsMapper.deleteResponsibilityId(pd); + } +} diff --git a/src/main/java/com/zcloud/service/bus/impl/ResponsibilityServiceImpl.java b/src/main/java/com/zcloud/service/bus/impl/ResponsibilityServiceImpl.java new file mode 100644 index 00000000..bdb196ae --- /dev/null +++ b/src/main/java/com/zcloud/service/bus/impl/ResponsibilityServiceImpl.java @@ -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 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); + } +} diff --git a/src/main/resources/mybatis/datasource/bus/CorpResponsibilityDetailsMapper.xml b/src/main/resources/mybatis/datasource/bus/CorpResponsibilityDetailsMapper.xml new file mode 100644 index 00000000..d6e9e130 --- /dev/null +++ b/src/main/resources/mybatis/datasource/bus/CorpResponsibilityDetailsMapper.xml @@ -0,0 +1,90 @@ + + + + + + + BUS_CORPRESPONSIBILITY_DETAILS + + + + + `qa-cmt-prevention`.sys_dictionaries + + + + + f.RESPONSIBILITYDETAIL_ID, + f.RESPONSIBILITY_ID, + f.COLLATERAL, + f.SORTINDEX + + + + + RESPONSIBILITYDETAIL_ID, + RESPONSIBILITY_ID, + COLLATERAL, + SORTINDEX + + + + + #{RESPONSIBILITYDETAIL_ID}, + #{RESPONSIBILITY_ID}, + #{COLLATERAL}, + #{SORTINDEX} + + + + + insert into + + ( + + ) values ( + + ) + + + + + + + + + + + + delete from + + where + RESPONSIBILITY_ID = #{RESPONSIBILITY_ID} + + + diff --git a/src/main/resources/mybatis/datasource/bus/CorpResponsibilityFinalsMapper.xml b/src/main/resources/mybatis/datasource/bus/CorpResponsibilityFinalsMapper.xml new file mode 100644 index 00000000..593181e8 --- /dev/null +++ b/src/main/resources/mybatis/datasource/bus/CorpResponsibilityFinalsMapper.xml @@ -0,0 +1,95 @@ + + + + + + + `qa-cmt-prevention`.BUS_CORPRESPONSIBILITY_FINAL + + + + + `qa-cmt-prevention`.sys_dictionaries + + + + + f.RESPONSIBILITYFINAL_ID, + f.RESPONSIBILITYDETAIL_ID, + f.RESPONSIBILITY_ID, + f.FINALTEXT, + f.SORTINDEX + + + + + RESPONSIBILITYFINAL_ID, + RESPONSIBILITYDETAIL_ID, + RESPONSIBILITY_ID, + FINALTEXT, + SORTINDEX + + + + + #{RESPONSIBILITYFINAL_ID}, + #{RESPONSIBILITYDETAIL_ID}, + #{RESPONSIBILITY_ID}, + #{FINALTEXT}, + #{SORTINDEX} + + + + + insert into + + ( + + ) values ( + + ) + + + + + + + + + + + delete from + + where + RESPONSIBILITY_ID = #{RESPONSIBILITY_ID} + + + diff --git a/src/main/resources/mybatis/datasource/bus/CorpResponsibilityMapper.xml b/src/main/resources/mybatis/datasource/bus/CorpResponsibilityMapper.xml new file mode 100644 index 00000000..708e3484 --- /dev/null +++ b/src/main/resources/mybatis/datasource/bus/CorpResponsibilityMapper.xml @@ -0,0 +1,248 @@ + + + + + + + BUS_CORPRESPONSIBILITY + + + + + `qa-cmt-prevention`.sys_dictionaries + + + + + 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 + + + + + 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 + + + + + #{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} + + + + + insert into + + ( + + ) values ( + + ) + + + update set PEOPLENUM_INVOLVED = PEOPLENUM_INVOLVED - 1 where RESPONSIBILITY_ID = #{RESPONSIBILITY_ID} + + + + + + + + update + + set + STATE = #{STATE} + where + RESPONSIBILITY_ID = #{RESPONSIBILITY_ID} + + + + + + + + update + + 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} + + + + + + + + + + + + + + update + + set + PEOPLENUM_INVOLVED = #{PEOPLENUM_INVOLVED} + where + RESPONSIBILITY_ID = #{RESPONSIBILITY_ID} + + + + + update + + set + ISDELETE = 1 + where + RESPONSIBILITY_ID = #{RESPONSIBILITY_ID} + + diff --git a/src/main/resources/mybatis/datasource/bus/CorpResponsibilityPeopleMapper.xml b/src/main/resources/mybatis/datasource/bus/CorpResponsibilityPeopleMapper.xml new file mode 100644 index 00000000..d157f59a --- /dev/null +++ b/src/main/resources/mybatis/datasource/bus/CorpResponsibilityPeopleMapper.xml @@ -0,0 +1,290 @@ + + + + + + + BUS_CORPRESPONSIBILITY_PEOPLE + + + + + `qa-cmt-prevention`.sys_dictionaries + + + + + 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 + + + + + RESPONSIBILITYPEOPLE_ID, + RESPONSIBILITY_ID, + DEPARTMENT_ID, + POST_ID, + USER_ID, + ISSIGN, + SIGNTIME, + CORPINFO_ID, + FILEPATH, + ISRESPONSIBILITY_PEOPLE, + ISREAD + + + + + #{RESPONSIBILITYPEOPLE_ID}, + #{RESPONSIBILITY_ID}, + #{DEPARTMENT_ID}, + #{POST_ID}, + #{USER_ID}, + #{ISSIGN}, + #{SIGNTIME}, + #{CORPINFO_ID}, + #{FILEPATH}, + #{ISRESPONSIBILITY_PEOPLE}, + #{ISREAD} + + + + + insert into + + ( + + ) values ( + + ) + + + + + + + + update + + set + ISDELETE = #{ISDELETE} + where + RESPONSIBILITY_ID = #{RESPONSIBILITY_ID} + + + + + + + + update + + set + ISDELETE = #{ISDELETE}, + OPERATTIME = #{OPERATTIME}, + RESPONSIBILITY_NAME =#{RESPONSIBILITY_NAME}, + LEVEL = #{LEVEL}, + TEXT = #{TEXT} + where + RESPONSIBILITY_ID = #{RESPONSIBILITY_ID} + + + + + + + + + + + + + delete from + + where + RESPONSIBILITY_ID = #{RESPONSIBILITY_ID} + + + + update + + set + FILEPATH = #{FILEPATH}, + SIGNTIME = #{SIGNTIME}, + ISSIGN =#{ISSIGN}, + ISREAD = #{ISREAD} + where + RESPONSIBILITYPEOPLE_ID = #{RESPONSIBILITYPEOPLE_ID} + + + + + + + + + + update + + set + ISREAD = #{ISREAD} + where + RESPONSIBILITYPEOPLE_ID = #{RESPONSIBILITYPEOPLE_ID} + + + + + update + + set + ISDELETE = 1 + where + RESPONSIBILITYPEOPLE_ID = #{RESPONSIBILITYPEOPLE_ID} + + + update + + set + ISDELETE = 1 + where + RESPONSIBILITYPEOPLE_ID = #{RESPONSIBILITYPEOPLE_ID} + + + + + + diff --git a/src/main/resources/mybatis/datasource/bus/ResponsibilityDetailsMapper.xml b/src/main/resources/mybatis/datasource/bus/ResponsibilityDetailsMapper.xml new file mode 100644 index 00000000..53054ad5 --- /dev/null +++ b/src/main/resources/mybatis/datasource/bus/ResponsibilityDetailsMapper.xml @@ -0,0 +1,89 @@ + + + + + + + `qa-cmt-regulatory`.BUS_RESPONSIBILITY_DETAILS + + + + + `qa-cmt-prevention`.sys_dictionaries + + + + + f.RESPONSIBILITYDETAIL_ID, + f.RESPONSIBILITY_ID, + f.COLLATERAL, + f.SORTINDEX + + + + + RESPONSIBILITYDETAIL_ID, + RESPONSIBILITY_ID, + COLLATERAL, + SORTINDEX + + + + + #{RESPONSIBILITYDETAIL_ID}, + #{RESPONSIBILITY_ID}, + #{COLLATERAL}, + #{SORTINDEX} + + + + + insert into + + ( + + ) values ( + + ) + + + + + + + + + + + delete from + + where + RESPONSIBILITY_ID = #{RESPONSIBILITY_ID} + + + diff --git a/src/main/resources/mybatis/datasource/bus/ResponsibilityFinalsMapper.xml b/src/main/resources/mybatis/datasource/bus/ResponsibilityFinalsMapper.xml new file mode 100644 index 00000000..a207b92e --- /dev/null +++ b/src/main/resources/mybatis/datasource/bus/ResponsibilityFinalsMapper.xml @@ -0,0 +1,95 @@ + + + + + + + `qa-cmt-regulatory`.BUS_RESPONSIBILITY_FINAL + + + + + `qa-cmt-prevention`.sys_dictionaries + + + + + f.RESPONSIBILITYFINAL_ID, + f.RESPONSIBILITYDETAIL_ID, + f.RESPONSIBILITY_ID, + f.FINALTEXT, + f.SORTINDEX + + + + + RESPONSIBILITYFINAL_ID, + RESPONSIBILITYDETAIL_ID, + RESPONSIBILITY_ID, + FINALTEXT, + SORTINDEX + + + + + #{RESPONSIBILITYFINAL_ID}, + #{RESPONSIBILITYDETAIL_ID}, + #{RESPONSIBILITY_ID}, + #{FINALTEXT}, + #{SORTINDEX} + + + + + insert into + + ( + + ) values ( + + ) + + + + + + + + + + + delete from + + where + RESPONSIBILITY_ID = #{RESPONSIBILITY_ID} + + + diff --git a/src/main/resources/mybatis/datasource/bus/ResponsibilityMapper.xml b/src/main/resources/mybatis/datasource/bus/ResponsibilityMapper.xml new file mode 100644 index 00000000..ce4c12fa --- /dev/null +++ b/src/main/resources/mybatis/datasource/bus/ResponsibilityMapper.xml @@ -0,0 +1,140 @@ + + + + + + + `qa-cmt-regulatory`.BUS_RESPONSIBILITY + + + + + `qa-cmt-prevention`.sys_dictionaries + + + + + 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 + + + + + RESPONSIBILITY_ID, + RESPONSIBILITY_NAME, + LEVEL, + TEXT, + ISDELETE, + CREATOR, + CREATTIME, + OPERATOR, + OPERATTIME, + CORPINFO_ID, + TYPE + + + + + #{RESPONSIBILITY_ID}, + #{RESPONSIBILITY_NAME}, + #{LEVEL}, + #{TEXT}, + #{ISDELETE}, + #{CREATOR}, + #{CREATTIME}, + #{OPERATOR}, + #{OPERATTIME}, + #{CORPINFO_ID}, + #{TYPE} + + + + + insert into + + ( + + ) values ( + + ) + + + + + + + + update + + set + ISDELETE = #{ISDELETE} + where + RESPONSIBILITY_ID = #{RESPONSIBILITY_ID} + + + + + + + + update + + set + ISDELETE = #{ISDELETE}, + OPERATTIME = #{OPERATTIME}, + RESPONSIBILITY_NAME =#{RESPONSIBILITY_NAME}, + LEVEL = #{LEVEL}, + + TYPE = #{TYPE}, + + TEXT = #{TEXT} + where + RESPONSIBILITY_ID = #{RESPONSIBILITY_ID} + + + + delete from + + where + RESPONSIBILITY_ID = #{RESPONSIBILITY_ID} + +