Commit db493ea7 authored by hezhuozhi's avatar hezhuozhi

工作台

parent a91b0e3e
......@@ -16,19 +16,20 @@ public enum HygfRouthTypeEnum {
HYGF_REPAY("hygf_repayment", "还款",10000L),
HYGF_DZKC("hygf_dzkc", "电站勘察",10001L),
HYGF_DSG("hygf_dsg", "待施工",10002L),
HYGF_HTCXFQ("hygf_htcxfq", "合同重新发起",10015L),
HYGF_HTFQ("hygf_htfq", "合同发起",10003L),
HYGF_HTQS("hygf_htqs", "合同签署",10004L),
HYGF_HTGZ("hygf_htgz", "合同盖章",10005L),
HYGF_XZFHD("fh_xzfhd", "新增发货单",10006L),
HYGF_XZPGD("hygf_xzfgd", "新增派工单",10007L),
HYGF_XZBWDJ("bw_xzbwdj", "新增并网登记",10008L),
HYGF_XZYSTJ("ys_xzystj", "新增验收提交",10009L),
HYGF_XZTSRZ("hygf_xztsrz", "新增推送融资",10010L),
HYGF_BWSJSH("bw_bwsjsh", "并网设计审核",10011L),
HYGF_BWGCSH("bw_bwgcsh", "并网工程审核",10012L),
HYGF_XZYSTJ("ys_xzystj", "新增验收提交",10009L),
HYGF_YSTRSH("bw_ystrsh", "验收投融审核",10013L),
HYGF_YSFWSH("bw_ysfwsh", "验收法务审核",10014L),
HYGF_XZTSRZ("hygf_xztsrz", "新增推送融资",10010L),
HYGF_HTCXFQ("hygf_htcxfq", "合同重新发起",10015L),
HYGF_DFK("hygf_dfk", "待放款",10016L),
;
private final String code;
......
......@@ -19,7 +19,7 @@ public enum PowerStationNodeEnum {
法务审核("法务审核", "hygf_07"),
设计上传图纸("设计上传图纸", "hygf_09"),
经销商上传图纸("经销商上传图纸", "hygf_10"),
文件审核("文件审核", "hygf_11");
文件审核("图纸审核", "hygf_11");
/**
......
......@@ -44,7 +44,7 @@
LEFT JOIN hygf_personnel_business hpb ON hpb.foundation_id=sub.sequence_nbr
<where>
sub.role like #{roleId}
and sub.amos_org_code = #{amosOrgCode}
and sub.amos_org_code like #{amosOrgCode}
<if test="companyOrgCode != null and companyOrgCode != ''">
and hpb.regional_companies_code like #{companyOrgCode}
</if>
......@@ -66,8 +66,8 @@
<select id="filterUsersByAmosDealer" resultType="java.lang.String">
SELECT amos_user_id FROM std_user_biz sub
LEFT JOIN hygf_personnel_business hpb ON hpb.foundation_id=sub.sequence_nbr
where sub.amos_org_code = #{amosDealerCode}
and hpb.regional_companies_code like #{companyOrgCode}
where sub.amos_org_code like CONCAT(#{amosDealerCode},'%')
and hpb.regional_companies_code like CONCAT('%',#{companyOrgCode},'%')
and amos_user_id in
<foreach item="item" collection="list" separator="," open="(" close=")" index="">
#{item}
......
......@@ -193,14 +193,19 @@ public class QiyuesuoController extends BaseController {
wrapper4.eq(HouseholdContract::getContractLockId, CallbackDto.getContractId());
HouseholdContract householdContrac = householdContractMapper.selectOne(wrapper4);
// 生成填报任务
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(householdContrac.getSequenceNbr()));
String routhPath = toDoTasksServiceImpl.getRouthPath(TaskTypeStationEnum.合同.getCode(), HygfRouthTypeEnum.HYGF_HTGZ.getCode(), routhPathVO);
String wxRouthPath = toDoTasksServiceImpl.getWxRouthPath(TaskTypeStationEnum.合同.getCode(), HygfRouthTypeEnum.HYGF_HTGZ.getCode(), routhPathVO);
ToDoTasks toDoTasks = new ToDoTasks(TaskTypeStationEnum.合同.getCode(), householdContrac.getSequenceNbr(), householdContrac.getPartyA() + "待合同盖章", householdContrac.getRegionalCompaniesCode(),routhPath,wxRouthPath);
List<String> todoUserIds = toDoTasksServiceImpl.getTodoUserIds(householdContrac.getRegionalCompaniesCode(), engineering);
toDoTasksServiceImpl.completeAndAddToDoTask(todoUserIds, toDoTasks,"");
//完成签字待办
ToDoTasks toDoTasks = new ToDoTasks(TaskTypeStationEnum.合同.getCode(), householdContrac.getSequenceNbr());
toDoTasksServiceImpl.completeToDoTasks(toDoTasks,"");
if(HouseholdContractEnum.勘察状态_已勘察.getCode().equals(householdContrac.getSurveyStatus())){
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(householdContrac.getSequenceNbr()));
String routhPath = toDoTasksServiceImpl.getRouthPath(TaskTypeStationEnum.合同.getCode(), HygfRouthTypeEnum.HYGF_HTGZ.getCode(), routhPathVO);
String wxRouthPath = toDoTasksServiceImpl.getWxRouthPath(TaskTypeStationEnum.合同.getCode(), HygfRouthTypeEnum.HYGF_HTGZ.getCode(), routhPathVO);
ToDoTasks toDoTasks1 = new ToDoTasks(TaskTypeStationEnum.合同.getCode(), householdContrac.getSequenceNbr(), householdContrac.getPartyA() + "待合同盖章", householdContrac.getRegionalCompaniesCode(),routhPath,wxRouthPath);
String roleId = toDoTasksServiceImpl.getRoleIdByName("户用光伏-工程");
List<String> todoUserIds = toDoTasksServiceImpl.getTodoUserIds(householdContrac.getRegionalCompaniesCode(), roleId);
toDoTasksServiceImpl.addToDoTasksByUserIds(todoUserIds, toDoTasks);
}
} else if ("SEAL".equals(CallbackDto.getCallbackType())) {
LambdaUpdateWrapper<HouseholdContract> wrapper = new LambdaUpdateWrapper<>();
......
......@@ -399,7 +399,14 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
}else if("FinancingAudit".equals(workflowResultDto.getNextNodeKey())){
String roleId = toDoTasksService.getRoleIdByName("户用光伏-融资");
List<String> userIds = toDoTasksService.getTodoUserIdsByRzjg(financingInfo.getFinancingCompaniesCode(),roleId);
toDoTasksService.addToDoTasksByUserIds(userIds,toDoTasks);
toDoTasksService.completeAndAddToDoTask(userIds,toDoTasks,"");
} else if ("AuditPass".equals(workflowResultDto.getNextNodeKey())){
String routhPath1 = toDoTasksService.getRouthPath(TaskTypeStationEnum.投融资.getCode(), HygfRouthTypeEnum.HYGF_DFK.getCode(), routhPathVO);
String wxRouthPath1 = toDoTasksService.getWxRouthPath(TaskTypeStationEnum.投融资.getCode(), HygfRouthTypeEnum.HYGF_DFK.getCode(), routhPathVO);
ToDoTasks toDoTasks1= new ToDoTasks (TaskTypeStationEnum.投融资.getCode(), peasantHousehold.getSequenceNbr(), peasantHousehold.getOwnersName()+"待放款",peasantHousehold.getRegionalCompaniesCode(),routhPath1,wxRouthPath1);
String roleId = toDoTasksService.getRoleIdByName("户用光伏-融资");
List<String> userIds = toDoTasksService.getTodoUserIdsByRzjg(financingInfo.getFinancingCompaniesCode(),roleId);
toDoTasksService.completeAndAddToDoTask(userIds,toDoTasks1,"");
} else {
List<String> userIds = Arrays.asList(Optional.ofNullable(workflowResultDto.getNextExecuteUserIds()).orElse("").split(","));
List<String> filterUsers = toDoTasksService.filterUsers(TaskTypeStationEnum.投融资.getCode(), workflowResultDto.getNextNodeKey(),userIds, orgCode, peasantHousehold.getDeveloperCode());
......@@ -485,6 +492,25 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
up.set(FinancingInfo::getStatus,"已放款");
this.getBaseMapper().update(null,up);
//完成待放款待办
if(CollectionUtil.isNotEmpty(ids)){
for (Long id : ids) {
ToDoTasks toDoTasks=new ToDoTasks(TaskTypeStationEnum.投融资.getCode(), id);
toDoTasksService.completeToDoTasks(toDoTasks,"");
//产生新的放款确认待办
PeasantHouseholdDto peasantHouseholdDto = peasantHouseholdService.queryBySeq(id);
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(id));
String routhPath = toDoTasksService.getRouthPath(TaskTypeStationEnum.投融资.getCode(), "AuditPass", routhPathVO);
String wxRouthPath = toDoTasksService.getWxRouthPath(TaskTypeStationEnum.投融资.getCode(), "AuditPass", routhPathVO);
ToDoTasks toDoTasks1= new ToDoTasks (TaskTypeStationEnum.投融资.getCode(), id ,peasantHouseholdDto.getOwnersName()+"待放款确认", peasantHouseholdDto.getRegionalCompaniesCode(),routhPath,wxRouthPath);
String roleId = toDoTasksService.getRoleIdByName("户用光伏-投融");
List<String> todoUserIds = toDoTasksService.getTodoUserIds(peasantHouseholdDto.getRegionalCompaniesCode(), roleId);
toDoTasksService.addToDoTasksByUserIds(todoUserIds,toDoTasks1);
}
}
}
public void upDateMoney(FinancingInfoDto financingInfoDto) {
......
......@@ -26,6 +26,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.BooleanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.component.emq.EmqKeeper;
......@@ -88,7 +89,6 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
// WorkflowImpl workflow;
@Autowired
WorkFlowService workFlowService;
@Autowired
HouseholdContractMapper householdContractMapper;
@Resource (type = RedisLockUtil.class)
......@@ -233,6 +233,9 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
userIds.add(peasantHousehold.getDeveloperUserId());
toDoTasksServiceImpl.addToDoTasksByUserIds(userIds, toDoTasks);
}else {
if("hygf_10".equals(powerStation.getNextProcessNode()) && "不通过".equals(powerStation.getProcessStatus())){
routhPath="/mixuap?appId=1678340647909617665&id=1678363821896396801";
}
ToDoTasks toDoTasks= new ToDoTasks(TaskTypeStationEnum.勘察.getCode(), powerStation.getSequenceNbr(), name + "待" + powerStationNodeEnum.getName(), peasantHousehold.getRegionalCompaniesCode(),routhPath,wxRouthPath);
List<String> todoUserIds = Arrays.asList(Optional.ofNullable(powerStation.getNextExecuteUserIds()).orElse("").split(","));
List<String> filterUsers = toDoTasksServiceImpl.filterUsers(TaskTypeStationEnum.勘察.getCode(),powerStation.getNextProcessNode(),todoUserIds, peasantHousehold.getRegionalCompaniesCode(), peasantHousehold.getDeveloperCode());
......@@ -306,6 +309,24 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
lambdaUw.set(HouseholdContract::getSurveyStatus, HouseholdContractEnum.勘察状态_已勘察.getCode());
householdContractServiceImpl.update(lambdaUw);
powerStation.setKcEndTime(new Date());
LambdaQueryWrapper<HouseholdContract> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(HouseholdContract::getPeasantHouseholdId, powerStation.getPeasantHouseholdId());
wrapper.ne(HouseholdContract::getStatus,"已作废");
wrapper.eq(HouseholdContract::getIsDelete,false);
List<HouseholdContract> householdContractList = householdContractServiceImpl.list(wrapper);
if (CollectionUtil.isNotEmpty(householdContractList)){
HouseholdContract householdContract = householdContractList.get(0);
if(HouseholdContractEnum.签字状态_已签字.getCode().equals(householdContract.getSignStatus())){
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(householdContract.getSequenceNbr()));
String routhPath = toDoTasksServiceImpl.getRouthPath(TaskTypeStationEnum.合同.getCode(), HygfRouthTypeEnum.HYGF_HTGZ.getCode(), routhPathVO);
String wxRouthPath = toDoTasksServiceImpl.getWxRouthPath(TaskTypeStationEnum.合同.getCode(), HygfRouthTypeEnum.HYGF_HTGZ.getCode(), routhPathVO);
ToDoTasks toDoTasks = new ToDoTasks(TaskTypeStationEnum.合同.getCode(), householdContract.getSequenceNbr(), householdContract.getPartyA() + "待合同盖章", householdContract.getRegionalCompaniesCode(),routhPath,wxRouthPath);
String roleId = toDoTasksServiceImpl.getRoleIdByName("户用光伏-工程");
List<String> todoUserIds = toDoTasksServiceImpl.getTodoUserIds(householdContract.getRegionalCompaniesCode(), roleId);
toDoTasksServiceImpl.addToDoTasksByUserIds(todoUserIds, toDoTasks);
}
}
}
break;
......
......@@ -1080,7 +1080,7 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
if( model instanceof PreparationMoney){
PreparationMoney preparationMoney = (PreparationMoney) model;
//更新待办
String taskName="[";
String taskName="";
LambdaQueryWrapper<DocumentStation> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(DocumentStation::getPreparationMoneyId,preparationMoney.getSequenceNbr());
List<DocumentStation> documentStations = documentStationMapper.selectList(wrapper);
......@@ -1091,11 +1091,16 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
}
taskName= taskName.substring(0,taskName.length()-1)+"]";
}
if("fh_sqbh".equals(workflowResultDto.getNextNodeKey())){
taskName= taskName + "待申请补货确认";
}else {
taskName= taskName + preparationMoney.getOrderStatus()+"收货单";
}
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(preparationMoney.getSequenceNbr()));
String routhPath = toDoTasksServiceImpl.getRouthPath(TaskTypeStationEnum.发货.getCode(),workflowResultDto.getNextNodeKey(), routhPathVO);
String wxRouthPath = toDoTasksServiceImpl.getWxRouthPath(TaskTypeStationEnum.发货.getCode(),workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.发货.getCode(), preparationMoney.getSequenceNbr(), taskName + preparationMoney.getOrderStatus()+"收货单",preparationMoney.getRegionalCompaniesCode(),routhPath,wxRouthPath);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.发货.getCode(), preparationMoney.getSequenceNbr(), taskName,preparationMoney.getRegionalCompaniesCode(),routhPath,wxRouthPath);
List<String> userIds = Arrays.asList(Optional.ofNullable(workflowResultDto.getNextExecuteUserIds()).orElse("").split(","));
List<String> filterUsers = toDoTasksServiceImpl.filterUsers(TaskTypeStationEnum.发货.getCode(), workflowResultDto.getNextNodeKey(),userIds, preparationMoney.getRegionalCompaniesCode(), preparationMoney.getAmosUnitOrgCode());
toDoTasksServiceImpl.completeAndAddToDoTask(filterUsers,toDoTasks,"");
......
......@@ -327,6 +327,9 @@ public class ToDoTasksServiceImpl extends BaseService<ToDoTasksDto, ToDoTasks, T
if (StringUtils.isNotEmpty(roleId)) {
roleId = "%" + roleId + "%";
}
if (StringUtils.isNotEmpty(amosOrgCode)) {
amosOrgCode = amosOrgCode + "%";
}
return toDoTasksMapper.getTodoUserIdsByAmosDealer(companyOrgCode, roleId, amosOrgCode);
}
......
......@@ -99,7 +99,7 @@
"key": "fh_xzfhd",
"taskType": "发货",
"name": "新增发货单",
"url": "/mixuap?appId=1678340647909617665&id=1802911589028859905",
"url": "/mixuap?appId=1678340647909617665&id=1784391442173530113",
"isNeedSpecialDeal": "0",
"isAdminRole": "1"
},
......@@ -107,7 +107,7 @@
"key": "fh_dtj",
"taskType": "发货",
"name": "待发货",
"url": "/mixuap?appId=1678340647909617665&id=1802911589028859905",
"url": "/mixuap?appId=1678340647909617665&id=1784391442173530113",
"isNeedSpecialDeal": "0",
"isAdminRole": "1"
},
......@@ -131,7 +131,7 @@
"key": "fh_sqbh",
"taskType": "发货",
"name": "申请补货",
"url": "/mixuap?appId=1677158789557547009&id=1808437079118450689",
"url": "/mixuap?appId=1678340647909617665&id=1784391442173530113",
"isNeedSpecialDeal": "0",
"isAdminRole": "1"
},
......@@ -316,7 +316,15 @@
"taskType": "投融资",
"name": "融资审核",
"url": "/mixuap?appId=1678340647909617665&id=1774974009419501569",
"isNeedSpecialDeal": "0",
"isNeedSpecialDeal": "1",
"isAdminRole": "1"
},
{
"key": "hygf_dfk",
"taskType": "投融资",
"name": "待放款",
"url": "/mixuap?appId=1678340647909617665&id=1831228592361574401",
"isNeedSpecialDeal": "1",
"isAdminRole": "1"
},
{
......
......@@ -316,7 +316,15 @@
"taskType": "投融资",
"name": "融资审核",
"url": "/view/mine/subPackageA/InvestmentAndFinancing/financing/index",
"isNeedSpecialDeal": "0",
"isNeedSpecialDeal": "1",
"isAdminRole": "1"
},
{
"key": "hygf_dfk",
"taskType": "投融资",
"name": "待放款",
"url": "/view/mine/subPackageA/InvestmentAndFinancing/financing/index",
"isNeedSpecialDeal": "1",
"isAdminRole": "1"
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment