Merge remote-tracking branch 'origin/pet' into pet
commit
fce988e59e
|
@ -13,6 +13,9 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* created by liu jun 相关方人员同步接口
|
||||||
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/openApi/xfgUser")
|
@RequestMapping("/openApi/xfgUser")
|
||||||
public class ApiXgfUserController extends BaseController {
|
public class ApiXgfUserController extends BaseController {
|
||||||
|
@ -35,6 +38,27 @@ public class ApiXgfUserController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/syncPhoto")
|
||||||
|
@ResponseBody
|
||||||
|
public Object syncPhoto() throws Exception {
|
||||||
|
Map<String, Object> response = new HashMap<String, Object>();
|
||||||
|
try {
|
||||||
|
PageData request = this.getPageData();
|
||||||
|
xgfUserService.syncPhoto(request);
|
||||||
|
|
||||||
|
response.put("code","0");
|
||||||
|
response.put("result", "success");
|
||||||
|
return response;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
response.put("code","9999");
|
||||||
|
response.put("result", "success");
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "/approvalApplication")
|
@RequestMapping(value = "/approvalApplication")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object approvalApplication() throws Exception {
|
public Object approvalApplication() throws Exception {
|
||||||
|
|
|
@ -106,8 +106,7 @@ public class TextLibraryController extends BaseController {
|
||||||
} else {
|
} else {
|
||||||
pd.put("CATEGORY_ID", corp_info.getString("CORP_TYPE4"));
|
pd.put("CATEGORY_ID", corp_info.getString("CORP_TYPE4"));
|
||||||
}
|
}
|
||||||
if (StringUtils.isEmpty(pd.getString("CORPINFO_ID")))
|
if (StringUtils.isEmpty(pd.getString("CORPINFO_ID")))pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID());
|
||||||
pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID());
|
|
||||||
|
|
||||||
if ("3".equals(pd.getString("ASSOCIATION"))) {
|
if ("3".equals(pd.getString("ASSOCIATION"))) {
|
||||||
pd.put("TYPE_ONE", "43ed4012090d4614bb35da60d06c8264");
|
pd.put("TYPE_ONE", "43ed4012090d4614bb35da60d06c8264");
|
||||||
|
|
|
@ -903,7 +903,7 @@ public class MapController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 一公司获取人员轨迹
|
||||||
@RequestMapping(value = "/getPersonTrace")
|
@RequestMapping(value = "/getPersonTrace")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object getPersonTrace() throws Exception {
|
public Object getPersonTrace() throws Exception {
|
||||||
|
|
|
@ -3,9 +3,12 @@ package com.zcloud.service.highriskwork.impl;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.zcloud.entity.system.Dictionaries;
|
||||||
import com.zcloud.service.highriskwork.HotWorkApplicationDelayedService;
|
import com.zcloud.service.highriskwork.HotWorkApplicationDelayedService;
|
||||||
import com.zcloud.service.highriskwork.HotWorkApplicationUserService;
|
import com.zcloud.service.highriskwork.HotWorkApplicationUserService;
|
||||||
|
import com.zcloud.service.system.DictionariesService;
|
||||||
import com.zcloud.util.DateUtil;
|
import com.zcloud.util.DateUtil;
|
||||||
|
import com.zcloud.util.Tools;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
@ -30,6 +33,8 @@ public class HotWorkApplicationServiceImpl implements HotWorkApplicationService{
|
||||||
private HotWorkApplicationUserService hotWorkApplicationUserService;
|
private HotWorkApplicationUserService hotWorkApplicationUserService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private HotWorkApplicationDelayedService hotWorkApplicationDelayedService;
|
private HotWorkApplicationDelayedService hotWorkApplicationDelayedService;
|
||||||
|
@Autowired
|
||||||
|
private DictionariesService dictionariesService;
|
||||||
|
|
||||||
/**新增
|
/**新增
|
||||||
* @param pd
|
* @param pd
|
||||||
|
@ -87,7 +92,21 @@ public class HotWorkApplicationServiceImpl implements HotWorkApplicationService{
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public PageData findById(PageData pd)throws Exception{
|
public PageData findById(PageData pd)throws Exception{
|
||||||
return hotworkapplicationMapper.findById(pd);
|
PageData data = hotworkapplicationMapper.findById(pd);
|
||||||
|
String workMethodId = data.getString("HOT_WORK_METHOD_ID");
|
||||||
|
//动火方法
|
||||||
|
if (Tools.notEmpty(workMethodId)) {
|
||||||
|
String[] split = workMethodId.split(",");
|
||||||
|
List<Dictionaries> dictionaries = dictionariesService.listSubDictByIds(split);
|
||||||
|
StringBuilder methodName = new StringBuilder();
|
||||||
|
for (Dictionaries dictionary : dictionaries) {
|
||||||
|
methodName.append(dictionary.getNAME()).append(",");
|
||||||
|
}
|
||||||
|
methodName.deleteCharAt(methodName.length() - 1);
|
||||||
|
data.put("HOT_WORK_METHOD_NAME", methodName);
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**批量删除
|
/**批量删除
|
||||||
|
|
|
@ -44,4 +44,6 @@ public interface XgfUserService {
|
||||||
void approveMax(PageData request, MultipartFile[] chengNuoShu) throws Exception;
|
void approveMax(PageData request, MultipartFile[] chengNuoShu) throws Exception;
|
||||||
|
|
||||||
List<PageData> getWorkTask(PageData condition) throws Exception;
|
List<PageData> getWorkTask(PageData condition) throws Exception;
|
||||||
|
|
||||||
|
void syncPhoto(PageData request) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ import com.zcloud.flow.xgf.util.XgfFlowDto;
|
||||||
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
|
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
|
||||||
import com.zcloud.mapper.datasource.xgf.*;
|
import com.zcloud.mapper.datasource.xgf.*;
|
||||||
import com.zcloud.service.system.DepartmentService;
|
import com.zcloud.service.system.DepartmentService;
|
||||||
|
import com.zcloud.service.system.UsersService;
|
||||||
import com.zcloud.service.xgf.XgfUserService;
|
import com.zcloud.service.xgf.XgfUserService;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
@ -55,6 +56,9 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
@Resource
|
@Resource
|
||||||
private FlowExecutor flowExecutor;
|
private FlowExecutor flowExecutor;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private UsersService usersService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void save(PageData pd) throws Exception {
|
public void save(PageData pd) throws Exception {
|
||||||
xgfUserMapper.save(pd);
|
xgfUserMapper.save(pd);
|
||||||
|
@ -1018,10 +1022,19 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
if (_list == null || _list.size() == 0) {
|
if (_list == null || _list.size() == 0) {
|
||||||
throw new RuntimeException("请求数据异常");
|
throw new RuntimeException("请求数据异常");
|
||||||
}
|
}
|
||||||
|
PageData condition = new PageData();
|
||||||
|
condition.put("USER_ID",request.getString("APPOINT_USER_ID"));
|
||||||
|
PageData userInfo = usersService.findById(condition);
|
||||||
|
if (userInfo != null && userInfo.size() > 0 && userInfo.get("ISMAIN") != null){
|
||||||
|
if ("1".equals(userInfo.getString("ISMAIN"))){
|
||||||
|
throw new RuntimeException("审批人不能指定主账号");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
List<String> list = _list.stream().map(x -> x.getString("XGF_USER_ID")).collect(Collectors.toList());
|
List<String> list = _list.stream().map(x -> x.getString("XGF_USER_ID")).collect(Collectors.toList());
|
||||||
PageData condition = new PageData();
|
|
||||||
for (String x : list) {
|
for (String x : list) {
|
||||||
|
condition.clear();
|
||||||
condition.put("FLOWS_ID", x);
|
condition.put("FLOWS_ID", x);
|
||||||
PageData flows = xgfFlowsMapper.findById(condition);
|
PageData flows = xgfFlowsMapper.findById(condition);
|
||||||
if (flows == null || flows.size() == 0) {
|
if (flows == null || flows.size() == 0) {
|
||||||
|
@ -1064,6 +1077,18 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
return xgfUserMapper.getWorkTask(condition);
|
return xgfUserMapper.getWorkTask(condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void syncPhoto(PageData request) throws Exception {
|
||||||
|
PageData condition = new PageData();
|
||||||
|
condition.put("XGF_USER_DETAILS_ID",request.get("USER_ID"));
|
||||||
|
PageData detailEntity = xgfUserDetailsMapper.findById(condition);
|
||||||
|
if (detailEntity == null || detailEntity.size() == 0){
|
||||||
|
throw new RuntimeException("未找到该用户详细信息");
|
||||||
|
}
|
||||||
|
detailEntity.put("PHOTO",request.get("PHOTO"));
|
||||||
|
xgfUserDetailsMapper.edit(detailEntity);
|
||||||
|
}
|
||||||
|
|
||||||
private String getType(String corpInfoId) {
|
private String getType(String corpInfoId) {
|
||||||
// created bu liu jun - 港务局要求,可以直接指定集团单位
|
// created bu liu jun - 港务局要求,可以直接指定集团单位
|
||||||
if ("1".equals(corpInfoId)) {
|
if ("1".equals(corpInfoId)) {
|
||||||
|
|
|
@ -178,6 +178,12 @@
|
||||||
<if test="pd.ENTERPRISE_SIDE != null and pd.ENTERPRISE_SIDE != ''">
|
<if test="pd.ENTERPRISE_SIDE != null and pd.ENTERPRISE_SIDE != ''">
|
||||||
and f.CORPINFO_ID != #{pd.ENTERPRISE_SIDE}
|
and f.CORPINFO_ID != #{pd.ENTERPRISE_SIDE}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="pd.MIGRATION_FLAG != null and pd.MIGRATION_FLAG != ''">
|
||||||
|
and f.MIGRATION_FLAG = #{pd.MIGRATION_FLAG}
|
||||||
|
</if>
|
||||||
|
<if test="pd.LIBRARY_FLAG != null and pd.LIBRARY_FLAG != ''">
|
||||||
|
and (f.MIGRATION_FLAG = '0' or f.MIGRATION_FLAG is null)
|
||||||
|
</if>
|
||||||
order by f.ISTOPTIME desc,f.CREATED_TIME desc
|
order by f.ISTOPTIME desc,f.CREATED_TIME desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -155,13 +155,13 @@
|
||||||
select
|
select
|
||||||
<include refid="Field"></include>,
|
<include refid="Field"></include>,
|
||||||
u.NAME CREATORNAME,
|
u.NAME CREATORNAME,
|
||||||
d.NAME DEPARTMENTNAME,
|
d.NAME DEPARTMENTNAME
|
||||||
p.name as HOT_WORK_METHOD_NAME
|
<!--p.name as HOT_WORK_METHOD_NAME-->
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
left join sys_user u on f.CREATOR = u.USER_ID
|
left join sys_user u on f.CREATOR = u.USER_ID
|
||||||
left join oa_department d on d.DEPARTMENT_ID = u.DEPARTMENT_ID
|
left join oa_department d on d.DEPARTMENT_ID = u.DEPARTMENT_ID
|
||||||
left join sys_dictionaries p on f.HOT_WORK_METHOD_ID = p.DICTIONARIES_ID
|
<!--left join sys_dictionaries p on f.HOT_WORK_METHOD_ID = p.DICTIONARIES_ID-->
|
||||||
where
|
where
|
||||||
f.HOTWORKAPPLICATION_ID = #{HOTWORKAPPLICATION_ID}
|
f.HOTWORKAPPLICATION_ID = #{HOTWORKAPPLICATION_ID}
|
||||||
</select>
|
</select>
|
||||||
|
|
Loading…
Reference in New Issue