diff --git a/src/main/java/com/zcloud/controller/gf/AppGFBlindBoardController.java b/src/main/java/com/zcloud/controller/gf/AppGFBlindBoardController.java index 79e3d14d..d4a2dadb 100644 --- a/src/main/java/com/zcloud/controller/gf/AppGFBlindBoardController.java +++ b/src/main/java/com/zcloud/controller/gf/AppGFBlindBoardController.java @@ -5,18 +5,18 @@ 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.gf.GFBlindBoardLogService; -import com.zcloud.service.gf.GFBlindBoardService; -import com.zcloud.service.gf.GFBlindBoardToMeasuresService; -import com.zcloud.service.gf.GFBlindBoardInfoService; +import com.zcloud.service.gf.*; import com.zcloud.util.*; +import org.apache.commons.io.FileUtils; import org.apache.commons.lang.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Transactional; 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 org.springframework.web.multipart.MultipartRequest; import javax.annotation.Resource; import java.text.DecimalFormat; @@ -36,13 +36,18 @@ public class AppGFBlindBoardController extends BaseController { private GFBlindBoardService GFblindboardService; @Resource private GFBlindBoardInfoService GFblindBoardInfoService; + + @Autowired + private GFBlindBoardAcceptUserService blindboardacceptuserService; + @Resource private GFBlindBoardLogService GFblindBoardLogService; - @Resource + @Autowired private SendMessageUtil sendMessageUtil; @Resource private GFBlindBoardToMeasuresService GFblindBoardToMeasuresService; - + @Autowired + private Smb smb; /**获取编码 * @param * @throws Exception @@ -84,6 +89,19 @@ public class AppGFBlindBoardController extends BaseController { String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); + PageData pd2 = new PageData(); + Calendar calendar = Calendar.getInstance(); + DecimalFormat dft=new DecimalFormat("00"); + int year = calendar.get(Calendar.YEAR); + String month = dft.format(calendar.get(Calendar.MONTH) + 1); + String day = dft.format(calendar.get(Calendar.DAY_OF_MONTH)); + pd2.put("CREATDATE",year + "-" + month + "-" + day); + pd2.put("CORPINFO_ID",pd.get("CORPINFO_ID")); + System.out.println(pd.get("CORPINFO_ID")); + pd2 = GFblindboardService.getCode(pd2); //根据ID读取 + String code = "MB"+year + month + day + dft.format((Integer.parseInt(pd2.get("code").toString())+1)); + pd = this.getPageData(); + pd.put("CHECK_NO", code); pd.put("BLINDBOARD_ID", this.get32UUID()); //主键 pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 pd.put("OTHER_PROTECTIVE_MEASURES", (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? pd.getString("OTHER_PROTECTIVE_MEASURES") : "") + ";_;"); @@ -93,7 +111,7 @@ public class AppGFBlindBoardController extends BaseController { String ffile = DateUtil.getDays(); String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); + smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); pd.put("APPLY_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd.put("APPLY_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); @@ -195,7 +213,7 @@ public class AppGFBlindBoardController extends BaseController { String ffile = DateUtil.getDays(); String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); + smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); map.put("path", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); } @@ -216,7 +234,7 @@ public class AppGFBlindBoardController extends BaseController { String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); - Smb.deleteFile(pd.getString("path")); + smb.deleteFile(pd.getString("path")); map.put("result", errInfo); return map; } @@ -257,7 +275,7 @@ public class AppGFBlindBoardController extends BaseController { String ffile = DateUtil.getDays(); String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); + smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); pd.put("APPLY_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd.put("APPLY_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); @@ -378,7 +396,7 @@ public class AppGFBlindBoardController extends BaseController { String ffile = DateUtil.getDays(); String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); + smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); pd2.put("CONSTRUCTION_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd2.put("CONSTRUCTION_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); @@ -387,6 +405,37 @@ public class AppGFBlindBoardController extends BaseController { pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); GFblindboardService.edit(pd2); log.put("ACTION", "作业负责人通过"); + GFblindBoardInfoService.delete(pd); + if(pd.get("boardList")!=null){ + List list = (List) JSON.parse(pd.get("boardList").toString()); + for (JSONObject json : list) { + PageData board = new PageData(); + board.put("BLINDBOARDINFO_ID", this.get32UUID()); // 主键 + board.put("BLINDBOARD_ID", pd.get("BLINDBOARD_ID")); + board.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 + board.put("BOARD_MATERIAL", json.get("BOARD_MATERIAL")); + board.put("BOARD_SPECIFICATION", json.get("BOARD_SPECIFICATION")); + board.put("BOARD_NO", json.get("BOARD_NO")); + board.put("ISDELETE", 0); + GFblindBoardInfoService.save(board); + } + } + + GFblindBoardToMeasuresService.delete(pd); + if(pd.get("measuresList")!=null){ + List list = (List) JSON.parse(pd.get("measuresList").toString()); + for (JSONObject json : list) { + PageData measures = new PageData(); + measures.put("BLINDBOARDTOMEASURES_ID", this.get32UUID()); // 主键 + measures.put("BLINDBOARD_ID", pd.get("BLINDBOARD_ID")); + measures.put("BUS_BLINDBOARD_MEASURES_ID", json.get("BUS_BLINDBOARD_MEASURES_ID")); + measures.put("STATUS", json.get("STATUS")); + measures.put("CONFIRM_ID", pd.get("OPERATOR")); + measures.put("CONFIRM_NAME", pd.get("ACTION_USER")); + GFblindBoardToMeasuresService.save(measures); + } + } + // 发短信 this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); @@ -399,7 +448,7 @@ public class AppGFBlindBoardController extends BaseController { String ffile = DateUtil.getDays(); String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); + smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); pd2.put("LEADER_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd2.put("LEADER_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); @@ -420,7 +469,7 @@ public class AppGFBlindBoardController extends BaseController { String ffile = DateUtil.getDays(); String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); + smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); pd2.put("ACCEPT_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd2.put("ACCEPT_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); @@ -517,13 +566,114 @@ public class AppGFBlindBoardController extends BaseController { pd = this.getPageData(); pd = GFblindboardService.findById(pd); //根据ID读取 map.put("pd", pd); + map.put("imgList",blindboardacceptuserService.findByIds(pd)); + map.put("imgList1",blindboardacceptuserService.findById(pd)); map.put("measuresList", GFblindboardService.listAllMeasures(pd)); map.put("boardList", GFblindBoardInfoService.listAll(pd)); map.put("result", errInfo); return map; } - /**批量删除 + /**修改 + * @param + * @throws Exception + */ + @RequestMapping(value="/editAcceptStatus") + @ResponseBody + @Transactional + public Object editAcceptStatus(MultipartRequest request) throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData pd2 = new PageData(); + pd2 = GFblindboardService.findById(pd); + pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 + pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + PageData log = new PageData(); + log.put("BLINDBOARDLOG_ID", this.get32UUID()); +// log.put("ACTION", "审核打回"); + log.put("BLINDBOARD_ID", pd.get("BLINDBOARD_ID")); + log.put("CREATOR",pd.get("ACTION_USER")); + log.put("CREATTIME", DateUtil.date2Str(new Date())); + + String status = pd.get("STATUS").toString(); + String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") + + (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;"); + + //打回清空数据 + pd2.put("OTHER_PROTECTIVE_MEASURES", ""); + switch (status) { + + + case "6"://验收人 + List fileList = new ArrayList(); + String signertime = ""; + String SIGNTIME[] = pd.getString("SIGNTIME").split(","); + + for (int i = 0; i < SIGNTIME.length; i++) { + signertime = SIGNTIME[i]; + fileList.add(request.getFile("file"+i)); + MultipartFile[] fileArr = new MultipartFile[fileList.size()]; + saveAcceptImg(fileList.toArray(fileArr),signertime,pd.getString("BLINDBOARD_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_USER_ID"),pd.getString("ACCEPT_DEPARTMENT_ID")); + fileList.clear(); + } + pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); + pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + GFblindboardService.edit(pd2); + log.put("ACTION", "验收通过"); + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); + + break; + + case "-6"://验收人打回 + log.put("ACTION", "验收人打回"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); + GFblindboardService.edit(pd2); + + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); + break; + default: + break; + } + GFblindboardService.save(log); + map.put("result", errInfo); + return map; + } + + private void saveAcceptImg(MultipartFile[] files,String signertime, String BLINDBOARD_ID, String CORPINFO_ID, String ACCEPT_USER_ID, String ACCEPT_DEPARTMENT_ID) throws Exception{ + if (files != null && files.length > 0) { + for (int i = 0; i < files.length; i++) { + PageData cpd = new PageData(); + cpd = this.getPageData(); + MultipartFile file = files[i]; + String ffile = DateUtil.getDays(); + String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); + cpd.put("ACCEPT_USER_SIGNER_TIME", signertime); + cpd.put("ACCEPT_CONFESS_ID", this.get32UUID()); + cpd.put("OPERATOR", cpd.get("OPERATOR")); //修改人 + cpd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + cpd.put("ACCEPT_USER_SIGNER_PATH", Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile + "/" + fileName); + cpd.put("ISDELETE", '0'); + cpd.put("CORPINFO_ID", CORPINFO_ID); + cpd.put("BLINDBOARD_ID", BLINDBOARD_ID); + cpd.put("ACCEPT_USER_ID", ACCEPT_USER_ID); + cpd.put("ACCEPT_CONFESS_DEPARTMENT_ID", ""); + cpd.put("ACCEPT_CONFESS_USER_ID", ""); + cpd.put("ACCEPT_DEPARTMENT_ID", ACCEPT_DEPARTMENT_ID); + blindboardacceptuserService.save(cpd); + } + } + } + + + + /**批量删除 * @param * @throws Exception */ @@ -736,7 +886,7 @@ public class AppGFBlindBoardController extends BaseController { String ffile = DateUtil.getDays(); String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); + smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); pd2.put("GUARDIAN_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd2.put("GUARDIAN_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); @@ -829,7 +979,7 @@ public class AppGFBlindBoardController extends BaseController { String ffile = DateUtil.getDays(); String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); + smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); pd2.put("CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd2.put("CONFESS_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); @@ -846,7 +996,7 @@ public class AppGFBlindBoardController extends BaseController { @ResponseBody @Transactional public Object editAcceptconfess( - @RequestParam(value="FFILE",required=false) MultipartFile[] files + MultipartRequest request ) throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -856,18 +1006,43 @@ public class AppGFBlindBoardController extends BaseController { pd2 = GFblindboardService.findById(pd); pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - if (files != null && files.length > 0) { - MultipartFile file = files[0]; + List fileList = new ArrayList(); + String signertime = ""; + String SIGNTIME[] = pd.getString("SIGNTIME").split(","); - String ffile = DateUtil.getDays(); - String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); - - pd2.put("ACCEPT_CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd2.put("ACCEPT_CONFESS_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - GFblindboardService.edit(pd2); + for (int i = 0; i < SIGNTIME.length; i++) { + signertime = SIGNTIME[i]; + fileList.add(request.getFile("file"+i)); + MultipartFile[] fileArr = new MultipartFile[fileList.size()]; + saveImg(fileList.toArray(fileArr),signertime,pd.getString("BLINDBOARD_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_CONFESS_USER_ID"),pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID")); + fileList.clear(); } map.put("result", errInfo); return map; } + private void saveImg(MultipartFile[] files,String signertime, String BLINDBOARD_ID, String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID, String ACCEPT_CONFESS_DEPARTMENT_ID) throws Exception{ + if (files != null && files.length > 0) { + for (int i = 0; i < files.length; i++) { + PageData pd = new PageData(); + pd = this.getPageData(); + MultipartFile file = files[i]; + String ffile = DateUtil.getDays(); + String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); + pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime); + pd.put("ACCEPT_CONFESS_ID", this.get32UUID()); + pd.put("OPERATOR", pd.get("OPERATOR")); //修改人 + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + pd.put("ACCEPT_CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile + "/" + fileName); + pd.put("ISDELETE", '0'); + pd.put("CORPINFO_ID", CORPINFO_ID); + pd.put("BLINDBOARD_ID", BLINDBOARD_ID); + pd.put("ACCEPT_CONFESS_USER_ID", ACCEPT_CONFESS_USER_ID); + pd.put("ACCEPT_CONFESS_DEPARTMENT_ID", ACCEPT_CONFESS_DEPARTMENT_ID); + pd.put("ACCEPT_USER_ID",""); + pd.put("ACCEPT_DEPARTMENT_ID", ""); + blindboardacceptuserService.save(pd); + } + } + } } diff --git a/src/main/java/com/zcloud/controller/gf/GFBlindBoardController.java b/src/main/java/com/zcloud/controller/gf/GFBlindBoardController.java index 0f426f6d..6a15271b 100644 --- a/src/main/java/com/zcloud/controller/gf/GFBlindBoardController.java +++ b/src/main/java/com/zcloud/controller/gf/GFBlindBoardController.java @@ -3,6 +3,7 @@ package com.zcloud.controller.gf; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; +import com.zcloud.service.gf.GFBlindBoardAcceptUserService; import com.zcloud.service.gf.GFBlindBoardInfoService; import com.zcloud.service.gf.GFBlindBoardService; import com.zcloud.util.Jurisdiction; @@ -35,6 +36,8 @@ public class GFBlindBoardController extends BaseController { private GFBlindBoardService GFblindboardService; @Autowired private GFBlindBoardInfoService GFblindBoardInfoService; + @Autowired + private GFBlindBoardAcceptUserService blindboardacceptuserService; /**新增 * @param @@ -132,6 +135,8 @@ public class GFBlindBoardController extends BaseController { pd = GFblindboardService.findById(pd); //根据ID读取 map.put("pd", pd); map.put("measuresList", GFblindboardService.listAllMeasures(pd)); + map.put("imgList",blindboardacceptuserService.findByIds(pd)); + map.put("imgList1",blindboardacceptuserService.findById(pd)); map.put("boardList", GFblindBoardInfoService.listAll(pd)); map.put("result", errInfo); return map; diff --git a/src/main/java/com/zcloud/mapper/datasource/gf/GFBlindBoardAcceptUserMapper.java b/src/main/java/com/zcloud/mapper/datasource/gf/GFBlindBoardAcceptUserMapper.java new file mode 100644 index 00000000..e33867bf --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/gf/GFBlindBoardAcceptUserMapper.java @@ -0,0 +1,67 @@ +package com.zcloud.mapper.datasource.gf; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 说明:图片管理 + * 作者:luoxiaobao + * 时间:2020-12-24 + * 官网:www.zcloudchina.com + */ +public interface GFBlindBoardAcceptUserMapper { + + /**新增 + * @param pd + * @throws Exception + */ + void save(PageData pd); + + /**删除 + * @param pd + * @throws Exception + */ + void delete(PageData pd); + + /**删除 + * @param pd + * @throws Exception + */ + void deleteList(PageData pd); + + /**修改 + * @param pd + * @throws Exception + */ + void edit(PageData pd); + + /**列表 + * @param page + * @throws Exception + */ + List datalistPage(Page page); + + /**列表(全部) + * @param pd + * @throws Exception + */ + List listAll(PageData pd); + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + List findById(PageData pd); + List findByIds(PageData pd); + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + void deleteAll(String[] ArrayDATA_IDS); + List listAllByIds(PageData pd); + +} + diff --git a/src/main/java/com/zcloud/service/gf/GFBlindBoardAcceptUserService.java b/src/main/java/com/zcloud/service/gf/GFBlindBoardAcceptUserService.java new file mode 100644 index 00000000..c86c8c80 --- /dev/null +++ b/src/main/java/com/zcloud/service/gf/GFBlindBoardAcceptUserService.java @@ -0,0 +1,67 @@ +package com.zcloud.service.gf; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 说明:图片管理 + * 作者:luoxiaobao + * 时间:2020-12-24 + * 官网:www.zcloudchina.com + */ +public interface GFBlindBoardAcceptUserService { + + /**新增 + * @param pd + * @throws Exception + */ + public void save(PageData pd)throws Exception; + + /**删除 + * @param pd + * @throws Exception + */ + public void delete(PageData pd)throws Exception; + + /**删除 + * @param pd + * @throws Exception + */ + public void deleteList(PageData pd)throws Exception; + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception; + + /**列表 + * @param page + * @throws Exception + */ + public List list(Page page)throws Exception; + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception; + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public List findById(PageData pd)throws Exception; + public List findByIds(PageData pd)throws Exception; + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; + + public List listAllByIds(PageData pd)throws Exception; +} + diff --git a/src/main/java/com/zcloud/service/gf/impl/GFBlindBoardAcceptUserServiceImpl.java b/src/main/java/com/zcloud/service/gf/impl/GFBlindBoardAcceptUserServiceImpl.java new file mode 100644 index 00000000..6ed92f74 --- /dev/null +++ b/src/main/java/com/zcloud/service/gf/impl/GFBlindBoardAcceptUserServiceImpl.java @@ -0,0 +1,102 @@ +package com.zcloud.service.gf.impl; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.gf.GFBlindBoardAcceptUserMapper; +import com.zcloud.service.gf.GFBlindBoardAcceptUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * 说明:图片管理 + * 作者:luoxiaobao + * 时间:2020-12-24 + * 官网:www.zcloudchina.com + */ +@Service +@Transactional //开启事物 +public class GFBlindBoardAcceptUserServiceImpl implements GFBlindBoardAcceptUserService { + + @Autowired + private GFBlindBoardAcceptUserMapper blindboardacceptuserMapper; + + /**新增 + * @param pd + * @throws Exception + */ + public void save(PageData pd)throws Exception{ + blindboardacceptuserMapper.save(pd); + } + + /**删除 + * @param pd + * @throws Exception + */ + public void delete(PageData pd)throws Exception{ + blindboardacceptuserMapper.delete(pd); + } + + /**删除 + * @param pd + * @throws Exception + */ + public void deleteList(PageData pd)throws Exception{ + blindboardacceptuserMapper.deleteList(pd); + } + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception{ + blindboardacceptuserMapper.edit(pd); + } + + /**列表 + * @param page + * @throws Exception + */ + public List list(Page page)throws Exception{ + return blindboardacceptuserMapper.datalistPage(page); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception{ + return blindboardacceptuserMapper.listAll(pd); + } + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public List findById(PageData pd)throws Exception{ + return blindboardacceptuserMapper.findById(pd); + } + public List findByIds(PageData pd)throws Exception{ + return blindboardacceptuserMapper.findByIds(pd); + } + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ + blindboardacceptuserMapper.deleteAll(ArrayDATA_IDS); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAllByIds(PageData pd)throws Exception{ + return blindboardacceptuserMapper.listAllByIds(pd); + } + +} + diff --git a/src/main/resources/mybatis/datasource/gf/BlindBoardAcceptUserMapper.xml b/src/main/resources/mybatis/datasource/gf/BlindBoardAcceptUserMapper.xml new file mode 100644 index 00000000..f9ef97b6 --- /dev/null +++ b/src/main/resources/mybatis/datasource/gf/BlindBoardAcceptUserMapper.xml @@ -0,0 +1,217 @@ + + + + + + + + GF_BLINDBOARD_ACCEPTUSER + + + + + SYS_DICTIONARIES + + + + f.ACCEPT_CONFESS_ID, + f.BLINDBOARD_ID, + f.CORPINFO_ID, + f.ISDELETE, + f.OPERATTIME, + f.OPERATOR, + f.ACCEPT_CONFESS_DEPARTMENT_ID, + f.ACCEPT_CONFESS_USER_ID, + f.ACCEPT_CONFESS_USER_SIGNER_PATH, + f.ACCEPT_CONFESS_USER_SIGNER_TIME, + f.ISSELF, + f.ACCEPT_USER_ID, + f.ACCEPT_USER_SIGNER_PATH, + f.ACCEPT_USER_SIGNER_TIME, + f.ACCEPT_DEPARTMENT_ID + + + + + ACCEPT_CONFESS_ID, + BLINDBOARD_ID, + CORPINFO_ID, + ISDELETE, + OPERATTIME, + OPERATOR, + ACCEPT_CONFESS_DEPARTMENT_ID, + ACCEPT_CONFESS_USER_ID, + ACCEPT_CONFESS_USER_SIGNER_PATH, + ACCEPT_CONFESS_USER_SIGNER_TIME, + ISSELF, + ACCEPT_USER_ID, + ACCEPT_USER_SIGNER_PATH, + ACCEPT_USER_SIGNER_TIME, + ACCEPT_DEPARTMENT_ID + + + + + + #{ACCEPT_CONFESS_ID}, + #{BLINDBOARD_ID}, + #{CORPINFO_ID}, + #{ISDELETE}, + #{OPERATTIME}, + #{OPERATOR}, + #{ACCEPT_CONFESS_DEPARTMENT_ID}, + #{ACCEPT_CONFESS_USER_ID}, + #{ACCEPT_CONFESS_USER_SIGNER_PATH}, + #{ACCEPT_CONFESS_USER_SIGNER_TIME}, + #{ISSELF}, + #{ACCEPT_USER_ID}, + #{ACCEPT_USER_SIGNER_PATH}, + #{ACCEPT_USER_SIGNER_TIME}, + #{ACCEPT_DEPARTMENT_ID} + + + + + insert into + + ( + + ) values ( + + ) + + + + + delete from + + where + ACCEPT_CONFESS_ID = #{ACCEPT_CONFESS_ID} + + + + + + + update + + set + ACCEPT_CONFESS_ID = #{ACCEPT_CONFESS_ID}, + BLINDBOARD_ID = #{BLINDBOARD_ID}, + CORPINFO_ID = #{CORPINFO_ID}, + OPERATTIME = #{OPERATTIME}, + OPERATOR = #{OPERATOR}, + ACCEPT_CONFESS_DEPARTMENT_ID = #{ACCEPT_CONFESS_DEPARTMENT_ID}, + ACCEPT_CONFESS_USER_ID = #{ACCEPT_CONFESS_USER_ID}, + ACCEPT_CONFESS_USER_SIGNER_PATH = #{ACCEPT_CONFESS_USER_SIGNER_PATH}, + ACCEPT_CONFESS_USER_SIGNER_TIME = #{ACCEPT_CONFESS_USER_SIGNER_TIME}, + ISSELF = #{ISSELF} + where + ACCEPT_CONFESS_ID = #{ACCEPT_CONFESS_ID} + + + + + + + + + + + + + + + update + + set + ISDELETE = '1' + where + ACCEPT_CONFESS_ID in + + #{item} + + + + + + + diff --git a/src/main/resources/mybatis/datasource/gf/BlindBoardMapper.xml b/src/main/resources/mybatis/datasource/gf/BlindBoardMapper.xml index 2e3abd32..da5034b2 100644 --- a/src/main/resources/mybatis/datasource/gf/BlindBoardMapper.xml +++ b/src/main/resources/mybatis/datasource/gf/BlindBoardMapper.xml @@ -355,7 +355,7 @@ f.WORK_TYPE, f.CONFESS_USER, f.ACCEPT_CONFESS_USER, - f.SPECIAL_WORK, + IFNULL(f.SPECIAL_WORK,'无') as SPECIAL_WORK, f.GUARDIAN_USER, f.WORK_USER, f.OTHER_PROTECTIVE_MEASURES, @@ -439,7 +439,74 @@