Browse Source

流程处理

yuansh 2 years ago
parent
commit
2df638561e

+ 1 - 1
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/mapper/TbTableInfoMapper.java

@@ -23,7 +23,7 @@ public interface TbTableInfoMapper extends BaseMapper<TbTableInfo> {
     * @Param [tableName]
     * @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
     */
-    @Select("select  COLUMN_NAME as columnName, column_comment as columnComment from information_schema.columns where table_name =#{tableName}")
+    @Select("select  COLUMN_NAME as columnName, column_comment as columnComment from information_schema.columns where table_name =#{tableName} group by COLUMN_NAME,column_comment")
     List<Map<String,Object>> getTableColumnList(@Param("tableName") String tableName);
 
     /**

+ 4 - 1
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/controller/IncidentTicketController.java

@@ -113,7 +113,10 @@ public class IncidentTicketController {
 			if(o.getState().equals("4") || o.getState().equals("5")){
 				List<IncidentTicketChildren> list = incidentTicketChildrenService.selectByMainId(o.getId());
 				String result = list.stream().map(IncidentTicketChildren::getU8Invoice).collect(Collectors.joining(","));
-				o.setU8Invoices(result);
+				if(StringUtils.isNotBlank(result) && !result.equals("null")){
+					o.setU8Invoices(result);
+				}
+
 			}
 
 			if(StringUtils.isNotBlank(o.getResponsibilityPerson1())){

+ 10 - 6
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/SyCertificates.java

@@ -12,6 +12,7 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import org.jeecg.common.aspect.annotation.Dict;
 import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
@@ -43,11 +44,11 @@ public class SyCertificates {
     @ApiModelProperty(value = "创建日期")
 	private Date createTime;
 	/**更新人登录名称*/
-	@Excel(name = "更新人登录名称", width = 15)
+//	@Excel(name = "更新人登录名称", width = 15)
     @ApiModelProperty(value = "更新人登录名称")
 	private String updateBy;
 	/**更新日期*/
-	@Excel(name = "更新日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+//	@Excel(name = "更新日期", width = 20, 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 = "更新日期")
@@ -57,7 +58,9 @@ public class SyCertificates {
     @ApiModelProperty(value = "证件名称")
 	private String name;
 	/**证件所有人(到期通知人)*/
-	@Excel(name = "证件所有人(到期通知人)", width = 15)
+	@Excel(name = "证件所有人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
+//	@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
+//	@Excel(name = "证件所有人(到期通知人)", width = 15)
     @ApiModelProperty(value = "证件所有人(到期通知人)")
 	private String userId;
 	/**证件编号*/
@@ -77,7 +80,8 @@ public class SyCertificates {
     @ApiModelProperty(value = "到期时间")
 	private Date endDate;
 	/**管理人(到期通知人)*/
-	@Excel(name = "管理人(到期通知人)", width = 15)
+	@Excel(name = "管理人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
+//	@Excel(name = "管理人(到期通知人)", width = 15)
     @ApiModelProperty(value = "管理人(到期通知人)")
 	private String manageId;
 	/**提前通知时间/月*/
@@ -92,11 +96,11 @@ public class SyCertificates {
     @ApiModelProperty(value = "附件")
 	private String enclosure;
     /**是否邮件通知*/
-	@Excel(name = "是否邮件通知(1是 0否)", width = 15)
+//	@Excel(name = "是否邮件通知(1是 0否)", width = 15)
     @ApiModelProperty(value = "是否邮件通知(1是 0否)")
 	private String isMessage;
 	/**删除标记*/
-	@Excel(name = "删除标记", width = 15)
+//	@Excel(name = "删除标记", width = 15)
     @ApiModelProperty(value = "删除标记")
 	private String delFlag;
 	/**是否公开(是 否)*/

+ 2 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/SyMaterial.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
 import org.springframework.format.annotation.DateTimeFormat;
 
 /**
@@ -24,6 +25,7 @@ public class SyMaterial implements Serializable {
 	@TableId(type = IdType.ID_WORKER_STR)
 	private String id;
 	/**创建人登录名称*/
+	@Excel(name = "创建人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
 	private String createBy;
 	/**创建日期*/
 	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")

+ 5 - 5
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/SyMaterialB.java

@@ -25,18 +25,18 @@ public class SyMaterialB implements Serializable {
 	@TableId(type = IdType.ID_WORKER_STR)
 	private String id;
 	/**创建人登录名称*/
-    @Excel(name = "创建人登录名称", width = 15)
+//    @Excel(name = "创建人登录名称", width = 15)
 	private String createBy;
 	/**创建日期*/
-	@Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+//	@Excel(name = "创建日期", width = 20, 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")
 	private Date createTime;
 	/**更新人登录名称*/
-    @Excel(name = "更新人登录名称", width = 15)
+//    @Excel(name = "更新人登录名称", width = 15)
 	private String updateBy;
 	/**更新日期*/
-	@Excel(name = "更新日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+//	@Excel(name = "更新日期", width = 20, 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")
 	private Date updateTime;
@@ -60,6 +60,6 @@ public class SyMaterialB implements Serializable {
     @Excel(name = "备注", width = 15)
 	private String remarks;
 	/**delFlag*/
-    @Excel(name = "delFlag", width = 15)
+//    @Excel(name = "delFlag", width = 15)
 	private String delFlag;
 }

+ 5 - 5
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/SyMaterialC.java

@@ -25,18 +25,18 @@ public class SyMaterialC implements Serializable {
 	@TableId(type = IdType.ID_WORKER_STR)
 	private String id;
 	/**创建人登录名称*/
-    @Excel(name = "创建人登录名称", width = 15)
+//    @Excel(name = "创建人登录名称", width = 15)
 	private String createBy;
 	/**创建日期*/
-	@Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+//	@Excel(name = "创建日期", width = 20, 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")
 	private Date createTime;
 	/**更新人登录名称*/
-    @Excel(name = "更新人登录名称", width = 15)
+//    @Excel(name = "更新人登录名称", width = 15)
 	private String updateBy;
 	/**更新日期*/
-	@Excel(name = "更新日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+//	@Excel(name = "更新日期", width = 20, 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")
 	private Date updateTime;
@@ -62,6 +62,6 @@ public class SyMaterialC implements Serializable {
     @Excel(name = "备注", width = 15)
 	private String remarks;
 	/**delFlag*/
-    @Excel(name = "delFlag", width = 15)
+//    @Excel(name = "delFlag", width = 15)
 	private String delFlag;
 }

+ 35 - 16
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/impl/IncidentTicketServiceImpl.java

@@ -78,10 +78,13 @@ public class IncidentTicketServiceImpl extends ServiceImpl<IncidentTicketMapper,
 		}
 	}
 
-//	public static void main(String[] args) {
-//		String cCode=addOne("123");
-//		System.out.println(cCode);
-//	}
+	public static void main(String[] args) {
+		//0000012372
+		//0000001185
+		//1000001186
+		String cCode=addOne("0000001185");
+		System.out.println(Integer.parseInt(cCode)+1000000000);
+	}
 
 	@DS("master1")
 	@Override
@@ -692,14 +695,14 @@ public class IncidentTicketServiceImpl extends ServiceImpl<IncidentTicketMapper,
 		return resMap;
 	}
 
-	public static void main(String[] args) {
-
-		String aa = "qqq";
-		String nn = "qwe,qqq";
-
-		System.out.println(nn.contains(aa));
-
-	}
+//	public static void main(String[] args) {
+//
+//		String aa = "qqq";
+//		String nn = "qwe,qqq";
+//
+//		System.out.println(nn.contains(aa));
+//
+//	}
 
 
 	@Override
@@ -767,7 +770,7 @@ public class IncidentTicketServiceImpl extends ServiceImpl<IncidentTicketMapper,
 					return Result.error("您已通知,请勿重新操作");
 				}
 
-				o.setConfirm("已通知");
+				o.setConfirm("已处理");
 				o.setUpdateBy(sysUser.getUsername());
 				o.setUpdateTime(new Date());
 				incidentTicketMsgMapper.updateById(o);
@@ -780,9 +783,15 @@ public class IncidentTicketServiceImpl extends ServiceImpl<IncidentTicketMapper,
 //			}
 		}
 
-//		if(!isAuth){
+		if(!isAuth){
 //			return Result.error("您无权操作此事故单");
-//		}
+			IncidentTicketMsg incidentTicketMsg = new IncidentTicketMsg();
+			incidentTicketMsg.setPkIncidentTicket(headId);
+			incidentTicketMsg.setUserId(sysUser.getUsername());
+			incidentTicketMsg.setUserName(sysUser.getRealname());
+			incidentTicketMsg.setConfirm("已处理-另");
+			iIncidentTicketMsgService.save(incidentTicketMsg);
+		}
 
 		HashMap<String,Object> taskParam = new HashMap<>();
 
@@ -823,7 +832,17 @@ public class IncidentTicketServiceImpl extends ServiceImpl<IncidentTicketMapper,
 		
 		//1.先删除子表数据
 		incidentTicketChildrenMapper.deleteByMainId(incidentTicket.getId());
-		
+
+		LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		LambdaQueryWrapper<IncidentTicketMsg> query = new LambdaQueryWrapper<IncidentTicketMsg>();
+		query.eq(IncidentTicketMsg::getPkIncidentTicket,incidentTicket.getId());
+		List<IncidentTicketMsg> list = iIncidentTicketMsgService.list(query);
+		for(IncidentTicketMsg o:list){
+
+
+
+		}
+
 		//2.子表数据重新插入
 		if(incidentTicketChildrenList!=null && incidentTicketChildrenList.size()>0) {
 			for(IncidentTicketChildren entity:incidentTicketChildrenList) {

+ 4 - 3
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/vo/SyMaterialPage.java

@@ -23,7 +23,8 @@ public class SyMaterialPage {
 	/**主键*/
 	private String id;
 	/**创建人登录名称*/
-  	@Excel(name = "创建人登录名称", width = 15)
+//  	@Excel(name = "创建人登录名称", width = 15)
+	@Excel(name = "创建人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
 	private String createBy;
 	/**创建日期*/
   	@Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@@ -31,10 +32,10 @@ public class SyMaterialPage {
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
 	private Date createTime;
 	/**更新人登录名称*/
-  	@Excel(name = "更新人登录名称", width = 15)
+//  	@Excel(name = "更新人登录名称", width = 15)
 	private String updateBy;
 	/**更新日期*/
-  	@Excel(name = "更新日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+//  	@Excel(name = "更新日期", width = 20, 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")
 	private Date updateTime;

+ 17 - 2
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java

@@ -105,8 +105,7 @@ public class SysUserController {
 		Result<IPage<SysUser>> result = new Result<IPage<SysUser>>();
 		String deptName = user.getDeptName();
         user.setDeptName(null);
-//        String realname = user.getRealname();
-//        user.setRealname(null);
+
         String syHireType = user.getSyHireType();
         user.setSyHireType(null);
 		QueryWrapper<SysUser> queryWrapper = QueryGenerator.initQueryWrapper(user, req.getParameterMap());
@@ -549,6 +548,9 @@ public class SysUserController {
         if(StringUtils.isNotBlank(address)){
             sysUser.setCommunication("0");
         }
+        String deptName = sysUser.getDeptName();
+        sysUser.setDeptName(null);
+
         // Step.1 组装查询条件
         QueryWrapper<SysUser> queryWrapper = QueryGenerator.initQueryWrapper(sysUser, request.getParameterMap());
 	    LoginUser loginUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
@@ -565,7 +567,20 @@ public class SysUserController {
         }else{
             queryWrapper.orderByAsc("create_time");
         }
+        if(StringUtils.isNotBlank(deptName)){
+            SysUser user2 = new SysUser();
+            user2.setDeptName(deptName);
+            List<SysUser> aa = sysUserMapper.selectUserInfo("T",user2);
+            List<String> deptList = new ArrayList<>();
 
+            for(SysUser o:aa){
+                deptList.add(o.getId());
+            }
+            if(deptList.size() > 0){
+                queryWrapper.lambda().in(SysUser::getId,deptList);
+            }
+
+        }
         //update-end--Author:kangxiaolin  Date:20180825 for:[03]用户导出,如果选择数据则只导出相关数据----------------------
         List<SysUser> pageList = sysUserService.list(queryWrapper);
         List<SysUserAddress> pageList2 = new ArrayList<>();

+ 5 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/entity/SysUser.java

@@ -396,4 +396,9 @@ public class SysUser implements Serializable {
     private java.lang.String ssAccount;
 
     private java.lang.String communication;
+
+    /**
+     * 附件
+     */
+    private java.lang.String fileName;
 }

+ 2 - 1
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/model/SysPermissionTree.java

@@ -9,7 +9,8 @@ import org.jeecg.modules.system.entity.SysPermission;
 public class SysPermissionTree implements Serializable {
 
 	private static final long serialVersionUID = 1L;
-
+//	http://localhost:3000/?ticket=ST-2489-L-hPnUHnKW0ZPnWbPMgLUQeRYU4-WIN-I6EQPFFB9U0#/online/cgreport/58a298b11a8e4e8f8f2676da49a780d9
+//	http://localhost:3000/?ticket=ST-2489-L-hPnUHnKW0ZPnWbPMgLUQeRYU4-WIN-I6EQPFFB9U0#/online/cgreport/848237b0db3a4bc09944e06741796e3e
 	/**
 	 * id
 	 */