Merge remote-tracking branch 'origin/master'
# Conflicts: # bonus-modules/bonus-project/src/main/java/com/bonus/project/service/impl/SupervisionUnitServiceImpl.java
This commit is contained in:
commit
d18ec8b651
|
|
@ -97,7 +97,7 @@ public class SupervisionUnitController extends BaseController {
|
|||
* @param bean 监理单位实体
|
||||
* @return 结果
|
||||
*/
|
||||
@PutMapping("/updateSupervisionUnitUser")
|
||||
@PostMapping("/updateSupervisionUnitUser")
|
||||
@SysLog(title = "监理单位管理", businessType = OperaType.UPDATE, logType = 0, module = "外来单位管理->监理单位总监")
|
||||
public AjaxResult updateSupervisionUnitUser(@Validated @RequestBody SupervisionUnit bean) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -151,4 +151,9 @@ public class SubPerson extends BaseBean implements Serializable {
|
|||
private String annotation = "0";
|
||||
private String isExistFile;
|
||||
|
||||
private List<String> userList;
|
||||
private String taskType;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -237,10 +237,9 @@ public class ProjectServiceImpl implements ProjectService {
|
|||
result = projectMapper.addSupervisoryUnit(bean);
|
||||
if (result > 0) {
|
||||
// 抛出异常触发事务回滚
|
||||
TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
|
||||
return AjaxResult.success("添加成功");
|
||||
}
|
||||
|
||||
TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
|
||||
// 返回操作结果,可能是插入的记录数或者其他标识
|
||||
} catch (Exception e) {
|
||||
// 手动进行回滚
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.project.service.impl;
|
|||
|
||||
import com.bonus.common.core.domain.MsgBean;
|
||||
import com.bonus.common.core.domain.RequestEntity;
|
||||
import com.bonus.common.core.utils.PageUtils;
|
||||
import com.bonus.common.core.utils.StaticVariableUtils;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
|
|
@ -24,7 +25,9 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
|
@ -154,10 +157,28 @@ public class SubServiceImpl implements SubService {
|
|||
*/
|
||||
@Override
|
||||
public List<SubPerson> enterPersonList(SubPerson bean) {
|
||||
long startTime = System.currentTimeMillis();
|
||||
RequestEntity entity = new RequestEntity();
|
||||
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
AjaxResult ajaxResult = flowTaskService.getStayFlow(entity);
|
||||
List<String> stringList = new ArrayList<>();
|
||||
if (ajaxResult.isSuccess() ) {
|
||||
List<Map<String, Object>> data = (List<Map<String, Object>>) ajaxResult.get("data");
|
||||
if (data != null && !data.isEmpty()) {
|
||||
if (data != null && !data.isEmpty()) {
|
||||
stringList = data.stream()
|
||||
.map(map -> (String) map.get("proInsId"))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
bean.setUserList(stringList);
|
||||
PageUtils.startPage();
|
||||
List<SubPerson> list = mapper.enterPersonList(bean);
|
||||
|
||||
RequestEntity entity = new RequestEntity();
|
||||
System.err.println("stringList="+stringList);
|
||||
// RequestEntity entity = new RequestEntity();
|
||||
entity.setUserId(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
// 创建一个 GenericProcessor 实例 对审批流程数据进行处理
|
||||
GenericProcessor processor = new GenericProcessor();
|
||||
|
|
@ -167,6 +188,8 @@ public class SubServiceImpl implements SubService {
|
|||
.filter(subPerson -> bean.getStatus().equals(subPerson.getIntoStatus()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
long endTime = System.currentTimeMillis();
|
||||
System.err.println("耗时:"+(endTime-startTime));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -140,6 +140,12 @@
|
|||
and lcp.out_status = #{status}
|
||||
</if>
|
||||
</if>
|
||||
<if test="userList != null and userList !='' ">
|
||||
and lcp.proc_inst_id in
|
||||
<foreach collection="userList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<select id="checkIsExistPersonName" resultType="com.bonus.system.api.domain.SysUser">
|
||||
SELECT user_id as userId,
|
||||
|
|
|
|||
|
|
@ -123,12 +123,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join (
|
||||
select count(1) num , sup_unit_id
|
||||
from pt_project_info
|
||||
where sup_unit_id is not null and sup_unit_id!=''
|
||||
where sup_unit_id is not null and sup_unit_id!='' and is_active=1
|
||||
GROUP BY sup_unit_id
|
||||
)pro on pro.sup_unit_id=psi.id
|
||||
left join(
|
||||
select count(1) num ,unit_id
|
||||
FROM pt_sup_info
|
||||
where is_active=1
|
||||
GROUP BY unit_id
|
||||
)us on us.unit_id=psi.id
|
||||
where psi.is_active = 1
|
||||
|
|
@ -138,16 +139,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
<select id="listSupervisionUnitUser" resultType="com.bonus.project.domain.SupervisionUnit">
|
||||
select (@rowNum := @rowNum + 1) as exportId,
|
||||
sup_id supId,
|
||||
comm_user_id commUserId,
|
||||
comm_user_name directorsName,
|
||||
comm_user_phone directorsPhone,
|
||||
comm_user_code commUserCode
|
||||
sup_id supId,
|
||||
comm_user_id commUserId,
|
||||
comm_user_name directorsName,
|
||||
comm_user_phone directorsPhone,
|
||||
comm_user_code commUserCode,
|
||||
IFNULL(pro.num,0) status
|
||||
from (select @rowNum := 0) r,
|
||||
pt_sup_info
|
||||
pt_sup_info psi
|
||||
left join (
|
||||
select count(1) num , sup_user_id
|
||||
from pt_project_info
|
||||
where sup_user_id is not null and sup_user_id!='' and is_active=1
|
||||
GROUP BY sup_user_id
|
||||
)pro on pro.sup_user_id=psi.sup_id
|
||||
where is_active=1 and unit_id=#{unitId}
|
||||
<if test="directorsName != null and directorsName != ''">
|
||||
and comm_user_phone like concat('%',#{directorsName},'%')
|
||||
and comm_user_name like concat('%',#{directorsName},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="listSupEntry" resultType="com.bonus.project.domain.SupervisionOfAdmission">
|
||||
|
|
|
|||
Loading…
Reference in New Issue