Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
@@ -973,4 +973,29 @@ ALTER TABLE `laws_weilai`.`laws_technology_evaluation_item_result`
|
||||
ADD COLUMN `feedback_time` datetime NULL COMMENT '反馈时间' AFTER `laws_technology_evaluation_id`;
|
||||
|
||||
-- 表字段 英文修改 2022-08-31
|
||||
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Sort Number' WHERE `id` = '1529373706885799937';
|
||||
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Sort Number' WHERE `id` = '1529373706885799937';
|
||||
|
||||
-- 增加角色,countryCard管理员。 2022-08-31
|
||||
INSERT INTO `laws_weilai`.`sys_role` (`id`, `role_name`, `role_code`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `parent_code`, `role_order`) VALUES ('1564916346120916993', 'countryCard管理员', 'countryCardManage', 'countryCard最大权限', 'admin', '2022-08-31 18:01:46', NULL, NULL, NULL, NULL);
|
||||
|
||||
-- 清单确认,拒绝原因表 2022-09-01
|
||||
CREATE TABLE `laws_weilai`.`project_laws_inventory_reject_cause` (
|
||||
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL ,
|
||||
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人' ,
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期' ,
|
||||
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人' ,
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新日期' ,
|
||||
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门' ,
|
||||
`reject_user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '拒绝人id' ,
|
||||
`reject_time` datetime NULL DEFAULT NULL COMMENT '拒绝时间' ,
|
||||
`reject_cause` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '拒绝原因' ,
|
||||
`project_laws_inventory_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '法规清单id' ,
|
||||
`reject_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '拒绝类型' ,
|
||||
PRIMARY KEY (`id`)
|
||||
)
|
||||
ENGINE=InnoDB
|
||||
DEFAULT CHARACTER SET=utf8mb4 COLLATE=utf8mb4_general_ci
|
||||
COMMENT='清单确认-拒绝原因表'
|
||||
ROW_FORMAT=DYNAMIC
|
||||
;
|
||||
|
||||
|
||||
+3
-3
@@ -105,9 +105,9 @@ public class DocTranslationEO implements Serializable {
|
||||
private java.lang.String translationResult;
|
||||
|
||||
/**转换时间*/
|
||||
@Excel(name = "转换时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@Excel(name = "转换时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@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 translationTime;
|
||||
|
||||
|
||||
+4
@@ -56,6 +56,10 @@ public class CountryCardManageReleaseEOController extends JeroController<Country
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@RequestParam(name="cut", defaultValue="cn") String cut,
|
||||
HttpServletRequest req) {
|
||||
//验证用户是否拥有countryCard角色
|
||||
if(this.countryCardManageReleaseEOService.isCountryCardManage()){
|
||||
countryCardManageReleaseEO.setCreateBy(null);
|
||||
}
|
||||
QueryWrapper<CountryCardManageReleaseEO> queryWrapper = QueryGenerator.initQueryWrapper(countryCardManageReleaseEO, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<CountryCardManageReleaseEO> page = new Page<CountryCardManageReleaseEO>(pageNo, pageSize);
|
||||
|
||||
+2
@@ -85,4 +85,6 @@ public interface ICountryCardManageReleaseEOService extends IService<CountryCard
|
||||
Result<List<DictModel>> getApplyMarketList(String queryFlag,String cut);
|
||||
|
||||
List<CountryCardManageReleaseEO> queryCountryCardManageReleaseByApplyMarkets(JSONObject params);
|
||||
|
||||
boolean isCountryCardManage();
|
||||
}
|
||||
|
||||
+56
-9
@@ -16,8 +16,11 @@ import com.jero.modules.problemKnowledgeBase.mapper.CountryCardManageReleaseEOMa
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseDetailEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryNationalFlagEOService;
|
||||
import com.jero.modules.project.enums.CollectManifestRoleIdEnum;
|
||||
import com.jero.modules.system.entity.SysUserRole;
|
||||
import com.jero.modules.system.enums.DicCodeEnum;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import com.jero.modules.system.service.ISysUserRoleService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
@@ -52,6 +55,8 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
|
||||
private ISysDictService sysDictService;
|
||||
@Autowired
|
||||
private ICountryNationalFlagEOService countryNationalFlagEOService;
|
||||
@Autowired
|
||||
private ISysUserRoleService sysUserRoleService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -263,18 +268,34 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
|
||||
if(CollectionUtils.isEmpty(countryCardManageReleaseEOList)){
|
||||
result = null;
|
||||
}else {
|
||||
for (DictModel dictModel : dictModelList) {
|
||||
boolean flag = false;
|
||||
for (CountryCardManageReleaseEO countryCardManageReleaseEO : countryCardManageReleaseEOList) {
|
||||
if(StringUtils.equals(dictModel.getValue(),countryCardManageReleaseEO.getApplyMarket())
|
||||
&& StringUtils.equals(countryCardManageReleaseEO.getCreateBy(),currentUser.getUsername())){
|
||||
flag = true;
|
||||
break;
|
||||
if(this.isCountryCardManage()){
|
||||
for (DictModel dictModel : dictModelList) {
|
||||
boolean flag = false;
|
||||
for (CountryCardManageReleaseEO countryCardManageReleaseEO : countryCardManageReleaseEOList) {
|
||||
if(StringUtils.equals(dictModel.getValue(),countryCardManageReleaseEO.getApplyMarket())){
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(flag){
|
||||
result.add(dictModel);
|
||||
}
|
||||
}
|
||||
}else {
|
||||
for (DictModel dictModel : dictModelList) {
|
||||
boolean flag = false;
|
||||
for (CountryCardManageReleaseEO countryCardManageReleaseEO : countryCardManageReleaseEOList) {
|
||||
if(StringUtils.equals(dictModel.getValue(),countryCardManageReleaseEO.getApplyMarket())
|
||||
&& StringUtils.equals(countryCardManageReleaseEO.getCreateBy(),currentUser.getUsername())){
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(flag){
|
||||
result.add(dictModel);
|
||||
if(flag){
|
||||
result.add(dictModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -300,4 +321,30 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
|
||||
this.disposeData(result,cut);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证用户是否是countryCard管理员,如果是的话,展示所有数据,如果不是,则展示用户自己创建的数据。
|
||||
*/
|
||||
@Override
|
||||
public boolean isCountryCardManage(){
|
||||
boolean result = false;
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<SysUserRole> userRoleList = this.sysUserRoleService.list(new QueryWrapper<SysUserRole>().lambda().eq(SysUserRole::getUserId, currentUser.getId())); // 查询用户所有角色
|
||||
if(CollectionUtils.isNotEmpty(userRoleList)){
|
||||
CollectManifestRoleIdEnum countruCardManage = CollectManifestRoleIdEnum.COUNTRU_CARD_MANAGE;
|
||||
List<SysUserRole> userRoles = userRoleList.stream().filter(userRole -> {
|
||||
boolean flag = false;
|
||||
if(StringUtils.equals(userRole.getRoleId(),countruCardManage.getId())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(userRoles)){
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+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.ProjectLawsInventoryRejectCauseEO;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryRejectCauseEOService;
|
||||
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: 清单确认-拒绝原因表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-09-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="清单确认-拒绝原因表")
|
||||
@RestController
|
||||
@RequestMapping("/project/projectLawsInventoryRejectCauseEO")
|
||||
@Slf4j
|
||||
public class ProjectLawsInventoryRejectCauseEOController extends JeroController<ProjectLawsInventoryRejectCauseEO, IProjectLawsInventoryRejectCauseEOService> {
|
||||
@Autowired
|
||||
private IProjectLawsInventoryRejectCauseEOService projectLawsInventoryRejectCauseEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param projectLawsInventoryRejectCauseEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "清单确认-拒绝原因表-分页列表查询")
|
||||
@ApiOperation(value="清单确认-拒绝原因表-分页列表查询", notes="清单确认-拒绝原因表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProjectLawsInventoryRejectCauseEO> queryWrapper = QueryGenerator.initQueryWrapper(projectLawsInventoryRejectCauseEO, req.getParameterMap());
|
||||
Page<ProjectLawsInventoryRejectCauseEO> page = new Page<ProjectLawsInventoryRejectCauseEO>(pageNo, pageSize);
|
||||
IPage<ProjectLawsInventoryRejectCauseEO> pageList = projectLawsInventoryRejectCauseEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "清单确认-拒绝原因表-列表查询")
|
||||
@ApiOperation(value="清单确认-拒绝原因表-列表查询", notes="清单确认-拒绝原因表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProjectLawsInventoryRejectCauseEO>> queryList(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO,HttpServletRequest req) {
|
||||
List<ProjectLawsInventoryRejectCauseEO> list = projectLawsInventoryRejectCauseEOService.queryList(projectLawsInventoryRejectCauseEO,req);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param projectLawsInventoryRejectCauseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "清单确认-拒绝原因表-添加")
|
||||
@ApiOperation(value="清单确认-拒绝原因表-添加", notes="清单确认-拒绝原因表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO) {
|
||||
projectLawsInventoryRejectCauseEOService.add(projectLawsInventoryRejectCauseEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param projectLawsInventoryRejectCauseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "清单确认-拒绝原因表-编辑")
|
||||
@ApiOperation(value="清单确认-拒绝原因表-编辑", notes="清单确认-拒绝原因表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO) {
|
||||
projectLawsInventoryRejectCauseEOService.editById(projectLawsInventoryRejectCauseEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "清单确认-拒绝原因表-通过id删除")
|
||||
@ApiOperation(value="清单确认-拒绝原因表-通过id删除", notes="清单确认-拒绝原因表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
projectLawsInventoryRejectCauseEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "清单确认-拒绝原因表-批量删除")
|
||||
@ApiOperation(value="清单确认-拒绝原因表-批量删除", notes="清单确认-拒绝原因表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.projectLawsInventoryRejectCauseEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "清单确认-拒绝原因表-通过id查询")
|
||||
@ApiOperation(value="清单确认-拒绝原因表-通过id查询", notes="清单确认-拒绝原因表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO = projectLawsInventoryRejectCauseEOService.queryById(id);
|
||||
if(projectLawsInventoryRejectCauseEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(projectLawsInventoryRejectCauseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param projectLawsInventoryRejectCauseEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO) {
|
||||
return super.exportXls(request, projectLawsInventoryRejectCauseEO, ProjectLawsInventoryRejectCauseEO.class, "清单确认-拒绝原因表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProjectLawsInventoryRejectCauseEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
package com.jero.modules.project.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 清单确认-拒绝原因表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-09-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("project_laws_inventory_reject_cause")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="project_laws_inventory_reject_cause对象", description="清单确认-拒绝原因表")
|
||||
public class ProjectLawsInventoryRejectCauseEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.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 java.lang.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 java.lang.String sysOrgCode;
|
||||
|
||||
/**拒绝人id*/
|
||||
@Excel(name = "拒绝人id", width = 15)
|
||||
@ApiModelProperty(value = "拒绝人id")
|
||||
private java.lang.String rejectUserId;
|
||||
|
||||
/**拒绝时间*/
|
||||
@Excel(name = "拒绝时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "拒绝时间")
|
||||
private java.util.Date rejectTime;
|
||||
|
||||
/**拒绝原因*/
|
||||
@Excel(name = "拒绝原因", width = 15)
|
||||
@ApiModelProperty(value = "拒绝原因")
|
||||
private java.lang.String rejectCause;
|
||||
|
||||
/**法规清单id*/
|
||||
@Excel(name = "法规清单id", width = 15)
|
||||
@ApiModelProperty(value = "法规清单id")
|
||||
private java.lang.String projectLawsInventoryId;
|
||||
|
||||
/**拒绝类型*/
|
||||
@Excel(name = "拒绝类型", width = 15)
|
||||
@ApiModelProperty(value = "拒绝类型")
|
||||
private java.lang.String rejectType;
|
||||
|
||||
}
|
||||
+3
-1
@@ -14,7 +14,9 @@ import java.util.List;
|
||||
public enum CollectManifestRoleIdEnum {
|
||||
// STUDIO_ID("R&H Studio","R&H Studio","studio","1534019911296118786",1),
|
||||
ADMIN_ID("R&H Manager","R&H Manager","manager","1534020391015444481",2),
|
||||
MANAGER_ID("系统管理员","Administrator","admin","f6817f48af4fb3af11b9e8bf182f618b",3);
|
||||
MANAGER_ID("系统管理员","Administrator","admin","f6817f48af4fb3af11b9e8bf182f618b",3),
|
||||
COUNTRU_CARD_MANAGE("countryCard管理员","countryCardManage","countryCardManage","1564916346120916993",4),
|
||||
;
|
||||
|
||||
String name;
|
||||
String enName;
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.project.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryRejectCauseEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 清单确认-拒绝原因表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-09-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProjectLawsInventoryRejectCauseEOMapper extends BaseMapper<ProjectLawsInventoryRejectCauseEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
<?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.ProjectLawsInventoryRejectCauseEOMapper">
|
||||
<resultMap id="ProjectLawsInventoryRejectCauseEOResultMap" type="com.jero.modules.project.entity.ProjectLawsInventoryRejectCauseEO">
|
||||
<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="reject_user_id" property="rejectUserId" />
|
||||
<result column="reject_time" property="rejectTime" />
|
||||
<result column="reject_cause" property="rejectCause" />
|
||||
<result column="project_laws_inventory_id" property="projectLawsInventoryId" />
|
||||
<result column="reject_type" property="rejectType" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.jero.modules.project.service;
|
||||
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryRejectCauseEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 清单确认-拒绝原因表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-09-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IProjectLawsInventoryRejectCauseEOService extends IService<ProjectLawsInventoryRejectCauseEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param projectLawsInventoryRejectCauseEO
|
||||
* @return
|
||||
*/
|
||||
void add(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param projectLawsInventoryRejectCauseEO
|
||||
* @return
|
||||
*/
|
||||
void editById(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ProjectLawsInventoryRejectCauseEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ProjectLawsInventoryRejectCauseEO> queryList(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO, HttpServletRequest req);
|
||||
}
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
package com.jero.modules.project.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryRejectCauseEO;
|
||||
import com.jero.modules.project.mapper.ProjectLawsInventoryRejectCauseEOMapper;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryRejectCauseEOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description: 清单确认-拒绝原因表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-09-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ProjectLawsInventoryRejectCauseEOServiceImpl extends ServiceImpl<ProjectLawsInventoryRejectCauseEOMapper, ProjectLawsInventoryRejectCauseEO> implements IProjectLawsInventoryRejectCauseEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param projectLawsInventoryRejectCauseEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO) {
|
||||
Date now = new Date();
|
||||
projectLawsInventoryRejectCauseEO.setCreateTime(now);
|
||||
projectLawsInventoryRejectCauseEO.setUpdateTime(now);
|
||||
save(projectLawsInventoryRejectCauseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param projectLawsInventoryRejectCauseEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO) {
|
||||
Date now = new Date();
|
||||
projectLawsInventoryRejectCauseEO.setUpdateTime(now);
|
||||
saveOrUpdate(projectLawsInventoryRejectCauseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过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 ProjectLawsInventoryRejectCauseEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProjectLawsInventoryRejectCauseEO> queryList(ProjectLawsInventoryRejectCauseEO projectLawsInventoryRejectCauseEO, HttpServletRequest req) {
|
||||
QueryWrapper<ProjectLawsInventoryRejectCauseEO> queryWrapper = QueryGenerator.initQueryWrapper(projectLawsInventoryRejectCauseEO, req.getParameterMap());
|
||||
List<ProjectLawsInventoryRejectCauseEO> result = this.list(queryWrapper);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -997,7 +997,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
Map<String, Object> queryMapTemp = new HashMap<>();
|
||||
Map<String, Object> queryMap3 = new HashMap<>();
|
||||
//特殊处理编号字段
|
||||
if (key.equals("serial_number")){
|
||||
if (key.equals("serial_number") || key.equals("title") || key.equals("file_text")){
|
||||
queryMapTemp.put(key, "*" + s + "*");
|
||||
queryMap.put("wildcard",queryMapTemp);
|
||||
queryMapJson.add(queryMap);
|
||||
|
||||
+2
-2
@@ -64,8 +64,8 @@ public class LawsWarnController {
|
||||
@ApiOperation(value = "推送")
|
||||
@GetMapping(value = "/warnPullMessage")
|
||||
// @RequiresPermissions("document:pullMessage")
|
||||
public Result<?> pullMessage(String departIds,String userIds,String documentIds) {
|
||||
lawsWarnService.warnPullMessage(departIds,userIds,documentIds);
|
||||
public Result<?> pullMessage(String departIds,String userIds,String documentIds,String flag) {
|
||||
lawsWarnService.warnPullMessage(departIds,userIds,documentIds,flag);
|
||||
return Result.OK("推送成功");
|
||||
}
|
||||
}
|
||||
|
||||
+129
-6
@@ -338,7 +338,7 @@ public class LawsWarnService {
|
||||
}
|
||||
|
||||
|
||||
public String warnPullMessage(String departIds, String userIds, String documentIds) {
|
||||
public String warnPullMessage(String departIds, String userIds, String documentIds,String flag) {
|
||||
Set<String> allDepartIds = new HashSet<>();
|
||||
//查询当前部门下所有部门
|
||||
if (StringUtils.isNotEmpty(departIds)) {
|
||||
@@ -379,6 +379,25 @@ public class LawsWarnService {
|
||||
List<String> urlList = new ArrayList<>();
|
||||
List<String> hrefList = new ArrayList<>();
|
||||
for (Map<String, Object> map : mapList) {
|
||||
//1-->新车型实施日期, 2-->在产车实施日期
|
||||
String timeContent = "";
|
||||
if("1".equals(flag)){
|
||||
String value = StringUtils.valueOf(map.get("xin1_che1_xing2_shi2_shi1_ri4_qi1"));
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
if(value.contains(" ")){
|
||||
value = value.split(" ")[0];
|
||||
}
|
||||
timeContent =" to you as the implementation date of the new model is " +value;
|
||||
}
|
||||
}else if("2".equals(flag)){
|
||||
String value = StringUtils.valueOf(map.get("implement_time"));
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
if(value.contains(" ")){
|
||||
value = value.split(" ")[0];
|
||||
}
|
||||
timeContent =" to you as the implementation date of vehicle production is " +value;
|
||||
}
|
||||
}
|
||||
serialNumberList.add(StringUtils.valueOf(map.get("serial_number")));
|
||||
String url = backUrl + "/docManage/library/detail?id=" + map.get("id") +
|
||||
"&title=" + map.get("title") +
|
||||
@@ -388,13 +407,16 @@ public class LawsWarnService {
|
||||
"&title=" + map.get("title") +
|
||||
"&serial_number=" + map.get("serial_number") + "'" + " target='_blank'>" + map.get("serial_number") + "</a>";
|
||||
urlList.add(url);
|
||||
hrefList.add(href);
|
||||
hrefList.add(href+timeContent);
|
||||
}
|
||||
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String content = sysUser.getUsername() + " pushed " + StringUtils.join(serialNumberList, ",") + " to you. Please be reminded to check it out.";
|
||||
String contentInfo = sysUser.getUsername() + " pushed " + StringUtils.join(hrefList, ",") + " to you. Please be reminded to check it out.";
|
||||
String content = StringUtils.join(serialNumberList, ",") + " has been shared with you, please check.";
|
||||
//消息详情模板
|
||||
// XXX has pushed GB 7258 to you as the implementation date of vehicle production is XXXX-XX-XX,
|
||||
// GB 7258 to you as the implementation date of vehicle production is XXXX-XX-XX, Please be reminded to check it out.
|
||||
String contentInfo = sysUser.getUsername() + " has pushed " + StringUtils.join(hrefList, ",") + ", Please be reminded to check it out.";
|
||||
String title = content;
|
||||
|
||||
//封装消息的实体类
|
||||
@@ -409,10 +431,28 @@ public class LawsWarnService {
|
||||
mapList.stream().forEach(e->{
|
||||
if(s.contains((String)e.get("id"))){
|
||||
String serialNumber = StringUtils.valueOf(e.get("serial_number"));
|
||||
list.add(serialNumber);
|
||||
String timeContent = "";
|
||||
if("1".equals(flag)){
|
||||
String value = StringUtils.valueOf(e.get("xin1_che1_xing2_shi2_shi1_ri4_qi1"));
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
if(value.contains(" ")){
|
||||
value = value.split(" ")[0];
|
||||
}
|
||||
timeContent =" to you as the implementation date of the new model is " +value;
|
||||
}
|
||||
}else if("2".equals(flag)){
|
||||
String value = StringUtils.valueOf(e.get("implement_time"));
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
if(value.contains(" ")){
|
||||
value = value.split(" ")[0];
|
||||
}
|
||||
timeContent =" to you as the implementation date of vehicle production is " +value;
|
||||
}
|
||||
}
|
||||
list.add(serialNumber + timeContent);
|
||||
}
|
||||
});
|
||||
String contentTemp = sysUser.getUsername() + " pushed " + StringUtils.join(list, ",") + " to you. Please be reminded to check it out.";
|
||||
String contentTemp = sysUser.getUsername() + " has pushed " + StringUtils.join(list, ",") + ", Please be reminded to check it out.";
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
@@ -421,4 +461,87 @@ public class LawsWarnService {
|
||||
bussDocumentLibraryEOService.sendWebsocket(documentIds, contentInfo);
|
||||
return "推送成功";
|
||||
}
|
||||
// public String warnPullMessage(String departIds, String userIds, String documentIds,String flag) {
|
||||
// Set<String> allDepartIds = new HashSet<>();
|
||||
// //查询当前部门下所有部门
|
||||
// if (StringUtils.isNotEmpty(departIds)) {
|
||||
// String[] departIdArr = departIds.split(",");
|
||||
// for (String departId : departIdArr) {
|
||||
// List<String> subDepIdsByDepId = sysDepartService.getSubDepIdsByDepId(departId);
|
||||
// allDepartIds.addAll(subDepIdsByDepId);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// List<String> userIdList = new ArrayList<>();
|
||||
// List<String> thirdIdList = new ArrayList<>();
|
||||
// if (StringUtils.isNotBlank(departIds)) {
|
||||
// //查询部门下的人员
|
||||
// List<SysUser> userList = new ArrayList<>();
|
||||
// if(allDepartIds.size() != 0){
|
||||
// userList = sysUserService.getUserListByDepIds(new ArrayList<>(allDepartIds));
|
||||
// }
|
||||
//
|
||||
// if (userList.size() != 0) {
|
||||
// userIdList = userList.stream().map(SysUser::getId).distinct().collect(Collectors.toList());
|
||||
// thirdIdList = userList.stream().map(SysUser::getThirdId).distinct().collect(Collectors.toList());
|
||||
// }
|
||||
// }
|
||||
// if(userIdList.size() == 0 && StringUtils.isNotBlank(userIds)){
|
||||
// List<SysUser> sysUsers = sysUserService.listByIds(Arrays.asList(userIds.split(",")));
|
||||
// if(sysUsers.size() != 0){
|
||||
// List<String> userId = sysUsers.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||
// List<String> thirdId = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
// userIdList.addAll(userId);
|
||||
// thirdIdList.addAll(thirdId);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //查询文档
|
||||
// List<Map<String, Object>> mapList = bussDocumentLibraryEOMapper.selectMapsAll(documentIds);
|
||||
// List<String> serialNumberList = new ArrayList<>();
|
||||
// List<String> urlList = new ArrayList<>();
|
||||
// List<String> hrefList = new ArrayList<>();
|
||||
// for (Map<String, Object> map : mapList) {
|
||||
// serialNumberList.add(StringUtils.valueOf(map.get("serial_number")));
|
||||
// String url = backUrl + "/docManage/library/detail?id=" + map.get("id") +
|
||||
// "&title=" + map.get("title") +
|
||||
// "&serial_number=" + map.get("serial_number");
|
||||
//
|
||||
// String href = "<a href='/docManage/library/detail?id=" + map.get("id") +
|
||||
// "&title=" + map.get("title") +
|
||||
// "&serial_number=" + map.get("serial_number") + "'" + " target='_blank'>" + map.get("serial_number") + "</a>";
|
||||
// urlList.add(url);
|
||||
// hrefList.add(href);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// String content = sysUser.getUsername() + " pushed " + StringUtils.join(serialNumberList, ",") + " to you. Please be reminded to check it out.";
|
||||
// String contentInfo = sysUser.getUsername() + " pushed " + StringUtils.join(hrefList, ",") + " to you. Please be reminded to check it out.";
|
||||
// String title = content;
|
||||
//
|
||||
// //封装消息的实体类
|
||||
// SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.PUSH.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
// sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
// bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
||||
// //飞书
|
||||
// try {
|
||||
// for (String s : urlList) {
|
||||
// String encode = UriEncoder.encode(s);
|
||||
// List<String> list = new ArrayList<>();
|
||||
// mapList.stream().forEach(e->{
|
||||
// if(s.contains((String)e.get("id"))){
|
||||
// String serialNumber = StringUtils.valueOf(e.get("serial_number"));
|
||||
// list.add(serialNumber);
|
||||
// }
|
||||
// });
|
||||
// String contentTemp = sysUser.getUsername() + " pushed " + StringUtils.join(list, ",") + " to you. Please be reminded to check it out.";
|
||||
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
|
||||
// }
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// bussDocumentLibraryEOService.sendWebsocket(documentIds, contentInfo);
|
||||
// return "推送成功";
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -63,15 +63,17 @@
|
||||
departId: '',
|
||||
defaultExpandedKeys: [],
|
||||
submitLoading: false,
|
||||
visibleTree: false
|
||||
visibleTree: false,
|
||||
flag: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
getPush(data) {
|
||||
getPush(data, flag) {
|
||||
this.tableKey = data
|
||||
this.flag = flag
|
||||
this.searchModel = ''
|
||||
this.visible = true
|
||||
this.visibleTree = false
|
||||
@@ -99,10 +101,20 @@
|
||||
this.visibleTree = false
|
||||
},
|
||||
handleSubmit() {
|
||||
let query = {
|
||||
documentIds: this.tableKey.join(','),
|
||||
userIds: this.userIds.join(','),
|
||||
departIds: this.userIds.join(',')
|
||||
let query = {}
|
||||
if (this.flag) {
|
||||
query = {
|
||||
documentIds: this.tableKey.join(','),
|
||||
userIds: this.userIds.join(','),
|
||||
departIds: this.userIds.join(','),
|
||||
flag: this.flag
|
||||
}
|
||||
} else {
|
||||
query = {
|
||||
documentIds: this.tableKey.join(','),
|
||||
userIds: this.userIds.join(','),
|
||||
departIds: this.userIds.join(',')
|
||||
}
|
||||
}
|
||||
this.submitLoading = true
|
||||
this.confirmLoading = true
|
||||
|
||||
@@ -234,7 +234,13 @@
|
||||
handleCompare() {
|
||||
if (this.selectedRowKeys.length > 0) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.libraryPushRef.getPush(JSON.parse(JSON.stringify(this.selectedRowKeys)))
|
||||
let flag = ''
|
||||
if (this.activeTab == this.$t('ImplementationDate')) {
|
||||
flag = 1
|
||||
} else {
|
||||
flag = 2
|
||||
}
|
||||
this.$refs.libraryPushRef.getPush(JSON.parse(JSON.stringify(this.selectedRowKeys)),flag)
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
|
||||
Reference in New Issue
Block a user