法规清单更新log
This commit is contained in:
+11
-13
@@ -16,8 +16,6 @@ import com.jero.common.util.DateUtils;
|
|||||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||||
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
||||||
import com.jero.modules.dummy.entity.DummyInventoryInfoEOEn;
|
|
||||||
import com.jero.modules.dummy.entity.DummyLogEO;
|
|
||||||
import com.jero.modules.dummy.enums.DummyInventoryBaseFieldEnum;
|
import com.jero.modules.dummy.enums.DummyInventoryBaseFieldEnum;
|
||||||
import com.jero.modules.dummy.mapper.DummyInventoryInfoEOMapper;
|
import com.jero.modules.dummy.mapper.DummyInventoryInfoEOMapper;
|
||||||
import com.jero.modules.dummy.service.IDummyInventoryInfoEOService;
|
import com.jero.modules.dummy.service.IDummyInventoryInfoEOService;
|
||||||
@@ -98,7 +96,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
/**
|
/**
|
||||||
* 设置更新log
|
* 设置更新log
|
||||||
*
|
*
|
||||||
*/
|
*//*
|
||||||
private void updateLog(String contentLog,String baseId) {
|
private void updateLog(String contentLog,String baseId) {
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
if (StringUtils.isNotBlank(contentLog)) {
|
if (StringUtils.isNotBlank(contentLog)) {
|
||||||
@@ -108,7 +106,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
dummyLogEO.setCreateBy(sysUser.getUsername());
|
dummyLogEO.setCreateBy(sysUser.getUsername());
|
||||||
dummyLogEOService.add(dummyLogEO);
|
dummyLogEOService.add(dummyLogEO);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
@@ -165,7 +163,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
String username = sysUser.getUsername();
|
String username = sysUser.getUsername();
|
||||||
String serialNumber = list.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
String serialNumber = list.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||||
String contentLog = username+"向清单中添加了标准\""+serialNumber+"\"";
|
String contentLog = username+"向清单中添加了标准\""+serialNumber+"\"";
|
||||||
updateLog(contentLog, dummyInventoryInfoEO.getDummyInventoryBaseId());
|
dummyLogEOService.updateLog(contentLog, dummyInventoryInfoEO.getDummyInventoryBaseId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,7 +181,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
//更新log
|
//更新log
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
String username = sysUser.getUsername();
|
String username = sysUser.getUsername();
|
||||||
String contentLog = username+"编辑了清单中的\""+dummyInventoryInfoEO.getSerialNumber()+"\",";
|
String contentLog = username+"编辑了清单中的\"" + dummyInventoryInfoEO.getSerialNumber() + "\"标准:";
|
||||||
List<DummyInventoryInfoEO> infoEOList = new ArrayList<>();
|
List<DummyInventoryInfoEO> infoEOList = new ArrayList<>();
|
||||||
infoEOList.add(dummyInventoryInfoEO);
|
infoEOList.add(dummyInventoryInfoEO);
|
||||||
//查询数据库里原来的数据
|
//查询数据库里原来的数据
|
||||||
@@ -202,7 +200,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
infoDiffList.add(infoDiff);
|
infoDiffList.add(infoDiff);
|
||||||
contentLog = dummyInventoryBaseEOService.setContentInfo(null,null,infoDiffList,null,null,contentLog);
|
contentLog = dummyInventoryBaseEOService.setContentInfo(null,null,infoDiffList,null,null,contentLog);
|
||||||
|
|
||||||
updateLog(contentLog, dummyInventoryInfoEO.getDummyInventoryBaseId());
|
dummyLogEOService.updateLog(contentLog, dummyInventoryInfoEO.getDummyInventoryBaseId());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,7 +249,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
String projectId = dummyInventoryInfoEOList.get(0).getDummyInventoryBaseId();
|
String projectId = dummyInventoryInfoEOList.get(0).getDummyInventoryBaseId();
|
||||||
String serialNumber = dummyInventoryInfoEOList.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
String serialNumber = dummyInventoryInfoEOList.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||||
String contentLog = username+"删除了清单中的\""+serialNumber+"\"标准";
|
String contentLog = username+"删除了清单中的\""+serialNumber+"\"标准";
|
||||||
updateLog(contentLog, projectId);
|
dummyLogEOService.updateLog(contentLog, projectId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -304,7 +302,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
String projectId = dummyInventoryInfoEOList.get(0).getDummyInventoryBaseId();
|
String projectId = dummyInventoryInfoEOList.get(0).getDummyInventoryBaseId();
|
||||||
String serialNumber = dummyInventoryInfoEOList.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
String serialNumber = dummyInventoryInfoEOList.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||||
String contentLog = username+"复制了\""+serialNumber+"\"";
|
String contentLog = username+"复制了\""+serialNumber+"\"";
|
||||||
updateLog(contentLog, projectId);
|
dummyLogEOService.updateLog(contentLog, projectId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -439,7 +437,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
this.updateBatchById(dummyInventoryInfoEOList);
|
this.updateBatchById(dummyInventoryInfoEOList);
|
||||||
|
|
||||||
contentLog = contentLogBuilder.substring(0, contentLogBuilder.length() - 1);
|
contentLog = contentLogBuilder.substring(0, contentLogBuilder.length() - 1);
|
||||||
updateLog(contentLog, projectId);
|
dummyLogEOService.updateLog(contentLog, projectId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public StringBuilder setUpdateContentLog(StringBuilder contentLogBuilder,String fieldName,String oldValue,String newValue){
|
public StringBuilder setUpdateContentLog(StringBuilder contentLogBuilder,String fieldName,String oldValue,String newValue){
|
||||||
@@ -605,7 +603,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
*/
|
*/
|
||||||
private void treeDict(DummyInventoryInfoEO dummyInventoryInfoEO, List<DummyInventoryInfoEO> dummyInventoryInfoEOList) {
|
private void treeDict(DummyInventoryInfoEO dummyInventoryInfoEO, List<DummyInventoryInfoEO> dummyInventoryInfoEOList) {
|
||||||
Set<String> technologyTerritorySet = new HashSet<>();
|
Set<String> technologyTerritorySet = new HashSet<>();
|
||||||
// Set<String> correspondingStandardSet = new HashSet<>();
|
Set<String> correspondingStandardSet = new HashSet<>();
|
||||||
List<String> deliverableList = new ArrayList<>();
|
List<String> deliverableList = new ArrayList<>();
|
||||||
if(dummyInventoryInfoEOList.size() != 0){
|
if(dummyInventoryInfoEOList.size() != 0){
|
||||||
for (DummyInventoryInfoEO record : dummyInventoryInfoEOList) {
|
for (DummyInventoryInfoEO record : dummyInventoryInfoEOList) {
|
||||||
@@ -1209,8 +1207,8 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
String serialNumber = serialNumberBuilder.substring(0, serialNumberBuilder.length() - 1);
|
String serialNumber = serialNumberBuilder.substring(0, serialNumberBuilder.length() - 1);
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
String username = sysUser.getUsername();
|
String username = sysUser.getUsername();
|
||||||
String contentLog = username+"向清单中添加了标准\""+serialNumber+"\"";
|
String contentLog = username+"向清单中导入了\""+serialNumber+"\"标准";
|
||||||
updateLog(contentLog, dataList.get(0).getDummyInventoryBaseId());
|
dummyLogEOService.updateLog(contentLog, dataList.get(0).getDummyInventoryBaseId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-2
@@ -1,12 +1,16 @@
|
|||||||
package com.jero.modules.dummy.service.impl;
|
package com.jero.modules.dummy.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.modules.dummy.entity.DummyLogEO;
|
import com.jero.modules.dummy.entity.DummyLogEO;
|
||||||
import com.jero.modules.dummy.mapper.DummyLogEOMapper;
|
import com.jero.modules.dummy.mapper.DummyLogEOMapper;
|
||||||
import com.jero.modules.dummy.service.IDummyLogEOService;
|
import com.jero.modules.dummy.service.IDummyLogEOService;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 虚拟清单log表
|
* @Description: 虚拟清单log表
|
||||||
@@ -16,6 +20,20 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class DummyLogEOServiceImpl extends ServiceImpl<DummyLogEOMapper, DummyLogEO> implements IDummyLogEOService {
|
public class DummyLogEOServiceImpl extends ServiceImpl<DummyLogEOMapper, DummyLogEO> implements IDummyLogEOService {
|
||||||
|
/**
|
||||||
|
* 设置更新log
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void updateLog(String contentLog,String baseId) {
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
if (StringUtils.isNotBlank(contentLog)) {
|
||||||
|
DummyLogEO dummyLogEO = new DummyLogEO();
|
||||||
|
dummyLogEO.setDummyInventoryBaseId(baseId);
|
||||||
|
dummyLogEO.setLogContent(contentLog);
|
||||||
|
dummyLogEO.setCreateBy(sysUser.getUsername());
|
||||||
|
add(dummyLogEO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
|
|||||||
+170
@@ -0,0 +1,170 @@
|
|||||||
|
package com.jero.modules.project.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.modules.project.entity.ProjectLawsInventoryLogEO;
|
||||||
|
import com.jero.modules.project.service.IProjectLawsInventoryLogEOService;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 项目库-法规清单更新log表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-05-17
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="项目库-法规清单更新log表")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/project/projectLawsInventoryLogEO")
|
||||||
|
@Slf4j
|
||||||
|
public class ProjectLawsInventoryLogEOController extends JeroController<ProjectLawsInventoryLogEO, IProjectLawsInventoryLogEOService> {
|
||||||
|
@Autowired
|
||||||
|
private IProjectLawsInventoryLogEOService projectLawsInventoryLogEOService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param projectLawsInventoryLogEO
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "项目库-法规清单更新log表-分页列表查询")
|
||||||
|
@ApiOperation(value="项目库-法规清单更新log表-分页列表查询", notes="项目库-法规清单更新log表-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(ProjectLawsInventoryLogEO projectLawsInventoryLogEO,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<ProjectLawsInventoryLogEO> queryWrapper = QueryGenerator.initQueryWrapper(projectLawsInventoryLogEO, req.getParameterMap());
|
||||||
|
Page<ProjectLawsInventoryLogEO> page = new Page<ProjectLawsInventoryLogEO>(pageNo, pageSize);
|
||||||
|
IPage<ProjectLawsInventoryLogEO> pageList = projectLawsInventoryLogEOService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "项目库-法规清单更新log表-列表查询")
|
||||||
|
@ApiOperation(value="项目库-法规清单更新log表-列表查询", notes="项目库-法规清单更新log表-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<ProjectLawsInventoryLogEO>> queryList() {
|
||||||
|
List<ProjectLawsInventoryLogEO> list = projectLawsInventoryLogEOService.queryList();
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param projectLawsInventoryLogEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "项目库-法规清单更新log表-添加")
|
||||||
|
@ApiOperation(value="项目库-法规清单更新log表-添加", notes="项目库-法规清单更新log表-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@Validated @RequestBody ProjectLawsInventoryLogEO projectLawsInventoryLogEO) {
|
||||||
|
projectLawsInventoryLogEOService.add(projectLawsInventoryLogEO);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param projectLawsInventoryLogEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "项目库-法规清单更新log表-编辑")
|
||||||
|
@ApiOperation(value="项目库-法规清单更新log表-编辑", notes="项目库-法规清单更新log表-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody ProjectLawsInventoryLogEO projectLawsInventoryLogEO) {
|
||||||
|
projectLawsInventoryLogEOService.editById(projectLawsInventoryLogEO);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "项目库-法规清单更新log表-通过id删除")
|
||||||
|
@ApiOperation(value="项目库-法规清单更新log表-通过id删除", notes="项目库-法规清单更新log表-通过id删除")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
projectLawsInventoryLogEOService.deleteById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "项目库-法规清单更新log表-批量删除")
|
||||||
|
@ApiOperation(value="项目库-法规清单更新log表-批量删除", notes="项目库-法规清单更新log表-批量删除")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.projectLawsInventoryLogEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "项目库-法规清单更新log表-通过id查询")
|
||||||
|
@ApiOperation(value="项目库-法规清单更新log表-通过id查询", notes="项目库-法规清单更新log表-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
ProjectLawsInventoryLogEO projectLawsInventoryLogEO = projectLawsInventoryLogEOService.queryById(id);
|
||||||
|
if(projectLawsInventoryLogEO==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(projectLawsInventoryLogEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param projectLawsInventoryLogEO
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, ProjectLawsInventoryLogEO projectLawsInventoryLogEO) {
|
||||||
|
return super.exportXls(request, projectLawsInventoryLogEO, ProjectLawsInventoryLogEO.class, "项目库-法规清单更新log表");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, ProjectLawsInventoryLogEO.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+16
-8
@@ -1,18 +1,21 @@
|
|||||||
package com.jero.modules.project.entity;
|
package com.jero.modules.project.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import java.util.Date;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
|
||||||
import com.jero.common.aspect.annotation.Dict;
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -230,6 +233,8 @@ public class ProjectLawsInventoryEO implements Serializable {
|
|||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "设计符合性确认-截止时间")
|
@ApiModelProperty(value = "设计符合性确认-截止时间")
|
||||||
private Date designDueDate;
|
private Date designDueDate;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String designDueDateString;
|
||||||
|
|
||||||
/**prehomo确认-交付物类型*/
|
/**prehomo确认-交付物类型*/
|
||||||
@Excel(name = "prehomo确认-交付物类型", width = 20,dicCode ="deliverable_template")
|
@Excel(name = "prehomo确认-交付物类型", width = 20,dicCode ="deliverable_template")
|
||||||
@@ -280,6 +285,8 @@ public class ProjectLawsInventoryEO implements Serializable {
|
|||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "prehomo确认-截止时间")
|
@ApiModelProperty(value = "prehomo确认-截止时间")
|
||||||
private Date prehomoDueDate;
|
private Date prehomoDueDate;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String prehomoDueDateString;
|
||||||
|
|
||||||
/**验证符合性确认-交付物类型*/
|
/**验证符合性确认-交付物类型*/
|
||||||
@Excel(name = "验证符合性确认-交付物类型", width = 20,dicCode ="deliverable_template")
|
@Excel(name = "验证符合性确认-交付物类型", width = 20,dicCode ="deliverable_template")
|
||||||
@@ -330,7 +337,8 @@ public class ProjectLawsInventoryEO implements Serializable {
|
|||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "验证符合性确认-截止时间")
|
@ApiModelProperty(value = "验证符合性确认-截止时间")
|
||||||
private Date verifyDueDate;
|
private Date verifyDueDate;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String verifyDueDateString;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "角色代码")
|
@ApiModelProperty(value = "角色代码")
|
||||||
|
|||||||
+71
@@ -0,0 +1,71 @@
|
|||||||
|
package com.jero.modules.project.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 项目库-法规清单更新log表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-05-17
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("project_laws_inventory_log")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="project_laws_inventory_log对象", description="项目库-法规清单更新log表")
|
||||||
|
public class ProjectLawsInventoryLogEO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**主键*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**创建人*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
private java.util.Date createTime;
|
||||||
|
|
||||||
|
/**更新人*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "更新日期")
|
||||||
|
private java.util.Date updateTime;
|
||||||
|
|
||||||
|
/**所属部门*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private String sysOrgCode;
|
||||||
|
|
||||||
|
/**法规清单表id*/
|
||||||
|
@Excel(name = "法规清单表id", width = 15)
|
||||||
|
@ApiModelProperty(value = "法规清单表id")
|
||||||
|
private String projectLibraryId;
|
||||||
|
|
||||||
|
/**log内容*/
|
||||||
|
@Excel(name = "log内容", width = 15)
|
||||||
|
@ApiModelProperty(value = "log内容")
|
||||||
|
private String logContent;
|
||||||
|
|
||||||
|
}
|
||||||
+38
@@ -0,0 +1,38 @@
|
|||||||
|
package com.jero.modules.project.enums;
|
||||||
|
|
||||||
|
public enum ProjectInventoryFieldEnum {
|
||||||
|
TECHNOLOGY_TERRITORY("技术领域","technology_territory"),
|
||||||
|
DUTY_TERRITORY("责任领域","duty_territory"),
|
||||||
|
IMPLEMENT_TYPE("实施类别","implement_type"),
|
||||||
|
ATTESTATION_TYPE("认证类型","attestation_type"),
|
||||||
|
ATTESTATION_RANK("认证级别","attestation_rank"),
|
||||||
|
|
||||||
|
DESIGN_DUE_DATE("设计符合性确认-截止时间","designDueDate"),
|
||||||
|
PREHOMO_DUE_DATE("Pre-Homo确认-截止时间","prehomoDueDate"),
|
||||||
|
VERIFY_DUE_DATE("验证符合性确认-截止时间","verifyDueDate"),
|
||||||
|
|
||||||
|
;
|
||||||
|
String name;
|
||||||
|
String value;
|
||||||
|
|
||||||
|
ProjectInventoryFieldEnum(String name, String value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package com.jero.modules.project.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.jero.modules.project.entity.ProjectLawsInventoryLogEO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 项目库-法规清单更新log表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-05-17
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ProjectLawsInventoryLogEOMapper extends BaseMapper<ProjectLawsInventoryLogEO> {
|
||||||
|
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.jero.modules.project.mapper.ProjectLawsInventoryLogEOMapper">
|
||||||
|
<resultMap id="ProjectLawsInventoryLogEOResultMap" type="com.jero.modules.project.entity.ProjectLawsInventoryLogEO">
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<result column="create_by" property="createBy" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<result column="update_by" property="updateBy" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="sys_org_code" property="sysOrgCode" />
|
||||||
|
<result column="project_library_id" property="projectLibraryId" />
|
||||||
|
<result column="log_content" property="logContent" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
+61
@@ -0,0 +1,61 @@
|
|||||||
|
package com.jero.modules.project.service;
|
||||||
|
|
||||||
|
import com.jero.modules.project.entity.ProjectLawsInventoryLogEO;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 项目库-法规清单更新log表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-05-17
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IProjectLawsInventoryLogEOService extends IService<ProjectLawsInventoryLogEO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param projectLawsInventoryLogEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void add(ProjectLawsInventoryLogEO projectLawsInventoryLogEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param projectLawsInventoryLogEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void editById(ProjectLawsInventoryLogEO projectLawsInventoryLogEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ProjectLawsInventoryLogEO queryById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ProjectLawsInventoryLogEO> queryList();
|
||||||
|
}
|
||||||
+79
-35
@@ -1,6 +1,9 @@
|
|||||||
package com.jero.modules.project.service.impl;
|
package com.jero.modules.project.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.ZipUtil;
|
import cn.hutool.core.util.ZipUtil;
|
||||||
|
import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
|
||||||
|
import com.jero.modules.dummy.enums.DummyInventoryBaseFieldEnum;
|
||||||
|
import com.jero.modules.dummy.service.impl.DummyInventoryBaseEOServiceImpl;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.aliyuncs.utils.IOUtils;
|
import com.aliyuncs.utils.IOUtils;
|
||||||
@@ -21,25 +24,23 @@ import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
|||||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||||
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
||||||
import com.jero.modules.dummy.service.IDummyInventoryInfoEOService;
|
import com.jero.modules.dummy.service.IDummyInventoryInfoEOService;
|
||||||
|
import com.jero.modules.dummy.service.impl.DummyInventoryBaseEOServiceImpl;
|
||||||
import com.jero.modules.feishu.service.IFeishuService;
|
import com.jero.modules.feishu.service.IFeishuService;
|
||||||
import com.jero.modules.message.websocket.WebSocket;
|
import com.jero.modules.message.websocket.WebSocket;
|
||||||
import com.jero.modules.oss.entity.OSSFile;
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
import com.jero.modules.oss.service.IOSSFileService;
|
import com.jero.modules.oss.service.IOSSFileService;
|
||||||
import com.jero.modules.project.entity.*;
|
import com.jero.modules.project.entity.*;
|
||||||
import com.jero.modules.project.enums.InventoryAffirmStatusEnum;
|
import com.jero.modules.project.enums.*;
|
||||||
import com.jero.modules.project.enums.MsgTypeEnum;
|
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
|
||||||
import com.jero.modules.project.enums.OperatorResultEnum;
|
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
||||||
import com.jero.modules.project.enums.OperatorTypeEnum;
|
import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
|
||||||
import com.jero.modules.project.enums.ProjectRoleEnum;
|
import com.jero.modules.project.mapper.ProjectRelatedPersonnelMapper;
|
||||||
import com.jero.modules.project.enums.RequestSourceEnum;
|
|
||||||
import com.jero.modules.project.enums.TaskAffirmStatusEnum;
|
|
||||||
import com.jero.modules.project.mapper.*;
|
|
||||||
import com.jero.modules.project.service.*;
|
import com.jero.modules.project.service.*;
|
||||||
import com.jero.modules.split.common.FileUnZip;
|
import com.jero.modules.split.common.FileUnZip;
|
||||||
import com.jero.modules.system.entity.SysAnnouncement;
|
import com.jero.modules.system.entity.SysAnnouncement;
|
||||||
import com.jero.modules.system.entity.SysCategory;
|
|
||||||
import com.jero.modules.system.entity.SysDictItem;
|
import com.jero.modules.system.entity.SysDictItem;
|
||||||
import com.jero.modules.system.entity.SysUser;
|
import com.jero.modules.system.entity.SysUser;
|
||||||
|
import com.jero.modules.system.mapper.SysDictItemMapper;
|
||||||
import com.jero.modules.system.mapper.SysUserMapper;
|
import com.jero.modules.system.mapper.SysUserMapper;
|
||||||
import com.jero.modules.system.service.ISysAnnouncementService;
|
import com.jero.modules.system.service.ISysAnnouncementService;
|
||||||
import com.jero.modules.system.service.ISysUserService;
|
import com.jero.modules.system.service.ISysUserService;
|
||||||
@@ -50,19 +51,8 @@ import org.apache.commons.collections4.CollectionUtils;
|
|||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.poi.hssf.usermodel.HSSFCell;
|
import org.apache.poi.hssf.usermodel.*;
|
||||||
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
import org.apache.poi.ss.usermodel.*;
|
||||||
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
|
|
||||||
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
|
|
||||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
|
||||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
||||||
import org.apache.poi.ss.usermodel.Cell;
|
|
||||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
|
||||||
import org.apache.poi.ss.usermodel.Row;
|
|
||||||
import org.apache.poi.ss.usermodel.Sheet;
|
|
||||||
import org.apache.poi.ss.usermodel.VerticalAlignment;
|
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
|
||||||
import org.apache.poi.ss.usermodel.WorkbookFactory;
|
|
||||||
import org.apache.poi.ss.util.CellRangeAddress;
|
import org.apache.poi.ss.util.CellRangeAddress;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
@@ -80,21 +70,10 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.File;
|
import java.io.*;
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.FileOutputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl.copyFile;
|
import static com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl.copyFile;
|
||||||
@@ -159,6 +138,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IProjectRelatedPersonnelService iProjectRelatedPersonnelService;
|
private IProjectRelatedPersonnelService iProjectRelatedPersonnelService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ProjectLawsInventoryLogEOServiceImpl projectLawsInventoryLogEOService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DummyInventoryBaseEOServiceImpl dummyInventoryBaseEOService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysDictItemMapper sysDictItemMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
@@ -227,6 +215,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
projectTaskInventoryEO.setProjectLawsInventoryId(lawsInventory.getId());
|
projectTaskInventoryEO.setProjectLawsInventoryId(lawsInventory.getId());
|
||||||
projectTaskInventoryEOList.add(projectTaskInventoryEO);
|
projectTaskInventoryEOList.add(projectTaskInventoryEO);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//更新log
|
||||||
|
String projectLibraryId = projectLawsInventoryEOS.stream().map(e->e.getProjectLibraryId()).collect(Collectors.toList()).get(0);
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
String username = sysUser.getUsername();
|
||||||
|
QueryWrapper<DummyInventoryBaseEO> queryWrapper = new QueryWrapper<>();
|
||||||
|
String dummyInventoryBaseName = dummyInventoryBaseEOService.list(queryWrapper.eq("id", dummyInventoryBaseId)).get(0).getName();//name
|
||||||
|
String contentLog = username+"调取了\""+ dummyInventoryBaseName +"\"虚拟清单的标准内容";
|
||||||
|
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId);
|
||||||
}
|
}
|
||||||
}else if(dummyInventoryInfoEOList.size() == 0 && StringUtils.isBlank(projectLawsInventoryEO.getFlag())){
|
}else if(dummyInventoryInfoEOList.size() == 0 && StringUtils.isBlank(projectLawsInventoryEO.getFlag())){
|
||||||
//flag为二次确认标识,flag为空时进行验证
|
//flag为二次确认标识,flag为空时进行验证
|
||||||
@@ -286,6 +283,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
projectTaskInventoryEOList.add(projectTaskInventoryEO);
|
projectTaskInventoryEOList.add(projectTaskInventoryEO);
|
||||||
}
|
}
|
||||||
super.saveBatch(list);
|
super.saveBatch(list);
|
||||||
|
|
||||||
|
//更新log
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
String username = sysUser.getUsername();
|
||||||
|
String serialNumber = list.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||||
|
String contentLog = username+"向清单中添加了标准\""+serialNumber+"\"";
|
||||||
|
projectLawsInventoryLogEOService.updateLog(contentLog, projectLawsInventoryEO.getProjectLibraryId());
|
||||||
}
|
}
|
||||||
//项目任务清单数据初始化。
|
//项目任务清单数据初始化。
|
||||||
this.projectTaskInventoryEOService.saveBatch(projectTaskInventoryEOList);
|
this.projectTaskInventoryEOService.saveBatch(projectTaskInventoryEOList);
|
||||||
@@ -327,6 +331,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
throw new JeroBootException("The user has no deletion permission");
|
throw new JeroBootException("The user has no deletion permission");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//更新log
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
String username = sysUser.getUsername();
|
||||||
|
QueryWrapper<ProjectLawsInventoryEO> queryWrapper = new QueryWrapper<>();
|
||||||
|
String serialNumber = list(queryWrapper.eq("id",id)).get(0).getSerialNumber();
|
||||||
|
String contentLog = username+"删除了清单中的\""+serialNumber+"\"标准";
|
||||||
|
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId);
|
||||||
|
|
||||||
removeById(id);
|
removeById(id);
|
||||||
this.projectTaskInventoryEOService.deleteByProjectLawsInventoryIds(Arrays.asList(id.split(",")));
|
this.projectTaskInventoryEOService.deleteByProjectLawsInventoryIds(Arrays.asList(id.split(",")));
|
||||||
}
|
}
|
||||||
@@ -348,6 +361,16 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
throw new JeroBootException("The user has no deletion permission");
|
throw new JeroBootException("The user has no deletion permission");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//更新log
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
String username = sysUser.getUsername();
|
||||||
|
QueryWrapper<ProjectLawsInventoryEO> queryWrapper = new QueryWrapper<>();
|
||||||
|
List<ProjectLawsInventoryEO> lawsList = list(queryWrapper.in("id", ids));
|
||||||
|
String serialNumber = lawsList.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||||
|
String contentLog = username+"删除了清单中的\""+serialNumber+"\"标准";
|
||||||
|
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId);
|
||||||
|
|
||||||
removeByIds(ids);
|
removeByIds(ids);
|
||||||
this.projectTaskInventoryEOService.deleteByProjectLawsInventoryIds(ids);
|
this.projectTaskInventoryEOService.deleteByProjectLawsInventoryIds(ids);
|
||||||
}
|
}
|
||||||
@@ -1044,6 +1067,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
}else {
|
}else {
|
||||||
throw new JeroBootException("当前操作用户不是该项目的studio工程师,没有权限操作!");
|
throw new JeroBootException("当前操作用户不是该项目的studio工程师,没有权限操作!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//更新log
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
String username = sysUser.getUsername();
|
||||||
|
String contentLog = username+"带入了相关人员名单信息";
|
||||||
|
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId);
|
||||||
return new Result<>().success("带入成功!");
|
return new Result<>().success("带入成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1242,6 +1271,14 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
projectLawsInventoryEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
projectLawsInventoryEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||||
}
|
}
|
||||||
this.saveBatch(projectLawsInventoryEOList);
|
this.saveBatch(projectLawsInventoryEOList);
|
||||||
|
|
||||||
|
//更新log
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
String username = sysUser.getUsername();
|
||||||
|
String projectLibraryId = projectLawsInventoryEOList.get(0).getProjectLibraryId();
|
||||||
|
String serialNumber = projectLawsInventoryEOList.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||||
|
String contentLog = username+"复制了\""+serialNumber+"\"";
|
||||||
|
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2211,6 +2248,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
projectTaskInventoryEOList.add(projectTaskInventoryEO);
|
projectTaskInventoryEOList.add(projectTaskInventoryEO);
|
||||||
}
|
}
|
||||||
this.projectTaskInventoryEOService.saveBatch(projectTaskInventoryEOList);
|
this.projectTaskInventoryEOService.saveBatch(projectTaskInventoryEOList);
|
||||||
|
|
||||||
|
//更新log
|
||||||
|
String serialNumber = dataList.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
String username = sysUser.getUsername();
|
||||||
|
String contentLog = username+"向清单中导入了\""+serialNumber+"\"标准";
|
||||||
|
projectLawsInventoryLogEOService.updateLog(contentLog, dataList.get(0).getProjectLibraryId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+107
@@ -0,0 +1,107 @@
|
|||||||
|
package com.jero.modules.project.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.system.vo.LoginUser;
|
||||||
|
import com.jero.modules.project.entity.ProjectLawsInventoryLogEO;
|
||||||
|
import com.jero.modules.project.mapper.ProjectLawsInventoryLogEOMapper;
|
||||||
|
import com.jero.modules.project.service.IProjectLawsInventoryLogEOService;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 项目库-法规清单更新log表
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2022-05-17
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ProjectLawsInventoryLogEOServiceImpl extends ServiceImpl<ProjectLawsInventoryLogEOMapper, ProjectLawsInventoryLogEO> implements IProjectLawsInventoryLogEOService {
|
||||||
|
/**
|
||||||
|
* 设置更新log
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void updateLog(String contentLog,String projectLibraryId) {
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
if (StringUtils.isNotBlank(contentLog)) {
|
||||||
|
ProjectLawsInventoryLogEO projectLawsInventoryLogEO = new ProjectLawsInventoryLogEO();
|
||||||
|
projectLawsInventoryLogEO.setProjectLibraryId(projectLibraryId);
|
||||||
|
projectLawsInventoryLogEO.setLogContent(contentLog);
|
||||||
|
projectLawsInventoryLogEO.setCreateBy(sysUser.getUsername());
|
||||||
|
add(projectLawsInventoryLogEO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param projectLawsInventoryLogEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void add(ProjectLawsInventoryLogEO projectLawsInventoryLogEO) {
|
||||||
|
Date now = new Date();
|
||||||
|
projectLawsInventoryLogEO.setCreateTime(now);
|
||||||
|
projectLawsInventoryLogEO.setUpdateTime(now);
|
||||||
|
save(projectLawsInventoryLogEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param projectLawsInventoryLogEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void editById(ProjectLawsInventoryLogEO projectLawsInventoryLogEO) {
|
||||||
|
Date now = new Date();
|
||||||
|
projectLawsInventoryLogEO.setUpdateTime(now);
|
||||||
|
saveOrUpdate(projectLawsInventoryLogEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteById(String id) {
|
||||||
|
removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteByIds(List<String> ids) {
|
||||||
|
removeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ProjectLawsInventoryLogEO queryById(String id) {
|
||||||
|
return getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ProjectLawsInventoryLogEO> queryList() {
|
||||||
|
return list();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user