提交代碼
parent
0b340003f3
commit
20986f1a1f
|
@ -34,6 +34,28 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
|
||||||
return value != null ? value : defaultValue;
|
return value != null ? value : defaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参数忽略类型比较
|
||||||
|
*
|
||||||
|
* @param obj1 对象1
|
||||||
|
* @param obj2 对象2
|
||||||
|
* @return value 返回值
|
||||||
|
*/
|
||||||
|
public static boolean eqObj(Object obj1, Object obj2)
|
||||||
|
{
|
||||||
|
if(obj1==null && obj2==null){
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
if(obj1==null){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(obj2==null){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return obj1.toString().equals(obj2.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* * 判断一个Collection是否为空, 包含List,Set,Queue
|
* * 判断一个Collection是否为空, 包含List,Set,Queue
|
||||||
*
|
*
|
||||||
|
|
|
@ -8,7 +8,6 @@ import com.yanzhu.common.core.web.domain.AjaxResult;
|
||||||
import com.yanzhu.common.core.web.page.TableDataInfo;
|
import com.yanzhu.common.core.web.page.TableDataInfo;
|
||||||
import com.yanzhu.common.log.annotation.Log;
|
import com.yanzhu.common.log.annotation.Log;
|
||||||
import com.yanzhu.common.log.enums.BusinessType;
|
import com.yanzhu.common.log.enums.BusinessType;
|
||||||
import com.yanzhu.common.redis.service.RedisService;
|
|
||||||
import com.yanzhu.common.security.annotation.InnerAuth;
|
import com.yanzhu.common.security.annotation.InnerAuth;
|
||||||
import com.yanzhu.common.security.annotation.RequiresPermissions;
|
import com.yanzhu.common.security.annotation.RequiresPermissions;
|
||||||
import com.yanzhu.common.security.utils.SecurityUtils;
|
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||||
|
@ -32,8 +31,6 @@ import java.util.Map;
|
||||||
@RequestMapping("/proProjectInfo")
|
@RequestMapping("/proProjectInfo")
|
||||||
public class ProProjectInfoController extends BaseController
|
public class ProProjectInfoController extends BaseController
|
||||||
{
|
{
|
||||||
@Autowired
|
|
||||||
private RedisService redisService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IProProjectInfoService proProjectInfoService;
|
private IProProjectInfoService proProjectInfoService;
|
||||||
|
|
|
@ -1,28 +1,35 @@
|
||||||
package com.yanzhu.manage.controller;
|
package com.yanzhu.manage.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.yanzhu.common.core.constant.CacheConstants;
|
||||||
import com.yanzhu.common.core.domain.R;
|
import com.yanzhu.common.core.domain.R;
|
||||||
import com.yanzhu.common.core.enums.UseStateEnums;
|
import com.yanzhu.common.core.enums.UseStateEnums;
|
||||||
import com.yanzhu.common.core.text.Convert;
|
import com.yanzhu.common.core.text.Convert;
|
||||||
import com.yanzhu.common.core.utils.DateUtils;
|
import com.yanzhu.common.core.utils.DateUtils;
|
||||||
|
import com.yanzhu.common.core.utils.StringUtils;
|
||||||
import com.yanzhu.common.core.utils.poi.ExcelUtil;
|
import com.yanzhu.common.core.utils.poi.ExcelUtil;
|
||||||
import com.yanzhu.common.core.web.controller.BaseController;
|
import com.yanzhu.common.core.web.controller.BaseController;
|
||||||
import com.yanzhu.common.core.web.domain.AjaxResult;
|
import com.yanzhu.common.core.web.domain.AjaxResult;
|
||||||
import com.yanzhu.common.core.web.page.TableDataInfo;
|
import com.yanzhu.common.core.web.page.TableDataInfo;
|
||||||
import com.yanzhu.common.log.annotation.Log;
|
import com.yanzhu.common.log.annotation.Log;
|
||||||
import com.yanzhu.common.log.enums.BusinessType;
|
import com.yanzhu.common.log.enums.BusinessType;
|
||||||
|
import com.yanzhu.common.redis.service.RedisService;
|
||||||
import com.yanzhu.common.security.annotation.InnerAuth;
|
import com.yanzhu.common.security.annotation.InnerAuth;
|
||||||
import com.yanzhu.common.security.annotation.RequiresPermissions;
|
import com.yanzhu.common.security.annotation.RequiresPermissions;
|
||||||
import com.yanzhu.common.security.utils.SecurityUtils;
|
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||||
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
|
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
|
||||||
|
import com.yanzhu.manage.enums.SubDeptsEnums;
|
||||||
|
import com.yanzhu.manage.enums.UserPostEnums;
|
||||||
import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService;
|
import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService;
|
||||||
import com.yanzhu.manage.service.IUniService;
|
import com.yanzhu.manage.service.IUniService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.*;
|
||||||
import java.util.Objects;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分包单位工人Controller
|
* 分包单位工人Controller
|
||||||
|
@ -34,12 +41,16 @@ import java.util.Objects;
|
||||||
@RequestMapping("/proProjectInfoSubdeptsUsers")
|
@RequestMapping("/proProjectInfoSubdeptsUsers")
|
||||||
public class ProProjectInfoSubdeptsUsersController extends BaseController
|
public class ProProjectInfoSubdeptsUsersController extends BaseController
|
||||||
{
|
{
|
||||||
@Autowired
|
|
||||||
private IProProjectInfoSubdeptsUsersService proProjectInfoSubdeptsUsersService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IUniService uniService;
|
private IUniService uniService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedisService redisService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IProProjectInfoSubdeptsUsersService proProjectInfoSubdeptsUsersService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询分包单位工人列表
|
* 查询分包单位工人列表
|
||||||
*/
|
*/
|
||||||
|
@ -309,14 +320,394 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
|
||||||
/**
|
/**
|
||||||
* 查询分包单位工人列表
|
* 查询分包单位工人列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/findAll")
|
@GetMapping("/findAllSendUsers/{proId}")
|
||||||
public AjaxResult findAll(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
|
public AjaxResult findAllSendUsers(@PathVariable("proId") Long proId)
|
||||||
{
|
{
|
||||||
proProjectInfoSubdeptsUsers.setUseStatus(UseStateEnums.IN.getCode());
|
String key = "findAllSendUsers::"+proId;
|
||||||
proProjectInfoSubdeptsUsers.setActiveTags("finished");
|
Object cache = redisService.getCacheObject(key);
|
||||||
proProjectInfoSubdeptsUsers.setSearchValue("sedUsers");
|
if(cache!=null){
|
||||||
List<ProProjectInfoSubdeptsUsers> list = proProjectInfoSubdeptsUsersService.selectProProjectInfoSubdeptsUsersList(proProjectInfoSubdeptsUsers);
|
return success(cache);
|
||||||
return success(list);
|
}
|
||||||
|
ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers();
|
||||||
|
query.setProjectId(proId);
|
||||||
|
query.setUseStatus(UseStateEnums.IN.getCode());
|
||||||
|
query.setActiveTags("finished");
|
||||||
|
query.setSearchValue("sedUsers");
|
||||||
|
List<ProProjectInfoSubdeptsUsers> list = proProjectInfoSubdeptsUsersService.selectProProjectInfoSubdeptsUsersList(query);
|
||||||
|
Map<String,Object> datas = new HashMap<>();
|
||||||
|
if(list.size()>0){
|
||||||
|
List<Map<String,Object>> lordSentList = new ArrayList<>();
|
||||||
|
List<Map<String,Object>> copySendList = new ArrayList<>();
|
||||||
|
List<Map<String,Object>> checkUserList = new ArrayList<>();
|
||||||
|
for(ProProjectInfoSubdeptsUsers user:list){
|
||||||
|
// 组装整改单位信息
|
||||||
|
if(!Objects.equals(user.getSubDeptType(), SubDeptsEnums.JSDW.getCode())){
|
||||||
|
List<Map<String,Object>> _lordSentList = lordSentList.stream().filter(map -> StringUtils.eqObj(map.get("subDeptId"),user.getSubDeptId())).collect(Collectors.toList());
|
||||||
|
if(_lordSentList.size()==0){
|
||||||
|
Map<String,Object> data = new HashMap<>();
|
||||||
|
data.put("subDeptId",user.getSubDeptId());
|
||||||
|
data.put("subDeptName",user.getSubDeptName());
|
||||||
|
data.put("subDeptTypeName",user.getSubDeptTypeName());
|
||||||
|
lordSentList.add(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 组装抄送单位信息
|
||||||
|
List<Map<String,Object>> _copySendList = copySendList.stream().filter(map -> StringUtils.eqObj(map.get("subDeptId"),user.getSubDeptId())).collect(Collectors.toList());
|
||||||
|
if(_copySendList.size()==0){
|
||||||
|
if(Objects.equals(user.getSubDeptType(), SubDeptsEnums.JSDW.getCode())){
|
||||||
|
Map<String,Object> data = new HashMap<>();
|
||||||
|
data.put("subDeptId",user.getSubDeptId());
|
||||||
|
data.put("subDeptName","项目总包单位");
|
||||||
|
data.put("subDeptType",user.getSubDeptType());
|
||||||
|
copySendList.add(data);
|
||||||
|
}else{
|
||||||
|
Map<String,Object> data = new HashMap<>();
|
||||||
|
data.put("subDeptId",user.getSubDeptId());
|
||||||
|
data.put("subDeptName",user.getSubDeptName());
|
||||||
|
data.put("subDeptType",user.getSubDeptType());
|
||||||
|
data.put("subDeptTypeName",user.getSubDeptTypeName());
|
||||||
|
copySendList.add(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 组装复检单位信息
|
||||||
|
if(Objects.equals(user.getSubDeptType(), SubDeptsEnums.JSDW.getCode())){
|
||||||
|
List<Map<String,Object>> _checkUserList = checkUserList.stream().filter(map -> StringUtils.eqObj(map.get("subDeptId"),user.getSubDeptId())).collect(Collectors.toList());
|
||||||
|
if(_checkUserList.size()==0){
|
||||||
|
Map<String,Object> data = new HashMap<>();
|
||||||
|
data.put("subDeptId",user.getSubDeptId());
|
||||||
|
data.put("subDeptName","项目总包单位");
|
||||||
|
checkUserList.add(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(lordSentList.size()>0){
|
||||||
|
for(Map<String,Object> data:lordSentList){
|
||||||
|
List<Map<String,Object>> userList = new ArrayList<>();
|
||||||
|
for(ProProjectInfoSubdeptsUsers user:list){
|
||||||
|
if(!Objects.equals(user.getSubDeptType(),SubDeptsEnums.JSDW.getCode()) && StringUtils.eqObj(data.get("subDeptId"),user.getSubDeptId())){
|
||||||
|
Map<String,Object> userMap = new HashMap<>();
|
||||||
|
userMap.put("userId",user.getUserId());
|
||||||
|
userMap.put("userName",user.getUserName());
|
||||||
|
userMap.put("userPhone",user.getUserPhone());
|
||||||
|
userMap.put("userPostName",StringUtils.eqObj(user.getUserPost(), UserPostEnums.BZZ.getCode())?user.getCraftPostName()+UserPostEnums.BZZ.getInfo():user.getCraftPostName());
|
||||||
|
userMap.put("state",false);
|
||||||
|
userList.add(userMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
data.put("userList",userList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(copySendList.size()>0){
|
||||||
|
// 抄送单位信息排序
|
||||||
|
copySendList = copySendList.stream()
|
||||||
|
.sorted(Comparator.comparing(map -> Convert.toLong(map.get("subDeptType"))))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
for(Map<String,Object> data:copySendList){
|
||||||
|
List<Map<String,Object>> userList = new ArrayList<>();
|
||||||
|
for(ProProjectInfoSubdeptsUsers user:list){
|
||||||
|
if(StringUtils.eqObj(data.get("subDeptId"),user.getSubDeptId())){
|
||||||
|
if(Objects.equals(user.getSubDeptType(),SubDeptsEnums.JSDW.getCode())){
|
||||||
|
Map<String,Object> userMap = new HashMap<>();
|
||||||
|
userMap.put("userId",user.getUserId());
|
||||||
|
userMap.put("userName",user.getUserName());
|
||||||
|
userMap.put("userPhone",user.getUserPhone());
|
||||||
|
userMap.put("state",false);
|
||||||
|
userList.add(userMap);
|
||||||
|
}else{
|
||||||
|
Map<String,Object> userMap = new HashMap<>();
|
||||||
|
userMap.put("userId",user.getUserId());
|
||||||
|
userMap.put("userName",user.getUserName());
|
||||||
|
userMap.put("userPhone",user.getUserPhone());
|
||||||
|
userMap.put("userPostName",StringUtils.eqObj(user.getUserPost(), UserPostEnums.BZZ.getCode())?user.getCraftPostName()+UserPostEnums.BZZ.getInfo():user.getCraftPostName());
|
||||||
|
userMap.put("state",false);
|
||||||
|
userList.add(userMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
data.put("userList",userList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(checkUserList.size()>0){
|
||||||
|
for(Map<String,Object> data:checkUserList){
|
||||||
|
List<Map<String,Object>> userList = new ArrayList<>();
|
||||||
|
for(ProProjectInfoSubdeptsUsers user:list){
|
||||||
|
if(Objects.equals(user.getSubDeptType(),SubDeptsEnums.JSDW.getCode()) && StringUtils.eqObj(data.get("subDeptId"),user.getSubDeptId())){
|
||||||
|
Map<String,Object> userMap = new HashMap<>();
|
||||||
|
userMap.put("userId",user.getUserId());
|
||||||
|
userMap.put("userName",user.getUserName());
|
||||||
|
userMap.put("userPhone",user.getUserPhone());
|
||||||
|
userMap.put("state",false);
|
||||||
|
userList.add(userMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
data.put("userList",userList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
datas.put("lordSentList",lordSentList);
|
||||||
|
datas.put("copySendList",copySendList);
|
||||||
|
datas.put("checkUserList",checkUserList);
|
||||||
|
}
|
||||||
|
redisService.setCacheObject(key,datas,5L, TimeUnit.MINUTES);
|
||||||
|
return success(datas);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组装的测试数据...
|
||||||
|
* JiangYuQi
|
||||||
|
* @return userList
|
||||||
|
*/
|
||||||
|
private static List<ProProjectInfoSubdeptsUsers> packageDatas(){
|
||||||
|
List<ProProjectInfoSubdeptsUsers> userList = new ArrayList<>();
|
||||||
|
// 组装第一条数据
|
||||||
|
ProProjectInfoSubdeptsUsers us1 = new ProProjectInfoSubdeptsUsers();
|
||||||
|
us1.setId(95L);
|
||||||
|
us1.setParId(null);
|
||||||
|
us1.setComId(101L);
|
||||||
|
us1.setProjectId(133L);
|
||||||
|
us1.setProjectName("lxm测试项目2");
|
||||||
|
us1.setSubDeptId(133L);
|
||||||
|
us1.setSubDeptType("1");
|
||||||
|
us1.setSubDeptTypeName("建设单位");
|
||||||
|
us1.setSubDeptName("lxm测试项目2");
|
||||||
|
us1.setSubDeptPowerPath(null);
|
||||||
|
us1.setUserId(144L);
|
||||||
|
us1.setUserPost("66");
|
||||||
|
us1.setSubDeptGroup(39L);
|
||||||
|
us1.setSubDeptGroupName("管理班组");
|
||||||
|
us1.setUserName("蒲峻峰");
|
||||||
|
us1.setCardType("1");
|
||||||
|
us1.setCardCode("510781198105058616");
|
||||||
|
us1.setUserSex("0");
|
||||||
|
us1.setUserPicture("/statics/2025/02/23/9c1bb579ccfb1c74edbe793f61257515_20250223173526A167.jpg");
|
||||||
|
us1.setUserPhone("13244554455");
|
||||||
|
us1.setDegreeGrade(null);
|
||||||
|
us1.setUserInfos("{\"cardImgPos\":\"/statics/2025/02/23/df1597450932c311c914ac859f5be898_20250223173504A165.jpg\",\"cardImgInv\":\"/statics/2025/02/23/54810ca35f07eff59ef67acd44879e48_20250223173517A166.jpg\"}");
|
||||||
|
us1.setCraftType(null);
|
||||||
|
us1.setCraftPost(null);
|
||||||
|
us1.setEduStatus(null);
|
||||||
|
us1.setEduFilePath(null);
|
||||||
|
us1.setEduDate(null);
|
||||||
|
us1.setApproveStatus(101L);
|
||||||
|
us1.setUseDate(null);
|
||||||
|
us1.setUseStatus("0");
|
||||||
|
us1.setAdmitGuid(null);
|
||||||
|
us1.setQrCode(null);
|
||||||
|
us1.setSubStep(2L);
|
||||||
|
us1.setIllnessStatus(null);
|
||||||
|
us1.setSupIllnessStatus(null);
|
||||||
|
us1.setIsDel(0L);
|
||||||
|
us1.setCreateBy("admin");
|
||||||
|
|
||||||
|
// 将第一条数据添加到列表
|
||||||
|
userList.add(us1);
|
||||||
|
|
||||||
|
// 组装第二条数据
|
||||||
|
ProProjectInfoSubdeptsUsers us2 = new ProProjectInfoSubdeptsUsers();
|
||||||
|
us2.setId(96L);
|
||||||
|
us2.setParId(null);
|
||||||
|
us2.setComId(101L);
|
||||||
|
us2.setProjectId(133L);
|
||||||
|
us2.setProjectName("lxm测试项目2");
|
||||||
|
us2.setSubDeptId(133L);
|
||||||
|
us2.setSubDeptType("1");
|
||||||
|
us2.setSubDeptTypeName("建设单位");
|
||||||
|
us2.setSubDeptName("lxm测试项目2");
|
||||||
|
us2.setSubDeptPowerPath(null);
|
||||||
|
us2.setUserId(145L);
|
||||||
|
us2.setUserPost("66");
|
||||||
|
us2.setSubDeptGroup(39L);
|
||||||
|
us2.setSubDeptGroupName("管理班组");
|
||||||
|
us2.setUserName("蒋林波");
|
||||||
|
us2.setCardType("1");
|
||||||
|
us2.setCardCode("510781197606254012");
|
||||||
|
us2.setUserSex("0");
|
||||||
|
us2.setUserPicture("/statics/2025/02/23/1004af18b5ab75d461eb1560eb77b58f_20250223173701A168.jpg");
|
||||||
|
us2.setUserPhone("13244554456");
|
||||||
|
us2.setDegreeGrade(null);
|
||||||
|
us2.setUserInfos("{\"cardImgPos\":\"/statics/2025/02/23/1004af18b5ab75d461eb1560eb77b58f_20250223173707A169.jpg\",\"cardImgInv\":\"/statics/2025/02/23/9c1bb579ccfb1c74edbe793f61257515_20250223173715A170.jpg\"}");
|
||||||
|
us2.setCraftType(null);
|
||||||
|
us2.setCraftPost(null);
|
||||||
|
us2.setEduStatus(null);
|
||||||
|
us2.setEduFilePath(null);
|
||||||
|
us2.setEduDate(null);
|
||||||
|
us2.setApproveStatus(101L);
|
||||||
|
us2.setUseDate(null);
|
||||||
|
us2.setUseStatus("0");
|
||||||
|
us2.setAdmitGuid(null);
|
||||||
|
us2.setQrCode(null);
|
||||||
|
us2.setSubStep(2L);
|
||||||
|
us2.setIllnessStatus(null);
|
||||||
|
us2.setSupIllnessStatus(null);
|
||||||
|
us2.setIsDel(0L);
|
||||||
|
us2.setCreateBy("admin");
|
||||||
|
|
||||||
|
// 将第二条数据添加到列表
|
||||||
|
userList.add(us2);
|
||||||
|
|
||||||
|
// 组装第三条数据
|
||||||
|
ProProjectInfoSubdeptsUsers us3 = new ProProjectInfoSubdeptsUsers();
|
||||||
|
us3.setId(104L);
|
||||||
|
us3.setParId(null);
|
||||||
|
us3.setComId(101L);
|
||||||
|
us3.setProjectId(133L);
|
||||||
|
us3.setProjectName("lxm测试项目2");
|
||||||
|
us3.setSubDeptId(133L);
|
||||||
|
us3.setSubDeptType("1");
|
||||||
|
us3.setSubDeptTypeName("建设单位");
|
||||||
|
us3.setSubDeptName("lxm测试项目2");
|
||||||
|
us3.setSubDeptPowerPath(null);
|
||||||
|
us3.setUserId(155L);
|
||||||
|
us3.setUserPost("66");
|
||||||
|
us3.setSubDeptGroup(49L);
|
||||||
|
us3.setSubDeptGroupName("管理班组");
|
||||||
|
us3.setUserName("蒲峻峰");
|
||||||
|
us3.setCardType("1");
|
||||||
|
us3.setCardCode("510781198105058616");
|
||||||
|
us3.setUserSex("0");
|
||||||
|
us3.setUserPicture("/statics/2025/03/02/1004af18b5ab75d461eb1560eb77b58f_20250302172602A019.jpg");
|
||||||
|
us3.setUserPhone("13488998899");
|
||||||
|
us3.setDegreeGrade(null);
|
||||||
|
us3.setUserInfos("{\"cardImgPos\":\"/statics/2025/03/02/df1597450932c311c914ac859f5be898_20250302172553A017.jpg\",\"cardImgInv\":\"/statics/2025/03/02/da69c21341c10c40fce19bdb9a796208_20250302172559A018.jpg\"}");
|
||||||
|
us3.setCraftType(null);
|
||||||
|
us3.setCraftPost(null);
|
||||||
|
us3.setEduStatus(null);
|
||||||
|
us3.setEduFilePath(null);
|
||||||
|
us3.setEduDate(null);
|
||||||
|
us3.setApproveStatus(101L);
|
||||||
|
us3.setUseDate(null);
|
||||||
|
us3.setUseStatus("0");
|
||||||
|
us3.setAdmitGuid(null);
|
||||||
|
us3.setQrCode(null);
|
||||||
|
us3.setSubStep(2L);
|
||||||
|
us3.setIllnessStatus(null);
|
||||||
|
us3.setSupIllnessStatus(null);
|
||||||
|
us3.setIsDel(0L);
|
||||||
|
us3.setCreateBy("admin");
|
||||||
|
|
||||||
|
// 将第三条数据添加到列表
|
||||||
|
userList.add(us3);
|
||||||
|
|
||||||
|
// 组装第四条数据
|
||||||
|
ProProjectInfoSubdeptsUsers us4 = new ProProjectInfoSubdeptsUsers();
|
||||||
|
us4.setId(106L);
|
||||||
|
us4.setParId(null);
|
||||||
|
us4.setComId(101L);
|
||||||
|
us4.setProjectId(133L);
|
||||||
|
us4.setProjectName("lxm测试项目2");
|
||||||
|
us4.setSubDeptId(133L);
|
||||||
|
us4.setSubDeptType("1");
|
||||||
|
us4.setSubDeptTypeName("建设单位");
|
||||||
|
us4.setSubDeptName("lxm测试项目2");
|
||||||
|
us4.setSubDeptPowerPath(null);
|
||||||
|
us4.setUserId(157L);
|
||||||
|
us4.setUserPost("66");
|
||||||
|
us4.setSubDeptGroup(50L);
|
||||||
|
us4.setSubDeptGroupName("管理班组");
|
||||||
|
us4.setUserName("王胡建");
|
||||||
|
us4.setCardType("1");
|
||||||
|
us4.setCardCode("510727197611054711");
|
||||||
|
us4.setUserSex("0");
|
||||||
|
us4.setUserPicture("/statics/2025/03/03/52f9d8668029387317eaa2faae079c38_20250303164124A031.jpg");
|
||||||
|
us4.setUserPhone("13488998890");
|
||||||
|
us4.setDegreeGrade(null);
|
||||||
|
us4.setUserInfos("{\"cardImgPos\":\"/statics/2025/03/03/ec722c0876abced32dc6db3f344be502_20250303164108A029.jpg\",\"cardImgInv\":\"/statics/2025/03/03/9c1bb579ccfb1c74edbe793f61257515_20250303164121A030.jpg\"}");
|
||||||
|
us4.setCraftType(null);
|
||||||
|
us4.setCraftPost(null);
|
||||||
|
us4.setEduStatus(null);
|
||||||
|
us4.setEduFilePath(null);
|
||||||
|
us4.setEduDate(null);
|
||||||
|
us4.setApproveStatus(101L);
|
||||||
|
us4.setUseDate(null);
|
||||||
|
us4.setUseStatus("0");
|
||||||
|
us4.setAdmitGuid(null);
|
||||||
|
us4.setQrCode(null);
|
||||||
|
us4.setSubStep(2L);
|
||||||
|
us4.setIllnessStatus(null);
|
||||||
|
us4.setSupIllnessStatus(null);
|
||||||
|
us4.setIsDel(0L);
|
||||||
|
us4.setCreateBy("admin");
|
||||||
|
|
||||||
|
// 将第四条数据添加到列表
|
||||||
|
userList.add(us4);
|
||||||
|
|
||||||
|
// 组装第五条数据
|
||||||
|
ProProjectInfoSubdeptsUsers us5 = new ProProjectInfoSubdeptsUsers();
|
||||||
|
us5.setId(114L);
|
||||||
|
us5.setParId(null);
|
||||||
|
us5.setComId(101L);
|
||||||
|
us5.setProjectId(133L);
|
||||||
|
us5.setProjectName("lxm测试项目2");
|
||||||
|
us5.setSubDeptId(35L);
|
||||||
|
us5.setSubDeptType("4");
|
||||||
|
us5.setSubDeptTypeName("劳务分包");
|
||||||
|
us5.setSubDeptName("北京电信劳务队");
|
||||||
|
us5.setSubDeptPowerPath("/statics/2025/03/06/c94c927978df13c7275e1fae79dc2e55_20250306003001A090.jpg");
|
||||||
|
us5.setUserId(163L);
|
||||||
|
us5.setUserPost("1");
|
||||||
|
us5.setSubDeptGroup(55L);
|
||||||
|
us5.setSubDeptGroupName("管理班组");
|
||||||
|
us5.setUserName("张金徐");
|
||||||
|
us5.setCardType("1");
|
||||||
|
us5.setCardCode("510781197309158614");
|
||||||
|
us5.setUserSex("男");
|
||||||
|
us5.setUserPicture("/statics/2025/03/06/6b6ae6af110d59013a1d62f28f1e0385_20250306002959A084.jpg");
|
||||||
|
us5.setUserPhone("18629401436");
|
||||||
|
us5.setDegreeGrade("1");
|
||||||
|
us5.setUserInfos("{\"nation\":\"汉\",\"nativePlace\":\"四川省\",\"address\":\"四川省江油市重兴乡龙山村三组\",\"emergencyContact\":\"龙景\",\"contactPhone\":\"15522425525\",\"cardImgPos\":\"/statics/2025/03/06/c7a258a694b596a910bb6d714c8912f7_20250306002959A087.jpg\",\"cardImgInv\":\"/statics/2025/03/06/9f8eb389a16a254cd3b9217c2e5c633b_20250306002959A088.jpg\",\"uniFaceInfo\":\"{\\\"projectGuid\\\":\\\"B35603337E2D46B590EC0DE5A24A6091\\\",\\\"admitGuid\\\":\\\"7E6A1448B175428C95B25E693F9F9F95\\\",\\\"faceGuid\\\":\\\"0C8DDFE1E9274948AF4706995881AFDD\\\",\\\"imageType\\\":3,\\\"faceUrl\\\":\\\"https://uniubi-aiot.oss-cn-hangzhou.aliyuncs.com/detect/20250306/003159-42BE5AB5F77B4B458D56EF5A55B209A8\\\",\\\"createTime\\\":\\\"2025-03-05T16:31:59+0000\\\"}\"}");
|
||||||
|
us5.setCraftType("3");
|
||||||
|
us5.setCraftPost("管理人员");
|
||||||
|
us5.setEduStatus("0");
|
||||||
|
us5.setEduFilePath("/statics/2025/03/06/9d8aeb76-bb05-4a31-9464-64e3647db509-c-p.pdf");
|
||||||
|
us5.setApproveStatus(100L);
|
||||||
|
us5.setUseStatus("0");
|
||||||
|
us5.setAdmitGuid("7E6A1448B175428C95B25E693F9F9F95");
|
||||||
|
us5.setQrCode("/statics/2025/03/06/1741192319054.png");
|
||||||
|
us5.setSubStep(100L);
|
||||||
|
us5.setIsDel(0L);
|
||||||
|
us5.setCreateBy("小程序数据");
|
||||||
|
|
||||||
|
// 将第五条数据添加到列表
|
||||||
|
userList.add(us5);
|
||||||
|
|
||||||
|
// 组装第六条数据
|
||||||
|
ProProjectInfoSubdeptsUsers us6 = new ProProjectInfoSubdeptsUsers();
|
||||||
|
us6.setId(115L);
|
||||||
|
us6.setParId(null);
|
||||||
|
us6.setComId(101L);
|
||||||
|
us6.setProjectId(133L);
|
||||||
|
us6.setProjectName("lxm测试项目2");
|
||||||
|
us6.setSubDeptId(35L);
|
||||||
|
us6.setSubDeptType("4");
|
||||||
|
us6.setSubDeptTypeName("劳务分包");
|
||||||
|
us6.setSubDeptName("北京电信劳务队");
|
||||||
|
us6.setSubDeptPowerPath("/statics/2025/03/06/c94c927978df13c7275e1fae79dc2e55_20250306003001A090.jpg");
|
||||||
|
us6.setUserId(164L);
|
||||||
|
us6.setUserPost("2");
|
||||||
|
us6.setSubDeptGroup(55L);
|
||||||
|
us6.setSubDeptGroupName("管理班组");
|
||||||
|
us6.setUserName("-姜玉琦测试-");
|
||||||
|
us6.setCardType("1");
|
||||||
|
us6.setCardCode("510781197309158614");
|
||||||
|
us6.setUserSex("男");
|
||||||
|
us6.setUserPicture("/statics/2025/03/06/6b6ae6af110d59013a1d62f28f1e0385_20250306002959A084.jpg");
|
||||||
|
us6.setUserPhone("18189138535");
|
||||||
|
us6.setDegreeGrade("1");
|
||||||
|
us6.setUserInfos("{\"nation\":\"汉\",\"nativePlace\":\"四川省\",\"address\":\"四川省江油市重兴乡龙山村三组\",\"emergencyContact\":\"龙景\",\"contactPhone\":\"15522425525\",\"cardImgPos\":\"/statics/2025/03/06/c7a258a694b596a910bb6d714c8912f7_20250306002959A087.jpg\",\"cardImgInv\":\"/statics/2025/03/06/9f8eb389a16a254cd3b9217c2e5c633b_20250306002959A088.jpg\",\"uniFaceInfo\":\"{\\\"projectGuid\\\":\\\"B35603337E2D46B590EC0DE5A24A6091\\\",\\\"admitGuid\\\":\\\"7E6A1448B175428C95B25E693F9F9F95\\\",\\\"faceGuid\\\":\\\"0C8DDFE1E9274948AF4706995881AFDD\\\",\\\"imageType\\\":3,\\\"faceUrl\\\":\\\"https://uniubi-aiot.oss-cn-hangzhou.aliyuncs.com/detect/20250306/003159-42BE5AB5F77B4B458D56EF5A55B209A8\\\",\\\"createTime\\\":\\\"2025-03-05T16:31:59+0000\\\"}\"}");
|
||||||
|
us6.setCraftType("3");
|
||||||
|
us6.setCraftPost("管理人员");
|
||||||
|
us6.setEduStatus("0");
|
||||||
|
us6.setEduFilePath("/statics/2025/03/06/9d8aeb76-bb05-4a31-9464-64e3647db509-c-p.pdf");
|
||||||
|
us6.setApproveStatus(100L);
|
||||||
|
us6.setUseStatus("0");
|
||||||
|
us6.setAdmitGuid(null);
|
||||||
|
us6.setQrCode(null);
|
||||||
|
us6.setSubStep(100L);
|
||||||
|
us6.setIsDel(0L);
|
||||||
|
us6.setCreateBy("小程序数据");
|
||||||
|
|
||||||
|
// 将第六条数据添加到列表
|
||||||
|
userList.add(us6);
|
||||||
|
return userList;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,7 +126,7 @@ public interface IUniService {
|
||||||
/**
|
/**
|
||||||
* 同步宇泛的人员和头像
|
* 同步宇泛的人员和头像
|
||||||
*/
|
*/
|
||||||
public Long syncUniUser(ProProjectInfoSubdeptsUsers puser);
|
public void syncUniUser(ProProjectInfoSubdeptsUsers puser);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同步宇泛的设备信息
|
* 同步宇泛的设备信息
|
||||||
|
|
|
@ -166,12 +166,14 @@ public class UniServiceImpl implements IUniService{
|
||||||
public JSONObject faceRegister(JSONObject data) {
|
public JSONObject faceRegister(JSONObject data) {
|
||||||
long projectId=data.getLong("projectId");
|
long projectId=data.getLong("projectId");
|
||||||
data.remove("projectId");
|
data.remove("projectId");
|
||||||
|
//System.out.println("faceRegister==REQ>"+JSON.toJSONString(data));
|
||||||
Request request=new Request.Builder()
|
Request request=new Request.Builder()
|
||||||
.url(UniUtils.FACEREGISTER)
|
.url(UniUtils.FACEREGISTER)
|
||||||
.post(UniUtils.toJsonBody(data))
|
.post(UniUtils.toJsonBody(data))
|
||||||
.headers(UniUtils.setHeaderParams(auth(projectId)))
|
.headers(UniUtils.setHeaderParams(auth(projectId)))
|
||||||
.build();
|
.build();
|
||||||
String res=UniUtils.getResult(request);
|
String res=UniUtils.getResult(request);
|
||||||
|
//System.out.println("faceRegister==RES>"+res);
|
||||||
JSONObject jo=JSON.parseObject(res);
|
JSONObject jo=JSON.parseObject(res);
|
||||||
if(jo.getLong("result").intValue()==1){
|
if(jo.getLong("result").intValue()==1){
|
||||||
return jo.getJSONObject("data");
|
return jo.getJSONObject("data");
|
||||||
|
@ -187,12 +189,14 @@ public class UniServiceImpl implements IUniService{
|
||||||
public boolean faceDelete(JSONObject data) {
|
public boolean faceDelete(JSONObject data) {
|
||||||
long projectId=data.getLong("projectId");
|
long projectId=data.getLong("projectId");
|
||||||
data.remove("projectId");
|
data.remove("projectId");
|
||||||
|
//System.out.println("faceDelete==REQ>"+JSON.toJSONString(data));
|
||||||
Request request=new Request.Builder()
|
Request request=new Request.Builder()
|
||||||
.url(UniUtils.FACEDELETE)
|
.url(UniUtils.FACEDELETE)
|
||||||
.post(UniUtils.toJsonBody(data))
|
.post(UniUtils.toJsonBody(data))
|
||||||
.headers(UniUtils.setHeaderParams(auth(projectId)))
|
.headers(UniUtils.setHeaderParams(auth(projectId)))
|
||||||
.build();
|
.build();
|
||||||
String res=UniUtils.getResult(request);
|
String res=UniUtils.getResult(request);
|
||||||
|
//System.out.println("faceDelete==RES>"+res);
|
||||||
JSONObject jo=JSON.parseObject(res);
|
JSONObject jo=JSON.parseObject(res);
|
||||||
if("token is illegal".equals(jo.getString("msg"))){
|
if("token is illegal".equals(jo.getString("msg"))){
|
||||||
clearAuthCache(projectId);
|
clearAuthCache(projectId);
|
||||||
|
@ -403,6 +407,23 @@ public class UniServiceImpl implements IUniService{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 私有入场
|
||||||
|
* @param user
|
||||||
|
*/
|
||||||
|
private void syncUserAuthDeviceByInfo(ProProjectInfoSubdeptsUsers user) {
|
||||||
|
AttendanceUbiDevice where=new AttendanceUbiDevice();
|
||||||
|
where.setProjectId(user.getProjectId());
|
||||||
|
List<AttendanceUbiDevice> devList=attendanceUbiDeviceMapper.selectAttendanceUbiDeviceList(where);
|
||||||
|
for(AttendanceUbiDevice device :devList) {
|
||||||
|
JSONObject jo=new JSONObject();
|
||||||
|
jo.put("projectId",user.getProjectId());
|
||||||
|
jo.put("deviceNo",device.getDeviceNo());
|
||||||
|
jo.put("admitGuids",user.getAdmitGuid());
|
||||||
|
authDevice(jo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private Long deleteDevice(Long id) {
|
private Long deleteDevice(Long id) {
|
||||||
AttendanceUbiDevice device=attendanceUbiDeviceMapper.selectAttendanceUbiDeviceById(id);
|
AttendanceUbiDevice device=attendanceUbiDeviceMapper.selectAttendanceUbiDeviceById(id);
|
||||||
if(device==null){
|
if(device==null){
|
||||||
|
@ -470,9 +491,7 @@ public class UniServiceImpl implements IUniService{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//public Long syncUniUser(Long userId, Long projectId) {
|
public void syncUniUser(ProProjectInfoSubdeptsUsers puser) {
|
||||||
public Long syncUniUser(ProProjectInfoSubdeptsUsers puser) {
|
|
||||||
//SysUser user=remoteUserService.getSysUserInfo(userId, SecurityConstants.INNER).getData();
|
|
||||||
JSONObject jo;
|
JSONObject jo;
|
||||||
if(StringUtils.isNotEmpty(puser.getUserInfos())){
|
if(StringUtils.isNotEmpty(puser.getUserInfos())){
|
||||||
jo = JSON.parseObject(puser.getUserInfos());
|
jo = JSON.parseObject(puser.getUserInfos());
|
||||||
|
@ -480,8 +499,8 @@ public class UniServiceImpl implements IUniService{
|
||||||
jo = new JSONObject();
|
jo = new JSONObject();
|
||||||
}
|
}
|
||||||
Long projectId=puser.getProjectId();
|
Long projectId=puser.getProjectId();
|
||||||
String admitGuid=puser.getAdmitGuid(); //jo.getString("admitGuid");
|
String admitGuid=puser.getAdmitGuid();
|
||||||
String faceGuid=puser.getFaceGuid(); //jo.getString("faceGuid");
|
String faceGuid=puser.getFaceGuid();
|
||||||
JSONObject userJo=new JSONObject();
|
JSONObject userJo=new JSONObject();
|
||||||
userJo.put("projectId",projectId);
|
userJo.put("projectId",projectId);
|
||||||
userJo.put("name",puser.getUserName());
|
userJo.put("name",puser.getUserName());
|
||||||
|
@ -519,10 +538,8 @@ public class UniServiceImpl implements IUniService{
|
||||||
url="http://62.234.3.186"+url;
|
url="http://62.234.3.186"+url;
|
||||||
}
|
}
|
||||||
faceJo.put("url",url);
|
faceJo.put("url",url);
|
||||||
//faceJo.put("url","https://uniubi-aiot.oss-cn-hangzhou.aliyuncs.com/detect/20241007/211204-71D9BCBE526C4F57B8D31ECAE03AEBFB");
|
|
||||||
faceJo.put("faceTag","");
|
faceJo.put("faceTag","");
|
||||||
HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.currentRequestAttributes()).getRequest();
|
HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.currentRequestAttributes()).getRequest();
|
||||||
//String url= request.getRemoteAddr();
|
|
||||||
if(StringUtils.isNotEmpty(faceGuid)){
|
if(StringUtils.isNotEmpty(faceGuid)){
|
||||||
JSONObject faceDel=new JSONObject();
|
JSONObject faceDel=new JSONObject();
|
||||||
faceDel.put("projectId",projectId);
|
faceDel.put("projectId",projectId);
|
||||||
|
@ -541,10 +558,11 @@ public class UniServiceImpl implements IUniService{
|
||||||
|
|
||||||
puser.setUserInfos(jo.toJSONString());
|
puser.setUserInfos(jo.toJSONString());
|
||||||
if(hasUpdate){
|
if(hasUpdate){
|
||||||
int ret=proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(puser);
|
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(puser);
|
||||||
return ret*1l;
|
|
||||||
}
|
}
|
||||||
return 0l;
|
|
||||||
|
// 人员入场
|
||||||
|
syncUserAuthDeviceByInfo(puser);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,10 +101,9 @@ export function findProjectDepts(proId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询项目参建单位
|
// 查询项目参建单位
|
||||||
export function findProjectDeptUsers(query) {
|
export function findProjectDeptUsers(proId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/manage/proProjectInfoDepts/findAllDepts/' + proId,
|
url: '/manage/proProjectInfoSubdeptsUsers/findAllSendUsers/' + proId,
|
||||||
method: 'get',
|
method: 'get'
|
||||||
params: query
|
|
||||||
})
|
})
|
||||||
}
|
}
|
|
@ -67,7 +67,7 @@ Component({
|
||||||
var data = this.data.rectifierData;
|
var data = this.data.rectifierData;
|
||||||
let ei = e.currentTarget.dataset.index;
|
let ei = e.currentTarget.dataset.index;
|
||||||
let index = ei.split('_');
|
let index = ei.split('_');
|
||||||
let userdata = data[index[0]].userinfoList[index[1]];
|
let userdata = data[index[0]].userList[index[1]];
|
||||||
let of = this.data.selectedIndex.indexOf(ei);
|
let of = this.data.selectedIndex.indexOf(ei);
|
||||||
if(of>-1){
|
if(of>-1){
|
||||||
this.data.selectedIndex.splice(of, 1);
|
this.data.selectedIndex.splice(of, 1);
|
||||||
|
@ -80,13 +80,17 @@ Component({
|
||||||
if(this.data.selectedIndex.length>1){
|
if(this.data.selectedIndex.length>1){
|
||||||
this.data.selectedIndex.forEach((item) =>{
|
this.data.selectedIndex.forEach((item) =>{
|
||||||
let _indexs = item.split('_');
|
let _indexs = item.split('_');
|
||||||
data[_indexs[0]].userinfoList[_indexs[1]].state = false;
|
data[_indexs[0]].userList[_indexs[1]].state = false;
|
||||||
});
|
});
|
||||||
userdata.state = true;
|
userdata.state = true;
|
||||||
this.data.selectedIndex=[];
|
this.data.selectedIndex=[];
|
||||||
this.data.selectedIndex.push(ei);
|
this.data.selectedIndex.push(ei);
|
||||||
}
|
}
|
||||||
let _gridData=[{userName:userdata.nickName+" ["+userdata.jobTypeName+"]",phoneNumber:userdata.phonenumber}];
|
let _post="";
|
||||||
|
if(userdata.userPostName){
|
||||||
|
_post = " ["+userdata.userPostName+"]";
|
||||||
|
}
|
||||||
|
let _gridData=[{'userId':userdata.userId,'userName':userdata.userName+_post,'userPhone':userdata.userPhone}];
|
||||||
this.triggerEvent('selected',_gridData)
|
this.triggerEvent('selected',_gridData)
|
||||||
this.setData({
|
this.setData({
|
||||||
choose:_gridData[0].userName,
|
choose:_gridData[0].userName,
|
||||||
|
@ -106,8 +110,12 @@ Component({
|
||||||
if(this.data.selectedIndex.length>0){
|
if(this.data.selectedIndex.length>0){
|
||||||
this.data.selectedIndex.forEach((item) =>{
|
this.data.selectedIndex.forEach((item) =>{
|
||||||
let _indexs = item.split('_');
|
let _indexs = item.split('_');
|
||||||
let name = data[_indexs[0]].userinfoList[_indexs[1]].nickName+" ["+data[_indexs[0]].userinfoList[_indexs[1]].jobTypeName+"]";
|
let _post="";
|
||||||
_gridData.push({userName:name,phoneNumber:data[_indexs[0]].userinfoList[_indexs[1]].phonenumber});
|
if(data[_indexs[0]].userList[_indexs[1]].userPostName){
|
||||||
|
_post = " ["+data[_indexs[0]].userList[_indexs[1]].userPostName+"]";
|
||||||
|
}
|
||||||
|
let name = data[_indexs[0]].userList[_indexs[1]].userName+_post;
|
||||||
|
_gridData.push({'userId':data[_indexs[0]].userList[_indexs[1]].userId,'userName':name,'userPhone':data[_indexs[0]].userList[_indexs[1]].userPhone});
|
||||||
chooses+=","+name;
|
chooses+=","+name;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,15 +17,14 @@
|
||||||
<view class="rectifier_list">
|
<view class="rectifier_list">
|
||||||
<view class="rectifier_list_height">
|
<view class="rectifier_list_height">
|
||||||
<view wx:for="{{rectifierData}}" wx:key="index" data-index="{{index}}">
|
<view wx:for="{{rectifierData}}" wx:key="index" data-index="{{index}}">
|
||||||
<view class="rectifier_list-group_for">[{{item.unitTypeName}}] {{item.unitName}}</view>
|
<view class="rectifier_list-group_for"><text class="modify_eharts_title_1">{{item.subDeptName}}</text><text wx:if="{{item.subDeptTypeName}}" style="font-size: small; color: antiquewhite;"> [{{item.subDeptTypeName}}]</text></view>
|
||||||
<view class="rectifier_list_for" wx:for="{{item.userinfoList}}" wx:for-item="items" wx:for-index="index_i" wx:key="index_i" data-index="{{index+'_'+index_i}}" bindtap="onSelected">
|
<view class="rectifier_list_for" wx:for="{{item.userList}}" wx:for-item="items" wx:for-index="index_i" wx:key="index_i" data-index="{{index+'_'+index_i}}" bindtap="onSelected">
|
||||||
<view class="rectifier_list_radio">
|
<view class="rectifier_list_radio">
|
||||||
<view class="rectifier_list_radio_circle {{items.state?'active':''}}">
|
<view class="rectifier_list_radio_circle {{items.state?'active':''}}">
|
||||||
<van-icon name="success" wx:if="{{items.state}}"/>
|
<van-icon name="success" wx:if="{{items.state}}"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="rectifier_list_name {{items.state?'active':''}}">{{items.phonenumber}}</view>
|
<view class="rectifier_list_name {{items.state?'active':''}}">{{items.userName}} {{items.userPhone}}<text wx:if="{{items.userPostName}}" style="font-size: small;"> [{{items.userPostName}}]</text></view>
|
||||||
<view class="rectifier_list_name {{items.state?'active':''}}">{{items.nickName}} [{{items.jobTypeName}}]</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -47,7 +47,7 @@ page{
|
||||||
.rectifier_list_for{
|
.rectifier_list_for{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 18rpx 15rpx;
|
padding: 16rpx 15rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -91,18 +91,28 @@ page{
|
||||||
}
|
}
|
||||||
.rectifier_list-group_for{
|
.rectifier_list-group_for{
|
||||||
height: 65rpx;
|
height: 65rpx;
|
||||||
background-color: #879ff97d;
|
background-color: #9898987d;
|
||||||
line-height: 65rpx;
|
line-height: 65rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
border-radius: 5px;
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
.rectifier_list-group_for:not(:first-child){
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
.inspect_input_fill_in {
|
.inspect_input_fill_in {
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
background: #212737;
|
background: #212737;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
}
|
}
|
||||||
|
.modify_eharts_title_1 {
|
||||||
|
padding-left: 45rpx;
|
||||||
|
background: url("http://fileimg.makalu.cc/CORE_52887EE6A33042408E11C2174974ABA1.png") no-repeat left/40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import config from '../../../config'
|
|
||||||
import {
|
import {
|
||||||
getToken,
|
getToken,
|
||||||
getUserInfo
|
getUserInfo
|
||||||
|
@ -35,30 +34,11 @@ Page({
|
||||||
},
|
},
|
||||||
active: 0,
|
active: 0,
|
||||||
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
|
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
|
||||||
loginName: "",
|
lordSentList: [],
|
||||||
userName: "",
|
copySendList: [],
|
||||||
rectifierData: [],
|
checkUserList: [],
|
||||||
rectifierData2: [],
|
|
||||||
rectifierData3: [],
|
|
||||||
//验收时间
|
|
||||||
nickedTime: '',
|
|
||||||
loadShow: false,
|
loadShow: false,
|
||||||
lordSent: "",
|
|
||||||
lordSentUser: "",
|
|
||||||
copySend: "",
|
|
||||||
copySendUser: "",
|
|
||||||
recheckSend: "",
|
|
||||||
recheckSendUser: "",
|
|
||||||
workParts: "",
|
|
||||||
changeInfo: "",
|
|
||||||
dangerType: "1",
|
|
||||||
dangerTypeList: [],
|
|
||||||
selectValue: "",
|
|
||||||
selectIndex: "",
|
|
||||||
problemType: "1",
|
|
||||||
showHis: false,
|
showHis: false,
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -127,70 +107,16 @@ Page({
|
||||||
* 获取项目所有人员,在页面组装数据...
|
* 获取项目所有人员,在页面组装数据...
|
||||||
*/
|
*/
|
||||||
getProjectUsers() {
|
getProjectUsers() {
|
||||||
let params = "projectId="+app.globalData.useProjectId;
|
findProjectDeptUsers(app.globalData.useProjectId).then(res =>{
|
||||||
findProjectDeptUsers(params).then(res =>{
|
if(res.code==200){
|
||||||
let _lordSentList = [];
|
this.setData({
|
||||||
let _copySendList = [];
|
lordSentList: res.data.lordSentList,
|
||||||
let _checkUserList = [];
|
copySendList: res.data.copySendList,
|
||||||
res.data.forEach(item =>{
|
checkUserList: res.data.checkUserList,
|
||||||
//if(item.subDeptType!='1' && _lordSentList)
|
});
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
let that = this
|
|
||||||
wx.request({
|
|
||||||
url: app.globalData.reqUrl + '/wechat/projectuserinfo/queryAllProjectUserByParams',
|
|
||||||
method: "get",
|
|
||||||
data: {
|
|
||||||
projectId: that.data.projectId,
|
|
||||||
loginName: that.data.loginName
|
|
||||||
},
|
|
||||||
header: {
|
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
|
||||||
},
|
|
||||||
success(res) {
|
|
||||||
res = res.data
|
|
||||||
if (res.code == 200) {
|
|
||||||
that.setData({
|
|
||||||
rectifierData: res.data,
|
|
||||||
rectifierData3: res.data,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
wx.request({
|
|
||||||
url: app.globalData.reqUrl + '/wechat/projectuserinfo/queryAllProjectUserByParams',
|
|
||||||
method: "get",
|
|
||||||
data: {
|
|
||||||
projectId: that.data.projectId,
|
|
||||||
loginName: that.data.loginName,
|
|
||||||
selectMy: 'Y'
|
|
||||||
},
|
|
||||||
header: {
|
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
|
||||||
},
|
|
||||||
success(res) {
|
|
||||||
res = res.data;
|
|
||||||
if (res.code == 200) {
|
|
||||||
let findMy = false;
|
|
||||||
res.data.forEach(it => {
|
|
||||||
if (it.userinfoList.length > 0) {
|
|
||||||
it.userinfoList.forEach(u => {
|
|
||||||
if (that.data.loginName == u.phonenumber) {
|
|
||||||
findMy = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if(!findMy){
|
|
||||||
res.data[0].userinfoList.push({state:false,nickName:that.data.userName,jobTypeName:'集团公司',phonenumber:that.data.loginName});
|
|
||||||
}
|
|
||||||
that.setData({
|
|
||||||
rectifierData2: res.data,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"van-steps": "@vant/weapp/steps/index",
|
"van-steps": "@vant/weapp/steps/index",
|
||||||
"van-overlay": "@vant/weapp/overlay/index"
|
"van-overlay": "@vant/weapp/overlay/index"
|
||||||
},
|
},
|
||||||
"navigationStyle":"custom"
|
"navigationStyle":"custom"
|
||||||
}
|
}
|
|
@ -5,7 +5,7 @@
|
||||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="15">
|
<van-col span="15">
|
||||||
<view class="header_name">新增质量隐患</view>
|
<view class="header_name">新增{{typeName}}隐患</view>
|
||||||
</van-col>
|
</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</view>
|
</view>
|
||||||
|
@ -38,14 +38,14 @@
|
||||||
<view class="markers inspect_info_title">隐患描述</view>
|
<view class="markers inspect_info_title">隐患描述</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<textarea class="add_textarea" placeholder="请填写质量隐患描述"
|
<textarea class="add_textarea" placeholder="请填写质量隐患描述"
|
||||||
placeholder-style="color:#6777aa;" bindinput="onInputWorkParts" maxlength="200"/>
|
placeholder-style="color:#6777aa;" bindinput="onInputWorkParts" maxlength="500"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list" >
|
<view class="inspect_info_list" >
|
||||||
<view class="markers inspect_info_title">整改要求</view>
|
<view class="markers inspect_info_title">整改要求</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<textarea class="add_textarea" placeholder="请填写隐患整改要求"
|
<textarea class="add_textarea" placeholder="请填写隐患整改要求"
|
||||||
placeholder-style="color:#6777aa;" bindinput="onInputChangeInfoValue" maxlength="200"/>
|
placeholder-style="color:#6777aa;" bindinput="onInputChangeInfoValue" maxlength="500"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
|
@ -57,21 +57,21 @@
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="markers inspect_info_title">整改人</view>
|
<view class="markers inspect_info_title">整改人</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<select-group-person rectifierData="{{rectifierData}}" multiple="{{fales}}" bindselected="onAddLordSent" index="1" title="请选择整改人" choose="{{lordSent}}">
|
<select-group-person rectifierData="{{lordSentList}}" multiple="{{fales}}" bindselected="onAddLordSent" index="1" title="请选择整改人" choose="{{lordSent}}">
|
||||||
</select-group-person>
|
</select-group-person>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="markers inspect_info_title">复检人</view>
|
<view class="markers inspect_info_title">复检人</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<select-group-person rectifierData="{{rectifierData2}}" multiple="{{fales}}" bindselected="onAddRecheckSend" index="2" title="请选择复检人" choose="{{recheckSend}}">
|
<select-group-person rectifierData="{{checkUserList}}" multiple="{{fales}}" bindselected="onAddRecheckSend" index="2" title="请选择复检人" choose="{{recheckSend}}">
|
||||||
</select-group-person>
|
</select-group-person>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="markers inspect_info_title">抄送人</view>
|
<view class="markers inspect_info_title">抄送人</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<select-group-person rectifierData="{{rectifierData3}}" multiple="{{true}}" bindselected="onAddCopySend" index="3" title="请选择抄送人" choose="{{copySend}}">
|
<select-group-person rectifierData="{{copySendList}}" multiple="{{true}}" bindselected="onAddCopySend" index="3" title="请选择抄送人" choose="{{copySend}}">
|
||||||
</select-group-person>
|
</select-group-person>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
<van-overlay show="{{loadShow}}">
|
<van-overlay show="{{loadShow}}">
|
||||||
<view class="gif">
|
<view class="gif">
|
||||||
<image src="/../images/loding2.gif"></image>
|
<image src="/../images/loding2.gif"></image>
|
||||||
<view>数据加载中!请稍后...</view>
|
<view>数据上传中!请稍后...</view>
|
||||||
</view>
|
</view>
|
||||||
</van-overlay>
|
</van-overlay>
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ import {
|
||||||
*/
|
*/
|
||||||
skipAdd(){
|
skipAdd(){
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: `../add/index?projectId=${this.data.initData.id}&projectName=`+this.data.initData.text,
|
url: `../add/index?type=${this.data.type}`,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ import {
|
||||||
*/
|
*/
|
||||||
skipAddDarft(){
|
skipAddDarft(){
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: `../draft/index`,
|
url: `../draft/index?type=${this.data.type}`,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue