Kaynağa Gözat

数据提交

yuansh 3 hafta önce
ebeveyn
işleme
e6e80aae36
15 değiştirilmiş dosya ile 466 ekleme ve 342 silme
  1. 3 0
      jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/mapper/ActNodeMapper.java
  2. 7 1
      jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/mapper/xml/ActReModelMapper.xml
  3. 1 0
      jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/service/IActNodeService.java
  4. 4 0
      jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/service/Impl/ActNodeServiceImpl.java
  5. 8 2
      jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/web/ActBusinessController.java
  6. 38 4
      jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/web/ActTaskController.java
  7. 12 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/controller/IncidentTicketController.java
  8. 2 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/IncidentTicket.java
  9. 3 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/impl/IncidentTicketServiceImpl.java
  10. 1 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/salary/controller/SalaryChangeRecordController.java
  11. 1 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/salary/controller/SalaryManagementController.java
  12. 1 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysPermissionController.java
  13. 331 327
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java
  14. 1 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
  15. 53 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml

+ 3 - 0
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/mapper/ActNodeMapper.java

@@ -35,4 +35,7 @@ public interface ActNodeMapper extends BaseMapper<ActNode> {
     @Select("select * from sys_user where id in (select user_id from sys_user_depart where dep_id = #{id}) and identity = 2")
     List<LoginUser> findUserDepartmentId(@Param("id") String id);
 
+    @Select("select MESSAGE_ from ACT_HI_COMMENT where TASK_ID_ = #{id} and TYPE_ = 'comment' order by TIME_")
+    List<String> selectMsg(@Param("id") String id);
+
 }

+ 7 - 1
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/mapper/xml/ActReModelMapper.xml

@@ -131,12 +131,18 @@ FROM
 		WHERE
 		RES.END_TIME_ IS NOT NULL
 
-		AND ( (RES.ASSIGNEE_ = #{map.username} OR ( RES.ASSIGNEE_ IS NULL AND HI_OR0.TYPE_ = 'candidate' AND ( HI_OR0.USER_ID_ = #{map.username} )))
+		<!--AND ( (RES.ASSIGNEE_ = #{map.username} OR ( RES.ASSIGNEE_ IS NULL AND HI_OR0.TYPE_ = 'candidate' AND ( HI_OR0.USER_ID_ = #{map.username} )))
 		    or (RES.ASSIGNEE_ = #{map.userId} OR ( RES.ASSIGNEE_ IS NULL AND HI_OR0.TYPE_ = 'candidate' AND ( HI_OR0.USER_ID_ = #{map.userId} )))
+		    )-->
+		AND ( (( RES.ASSIGNEE_ IS NULL AND HI_OR0.TYPE_ = 'candidate' AND ( HI_OR0.USER_ID_ = #{map.username} )))
+		    or (( RES.ASSIGNEE_ IS NULL AND HI_OR0.TYPE_ = 'candidate' AND ( HI_OR0.USER_ID_ = #{map.userId} )))
 		    )
 		<if test="map.pkOrg!=null and map.pkOrg!=''">
 			AND RES.pk_org=#{map.pkOrg}
 		</if>
+		<if test="map.begin!=null and map.begin!=''">
+			AND RES.START_TIME_ between #{map.begin} and CONCAT(#{map.end},' 23:59:59')
+		</if>
 		<if test="map.name!=null and map.name!=''">
 			AND RES.NAME_ LIKE '%${map.name}%'
 		</if>

+ 1 - 0
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/service/IActNodeService.java

@@ -18,4 +18,5 @@ public interface IActNodeService extends IService<ActNode> {
     List<LoginUser> getSysUserList(Map<String,Object> map);
 
     List<LoginUser> queryAllUser();
+    List<String> selectMsg(String id);
 }

+ 4 - 0
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/service/Impl/ActNodeServiceImpl.java

@@ -84,6 +84,10 @@ public class ActNodeServiceImpl extends ServiceImpl<ActNodeMapper, ActNode> impl
         return this.baseMapper.findUserByRoleId(id);
     }
 
+    public List<String> selectMsg(String id) {
+        return this.baseMapper.selectMsg(id);
+    }
+
     public List<LoginUser> findUserDepartmentId(String id) {
         return this.baseMapper.findUserDepartmentId(id);
     }

+ 8 - 2
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/web/ActBusinessController.java

@@ -871,8 +871,14 @@ public class ActBusinessController {
                 columnIncrease=columnIncrease+sb.toString()+" as "+param.getTableName()+"__"+column.get("columnName").toString()+",";
             }
         }
-        //截掉最后一个符号
-        columnIncrease=columnIncrease.substring(0, columnIncrease.length() -1);
+
+        if("incident_ticket".equals(param.getTableName())){
+            columnIncrease=columnIncrease+" cl.follow_up ";
+        }else{
+            //截掉最后一个符号","
+            columnIncrease=columnIncrease.substring(0, columnIncrease.length() -1);
+        }
+
         map.put("columnIncrease",columnIncrease);
         map.put("column1",column1);
         List<Map<String,Object>> list=iActBusinessService.getActBusinessList(map);

+ 38 - 4
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/web/ActTaskController.java

@@ -50,6 +50,7 @@ import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
 import java.net.URLDecoder;
+import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -438,9 +439,16 @@ public class ActTaskController {
             }
             htv.setAssignees(assignees);
             // 关联审批意见
-            List<Comment> comments = taskService.getTaskComments(htv.getId(), "comment");
+//            List<Comment> comments = taskService.getTaskComments(htv.getId(), "comment");
+            List<String> comments = actNodeService.selectMsg(htv.getId());
             if(comments!=null&&comments.size()>0){
-                htv.setComment(comments.get(0).getFullMessage());
+                htv.setComment(comments.get(0));
+//                if("��ͬ��".equals(comments.get(0).getFullMessage())){
+//                    htv.setComment("已同意");
+//                }else{
+//
+//                    htv.setComment(comments.get(0).getFullMessage());
+//                }
             }
             if (!firstComplete && htv.getEndTime() != null){
                 htv.setDeleteReason("");
@@ -790,6 +798,8 @@ public class ActTaskController {
     public Result<Object> doneList(String name,
                                    String categoryId,
                                    String defname,
+                                   String begin,
+                                   String end,
                                    Integer priority,
                                    HttpServletRequest req){
 
@@ -815,6 +825,21 @@ public class ActTaskController {
         Map<String,Object> map=new HashMap<>();
         map.put("name",name);
         map.put("username",userId);
+        // 格式化输出
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        if(StringUtils.isBlank(begin)){
+            // 获取三个月前的日期
+            Calendar calendar = Calendar.getInstance();
+            calendar.setTime(new Date());
+            calendar.add(Calendar.MONTH, -1);
+            Date threeMonthsAgo = calendar.getTime();
+            begin = sdf.format(threeMonthsAgo);
+        }
+        if(StringUtils.isBlank(end)){
+            end = sdf.format(new Date());
+        }
+        map.put("begin",begin);
+        map.put("end",end);
         map.put("pkOrg",loginUser.getOrgCode());
         map.put("userId",loginUser.getId());
 //        map.put("defname",defname);
@@ -839,10 +864,19 @@ public class ActTaskController {
                 }
             }
             // 关联审批意见
-            List<Comment> comments = taskService.getTaskComments(htv.getId(), "comment");
+//            List<Comment> comments = taskService.getTaskComments(htv.getId(), "comment");
+            List<String> comments = actNodeService.selectMsg(htv.getId());
             if(comments!=null&&comments.size()>0){
-                htv.setComment(comments.get(0).getFullMessage());
+                htv.setComment(comments.get(0));
             }
+//            if(comments!=null&&comments.size()>0){
+//                if("��ͬ��".equals(comments.get(0).getFullMessage())){
+//                    htv.setComment("已同意");
+//                }else{
+//
+//                    htv.setComment(comments.get(0).getFullMessage());
+//                }
+//            }
             // 关联流程信息
             ActZprocess actProcess = actZprocessService.getById(htv.getProcDefId());
             if(actProcess!=null){

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

@@ -539,6 +539,18 @@ public class IncidentTicketController {
 			incidentTicket.setMsgTime3(new Date());
 			incidentTicket.setFrequency3(0);
 			incidentTicketService.updateById(incidentTicket);
+
+			List<IncidentTicketChildren> childrenList = incidentTicketChildrenService.selectByMainId(incidentTicket.getId());
+			for (IncidentTicketChildren o:childrenList) {
+
+				String practicalSum = o.getPracticalSum();//实际事故金额
+				String accidentSum = o.getAccidentSum();//事故金额
+				if(StringUtils.isBlank(practicalSum)){
+					o.setPracticalSum(accidentSum);
+					incidentTicketChildrenService.updateById(o);
+				}
+			}
+
 			return Result.ok("执行成功(该单据无需推送U8,请直接执行下一步操作)");
 		}
 		String date1 = DateUtils.formatDate(incidentTicket.getInvoicingDate(),"yyyy-MM-dd");

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

@@ -274,7 +274,8 @@ public class IncidentTicket implements Serializable {
     private String isConfirm;
     //扣款金额
     private BigDecimal deductionAmount;
-
+//srm返回字段,如果为1则在未提交的流程列表显示
+    private String followUp;
 	/**
 	 * 订单备注
 	 */

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

@@ -741,8 +741,8 @@ public class IncidentTicketServiceImpl extends ServiceImpl<IncidentTicketMapper,
 		LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
 		HashMap<String,Object> taskParam = new HashMap<>();
 
-		if(!sysUser.getUsername().equals("T0008")){
-			return Result.error("该功能仅方珂使用");
+		if(!sysUser.getUsername().equals("T0008") && !sysUser.getUsername().equals("T0007")){
+			return Result.error("该功能仅方珂或张姚瑶使用");
 		}
 
 		Map<String ,Object> map = new HashMap<>();
@@ -841,6 +841,7 @@ public class IncidentTicketServiceImpl extends ServiceImpl<IncidentTicketMapper,
 		HashMap<String,Object> taskParam = new HashMap<>();
 
 		sysBaseAPI.sendSysAnnouncement(sysUser,sysUser.getUsername(),"T0008","质量事故单 "+code,code+"  "+title+" 财务对单人已处理完毕;", CommonConstant.MSG_CATEGORY_2,taskParam);
+		sysBaseAPI.sendSysAnnouncement(sysUser,sysUser.getUsername(),"T0007","质量事故单 "+code,code+"  "+title+" 财务对单人已处理完毕;", CommonConstant.MSG_CATEGORY_2,taskParam);
 
 //		if(isComplete){
 

+ 1 - 1
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/salary/controller/SalaryChangeRecordController.java

@@ -61,7 +61,7 @@ public class SalaryChangeRecordController extends JeecgController<SalaryChangeRe
     @ModelAttribute
     public void get() {
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        if(!"T0003".equals(sysUser.getUsername()) && !"T0111".equals(sysUser.getUsername())){
+        if(!"T0003".equals(sysUser.getUsername()) && !"T0111".equals(sysUser.getUsername()) && !"T0175".equals(sysUser.getUsername())){
             throw new JeecgBootException("无权操作此功能!!!");
         }
     }

+ 1 - 1
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/salary/controller/SalaryManagementController.java

@@ -89,7 +89,7 @@ public class SalaryManagementController {
     @ModelAttribute
     public void get() {
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        if(!"T0003".equals(sysUser.getUsername()) && !"T0111".equals(sysUser.getUsername())){
+        if(!"T0003".equals(sysUser.getUsername()) && !"T0111".equals(sysUser.getUsername()) && !"T0175".equals(sysUser.getUsername())){
             throw new JeecgBootException("无权操作此功能!!!");
         }
     }

+ 1 - 1
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysPermissionController.java

@@ -214,7 +214,7 @@ public class SysPermissionController {
 			List<SysPermission> metaList = new ArrayList<>();
 
 //			metaList = metaList2;
-			if(username.equals("T0003") || username.equals("T0111")){
+			if(username.equals("T0003") || username.equals("T0111") || username.equals("T0175")){
 				metaList = metaList2;
 			}else{
 

Dosya farkı çok büyük olduğundan ihmal edildi
+ 331 - 327
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java


+ 1 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java

@@ -123,6 +123,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
 
 	List<SysUserSysDepartModel> selectUserInfo(IPage page, @Param("orgCode") String orgCode, @Param("userParams") SysUser userParams);
 	List<SysUser> selectUserInfo(@Param("orgCode") String orgCode, @Param("userParams") SysUser userParams);
+	List<SysUser> selectUserInfo2(@Param("orgCode") String orgCode, @Param("userParams") SysUser userParams);
 
 
     /**

+ 53 - 2
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml

@@ -144,6 +144,52 @@
 			sys_depart.org_code ASC
 	</select>
 
+	<select id="selectUserInfo2" resultType="org.jeecg.modules.system.entity.SysUser">
+		select group_concat(IFNULL(c.depart_name,'无部门')) AS "departIds",
+			   <!--group_concat(IFNULL(c.id,'')) AS "id",-->
+			   a.id AS "id",
+			   a.realname AS "realname",
+			   a.work_no AS "work_no",
+				a.sex as "sex",
+				CASE when d.name = null or d.name = '' or d.name is null
+				THEN a.post
+				ELSE d.name
+				END AS "post",
+			   a.telephone AS "telephone",
+			   a.email AS "email",
+			   a.phone AS "phone" ,
+			   a.n_Virtual_No as "nVirtualNo",
+			   a.n_Company_Phone as "nCompanyPhone",
+			   a.n_Company_Line as "nCompanyLine"
+		from sys_user a
+				 left join sys_user_depart b on a.id = b.user_id
+				 left join sys_depart c on c.id = b.dep_id
+		left join sys_position d on d.code = a.post
+
+		WHERE
+		a.del_flag='0' AND c.org_code LIKE '${orgCode}%'
+
+		<if test="userParams != null">
+			<if test="userParams.realname != null and userParams.realname != ''">
+				AND a.realname LIKE '%${userParams.realname}%'
+			</if>
+			<if test="userParams.workNo != null and userParams.workNo != ''">
+				AND a.work_no LIKE '%${userParams.workNo}%'
+			</if>
+			<if test="userParams.deptName != null and userParams.deptName != ''">
+				AND c.depart_name LIKE '%${userParams.deptName}%'
+			</if>
+			<if test="userParams.deptCode != null and userParams.deptCode != ''">
+				AND c.org_code LIKE '%${userParams.deptCode}%'
+			</if>
+			<if test="userParams.syHireType != null and userParams.syHireType != ''">
+				AND IFNULL(a.sy_Hire_Type,'在职') in  (${userParams.syHireType})
+			</if>
+		</if>
+		group by a.username,a.realname
+		order by substring_index(work_no, '-', 1) + 0 ASC,work_no
+	</select>
+
 	<select id="selectUserInfo" resultType="org.jeecg.modules.system.entity.SysUser">
 		select group_concat(IFNULL(c.depart_name,'无部门')) AS "departIds",
 			   <!--group_concat(IFNULL(c.id,'')) AS "id",-->
@@ -167,7 +213,9 @@
 		left join sys_position d on d.code = a.post
 
 		WHERE
-		a.del_flag='0' and a.communication !=1 and ifnull(a.sy_hire_type,'1') !='离职' AND c.org_code LIKE '${orgCode}%'
+		a.del_flag='0' and a.communication !=1
+		 <!-- and ifnull(a.sy_hire_type,'1') !='离职' -->
+		 AND c.org_code LIKE '${orgCode}%'
 
 		<if test="userParams != null">
 			<if test="userParams.realname != null and userParams.realname != ''">
@@ -197,7 +245,10 @@
 			left join sys_position d on d.code = a.post
 
 			WHERE
-			a.del_flag='0' and a.communication !=1 and ifnull(a.sy_hire_type,'1') !='离职' AND c.org_code LIKE '${orgCode}%'
+			a.del_flag='0' and a.communication !=1
+
+		<!-- and ifnull(a.sy_hire_type,'1') !='离职' -->
+			AND c.org_code LIKE '${orgCode}%'
 
 			<if test="userParams != null">
 				<if test="userParams.realname != null and userParams.realname != ''">

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor