Browse Source

搬运工对账单及监听

yuansh 2 years ago
parent
commit
01805364b5
47 changed files with 2437 additions and 39 deletions
  1. 33 7
      jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/web/ActBusinessController.java
  2. 32 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/config/MultipartConfig.java
  3. 122 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/config/dataSource/OtherSource.java
  4. 60 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/activiti/listener/ListenerPersonnelRequirement.java
  5. 73 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/activiti/listener/ListenerSendMsgByRole.java
  6. 71 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/cas/controller/CasClientController.java
  7. 31 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/controller/CdEnterpriseEnnouncementController.java
  8. 5 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/controller/CdLinksController.java
  9. 3 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/controller/CdScheduleController.java
  10. 246 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/controller/SyCarryController.java
  11. 245 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/controller/SyCottonYarnController.java
  12. 79 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/SyCarry.java
  13. 89 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/SyCarryB.java
  14. 78 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/SyCottonYarn.java
  15. 86 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/SyCottonYarnB.java
  16. 18 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/SyCarryBMapper.java
  17. 17 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/SyCarryMapper.java
  18. 18 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/SyCottonYarnBMapper.java
  19. 17 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/SyCottonYarnMapper.java
  20. 10 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/SyMaterialMapper.java
  21. 18 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/xml/SyCarryBMapper.xml
  22. 5 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/xml/SyCarryMapper.xml
  23. 18 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/xml/SyCottonYarnBMapper.xml
  24. 5 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/xml/SyCottonYarnMapper.xml
  25. 24 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/xml/SyMaterialMapper.xml
  26. 16 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/ISyCarryBService.java
  27. 50 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/ISyCarryService.java
  28. 1 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/ISyCertificatesService.java
  29. 16 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/ISyCottonYarnBService.java
  30. 50 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/ISyCottonYarnService.java
  31. 27 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/impl/SyCarryBServiceImpl.java
  32. 234 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/impl/SyCarryServiceImpl.java
  33. 69 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/impl/SyCertificatesServiceImpl.java
  34. 27 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/impl/SyCottonYarnBServiceImpl.java
  35. 214 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/impl/SyCottonYarnServiceImpl.java
  36. 96 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/vo/SyCarryPage.java
  37. 96 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/vo/SyCottonYarnPage.java
  38. 23 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/job/ChangeUserInfoJob.java
  39. 16 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementController.java
  40. 10 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysPositionController.java
  41. 17 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java
  42. 27 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/entity/SysUser.java
  43. 7 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
  44. 16 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml
  45. 7 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysUserService.java
  46. 14 0
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
  47. 1 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/util/MyThread.java

+ 33 - 7
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/web/ActBusinessController.java

@@ -255,9 +255,29 @@ public class ActBusinessController {
         String tableId = request.getParameter("tableId");
         String tableName = request.getParameter("tableName");
 
+        Map<String, Object> map = actBusinessService.getApplyForm(tableId, tableName);
+        Set set = map.keySet();
+        for (Object o : set) {
+            if(map.get(o) != null && map.get(o).toString().startsWith("[") && map.get(o).toString().endsWith("]")
+                    && !map.get(o).toString().startsWith("[{") ){
+                String dmf = map.get(o).toString().replace("[","");
+                String dmf2 = dmf.replace("]","");
+                String dmf3 = dmf2.replace("\"","");
+                if(StringUtils.isNotBlank(dmf3)){
+                    String[] userList = dmf3.split(",");
+                    if(userList.length > 0){
+                        map.put(o.toString(),userList);
+                    }else{
+                        map.put(o.toString(),new ArrayList<>());
+                    }
+                }else{
+                    map.put(o.toString(),new ArrayList<>());
+                }
+
+            }
+        }
 
 
-        Map<String, Object> map = actBusinessService.getApplyForm(tableId, tableName);
         String tableNameb = null;
         String tableNameChildren = null;
         if(MapUtil.isNotEmpty(map)){
@@ -360,9 +380,13 @@ public class ActBusinessController {
             actBusiness.setApplyTime(new Date());
             actBusinessService.updateById(actBusiness);
         }catch (Exception e){//如果提交中发生异常,这直接通过该条数据
-            error = true;
-            onlyInfo(actBusiness,busiData);
-            throw new JeecgBootException("流程错误,直接通过");
+            String par = onlyInfo(actBusiness,busiData);
+            if(par.equals("true")){
+                System.out.println(e.getMessage()+"=============================");
+                throw new JeecgBootException("流程错误,直接通过");
+            }else{
+                throw new JeecgBootException(e.getMessage());
+            }
 
         }
 
@@ -374,10 +398,10 @@ public class ActBusinessController {
      * @param actBusiness
      * @param busiData
      */
-    public void onlyInfo(ActBusiness actBusiness,Map<String, Object> busiData){
+    public String onlyInfo(ActBusiness actBusiness,Map<String, Object> busiData){
 
         if(actBusiness == null || StringUtils.isBlank(actBusiness.getTableName())){
-            return;
+            return "false";
         }
 
         //会议纪要
@@ -423,7 +447,9 @@ public class ActBusinessController {
             //开启线程
             thread.start();
 
-
+            return "true";
+        }else{
+            return "false";
         }
 
     }

+ 32 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/config/MultipartConfig.java

@@ -0,0 +1,32 @@
+package org.jeecg.config;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.web.servlet.MultipartConfigFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import javax.servlet.MultipartConfigElement;
+import java.io.File;
+
+/**
+ * 测试临时缓存
+ **/
+@Configuration
+public class MultipartConfig{
+
+    @Value("${jeecg.path.webapp}")
+    private String projectPathTmp;
+    /**
+     *文件临时上传路径
+     */
+    @Bean
+    MultipartConfigElement multipartConfigElement() {
+        MultipartConfigFactory factory = new MultipartConfigFactory();
+        String location = projectPathTmp; //指定一个固定的临时文件路径
+        File tmpFile = new File(location);
+        if(!tmpFile.exists()){
+            tmpFile.mkdirs();
+        }
+        factory.setLocation(location);
+        return factory.createMultipartConfig();
+    }
+}

+ 122 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/config/dataSource/OtherSource.java

@@ -0,0 +1,122 @@
+package org.jeecg.config.dataSource;
+import org.apache.logging.log4j.util.PropertiesUtil;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import java.io.InputStreamReader;
+import java.sql.*;
+import java.util.*;
+
+public class OtherSource {
+
+    public List<Map<String,String>> getSupplier() {
+        String active = getProjectConfigActive("active");
+        List<Map<String,String>> supplierList = new ArrayList<>();
+
+        if(!active.equals("senyu")){
+            Map<String,String> map1 = new HashMap<>();
+            map1.put("label","上海供应商");
+            map1.put("value","00001");
+            supplierList.add(map1);
+
+            Map<String,String> map2 = new HashMap<>();
+            map2.put("label","北京供应商");
+            map2.put("value","00002");
+            supplierList.add(map2);
+            return supplierList;
+        }
+
+//        String URL="jdbc:sqlserver://192.168.5.170;DatabaseName=UFDATA_101_2021";
+        String URL="jdbc:sqlserver://192.168.1.253;DatabaseName=UFDATA_101_2021";
+        String USER="sa";
+        String PASSWORD="Windows2008R2";
+        Statement sta=null;
+        Connection con=null;
+        ResultSet rs =null;
+
+        try {
+
+            Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
+            con=DriverManager.getConnection(URL,USER,PASSWORD);
+            sta =con.createStatement();
+            String sql="select cVenCode,cVenName from all_supplier_view ";
+            rs =sta.executeQuery(sql);
+            while(rs.next()) {
+                Map<String,String> map = new HashMap<>();
+                String code=rs.getString("cVenCode");
+                String name=rs.getString("cVenName");
+                map.put("value",code);
+                map.put("label",name);
+                supplierList.add(map);
+            }
+
+        } catch (ClassNotFoundException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (SQLException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        finally {
+            if(rs!=null)
+                try {
+                    rs.close();
+                } catch (SQLException e) {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
+                }
+            if(sta!=null)
+                try {
+                    sta.close();
+                } catch (SQLException e) {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
+                }
+            if(con!=null)
+                try {
+                    con.close();
+                } catch (SQLException e) {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
+                }
+        }
+
+        return supplierList;
+
+    }
+
+    /**
+     * 获取固定文件配置信息
+     * @return
+     */
+    public static String getProjectConfigActive(String key){
+        Properties pros = new Properties();
+        String value = "";
+        try {
+            PropertiesUtil.class.getResourceAsStream("/application.yml");
+            pros.load(new InputStreamReader(PropertiesUtil.class.getResourceAsStream("/application.yml"), "UTF-8"));
+            value = pros.getProperty(key);
+        } catch (Exception e) {
+            return e.getMessage();
+        }
+        return value;
+    }
+
+
+    public static String getProjectConfigValue(String key){
+
+        String active = getProjectConfigActive("active");
+        Properties pros = new Properties();
+        String value = "";
+        try {
+            pros.load(new InputStreamReader(PropertiesUtil.class.getResourceAsStream("/application-"+active+".yml"), "UTF-8"));
+            value = pros.getProperty(key);
+        } catch (Exception e) {
+            return e.getMessage();
+        }
+        return value;
+    }
+
+    public static void main(String[] args) {
+
+    }
+}

+ 60 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/activiti/listener/ListenerPersonnelRequirement.java

@@ -0,0 +1,60 @@
+package org.jeecg.modules.activiti.listener;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import org.activiti.engine.delegate.*;
+import org.apache.commons.lang.StringUtils;
+import org.jeecg.common.constant.CommonConstant;
+import org.jeecg.common.system.api.ISysBaseAPI;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.oa.service.IActivitiService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 人员需求申请,总经理审批结束后,在人事审批之前通知发起人
+ */
+@Component
+public class ListenerPersonnelRequirement implements TaskListener, JavaDelegate {
+
+    private Expression json;
+    @Autowired
+    private ISysBaseAPI sysBaseAPI;
+
+    @Override
+    public void notify(DelegateTask delegateTask){
+        System.out.println("-------------1");
+    }
+
+    @Override
+    public void execute(DelegateExecution delegateExecution){
+        String jsonString = json.getExpressionText();
+        JSONObject jsonObject = JSON.parseObject(jsonString);
+        String receiveBy = oConvertUtils.getString(jsonObject.get("receiveBy")); // 消息接收人
+        String title = oConvertUtils.getString(jsonObject.get("title")); // 标题
+        String msg = oConvertUtils.getString(jsonObject.get("msg")); // 正文
+
+        if(StringUtils.isBlank(receiveBy) || StringUtils.isBlank(title) || StringUtils.isBlank(msg)){
+            return;
+        }
+        if(!delegateExecution.getVariableInstances().containsKey(receiveBy)){
+            return;
+        }
+
+        String msg_user = delegateExecution.getVariableInstances().get(receiveBy).getTextValue();
+
+        HashMap<String,Object> taskParam = new HashMap<>();
+        LoginUser loginUser = sysBaseAPI.getUserByName("admin");
+
+        sysBaseAPI.sendSysAnnouncement(loginUser,"admin",msg_user,title,
+                msg, CommonConstant.MSG_CATEGORY_2,taskParam);
+//                "<h3>"+msg+"</h3>", CommonConstant.MSG_CATEGORY_2,taskParam);
+
+    }
+
+}

+ 73 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/activiti/listener/ListenerSendMsgByRole.java

@@ -0,0 +1,73 @@
+package org.jeecg.modules.activiti.listener;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import org.activiti.engine.HistoryService;
+import org.activiti.engine.RepositoryService;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.delegate.*;
+import org.activiti.engine.history.HistoricTaskInstance;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.constant.CommonConstant;
+import org.jeecg.common.system.api.ISysBaseAPI;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.activiti.entity.ActBusiness;
+import org.jeecg.modules.activiti.entity.ActivitiConstant;
+import org.jeecg.modules.activiti.service.Impl.ActBusinessServiceImpl;
+import org.jeecg.modules.message.entity.SysMessageTemplate;
+import org.jeecg.modules.message.service.ISysMessageTemplateService;
+import org.jeecg.modules.system.entity.SysUser;
+import org.jeecg.modules.system.service.ISysUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * 角色消息监听
+ */
+@Component
+public class ListenerSendMsgByRole implements TaskListener, JavaDelegate {
+	private Expression json;
+	@Autowired
+	private ISysBaseAPI sysBaseAPI;
+	@Autowired
+	private ISysUserService sysUserService;
+
+	@Override
+	public void notify(DelegateTask delegateTask){
+		System.out.println("-------------1");
+	}
+
+	@Override
+	public void execute(DelegateExecution delegateExecution){
+		String jsonString = json.getExpressionText();
+		JSONObject jsonObject = JSON.parseObject(jsonString);
+		String roleCode = oConvertUtils.getString(jsonObject.get("roleCode")); // 消息接收人
+		String title = oConvertUtils.getString(jsonObject.get("title")); // 标题
+		String msg = oConvertUtils.getString(jsonObject.get("msg")); // 正文
+
+		if(StringUtils.isBlank(roleCode) || StringUtils.isBlank(title) || StringUtils.isBlank(msg)){
+			return;
+		}
+
+		List<SysUser> getUserByRoleCode = sysUserService.getUserByRoleCode(roleCode,null);
+		if(getUserByRoleCode.size() < 1){
+			return;
+		}
+
+		HashMap<String,Object> taskParam = new HashMap<>();
+		LoginUser loginUser = sysBaseAPI.getUserByName("admin");
+
+		for(SysUser o:getUserByRoleCode){
+			sysBaseAPI.sendSysAnnouncement(loginUser,"admin",o.getUsername(),title,
+					msg, CommonConstant.MSG_CATEGORY_2,taskParam);
+		}
+
+	}
+}

+ 71 - 8
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/cas/controller/CasClientController.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.cas.controller;
 
+import java.util.ArrayList;
 import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
@@ -8,6 +9,7 @@ import javax.servlet.http.HttpServletResponse;
 import org.apache.commons.lang.StringUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.constant.CommonConstant;
+import org.jeecg.common.system.api.ISysBaseAPI;
 import org.jeecg.common.system.util.JwtUtil;
 import org.jeecg.common.util.RedisUtil;
 import org.jeecg.modules.cas.util.CASServiceUtil;
@@ -47,7 +49,9 @@ public class CasClientController {
     private ISysDepartService sysDepartService;
 	@Autowired
     private RedisUtil redisUtil;
-	
+	@Autowired
+	private ISysBaseAPI sysBaseAPI;
+
 	@Value("${cas.prefixUrl}")
     private String prefixUrl;
 	
@@ -86,14 +90,46 @@ public class CasClientController {
 			JSONObject obj = new JSONObject();
 			List<SysDepart> departs = sysDepartService.queryUserDeparts(sysUser.getId());
 			obj.put("departs", departs);
-			if (departs == null || departs.size() == 0) {
+
+//			if (departs == null || departs.size() == 0) {
+//				obj.put("multi_depart", 0);
+//			} else if (departs.size() == 1) {
+//				sysUserService.updateUserDepart(principal, departs.get(0).getOrgCode());
+//				obj.put("multi_depart", 1);
+//			} else {
+//				obj.put("multi_depart", 2);
+//			}
+			//获取关联公司情况
+			if(!StringUtils.isNotBlank(sysUser.getPkOrg())){
 				obj.put("multi_depart", 0);
-			} else if (departs.size() == 1) {
-				sysUserService.updateUserDepart(principal, departs.get(0).getOrgCode());
-				obj.put("multi_depart", 1);
-			} else {
-				obj.put("multi_depart", 2);
+			}else{
+				String[] orgIdList=sysUser.getPkOrg().split(",");
+				if(orgIdList.length==1){
+					obj.put("multi_depart", 1);
+					sysUserService.updateUserDepart(principal, orgIdList[0]);
+					sysUser.setOrgCode(orgIdList[0]);
+				}else{
+					obj.put("multi_depart", 2);
+				}
+				//获取公司集合
+				String[] orgNameList=sysUser.getPkOrgName().split(",");
+				List<SysDepart> orgList=new ArrayList<>();
+				for(int i=0;i<orgIdList.length;i++){
+					SysDepart sysDepart=new SysDepart();
+					sysDepart.setId(orgIdList[i]);
+					sysDepart.setDepartName(orgNameList[i]);
+					orgList.add(sysDepart);
+				}
+				obj.put("orgList", orgList);
+			}
+
+			String is_possess = getDeptHead(sysUser.getUsername(),sysUser.getPkOrg());
+			if(is_possess.equals("0")){
+				sysUser.setIsPossess(2);
+			}else{
+				sysUser.setIsPossess(sysUser.getIdentity());
 			}
+
 			obj.put("token", token);
 			obj.put("userInfo", sysUser);
 			result.setResult(obj);
@@ -106,5 +142,32 @@ public class CasClientController {
 		return new HttpEntity<>(result);
 	}
 
-	
+
+	/**
+	 * 获取该用户是否有部门负责人
+	 * @param username
+	 * @return
+	 */
+	public String getDeptHead(String username,String orgCode){
+
+		String is_possess = "0";
+		SysDepart sysDepart= sysDepartService.getById(orgCode);
+
+		if(sysDepart != null && StringUtils.isNotBlank(sysDepart.getOrgCode())){
+
+			List<SysDepart> list = sysDepartService.queryDepartsByUsernameByOrg(username,sysDepart.getOrgCode());
+
+			for(SysDepart o:list){
+				List<String> aa = sysBaseAPI.getDeptHeadByDepId(o.getId());
+				if(aa.size() > 0){
+					is_possess = "1";
+					return is_possess;
+				}
+			}
+		}
+
+		return is_possess;
+	}
+
+
 }

+ 31 - 2
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/controller/CdEnterpriseEnnouncementController.java

@@ -13,11 +13,13 @@ import com.baomidou.mybatisplus.extension.api.R;
 import org.apache.commons.lang.StringUtils;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.api.ISysBaseAPI;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.oa.entity.CdEnterpriseEnnouncement;
+import org.jeecg.modules.oa.entity.SyCertificates;
 import org.jeecg.modules.oa.service.ICdEnterpriseEnnouncementService;
 import java.util.Date;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -53,7 +55,8 @@ import io.swagger.annotations.ApiOperation;
 public class CdEnterpriseEnnouncementController extends JeecgController<CdEnterpriseEnnouncement, ICdEnterpriseEnnouncementService> {
 	@Autowired
 	private ICdEnterpriseEnnouncementService cdEnterpriseEnnouncementService;
-	
+	 @Autowired
+	 private ISysBaseAPI sysBaseAPI;
 	/**
 	 * 分页列表查询
 	 *
@@ -67,17 +70,43 @@ public class CdEnterpriseEnnouncementController extends JeecgController<CdEnterp
 	@ApiOperation(value="企业公告-分页列表查询", notes="企业公告-分页列表查询")
 	@GetMapping(value = "/list")
 	public Result<?> queryPageList(CdEnterpriseEnnouncement cdEnterpriseEnnouncement,
+								   @RequestParam(name="parSelect", defaultValue="1") Integer parSelect,
 								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
 								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
 								   HttpServletRequest req) {
+
 		QueryWrapper<CdEnterpriseEnnouncement> queryWrapper = QueryGenerator.initQueryWrapper(cdEnterpriseEnnouncement, req.getParameterMap());
 		//公司id过滤
 		LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
 		queryWrapper.lambda().eq(CdEnterpriseEnnouncement::getPkOrg,sysUser.getOrgCode());
 		queryWrapper.lambda().eq(CdEnterpriseEnnouncement::getDelFlag,'0');
-		queryWrapper.lambda().orderByDesc(CdEnterpriseEnnouncement::getUpdateTime);
+
+		if(parSelect == 2){
+			queryWrapper.lambda().orderByDesc(CdEnterpriseEnnouncement::getCreateTime);
+		}else{
+			queryWrapper.lambda().orderByDesc(CdEnterpriseEnnouncement::getUpdateTime);
+		}
+
+
 		Page<CdEnterpriseEnnouncement> page = new Page<CdEnterpriseEnnouncement>(pageNo, pageSize);
 		IPage<CdEnterpriseEnnouncement> pageList = cdEnterpriseEnnouncementService.page(page, queryWrapper);
+
+		for (CdEnterpriseEnnouncement o:pageList.getRecords()) {
+
+			if(StringUtils.isNotBlank(o.getCreateBy())){
+				LoginUser login = sysBaseAPI.getUserByName(o.getCreateBy());
+				if(login != null){
+					o.setCreateBy(login.getRealname());
+				}
+			}
+			if(StringUtils.isNotBlank(o.getUpdateBy())){
+				LoginUser login = sysBaseAPI.getUserByName(o.getUpdateBy());
+				if(login != null){
+					o.setUpdateBy(login.getRealname());
+				}
+			}
+		}
+
 		return Result.ok(pageList);
 	}
 

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

@@ -15,6 +15,7 @@ import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.config.dataSource.OtherSource;
 import org.jeecg.modules.oa.entity.CdLinks;
 import org.jeecg.modules.oa.service.ICdLinksService;
 import java.util.Date;
@@ -70,6 +71,10 @@ public class CdLinksController extends JeecgController<CdLinks, ICdLinksService>
 								   HttpServletRequest req) {
 		QueryWrapper<CdLinks> queryWrapper = QueryGenerator.initQueryWrapper(cdLinks, req.getParameterMap());
 		LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		String active = OtherSource.getProjectConfigActive("active");
+		if(!active.equals("senyu")){
+			queryWrapper.lambda().eq(CdLinks::getCreateBy,sysUser.getUsername());
+		}
 		queryWrapper.lambda().eq(CdLinks::getPkOrg,sysUser.getOrgCode());
 		queryWrapper.lambda().eq(CdLinks::getDelFlag,'0');
 		queryWrapper.lambda().orderByDesc(CdLinks::getCreateTime);

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

@@ -72,6 +72,7 @@ public class CdScheduleController extends JeecgController<CdSchedule, ICdSchedul
 		LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
 		queryWrapper.lambda().eq(CdSchedule::getPkOrg,sysUser.getOrgCode());
 		queryWrapper.lambda().eq(CdSchedule::getDelFlag,'0');
+		queryWrapper.lambda().eq(CdSchedule::getCreateBy,sysUser.getUsername());
 		queryWrapper.lambda().orderByDesc(CdSchedule::getCreateTime);
 		Page<CdSchedule> page = new Page<CdSchedule>(pageNo, pageSize);
 		IPage<CdSchedule> pageList = cdScheduleService.page(page, queryWrapper);
@@ -186,6 +187,7 @@ public class CdScheduleController extends JeecgController<CdSchedule, ICdSchedul
 	  try {
 		  LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
 		  cdSchedule.setPkOrg(user.getOrgCode());
+		  cdSchedule.setCreateBy(user.getUsername());
 		  List<CdSchedule> list=cdScheduleService.getListByTime(cdSchedule);
 		  result.setResult(list);
 		  result.success("操作成功");
@@ -210,6 +212,7 @@ public class CdScheduleController extends JeecgController<CdSchedule, ICdSchedul
 	  try {
 		  LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
 		  cdSchedule.setPkOrg(user.getOrgCode());
+		  cdSchedule.setCreateBy(user.getUsername());
 		  Integer count=cdScheduleService.getLastMonth(cdSchedule);
 		  if(count==null){
               count=0;

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

@@ -0,0 +1,246 @@
+package org.jeecg.modules.oa.controller;
+
+import java.io.UnsupportedEncodingException;
+import java.io.IOException;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.system.vo.LoginUser;
+import org.apache.shiro.SecurityUtils;
+import org.jeecg.modules.oa.vo.SyCarryPage;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.oa.entity.SyCarryB;
+import org.jeecg.modules.oa.entity.SyCarry;
+import org.jeecg.modules.oa.service.ISyCarryService;
+import org.jeecg.modules.oa.service.ISyCarryBService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+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.alibaba.fastjson.JSON;
+
+ /**
+ * @Description: 搬运装卸费用-搬运工对账单-主表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+@RestController
+	@RequestMapping("/oa/syCarry")
+@Slf4j
+public class SyCarryController {
+	@Autowired
+	private ISyCarryService syCarryService;
+	@Autowired
+	private ISyCarryBService syCarryBService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param syCarry
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@GetMapping(value = "/list")
+	public Result<?> queryPageList(SyCarry syCarry,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+		QueryWrapper<SyCarry> queryWrapper = QueryGenerator.initQueryWrapper(syCarry, req.getParameterMap());
+		Page<SyCarry> page = new Page<SyCarry>(pageNo, pageSize);
+		IPage<SyCarry> pageList = syCarryService.page(page, queryWrapper);
+		return Result.ok(pageList);
+	}
+	
+	/**
+	 * 添加
+	 *
+	 * @param syCarryPage
+	 * @return
+	 */
+	@PostMapping(value = "/add")
+	public Result<?> add(@RequestBody SyCarryPage syCarryPage) {
+		SyCarry syCarry = new SyCarry();
+		BeanUtils.copyProperties(syCarryPage, syCarry);
+		syCarryService.saveMain(syCarry, syCarryPage.getSyCarryBList());
+		return Result.ok("添加成功!");
+	}
+	
+	/**
+	 * 编辑
+	 *
+	 * @param syCarryPage
+	 * @return
+	 */
+	@PutMapping(value = "/edit")
+	public Result<?> edit(@RequestBody SyCarryPage syCarryPage) {
+		SyCarry syCarry = new SyCarry();
+		BeanUtils.copyProperties(syCarryPage, syCarry);
+		syCarryService.updateMain(syCarry, syCarryPage.getSyCarryBList());
+		return Result.ok("编辑成功!");
+	}
+	
+	/**
+	 * 通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@DeleteMapping(value = "/delete")
+	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
+	    syCarryService.delMain(id);
+		return Result.ok("删除成功!");
+	}
+	
+	/**
+	 * 批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.syCarryService.delBatchMain(Arrays.asList(ids.split(",")));
+		return Result.ok("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+     *
+	 * @param id
+	 * @return
+	 */
+	@GetMapping(value = "/queryById")
+	public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
+		SyCarry syCarry = syCarryService.getById(id);
+		return Result.ok(syCarry);
+	}
+	
+	/**
+	 * 通过id查询
+     *
+	 * @param id
+	 * @return
+	 */
+	@GetMapping(value = "/querySyCarryBByMainId")
+	public Result<?> querySyCarryBListByMainId(@RequestParam(name="id",required=true) String id) {
+		List<SyCarryB> syCarryBList = syCarryBService.selectByMainId(id);
+		return Result.ok(syCarryBList);
+	}
+
+  /**
+   * 导出excel
+   *
+   * @param request
+   * @param syCarry
+   */
+  @RequestMapping(value = "/exportXls")
+  public ModelAndView exportXls(HttpServletRequest request, SyCarry syCarry) {
+      // Step.1 组装查询条件
+      QueryWrapper<SyCarry> queryWrapper = QueryGenerator.initQueryWrapper(syCarry, request.getParameterMap());
+      LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+
+      //Step.2 获取导出数据
+      List<SyCarryPage> pageList = new ArrayList<SyCarryPage>();
+      List<SyCarry> syCarryList = syCarryService.list(queryWrapper);
+      for (SyCarry temp : syCarryList) {
+          SyCarryPage vo = new SyCarryPage();
+          BeanUtils.copyProperties(temp, vo);
+          List<SyCarryB> syCarryBList = syCarryBService.selectByMainId(temp.getId());
+          vo.setSyCarryBList(syCarryBList);
+          pageList.add(vo);
+      }
+      //Step.3 调用AutoPoi导出Excel
+      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+      mv.addObject(NormalExcelConstants.FILE_NAME, "搬运装卸费用-搬运工对账单-主表");
+      mv.addObject(NormalExcelConstants.CLASS, SyCarryPage.class);
+      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("搬运装卸费用-搬运工对账单-主表数据", "导出人:"+sysUser.getRealname(), "搬运装卸费用-搬运工对账单-主表"));
+      mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+      return mv;
+  }
+
+  /**
+   * 通过excel导入数据
+   *
+   * @param request
+   * @param response
+   * @return
+   */
+  @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+  public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+      MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+      Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+      for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+          MultipartFile file = entity.getValue();// 获取上传文件对象
+          ImportParams params = new ImportParams();
+          params.setTitleRows(2);
+          params.setHeadRows(1);
+          params.setNeedSave(true);
+          try {
+              List<SyCarryPage> list = ExcelImportUtil.importExcel(file.getInputStream(), SyCarryPage.class, params);
+              for (SyCarryPage page : list) {
+                  SyCarry po = new SyCarry();
+                  BeanUtils.copyProperties(page, po);
+                  syCarryService.saveMain(po, page.getSyCarryBList());
+              }
+              return Result.ok("文件导入成功!数据行数:" + list.size());
+          } catch (Exception e) {
+              log.error(e.getMessage(),e);
+              return Result.error("文件导入失败:"+e.getMessage());
+          } finally {
+              try {
+                  file.getInputStream().close();
+              } catch (IOException e) {
+                  e.printStackTrace();
+              }
+          }
+      }
+      return Result.ok("文件导入失败!");
+  }
+
+
+	 /**
+	  * 批量审批
+	  * @param ids
+	  * @return
+	  */
+	 @GetMapping(value = "/commitBatch")
+	 public Result<?> commitBatch(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="state",required=true) String state) {
+		 String res = this.syCarryService.commitBatch(Arrays.asList(ids.split(",")),state);
+		 return Result.ok(res);
+	 }
+
+	 /**
+	  * 计划员签名
+	  *
+	  * @param id
+	  * @return
+	  */
+	 @GetMapping(value = "/signPlan")
+	 public Result<?> signPlan(@RequestParam(name="id",required=true) String id) {
+		 String res = syCarryService.signPlan(id);
+		 return Result.ok(res);
+	 }
+
+ }

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

@@ -0,0 +1,245 @@
+package org.jeecg.modules.oa.controller;
+
+import java.io.UnsupportedEncodingException;
+import java.io.IOException;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.system.vo.LoginUser;
+import org.apache.shiro.SecurityUtils;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.oa.entity.SyCottonYarnB;
+import org.jeecg.modules.oa.entity.SyCottonYarn;
+import org.jeecg.modules.oa.vo.SyCottonYarnPage;
+import org.jeecg.modules.oa.service.ISyCottonYarnService;
+import org.jeecg.modules.oa.service.ISyCottonYarnBService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+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.alibaba.fastjson.JSON;
+
+ /**
+ * @Description: 搬运装卸费用-棉纱-主表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+@RestController
+@RequestMapping("/oa/syCottonYarn")
+@Slf4j
+public class SyCottonYarnController {
+	@Autowired
+	private ISyCottonYarnService syCottonYarnService;
+	@Autowired
+	private ISyCottonYarnBService syCottonYarnBService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param syCottonYarn
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@GetMapping(value = "/list")
+	public Result<?> queryPageList(SyCottonYarn syCottonYarn,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+		QueryWrapper<SyCottonYarn> queryWrapper = QueryGenerator.initQueryWrapper(syCottonYarn, req.getParameterMap());
+		Page<SyCottonYarn> page = new Page<SyCottonYarn>(pageNo, pageSize);
+		IPage<SyCottonYarn> pageList = syCottonYarnService.page(page, queryWrapper);
+		return Result.ok(pageList);
+	}
+	
+	/**
+	 * 添加
+	 *
+	 * @param syCottonYarnPage
+	 * @return
+	 */
+	@PostMapping(value = "/add")
+	public Result<?> add(@RequestBody SyCottonYarnPage syCottonYarnPage) {
+		SyCottonYarn syCottonYarn = new SyCottonYarn();
+		BeanUtils.copyProperties(syCottonYarnPage, syCottonYarn);
+		syCottonYarnService.saveMain(syCottonYarn, syCottonYarnPage.getSyCottonYarnBList());
+		return Result.ok("添加成功!");
+	}
+	
+	/**
+	 * 编辑
+	 *
+	 * @param syCottonYarnPage
+	 * @return
+	 */
+	@PutMapping(value = "/edit")
+	public Result<?> edit(@RequestBody SyCottonYarnPage syCottonYarnPage) {
+		SyCottonYarn syCottonYarn = new SyCottonYarn();
+		BeanUtils.copyProperties(syCottonYarnPage, syCottonYarn);
+		syCottonYarnService.updateMain(syCottonYarn, syCottonYarnPage.getSyCottonYarnBList());
+		return Result.ok("编辑成功!");
+	}
+	
+	/**
+	 * 通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@DeleteMapping(value = "/delete")
+	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
+	    syCottonYarnService.delMain(id);
+		return Result.ok("删除成功!");
+	}
+	
+	/**
+	 * 批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.syCottonYarnService.delBatchMain(Arrays.asList(ids.split(",")));
+		return Result.ok("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+     *
+	 * @param id
+	 * @return
+	 */
+	@GetMapping(value = "/queryById")
+	public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
+		SyCottonYarn syCottonYarn = syCottonYarnService.getById(id);
+		return Result.ok(syCottonYarn);
+	}
+	
+	/**
+	 * 通过id查询
+     *
+	 * @param id
+	 * @return
+	 */
+	@GetMapping(value = "/querySyCottonYarnBByMainId")
+	public Result<?> querySyCottonYarnBListByMainId(@RequestParam(name="id",required=true) String id) {
+		List<SyCottonYarnB> syCottonYarnBList = syCottonYarnBService.selectByMainId(id);
+		return Result.ok(syCottonYarnBList);
+	}
+
+  /**
+   * 导出excel
+   *
+   * @param request
+   * @param syCottonYarn
+   */
+  @RequestMapping(value = "/exportXls")
+  public ModelAndView exportXls(HttpServletRequest request, SyCottonYarn syCottonYarn) {
+      // Step.1 组装查询条件
+      QueryWrapper<SyCottonYarn> queryWrapper = QueryGenerator.initQueryWrapper(syCottonYarn, request.getParameterMap());
+      LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+
+      //Step.2 获取导出数据
+      List<SyCottonYarnPage> pageList = new ArrayList<SyCottonYarnPage>();
+      List<SyCottonYarn> syCottonYarnList = syCottonYarnService.list(queryWrapper);
+      for (SyCottonYarn temp : syCottonYarnList) {
+          SyCottonYarnPage vo = new SyCottonYarnPage();
+          BeanUtils.copyProperties(temp, vo);
+          List<SyCottonYarnB> syCottonYarnBList = syCottonYarnBService.selectByMainId(temp.getId());
+          vo.setSyCottonYarnBList(syCottonYarnBList);
+          pageList.add(vo);
+      }
+      //Step.3 调用AutoPoi导出Excel
+      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+      mv.addObject(NormalExcelConstants.FILE_NAME, "搬运装卸费用-棉纱-主表");
+      mv.addObject(NormalExcelConstants.CLASS, SyCottonYarnPage.class);
+      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("搬运装卸费用-棉纱-主表数据", "导出人:"+sysUser.getRealname(), "搬运装卸费用-棉纱-主表"));
+      mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+      return mv;
+  }
+
+  /**
+   * 通过excel导入数据
+   *
+   * @param request
+   * @param response
+   * @return
+   */
+  @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+  public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+      MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+      Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+      for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+          MultipartFile file = entity.getValue();// 获取上传文件对象
+          ImportParams params = new ImportParams();
+          params.setTitleRows(2);
+          params.setHeadRows(1);
+          params.setNeedSave(true);
+          try {
+              List<SyCottonYarnPage> list = ExcelImportUtil.importExcel(file.getInputStream(), SyCottonYarnPage.class, params);
+              for (SyCottonYarnPage page : list) {
+                  SyCottonYarn po = new SyCottonYarn();
+                  BeanUtils.copyProperties(page, po);
+                  syCottonYarnService.saveMain(po, page.getSyCottonYarnBList());
+              }
+              return Result.ok("文件导入成功!数据行数:" + list.size());
+          } catch (Exception e) {
+              log.error(e.getMessage(),e);
+              return Result.error("文件导入失败:"+e.getMessage());
+          } finally {
+              try {
+                  file.getInputStream().close();
+              } catch (IOException e) {
+                  e.printStackTrace();
+              }
+          }
+      }
+      return Result.ok("文件导入失败!");
+  }
+
+
+	 /**
+	  * 计划员批量签名
+	  * @param ids
+	  * @return
+	  */
+	 @GetMapping(value = "/commitBatch")
+	 public Result<?> commitBatch(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="state",required=true) String state) {
+		 String res = this.syCottonYarnService.commitBatch(Arrays.asList(ids.split(",")),state);
+		 return Result.ok(res);
+	 }
+
+	 /**
+	  * 计划员签名
+	  *
+	  * @param id
+	  * @return
+	  */
+	 @GetMapping(value = "/signPlan")
+	 public Result<?> signPlan(@RequestParam(name="id",required=true) String id) {
+		 String res = syCottonYarnService.signPlan(id);
+		 return Result.ok(res);
+	 }
+}

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

@@ -0,0 +1,79 @@
+package org.jeecg.modules.oa.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+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.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * @Description: 搬运装卸费用-搬运工对账单-主表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+@Data
+@TableName("sy_carry")
+public class SyCarry implements Serializable {
+    private static final long serialVersionUID = 1L;
+    
+	/**主键*/
+	@TableId(type = IdType.ID_WORKER_STR)
+	private String id;
+	/**0草稿,1仓库已提交(计划签字),2人事行政,3财务经理 .4已完成*/
+	private String state;
+	/**创建人登录名称*/
+	private String createBy;
+	/**创建日期*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date createTime;
+	/**更新人登录名称*/
+	private String updateBy;
+	/**更新日期*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date updateTime;
+	/**所属部门*/
+	private String sysOrgCode;
+	/**名称*/
+	private String name;
+	/**编号*/
+	private String code;
+	/**备注*/
+	private String demo;
+	/**删除标记*/
+	private String delFlag;
+	/**仓库提交人*/
+	private String ckBy;
+	/**仓库提交人名称*/
+	private String ckName;
+	/**仓库提交时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date ckTime;
+	/**人事行政提交人*/
+	private String rsxzBy;
+	/**人事行政提交人名称*/
+	private String rsxzName;
+	/**人事行政提交时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date rsxzTime;
+	/**财务经理提交人*/
+	private String cwjlBy;
+	/**财务经理提交人名称*/
+	private String cwjlName;
+	/**财务经理提交时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date cwjlTime;
+	/**总计*/
+	@Excel(name = "总计", width = 15)
+	private Double totalNum;
+
+}

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

@@ -0,0 +1,89 @@
+package org.jeecg.modules.oa.entity;
+
+import java.io.Serializable;
+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 java.util.Date;
+
+/**
+ * @Description: 搬运装卸费用-搬运工对账单-子表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+@Data
+@TableName("sy_carry_b")
+public class SyCarryB implements Serializable {
+    private static final long serialVersionUID = 1L;
+    
+	/**主键*/
+	@TableId(type = IdType.ID_WORKER_STR)
+	private String id;
+	/**表头主键*/
+	private String headId;
+	/**创建人登录名称*/
+    @Excel(name = "创建人登录名称", width = 15)
+	private String createBy;
+	/**创建日期*/
+	@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)
+	private String updateBy;
+	/**更新日期*/
+	@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;
+	/**删除标记*/
+    @Excel(name = "删除标记", width = 15)
+	private String delFlag;
+	/**计划员审批*/
+    @Excel(name = "计划员审批", width = 15)
+	private String jhyBy;
+	/**计划员审批名称*/
+    @Excel(name = "计划员审批名称", width = 15)
+	private String jhyName;
+	/**计划员审批时间*/
+    @Excel(name = "计划员审批时间", width = 15)
+	private String jhyTime;
+	/**计划员*/
+    @Excel(name = "计划员", width = 15)
+	private String jhyByData;
+	/**计划员名称*/
+    @Excel(name = "计划员名称", width = 15)
+	private String jhyNameData;
+	/**日期*/
+	@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 orderDate;
+	/**总件数*/
+    @Excel(name = "总件数", width = 15)
+	private Double allNum;
+	/**明细*/
+    @Excel(name = "明细", width = 15)
+	private Double detailedNum;
+	/**衣架*/
+    @Excel(name = "衣架", width = 15)
+	private Double coatHanger;
+	/**集装箱号*/
+    @Excel(name = "集装箱号", width = 15)
+	private String containerNo;
+	/**价格*/
+    @Excel(name = "价格", width = 15)
+	private Double price;
+	/**发票号*/
+    @Excel(name = "发票号", width = 15)
+	private String invoiceNo;
+	/**备注*/
+    @Excel(name = "备注", width = 15)
+	private String demo;
+}

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

@@ -0,0 +1,78 @@
+package org.jeecg.modules.oa.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+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.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * @Description: 搬运装卸费用-棉纱-主表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+@Data
+@TableName("sy_cotton_yarn")
+public class SyCottonYarn implements Serializable {
+    private static final long serialVersionUID = 1L;
+    
+	/**主键*/
+	@TableId(type = IdType.ID_WORKER_STR)
+	private String id;
+	/**0草稿,1仓库已提交(计划签字),2人事行政,3财务经理*/
+	private String state;
+	/**创建人登录名称*/
+	private String createBy;
+	/**创建日期*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date createTime;
+	/**更新人登录名称*/
+	private String updateBy;
+	/**更新日期*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date updateTime;
+	/**删除标记*/
+	private String delFlag;
+	/**所属部门*/
+	private String sysOrgCode;
+	/**名称*/
+	private String name;
+	/**编号*/
+	private String code;
+	/**备注*/
+	private String demo;
+	/**仓库提交人*/
+	private String ckBy;
+	/**仓库提交人名称*/
+	private String ckName;
+	/**仓库提交时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date ckTime;
+	/**人事行政提交人*/
+	private String rsxzBy;
+	/**人事行政提交人名称*/
+	private String rsxzName;
+	/**人事行政提交时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date rsxzTime;
+	/**财务经理提交人*/
+	private String cwjlBy;
+	/**财务经理提交人名称*/
+	private String cwjlName;
+	/**财务经理提交时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	private Date cwjlTime;
+	/**总计*/
+	@Excel(name = "总计", width = 15)
+	private Double totalNum;
+}

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

@@ -0,0 +1,86 @@
+package org.jeecg.modules.oa.entity;
+
+import java.io.Serializable;
+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 java.util.Date;
+
+/**
+ * @Description: 搬运装卸费用-棉纱-子表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+@Data
+@TableName("sy_cotton_yarn_b")
+public class SyCottonYarnB implements Serializable {
+    private static final long serialVersionUID = 1L;
+    
+	/**主键*/
+	@TableId(type = IdType.ID_WORKER_STR)
+	private String id;
+	/**表头主键*/
+	private String headId;
+	/**创建人登录名称*/
+    @Excel(name = "创建人登录名称", width = 15)
+	private String createBy;
+	/**创建日期*/
+	@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)
+	private String updateBy;
+	/**更新日期*/
+	@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;
+	/**删除标记*/
+    @Excel(name = "删除标记", width = 15)
+	private String delFlag;
+	/**计划员审批*/
+    @Excel(name = "计划员审批", width = 15)
+	private String jhyBy;
+	/**计划员审批名称*/
+    @Excel(name = "计划员审批名称", width = 15)
+	private String jhyName;
+	/**计划员审批时间*/
+    @Excel(name = "计划员审批时间", width = 15)
+	private String jhyTime;
+	/**日期*/
+	@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 orderDate;
+	/**入库单号*/
+    @Excel(name = "入库单号", width = 15)
+	private String receiptNo;
+	/**吨数*/
+    @Excel(name = "吨数", width = 15)
+	private Double tonnage;
+	/**柜子数量*/
+    @Excel(name = "柜子数量", width = 15)
+	private Double cabinets;
+	/**每吨纱价格*/
+    @Excel(name = "每吨纱价格", width = 15)
+	private Double price;
+	/**集装箱号*/
+    @Excel(name = "集装箱号", width = 15)
+	private String containerNo;
+	/**原因*/
+    @Excel(name = "原因", width = 15)
+	private String reason;
+	/**总价*/
+    @Excel(name = "总价", width = 15)
+	private Double totalPrice;
+	/**备注*/
+    @Excel(name = "备注", width = 15)
+	private String demo;
+}

+ 18 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/SyCarryBMapper.java

@@ -0,0 +1,18 @@
+package org.jeecg.modules.oa.mapper;
+
+import java.util.List;
+import org.jeecg.modules.oa.entity.SyCarryB;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 搬运装卸费用-搬运工对账单-子表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+public interface SyCarryBMapper extends BaseMapper<SyCarryB> {
+
+	public boolean deleteByMainId(String mainId);
+    
+	public List<SyCarryB> selectByMainId(String mainId);
+}

+ 17 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/SyCarryMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.oa.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.oa.entity.SyCarry;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 搬运装卸费用-搬运工对账单-主表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+public interface SyCarryMapper extends BaseMapper<SyCarry> {
+
+}

+ 18 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/SyCottonYarnBMapper.java

@@ -0,0 +1,18 @@
+package org.jeecg.modules.oa.mapper;
+
+import java.util.List;
+import org.jeecg.modules.oa.entity.SyCottonYarnB;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 搬运装卸费用-棉纱-子表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+public interface SyCottonYarnBMapper extends BaseMapper<SyCottonYarnB> {
+
+	public boolean deleteByMainId(String mainId);
+    
+	public List<SyCottonYarnB> selectByMainId(String mainId);
+}

+ 17 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/SyCottonYarnMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.oa.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.oa.entity.SyCottonYarn;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 搬运装卸费用-棉纱-主表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+public interface SyCottonYarnMapper extends BaseMapper<SyCottonYarn> {
+
+}

+ 10 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/SyMaterialMapper.java

@@ -41,4 +41,14 @@ public interface SyMaterialMapper extends BaseMapper<SyMaterial> {
      */
     public int updateUserEnd();
 
+    /**
+     * 每年11号更新重置年假数据
+     * @return
+     */
+    public int updateAnnualZero();
+    public int updateAnnualThree();
+    public int updateAnnualFive();
+    public int updateAnnualSeven();
+    public int updateAnnualTen();
+
 }

+ 18 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/xml/SyCarryBMapper.xml

@@ -0,0 +1,18 @@
+<?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="org.jeecg.modules.oa.mapper.SyCarryBMapper">
+
+	<delete id="deleteByMainId" parameterType="java.lang.String">
+		DELETE 
+		FROM  sy_carry_b 
+		WHERE
+			 head_id = #{id} 		
+	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.oa.entity.SyCarryB">
+		SELECT * 
+		FROM  sy_carry_b
+		WHERE
+			 head_id = #{id} 		
+	</select>
+</mapper>

+ 5 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/xml/SyCarryMapper.xml

@@ -0,0 +1,5 @@
+<?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="org.jeecg.modules.oa.mapper.SyCarryMapper">
+
+</mapper>

+ 18 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/xml/SyCottonYarnBMapper.xml

@@ -0,0 +1,18 @@
+<?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="org.jeecg.modules.oa.mapper.SyCottonYarnBMapper">
+
+	<delete id="deleteByMainId" parameterType="java.lang.String">
+		DELETE 
+		FROM  sy_cotton_yarn_b 
+		WHERE
+			 head_id = #{id} 		
+	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.oa.entity.SyCottonYarnB">
+		SELECT * 
+		FROM  sy_cotton_yarn_b
+		WHERE
+			 head_id = #{id} 		
+	</select>
+</mapper>

+ 5 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/xml/SyCottonYarnMapper.xml

@@ -0,0 +1,5 @@
+<?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="org.jeecg.modules.oa.mapper.SyCottonYarnMapper">
+
+</mapper>

+ 24 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/mapper/xml/SyMaterialMapper.xml

@@ -40,7 +40,31 @@
         SET msg_num = msg_num - 1
         where del_flag = 0 and IFNULL(n_personnel_type,'未转正') !='转正' and n_induction_time is not null and msg_num > 0
 			and DATEDIFF(NOW(),n_induction_time) >= 50
+    </update>
 
+    <update id="updateAnnualZero">
+        update sys_user set n_annual_num = 0 ,n_annual_old_num = 0 ,n_annual_now_num = 0
+        where del_flag = 0 and n_personnel_type ='转正' and TIMESTAMPDIFF(YEAR, n_become_time,NOW()) = 0
+    </update>
+    <update id="updateAnnualThree">
+        update sys_user set n_annual_num = 3 ,n_annual_old_num = 0 ,n_annual_now_num = 3
+        where del_flag = 0 and n_personnel_type ='转正'
+          and TIMESTAMPDIFF(YEAR, n_become_time,NOW()) BETWEEN 1 and 3
+    </update>
+    <update id="updateAnnualFive">
+        update sys_user set n_annual_num = 5 ,n_annual_old_num = 0 ,n_annual_now_num = 5
+        where del_flag = 0 and n_personnel_type ='转正'
+          and TIMESTAMPDIFF(YEAR, n_become_time,NOW()) BETWEEN 4 and 6
+    </update>
+    <update id="updateAnnualSeven">
+        update sys_user set n_annual_num = 7 ,n_annual_old_num = 0 ,n_annual_now_num = 7
+        where del_flag = 0 and n_personnel_type ='转正'
+          and TIMESTAMPDIFF(YEAR, n_become_time,NOW()) BETWEEN 7 and 9
+    </update>
+    <update id="updateAnnualTen">
+        update sys_user set n_annual_num = 10,n_annual_old_num = 0 ,n_annual_now_num = 10
+        where del_flag = 0 and n_personnel_type ='转正'
+          and TIMESTAMPDIFF(YEAR, n_become_time,NOW()) >= 10
     </update>
 
 </mapper>

+ 16 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/ISyCarryBService.java

@@ -0,0 +1,16 @@
+package org.jeecg.modules.oa.service;
+
+import org.jeecg.modules.oa.entity.SyCarryB;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
+/**
+ * @Description: 搬运装卸费用-搬运工对账单-子表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+public interface ISyCarryBService extends IService<SyCarryB> {
+
+	public List<SyCarryB> selectByMainId(String mainId);
+}

+ 50 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/ISyCarryService.java

@@ -0,0 +1,50 @@
+package org.jeecg.modules.oa.service;
+
+import org.jeecg.modules.oa.entity.SyCarryB;
+import org.jeecg.modules.oa.entity.SyCarry;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @Description: 搬运装卸费用-搬运工对账单-主表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+public interface ISyCarryService extends IService<SyCarry> {
+
+	/**
+	 * 添加一对多
+	 * 
+	 */
+	public void saveMain(SyCarry syCarry,List<SyCarryB> syCarryBList) ;
+	
+	/**
+	 * 修改一对多
+	 * 
+	 */
+	public void updateMain(SyCarry syCarry,List<SyCarryB> syCarryBList);
+	
+	/**
+	 * 删除一对多
+	 */
+	public void delMain (String id);
+	
+	/**
+	 * 批量删除一对多
+	 */
+	public void delBatchMain (Collection<? extends Serializable> idList);
+
+	/**
+	 * 批量签名
+	 * state 1 计划员提交 2,人事行政审批 3.财务经理审批
+	 */
+	public String commitBatch(Collection<? extends Serializable> idList,String state);
+
+	/**
+	 * 计划员签名
+	 */
+	public String signPlan(String id);
+}

+ 1 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/ISyCertificatesService.java

@@ -13,4 +13,5 @@ public interface ISyCertificatesService extends IService<SyCertificates> {
 
     public void sentMsg();
     public void sentMsgPersonnelJob();
+    public void changeUserInfoJob();
 }

+ 16 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/ISyCottonYarnBService.java

@@ -0,0 +1,16 @@
+package org.jeecg.modules.oa.service;
+
+import org.jeecg.modules.oa.entity.SyCottonYarnB;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
+/**
+ * @Description: 搬运装卸费用-棉纱-子表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+public interface ISyCottonYarnBService extends IService<SyCottonYarnB> {
+
+	public List<SyCottonYarnB> selectByMainId(String mainId);
+}

+ 50 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/ISyCottonYarnService.java

@@ -0,0 +1,50 @@
+package org.jeecg.modules.oa.service;
+
+import org.jeecg.modules.oa.entity.SyCottonYarnB;
+import org.jeecg.modules.oa.entity.SyCottonYarn;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @Description: 搬运装卸费用-棉纱-主表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+public interface ISyCottonYarnService extends IService<SyCottonYarn> {
+
+	/**
+	 * 添加一对多
+	 * 
+	 */
+	public void saveMain(SyCottonYarn syCottonYarn,List<SyCottonYarnB> syCottonYarnBList) ;
+	
+	/**
+	 * 修改一对多
+	 * 
+	 */
+	public void updateMain(SyCottonYarn syCottonYarn,List<SyCottonYarnB> syCottonYarnBList);
+	
+	/**
+	 * 删除一对多
+	 */
+	public void delMain (String id);
+	
+	/**
+	 * 批量删除一对多
+	 */
+	public void delBatchMain (Collection<? extends Serializable> idList);
+
+	/**
+	 * 批量签名
+	 * state 1 计划员提交 2,人事行政审批 3.财务经理审批
+	 */
+	public String commitBatch(Collection<? extends Serializable> idList,String state);
+
+	/**
+	 * 计划员签名
+	 */
+	public String signPlan(String id);
+}

+ 27 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/impl/SyCarryBServiceImpl.java

@@ -0,0 +1,27 @@
+package org.jeecg.modules.oa.service.impl;
+
+import org.jeecg.modules.oa.entity.SyCarryB;
+import org.jeecg.modules.oa.mapper.SyCarryBMapper;
+import org.jeecg.modules.oa.service.ISyCarryBService;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description: 搬运装卸费用-搬运工对账单-子表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+@Service
+public class SyCarryBServiceImpl extends ServiceImpl<SyCarryBMapper, SyCarryB> implements ISyCarryBService {
+	
+	@Autowired
+	private SyCarryBMapper syCarryBMapper;
+	
+	@Override
+	public List<SyCarryB> selectByMainId(String mainId) {
+		return syCarryBMapper.selectByMainId(mainId);
+	}
+}

+ 234 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/impl/SyCarryServiceImpl.java

@@ -0,0 +1,234 @@
+package org.jeecg.modules.oa.service.impl;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.system.api.ISysBaseAPI;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.common.util.DateUtils;
+import org.jeecg.modules.oa.entity.SyCarry;
+import org.jeecg.modules.oa.entity.SyCarryB;
+import org.jeecg.modules.oa.entity.SyCottonYarnB;
+import org.jeecg.modules.oa.mapper.SyCarryBMapper;
+import org.jeecg.modules.oa.mapper.SyCarryMapper;
+import org.jeecg.modules.oa.service.ISyCarryService;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+import java.util.Collection;
+
+/**
+ * @Description: 搬运装卸费用-搬运工对账单-主表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+@Service
+public class SyCarryServiceImpl extends ServiceImpl<SyCarryMapper, SyCarry> implements ISyCarryService {
+
+	@Autowired
+	private SyCarryMapper syCarryMapper;
+	@Autowired
+	private SyCarryBMapper syCarryBMapper;
+	@Autowired
+	private ISysBaseAPI iSysBaseAPI;
+
+	@Override
+	@Transactional
+	public void saveMain(SyCarry syCarry, List<SyCarryB> syCarryBList) {
+		syCarryMapper.insert(syCarry);
+		for(SyCarryB entity:syCarryBList) {
+			//外键设置
+			entity.setHeadId(syCarry.getId());
+			syCarryBMapper.insert(entity);
+		}
+	}
+
+	@Override
+	@Transactional
+	public void updateMain(SyCarry syCarry,List<SyCarryB> syCarryBList) {
+		syCarryMapper.updateById(syCarry);
+		
+		//1.先删除子表数据
+		syCarryBMapper.deleteByMainId(syCarry.getId());
+		
+		//2.子表数据重新插入
+		for(SyCarryB entity:syCarryBList) {
+			//外键设置
+			entity.setHeadId(syCarry.getId());
+			syCarryBMapper.insert(entity);
+		}
+	}
+
+	@Override
+	@Transactional
+	public void delMain(String id) {
+		syCarryBMapper.deleteByMainId(id);
+		syCarryMapper.deleteById(id);
+	}
+
+	@Override
+	@Transactional
+	public void delBatchMain(Collection<? extends Serializable> idList) {
+		for(Serializable id:idList) {
+			syCarryBMapper.deleteByMainId(id.toString());
+			syCarryMapper.deleteById(id);
+		}
+	}
+
+	/**
+	 *
+	 * @param idList
+	 * @param state state 1 计划员提交 2,人事行政审批 3.财务经理审批
+	 * @return
+	 */
+	@Override
+	@Transactional
+	public String commitBatch(Collection<? extends Serializable> idList,String state) {
+		StringBuffer sb = new StringBuffer();
+		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		for(Serializable id:idList) {
+			SyCarry syCarry = syCarryMapper.selectById(id);
+			String syState = syCarry.getState();//0草稿,1仓库已提交(计划签字),2人事行政,3财务经理 ,4已完成
+
+			//计划员提交
+			if(state.equals("1")){
+				if(!syState.equals("0")){
+					sb.append("单据"+syCarry.getCode()+"无法此操作,请查看");
+					continue;
+				}
+				syCarry.setState("1");//0草稿,1仓库已提交(计划签字),2人事行政,3财务经理 ,4已完成
+				syCarry.setCkBy(loginUser.getUsername());//仓库提交人
+				syCarry.setCkName(loginUser.getRealname());//仓库提交人
+				syCarry.setCkTime(new Date());//仓库提交时间
+				syCarryMapper.updateById(syCarry);
+				sb.append("单据"+syCarry.getCode()+"提交成功");
+				continue;
+			}
+
+			List<String> listRole = iSysBaseAPI.getRolesByUsername(loginUser.getUsername());
+
+			//人事行政审批
+			if(state.equals("2")){
+
+				boolean type = false;
+
+				for(String o:listRole){
+					if(o.equals("SY003")){ //人事文员 角色
+						type = true;
+					}
+				}
+
+				if(!type){
+					sb.append("单据"+syCarry.getCode()+"仅人事行政可进行操作");
+					continue;
+				}
+				//0草稿,1仓库已提交(计划签字),2人事行政,3财务经理 ,4已完成
+				if(!syState.equals("2")){
+					sb.append("单据"+syCarry.getCode()+"无法此操作,请查看");
+					continue;
+				}
+				syCarry.setState("3");//0草稿,1仓库已提交(计划签字),2人事行政,3财务经理 ,4已完成
+				syCarry.setRsxzBy(loginUser.getUsername());//人事行政提交人
+				syCarry.setRsxzName(loginUser.getRealname());//人事行政提交人
+				syCarry.setRsxzTime(new Date());//人事行政提交人提交时间
+				syCarryMapper.updateById(syCarry);
+				sb.append("单据"+syCarry.getCode()+"审批成功");
+				continue;
+			}
+
+			//财务经理审批
+			if(state.equals("3")){
+
+				boolean type = false;
+
+				for(String o:listRole){
+					if(o.equals("SY002") || o.equals("SY008")){ //SY002 财务经理 SY008财务总监角色
+						type = true;
+					}
+				}
+
+				if(!type){
+					sb.append("单据"+syCarry.getCode()+"仅财务经理可进行操作");
+					continue;
+				}
+
+				if(!syState.equals("3")){
+					sb.append("单据"+syCarry.getCode()+"无法此操作,请查看");
+					continue;
+				}
+				syCarry.setState("4");//0草稿,1仓库已提交(计划签字),2人事行政,3财务经理 ,4已完成
+				syCarry.setCwjlBy(loginUser.getUsername());//财务经理提交人
+				syCarry.setCwjlName(loginUser.getRealname());//财务经理提交人
+				syCarry.setCwjlTime(new Date());//财务经理提交人提交时间
+				syCarryMapper.updateById(syCarry);
+				sb.append("单据"+syCarry.getCode()+"审批成功");
+				continue;
+			}
+
+		}
+
+		return sb.toString();
+	}
+
+	@Override
+	@Transactional
+	public String signPlan(String id) {
+
+		SyCarryB syCarryB = syCarryBMapper.selectById(id);
+		if(syCarryB == null){
+			return "数据存在,请刷新后重试";
+		}
+
+		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		String jhyByData = syCarryB.getJhyByData();
+		String jhyBy = syCarryB.getJhyBy();
+		if(!jhyByData.contains(loginUser.getUsername())){
+			return "您无权操作此条数据";
+		}
+		if(jhyBy.contains(loginUser.getUsername())){
+			return "此条数据以签字,请勿重新操作";
+		}
+
+		if(StringUtils.isNotBlank(syCarryB.getJhyBy())){
+			syCarryB.setJhyBy(syCarryB.getJhyBy()+"/"+loginUser.getUsername());
+			syCarryB.setJhyName(syCarryB.getJhyName()+"/"+loginUser.getRealname());
+			syCarryB.setJhyTime(syCarryB.getJhyTime()+"/"+ DateUtils.getDate("yyyy-MM-dd HH:mm:ss"));
+		}else{
+			syCarryB.setJhyBy(loginUser.getUsername());
+			syCarryB.setJhyName(loginUser.getRealname());
+			syCarryB.setJhyTime(DateUtils.getDate("yyyy-MM-dd HH:mm:ss"));
+		}
+
+		syCarryBMapper.updateById(syCarryB);
+
+		List<SyCarryB> syCarryB2 = syCarryBMapper.selectByMainId(syCarryB.getHeadId());
+		boolean ifAll = true;
+		for(SyCarryB o:syCarryB2){
+			String[] jhy = o.getJhyBy().split("/");
+			String[] jhyData = o.getJhyByData().split("/");
+			if(jhyData.length != jhy.length){
+				ifAll = false;
+			}
+		}
+		if(ifAll){
+			SyCarry syCarry = syCarryMapper.selectById(syCarryB.getHeadId());
+			syCarry.setState("2");//0草稿,1仓库已提交(计划签字),2人事行政,3财务经理
+			syCarryMapper.updateById(syCarry);
+		}
+
+		return "签字成功";
+	}
+
+
+	public static void main(String[] args) {
+		String ch = "T00011";
+		String s = "T0001,T0002";
+		System.out.println(DateUtils.getDate("yyyy-MM-dd HH:mm:ss"));
+
+	}
+
+}

+ 69 - 5
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/impl/SyCertificatesServiceImpl.java

@@ -18,7 +18,12 @@ import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
+import java.beans.Encoder;
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
 import java.text.SimpleDateFormat;
+import java.util.Base64;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -49,7 +54,7 @@ public class SyCertificatesServiceImpl extends ServiceImpl<SyCertificatesMapper,
             String dateString = DateUtils.formatDate(o.getEndDate(),"yyyy-MM-dd");
 
             if(StringUtils.isNotBlank(o.getManageId())){
-                sysBaseAPI.sendSysAnnouncement(loginUser,"admin",o.getManageId(),"证件到期提醒","您好! 员工 "+o.getUserId()+" 证件"+o.getName()+"到期时间为"+dateString+" ; 已不足"+o.getNoticeMonth()+"个月,请及时处理。", CommonConstant.MSG_CATEGORY_2,taskParam);
+                sysBaseAPI.sendSysAnnouncement(loginUser,"admin",o.getManageId(),"证件到期提醒","您好! "+o.getUserId()+" 证件"+o.getName()+"到期时间为"+dateString+" ; 已不足"+o.getNoticeMonth()+"个月,请及时处理。", CommonConstant.MSG_CATEGORY_2,taskParam);
 
             }
             if(StringUtils.isNotBlank(o.getUserId())){
@@ -93,7 +98,7 @@ public class SyCertificatesServiceImpl extends ServiceImpl<SyCertificatesMapper,
 
             for(SysUser a:pageList.getRecords()){
 
-                sysBaseAPI.sendSysAnnouncement(loginUser,"admin",a.getUsername(),"人员转正提醒","您好! 员工 "+o.getRealname()+" 工号"+o.getWorkNo()+" 入职时间为"+dateString+" ; 已超过50天,请及时进行转正处理。", CommonConstant.MSG_CATEGORY_2,taskParam);
+                sysBaseAPI.sendSysAnnouncement(loginUser,"admin",a.getUsername(),"人员转正提醒","您好! "+o.getRealname()+" 工号"+o.getWorkNo()+" 入职时间为"+dateString+" ; 已超过50天,请及时进行转正处理。", CommonConstant.MSG_CATEGORY_2,taskParam);
 
             }
 
@@ -106,11 +111,70 @@ public class SyCertificatesServiceImpl extends ServiceImpl<SyCertificatesMapper,
     }
 
 
-    public static void main(String[] args) {
+
+    /**
+     * 年假。
+     * 1) 1-33 天,4-65 天,7-97
+     * 2) 根据转正日期,三年加两天+
+     * 3) 十年以上 10
+     * 4) 每年一月一号自动重置年假天数
+     *
+     * 1.1-3年(含3年)3天; 4-6年(含6年)5天,7-10年(含10年)7天,10年以上:10
+     * 2.根据转正日期,超过1周年后的下一个11日起,享有3天年假
+     */
+
+    public void changeUserInfoJob(){
+
         Date date = new Date();
-        SimpleDateFormat dateFm = new SimpleDateFormat("EEEE");
+        SimpleDateFormat dateFm = new SimpleDateFormat("MM-DD");
         String currSun = dateFm.format(date);
-        System.out.println(currSun);
+        if(!currSun.equals("01-01")){
+            return;
+        }
+
+        syMaterialMapper.updateAnnualZero();
+        syMaterialMapper.updateAnnualThree();
+        syMaterialMapper.updateAnnualFive();
+        syMaterialMapper.updateAnnualSeven();
+        syMaterialMapper.updateAnnualTen();
+
+
     }
 
+
+
+    public static void main(String[] args) throws Exception {
+//        Date date = new Date();
+//        SimpleDateFormat dateFm = new SimpleDateFormat("MM-DD");
+//        String currSun = dateFm.format(date);
+//        System.out.println(currSun);
+//        if(currSun.equals("01-11")){
+//            System.out.println("dsasdsd");
+//        }
+
+        System.out.println(getImageBase(""));
+
+
+    }
+    public static String getImageBase(String src) throws Exception {
+        String image =   "E:\\123.png";
+        File file = new File(image);
+
+//        URL url = new URL(src);
+        InputStream in = new FileInputStream(file);
+        byte[] data = null;
+        try {
+//            in = url.openStream();//远程文件
+            data = new byte[in.available()];
+            in.read(data);
+            in.close();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+        Base64.Encoder encoder = Base64.getEncoder();
+        return encoder.encodeToString(data);
+    }
+
+
 }

+ 27 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/impl/SyCottonYarnBServiceImpl.java

@@ -0,0 +1,27 @@
+package org.jeecg.modules.oa.service.impl;
+
+import org.jeecg.modules.oa.entity.SyCottonYarnB;
+import org.jeecg.modules.oa.mapper.SyCottonYarnBMapper;
+import org.jeecg.modules.oa.service.ISyCottonYarnBService;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description: 搬运装卸费用-棉纱-子表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+@Service
+public class SyCottonYarnBServiceImpl extends ServiceImpl<SyCottonYarnBMapper, SyCottonYarnB> implements ISyCottonYarnBService {
+	
+	@Autowired
+	private SyCottonYarnBMapper syCottonYarnBMapper;
+	
+	@Override
+	public List<SyCottonYarnB> selectByMainId(String mainId) {
+		return syCottonYarnBMapper.selectByMainId(mainId);
+	}
+}

+ 214 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/impl/SyCottonYarnServiceImpl.java

@@ -0,0 +1,214 @@
+package org.jeecg.modules.oa.service.impl;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.system.api.ISysBaseAPI;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.common.util.DateUtils;
+import org.jeecg.modules.oa.entity.SyCottonYarn;
+import org.jeecg.modules.oa.entity.SyCottonYarnB;
+import org.jeecg.modules.oa.mapper.SyCottonYarnBMapper;
+import org.jeecg.modules.oa.mapper.SyCottonYarnMapper;
+import org.jeecg.modules.oa.service.ISyCottonYarnService;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+import java.util.Collection;
+
+/**
+ * @Description: 搬运装卸费用-棉纱-主表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+@Service
+public class SyCottonYarnServiceImpl extends ServiceImpl<SyCottonYarnMapper, SyCottonYarn> implements ISyCottonYarnService {
+
+	@Autowired
+	private SyCottonYarnMapper syCottonYarnMapper;
+	@Autowired
+	private SyCottonYarnBMapper syCottonYarnBMapper;
+	@Autowired
+	private ISysBaseAPI iSysBaseAPI;
+	@Override
+	@Transactional
+	public void saveMain(SyCottonYarn syCottonYarn, List<SyCottonYarnB> syCottonYarnBList) {
+		syCottonYarnMapper.insert(syCottonYarn);
+		for(SyCottonYarnB entity:syCottonYarnBList) {
+			//外键设置
+			entity.setHeadId(syCottonYarn.getId());
+			syCottonYarnBMapper.insert(entity);
+		}
+	}
+
+	@Override
+	@Transactional
+	public void updateMain(SyCottonYarn syCottonYarn,List<SyCottonYarnB> syCottonYarnBList) {
+		syCottonYarnMapper.updateById(syCottonYarn);
+		
+		//1.先删除子表数据
+		syCottonYarnBMapper.deleteByMainId(syCottonYarn.getId());
+		
+		//2.子表数据重新插入
+		for(SyCottonYarnB entity:syCottonYarnBList) {
+			//外键设置
+			entity.setHeadId(syCottonYarn.getId());
+			syCottonYarnBMapper.insert(entity);
+		}
+	}
+
+	@Override
+	@Transactional
+	public void delMain(String id) {
+		syCottonYarnBMapper.deleteByMainId(id);
+		syCottonYarnMapper.deleteById(id);
+	}
+
+	@Override
+	@Transactional
+	public void delBatchMain(Collection<? extends Serializable> idList) {
+		for(Serializable id:idList) {
+			syCottonYarnBMapper.deleteByMainId(id.toString());
+			syCottonYarnMapper.deleteById(id);
+		}
+	}
+
+	/**
+	 *
+	 * @param idList
+	 * @param state state 1 计划员提交 2,人事行政审批 3.财务经理审批
+	 * @return
+	 */
+	@Override
+	@Transactional
+	public String commitBatch(Collection<? extends Serializable> idList,String state) {
+		StringBuffer sb = new StringBuffer();
+		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		for(Serializable id:idList) {
+			SyCottonYarn syCottonYarn = syCottonYarnMapper.selectById(id);
+			String syState = syCottonYarn.getState();//0草稿,1仓库已提交(计划签字),2人事行政,3财务经理 ,4已完成
+
+			//计划员提交
+			if(state.equals("1")){
+				if(!syState.equals("0")){
+					sb.append("单据"+syCottonYarn.getCode()+"无法此操作,请查看");
+					continue;
+				}
+				syCottonYarn.setState("1");//0草稿,1仓库已提交(计划签字),2人事行政,3财务经理 ,4已完成
+				syCottonYarn.setCkBy(loginUser.getUsername());//仓库提交人
+				syCottonYarn.setCkName(loginUser.getRealname());//仓库提交人
+				syCottonYarn.setCkTime(new Date());//仓库提交时间
+				syCottonYarnMapper.updateById(syCottonYarn);
+				sb.append("单据"+syCottonYarn.getCode()+"提交成功");
+				continue;
+			}
+
+			List<String> listRole = iSysBaseAPI.getRolesByUsername(loginUser.getUsername());
+
+			//人事行政审批
+			if(state.equals("2")){
+
+				boolean type = false;
+
+				for(String o:listRole){
+					if(o.equals("SY003")){ //人事文员 角色
+						type = true;
+					}
+				}
+
+				if(!type){
+					sb.append("单据"+syCottonYarn.getCode()+"仅人事行政可进行操作");
+					continue;
+				}
+				//0草稿,1仓库已提交(计划签字),2人事行政,3财务经理 ,4已完成
+				if(!syState.equals("2")){
+					sb.append("单据"+syCottonYarn.getCode()+"无法此操作,请查看");
+					continue;
+				}
+				syCottonYarn.setState("3");//0草稿,1仓库已提交(计划签字),2人事行政,3财务经理 ,4已完成
+				syCottonYarn.setRsxzBy(loginUser.getUsername());//人事行政提交人
+				syCottonYarn.setRsxzName(loginUser.getRealname());//人事行政提交人
+				syCottonYarn.setRsxzTime(new Date());//人事行政提交人提交时间
+				syCottonYarnMapper.updateById(syCottonYarn);
+				sb.append("单据"+syCottonYarn.getCode()+"审批成功");
+				continue;
+			}
+
+			//财务经理审批
+			if(state.equals("3")){
+
+				boolean type = false;
+
+				for(String o:listRole){
+					if(o.equals("SY002") || o.equals("SY008")){ //SY002 财务经理 SY008财务总监角色
+						type = true;
+					}
+				}
+
+				if(!type){
+					sb.append("单据"+syCottonYarn.getCode()+"仅财务经理可进行操作");
+					continue;
+				}
+
+				if(!syState.equals("3")){
+					sb.append("单据"+syCottonYarn.getCode()+"无法此操作,请查看");
+					continue;
+				}
+				syCottonYarn.setState("4");//0草稿,1仓库已提交(计划签字),2人事行政,3财务经理 ,4已完成
+				syCottonYarn.setCwjlBy(loginUser.getUsername());//财务经理提交人
+				syCottonYarn.setCwjlName(loginUser.getRealname());//财务经理提交人
+				syCottonYarn.setCwjlTime(new Date());//财务经理提交人提交时间
+				syCottonYarnMapper.updateById(syCottonYarn);
+				sb.append("单据"+syCottonYarn.getCode()+"审批成功");
+				continue;
+			}
+
+		}
+
+		return sb.toString();
+	}
+
+	@Override
+	@Transactional
+	public String signPlan(String id) {
+
+		SyCottonYarnB syCottonYarnB = syCottonYarnBMapper.selectById(id);
+		if(syCottonYarnB == null){
+			return "数据存在,请刷新后重试";
+		}
+
+		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		String jhyBy = syCottonYarnB.getJhyBy();
+		if(jhyBy.contains(loginUser.getUsername())){
+			return "此条数据以签字,请勿重新操作";
+		}
+
+		syCottonYarnB.setJhyBy(loginUser.getUsername());
+		syCottonYarnB.setJhyName(loginUser.getRealname());
+		syCottonYarnB.setJhyTime(DateUtils.getDate("yyyy-MM-dd HH:mm:ss"));
+
+		syCottonYarnBMapper.updateById(syCottonYarnB);
+
+		List<SyCottonYarnB> syCottonYarnB2 = syCottonYarnBMapper.selectByMainId(syCottonYarnB.getHeadId());
+		boolean ifAll = true;
+		for(SyCottonYarnB o:syCottonYarnB2){
+			String jhy = o.getJhyBy();
+			if(StringUtils.isBlank(jhy)){
+				ifAll = false;
+			}
+		}
+
+		if(ifAll){
+			SyCottonYarn syCottonYarn = syCottonYarnMapper.selectById(syCottonYarnB.getHeadId());
+			syCottonYarn.setState("2");//0草稿,1仓库已提交(计划签字),2人事行政,3财务经理
+			syCottonYarnMapper.updateById(syCottonYarn);
+		}
+
+		return "签字成功";
+	}
+
+}

+ 96 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/vo/SyCarryPage.java

@@ -0,0 +1,96 @@
+package org.jeecg.modules.oa.vo;
+
+import java.util.List;
+import org.jeecg.modules.oa.entity.SyCarry;
+import org.jeecg.modules.oa.entity.SyCarryB;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecgframework.poi.excel.annotation.ExcelCollection;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.util.Date;
+
+/**
+ * @Description: 搬运装卸费用-搬运工对账单-主表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+@Data
+public class SyCarryPage {
+	
+	/**主键*/
+	private String id;
+	/**0草稿,1仓库已提交(计划签字),2人事行政,3财务经理*/
+	private String state;
+	/**创建人登录名称*/
+  	@Excel(name = "创建人登录名称", width = 15)
+	private String createBy;
+	/**创建日期*/
+  	@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)
+	private String updateBy;
+	/**更新日期*/
+  	@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;
+	/**所属部门*/
+  	@Excel(name = "所属部门", width = 15)
+	private String sysOrgCode;
+	/**名称*/
+  	@Excel(name = "名称", width = 15)
+	private String name;
+	/**编号*/
+  	@Excel(name = "编号", width = 15)
+	private String code;
+	/**备注*/
+  	@Excel(name = "备注", width = 15)
+	private String demo;
+	/**删除标记*/
+  	@Excel(name = "删除标记", width = 15)
+	private String delFlag;
+	/**仓库提交人*/
+  	@Excel(name = "仓库提交人", width = 15)
+	private String ckBy;
+	/**仓库提交人名称*/
+  	@Excel(name = "仓库提交人名称", width = 15)
+	private String ckName;
+	/**仓库提交时间*/
+  	@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 ckTime;
+	/**人事行政提交人*/
+  	@Excel(name = "人事行政提交人", width = 15)
+	private String rsxzBy;
+	/**人事行政提交人名称*/
+  	@Excel(name = "人事行政提交人名称", width = 15)
+	private String rsxzName;
+	/**人事行政提交时间*/
+  	@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 rsxzTime;
+	/**财务经理提交人*/
+  	@Excel(name = "财务经理提交人", width = 15)
+	private String cwjlBy;
+	/**财务经理提交人名称*/
+  	@Excel(name = "财务经理提交人名称", width = 15)
+	private String cwjlName;
+	/**财务经理提交时间*/
+  	@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 cwjlTime;
+	/**总计*/
+	@Excel(name = "总计", width = 15)
+	private Double totalNum;
+	@ExcelCollection(name="搬运装卸费用-搬运工对账单-子表")
+	private List<SyCarryB> syCarryBList;
+	
+}

+ 96 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/vo/SyCottonYarnPage.java

@@ -0,0 +1,96 @@
+package org.jeecg.modules.oa.vo;
+
+import java.util.List;
+import org.jeecg.modules.oa.entity.SyCottonYarn;
+import org.jeecg.modules.oa.entity.SyCottonYarnB;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecgframework.poi.excel.annotation.ExcelCollection;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.util.Date;
+
+/**
+ * @Description: 搬运装卸费用-棉纱-主表
+ * @Author: jeecg-boot
+ * @Date:   2023-01-10
+ * @Version: V1.0
+ */
+@Data
+public class SyCottonYarnPage {
+	
+	/**主键*/
+	private String id;
+	/**0草稿,1仓库已提交(计划签字),2人事行政,3财务经理*/
+	private String state;
+	/**创建人登录名称*/
+  	@Excel(name = "创建人登录名称", width = 15)
+	private String createBy;
+	/**创建日期*/
+  	@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)
+	private String updateBy;
+	/**更新日期*/
+  	@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;
+	/**删除标记*/
+  	@Excel(name = "删除标记", width = 15)
+	private String delFlag;
+	/**所属部门*/
+  	@Excel(name = "所属部门", width = 15)
+	private String sysOrgCode;
+	/**名称*/
+  	@Excel(name = "名称", width = 15)
+	private String name;
+	/**编号*/
+  	@Excel(name = "编号", width = 15)
+	private String code;
+	/**备注*/
+  	@Excel(name = "备注", width = 15)
+	private String demo;
+	/**仓库提交人*/
+  	@Excel(name = "仓库提交人", width = 15)
+	private String ckBy;
+	/**仓库提交人名称*/
+  	@Excel(name = "仓库提交人名称", width = 15)
+	private String ckName;
+	/**仓库提交时间*/
+  	@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 ckTime;
+	/**人事行政提交人*/
+  	@Excel(name = "人事行政提交人", width = 15)
+	private String rsxzBy;
+	/**人事行政提交人名称*/
+  	@Excel(name = "人事行政提交人名称", width = 15)
+	private String rsxzName;
+	/**人事行政提交时间*/
+  	@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 rsxzTime;
+	/**财务经理提交人*/
+  	@Excel(name = "财务经理提交人", width = 15)
+	private String cwjlBy;
+	/**财务经理提交人名称*/
+  	@Excel(name = "财务经理提交人名称", width = 15)
+	private String cwjlName;
+	/**财务经理提交时间*/
+  	@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 cwjlTime;
+	/**总计*/
+	@Excel(name = "总计", width = 15)
+	private Double totalNum;
+	@ExcelCollection(name="搬运装卸费用-棉纱-子表")
+	private List<SyCottonYarnB> syCottonYarnBList;
+	
+}

+ 23 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/job/ChangeUserInfoJob.java

@@ -0,0 +1,23 @@
+package org.jeecg.modules.quartz.job;
+
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.util.DateUtils;
+import org.jeecg.modules.oa.service.ISyCertificatesService;
+import org.quartz.Job;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+import org.springframework.beans.factory.annotation.Autowired;
+
+@Slf4j
+public class ChangeUserInfoJob implements Job {
+
+    @Autowired
+    private ISyCertificatesService iSyCertificatesService;
+
+    @Override
+    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
+
+        log.info(String.format(" 一月一号重置假期定时任务 CertificatesJob !  时间:" + DateUtils.getTimestamp()));
+        iSyCertificatesService.changeUserInfoJob();
+    }
+}

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

@@ -11,15 +11,18 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.constant.CommonConstant;
 import org.jeecg.common.constant.CommonSendStatus;
+import org.jeecg.common.system.api.ISysBaseAPI;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.util.JwtUtil;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.message.websocket.WebSocket;
+import org.jeecg.modules.oa.entity.SyCertificates;
 import org.jeecg.modules.system.entity.SysAnnouncement;
 import org.jeecg.modules.system.entity.SysAnnouncementSend;
 import org.jeecg.modules.system.service.ISysAnnouncementSendService;
@@ -64,7 +67,8 @@ public class SysAnnouncementController {
 	private ISysAnnouncementSendService sysAnnouncementSendService;
 	@Resource
     private WebSocket webSocket;
-
+	@Autowired
+	private ISysBaseAPI sysBaseAPI;
 	/**
 	  * 分页列表查询
 	 * @param sysAnnouncement
@@ -93,6 +97,17 @@ public class SysAnnouncementController {
 			}
 		}
 		IPage<SysAnnouncement> pageList = sysAnnouncementService.page(page, queryWrapper);
+
+		for (SysAnnouncement o:pageList.getRecords()) {
+
+			if(StringUtils.isNotBlank(o.getSender())){
+				LoginUser login = sysBaseAPI.getUserByName(o.getSender());
+				if(login != null){
+					o.setSender(login.getRealname());
+				}
+			}
+		}
+
 		log.info("查询当前页:"+pageList.getCurrent());
 		log.info("查询当前页数量:"+pageList.getSize());
 		log.info("查询结果数量:"+pageList.getRecords().size());

+ 10 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysPositionController.java

@@ -7,11 +7,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.system.entity.SysPosition;
+import org.jeecg.modules.system.entity.SysUser;
 import org.jeecg.modules.system.service.ISysPositionService;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@@ -65,8 +67,16 @@ public class SysPositionController {
                                                     @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                                     HttpServletRequest req) {
         Result<IPage<SysPosition>> result = new Result<IPage<SysPosition>>();
+        String name = sysPosition.getName();
+        if(StringUtils.isNotBlank(sysPosition.getName())){
+            sysPosition.setName(null);
+        }
         QueryWrapper<SysPosition> queryWrapper = QueryGenerator.initQueryWrapper(sysPosition, req.getParameterMap());
         Page<SysPosition> page = new Page<SysPosition>(pageNo, pageSize);
+        if(StringUtils.isNotBlank(name)){
+            queryWrapper.lambda().like(SysPosition::getName,name);
+        }
+
         IPage<SysPosition> pageList = sysPositionService.page(page, queryWrapper);
         result.setSuccess(true);
         result.setResult(pageList);

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

@@ -24,9 +24,11 @@ import org.jeecg.common.system.api.ISysBaseAPI;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.util.JwtUtil;
 import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.common.util.MD5Util;
 import org.jeecg.common.util.PasswordUtil;
 import org.jeecg.common.util.RedisUtil;
 import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.config.dataSource.OtherSource;
 import org.jeecg.modules.system.entity.*;
 import org.jeecg.modules.system.model.DepartIdModel;
 import org.jeecg.modules.system.model.SysUserSysDepartModel;
@@ -127,6 +129,8 @@ public class SysUserController {
 		String selectedDeparts = jsonObject.getString("selecteddeparts");
 		try {
 			SysUser user = JSON.parseObject(jsonObject.toJSONString(), SysUser.class);
+            String password2 = MD5Util.MD5Encode(user.getPassword(),"");
+            user.setPassword2(password2);
 			user.setCreateTime(new Date());//设置创建时间
 			String salt = oConvertUtils.randomGen(8);
 			user.setSalt(salt);
@@ -134,6 +138,7 @@ public class SysUserController {
 			user.setPassword(passwordEncode);
 			user.setStatus(1);
 			user.setDelFlag("0");
+
 			sysUserService.addUserWithRole(user, selectedRoles);
             sysUserService.addUserWithDepart(user, selectedDeparts);
 
@@ -544,7 +549,12 @@ public class SysUserController {
         }
 		LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("导出列表数据", "导出人:"+user.getRealname(), "导出信息"));
-        mv.addObject(NormalExcelConstants.DATA_LIST, pageList2);
+        if(StringUtils.isNotBlank(address)){
+            mv.addObject(NormalExcelConstants.DATA_LIST, pageList2);
+        }else{
+            mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        }
+
         return mv;
     }
 
@@ -580,6 +590,9 @@ public class SysUserController {
                         // 密码默认为“123456”
                         sysUserExcel.setPassword("123456");
                     }
+                    String password2 = MD5Util.MD5Encode(sysUserExcel.getPassword(),"");
+                    sysUserExcel.setPassword2(password2);
+
 	                String salt = oConvertUtils.randomGen(8);
 	                sysUserExcel.setSalt(salt);
 	                String passwordEncode = PasswordUtil.encrypt(sysUserExcel.getUsername(), sysUserExcel.getPassword(), salt);
@@ -1362,20 +1375,10 @@ public class SysUserController {
         result.setSuccess(true);
         result.setResult(pageList);
         log.info(pageList.toString());
-        Map<String,Object> mapOne = new HashMap<>();
-
-        List<Map<String,String>> supplierList = new ArrayList<>();//临时字段,存放u8中的供应商档案
-        Map<String,String> map2 = new HashMap<>();
-        map2.put("label","上海供应商");
-        map2.put("value","00001");
-        supplierList.add(map2);
 
-        Map<String,String> map22 = new HashMap<>();
-        map22.put("label","北京供应商");
-        map22.put("value","00002");
-        supplierList.add(map22);
-
-        mapOne.put("supplierList",supplierList);
+        Map<String,Object> mapOne = new HashMap<>();
+        OtherSource other = new OtherSource();
+        mapOne.put("supplierList",other.getSupplier());
         result.setData(mapOne);
 
         return result;

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

@@ -56,6 +56,8 @@ public class SysUser implements Serializable {
     @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
     private String password;
 
+    private String password2;
+
     /**
      * md5密码盐
      */
@@ -338,6 +340,31 @@ public class SysUser implements Serializable {
     @TableField(exist = false)
     private java.lang.String deptName;//临时字段,存放部门名称
 
+    /**社保断缴日期*/
+    @Excel(name = "社保断缴日期", width = 20, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "社保断缴日期")
+    private java.util.Date sySecurityOutTime;
+
+    /**公积金断缴日期*/
+    @Excel(name = "公积金断缴日期", width = 20, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "公积金断缴日期")
+    private java.util.Date syFundOutTime;
+
+    /**离职日期*/
+    @Excel(name = "离职日期", width = 20, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "离职日期")
+    private java.util.Date syResignationTime;
+
+    /**雇佣状态(在职、离职、退休返聘)*/
+    @Excel(name = "雇佣状态(在职、离职、退休返聘)", width = 15)
+    @ApiModelProperty(value = "雇佣状态(在职、离职、退休返聘)")
+    private java.lang.String syHireType;
 
     /**
      * 补充的字段

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

@@ -159,4 +159,11 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
 	 */
 	int deleteLogicDeleted(@Param("userIds") String userIds);
 
+	/**
+	 * 根据角色查询用户
+	 * @param roleCode
+	 * @param username
+	 * @return
+	 */
+	List<SysUser> getUserByRoleCode(@Param("roleCode") String roleCode,@Param("username") String username);
 }

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

@@ -66,7 +66,19 @@
 			and username = #{username}
 		</if>
 	</select>
-	
+
+	<!-- 根据角色编码查询 -->
+	<select id="getUserByRoleCode" resultType="org.jeecg.modules.system.entity.SysUser">
+		select * from sys_user where del_flag = '0' and id
+			in (select user_id from sys_user_role where role_id in(
+				select id from sys_role where role_code = #{roleCode}
+				)
+			)
+		<if test="username!=null and username!=''">
+			and username = #{username}
+		</if>
+	</select>
+
 	<!--  修改用户部门code -->
 	<update id="updateUserDepart">
 		UPDATE sys_user SET org_code = #{orgCode} where username = #{username}
@@ -147,6 +159,9 @@
 			<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>
 		group by a.username,a.realname
 		order by substring_index(work_no, '-', 1) + 0 ASC,work_no

+ 7 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysUserService.java

@@ -241,4 +241,11 @@ public interface ISysUserService extends IService<SysUser> {
 
 	List<SysUser> getSysUserList(SysUser sysUser);
 
+	/**
+	 * 获取所有有效用户
+	 * @return
+	 */
+	List<SysUser> queryAllUserInfo();
+
+	List<SysUser> getUserByRoleCode(String roleCode,String username);
 }

+ 14 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java

@@ -16,6 +16,7 @@ import org.jeecg.common.constant.CommonConstant;
 import org.jeecg.common.system.api.ISysBaseAPI;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.system.vo.SysUserCacheInfo;
+import org.jeecg.common.util.MD5Util;
 import org.jeecg.common.util.PasswordUtil;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.system.entity.*;
@@ -87,6 +88,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
         String password = sysUser.getPassword();
         String passwordEncode = PasswordUtil.encrypt(sysUser.getUsername(), password, salt);
         sysUser.setPassword(passwordEncode);
+
+        String password2 = MD5Util.MD5Encode(password,"");
+		sysUser.setPassword2(password2);
         this.userMapper.updateById(sysUser);
         return Result.ok("密码修改成功!");
     }
@@ -412,4 +416,14 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
 		return sysUserList;
 	}
 
+	@Override
+	public List<SysUser> queryAllUserInfo() {
+		List<SysUser> userList = userMapper.selectList(new QueryWrapper<SysUser>().eq("status","1").eq("del_flag","0"));
+		return userList;
+	}
+
+	@Override
+	public List<SysUser> getUserByRoleCode(String roleCode,String username){
+		return userMapper.getUserByRoleCode(roleCode,username);
+	}
 }

+ 1 - 1
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/util/MyThread.java

@@ -36,7 +36,7 @@ public class MyThread extends Thread {
 
         for(ComboModel o:list){
 
-            sysBaseAPI.sendSysAnnouncement(loginUser,"admin",o.getUsername(),"通讯录变更提醒","您好! 新员工 "+user.getRealname()+" 已更新通讯录信息,请至通讯录管理页面查看。", CommonConstant.MSG_CATEGORY_2,taskParam);
+            sysBaseAPI.sendSysAnnouncement(loginUser,"admin",o.getUsername(),"通讯录变更提醒","您好! "+user.getRealname()+" 已更新通讯录信息,请至通讯录管理页面查看。", CommonConstant.MSG_CATEGORY_2,taskParam);
 
         }