Commit 22b50b90 authored by hezhuozhi's avatar hezhuozhi

工作台

parent 8b41f5fc
......@@ -12,6 +12,7 @@ public enum HygfRouthTypeEnum {
*/
HYGF_REPAY("hygf_repayment", "还款"),
HYGF_DZKC("hygf_dzkc", "电站勘察"),
HYGF_DSG("hygf_dsg", "待施工"),
;
private final String code;
......
......@@ -11,6 +11,7 @@ public enum TaskTypeStationEnum {
重置密码("重置密码", "重置密码"),
设置管理员("设置管理员", "设置管理员"),
发货管理("发货管理", "发货管理"),
派工发料("派工发料", "派工发料"),
施工完工("施工完工", "施工完工"),
并网管理("并网管理", "并网管理"),
验收管理("验收管理", "验收管理"),
......
package com.yeejoin.amos.boot.module.hygf.api.entity;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.Date;
......@@ -26,43 +34,43 @@ public class ToDoTasks extends BaseEntity {
/**
* 任务类型
*/
@TableField("type")
@TableField("type")
private String type;
/**
* 业务id
*/
@TableField("business_id")
@TableField("business_id")
private Long businessId;
/**
* 任务状态
*/
@TableField("state")
@TableField("state")
private String state;
/**
* 用户id
*/
@TableField("amos_user_id")
@TableField("amos_user_id")
private String amosUserId;
/**
* 任务创建时间
*/
@TableField("creation_time")
@TableField("creation_time")
private Date creationTime;
/**
* 完成时间
*/
@TableField("complete_time")
@TableField("complete_time")
private Date completeTime;
/**
* 任务名称
*/
@TableField("task_name")
@TableField("task_name")
private String taskName;
/**
......@@ -77,9 +85,15 @@ public class ToDoTasks extends BaseEntity {
@TableField("route_path")
private String routePath;
/**
*路由地址
*/
@TableField("wx_route_path")
private String wxRoutePath;
public ToDoTasks(String type, Long businessId, String taskName,String orgCode) {
public ToDoTasks(String type, Long businessId, String taskName, String orgCode) {
addOperator();
this.type = type;
this.businessId = businessId;
this.state = "待办";
......@@ -88,7 +102,8 @@ public class ToDoTasks extends BaseEntity {
this.taskName = taskName;
}
public ToDoTasks(String type, Long businessId, String taskName,String orgCode,String routePath) {
public ToDoTasks(String type, Long businessId, String taskName, String orgCode, String routePath,String wxRoutePath) {
addOperator();
this.type = type;
this.businessId = businessId;
this.state = "待办";
......@@ -96,9 +111,11 @@ public class ToDoTasks extends BaseEntity {
this.creationTime = new Date();
this.taskName = taskName;
this.routePath = routePath;
this.wxRoutePath= wxRoutePath;
}
public ToDoTasks(String type, Long businessId) {
addOperator();
this.type = type;
this.businessId = businessId;
this.state = "待办";
......@@ -107,4 +124,15 @@ public class ToDoTasks extends BaseEntity {
public ToDoTasks() {
}
private void addOperator() {
try {
this.recDate = new Date();
this.recUserId = RequestContext.getExeUserId();
this.recUserName = RequestContext.getLoginId();
} catch (Exception e) {
e.printStackTrace();
}
}
}
......@@ -28,4 +28,12 @@ public interface ToDoTasksMapper extends BaseMapper<ToDoTasks> {
*/
List<String> getTodoUserIds(@Param("companyOrgCode") String companyOrgCode, @Param("roleId") String roleId);
/**
* 根据区域公司、角色、经销商获取待办的人员
* @param companyOrgCode
* @param roleId
* @param amosDealerId
* @return
*/
List<String> getTodoUserIdsByAmosDealer(@Param("companyOrgCode") String companyOrgCode, @Param("roleId") String roleId, @Param("amosDealerId") String amosDealerId);
}
......@@ -29,8 +29,8 @@
left join hygf_financing_info hfi on hfi.peasant_household_id = hph.sequence_nbr
<where>
hph.construction_state = '验收完成'
<if test="map.routhPathId != null and map.routhPathId != ''">
and hph.sequence_nbr = #{map.routhPathId}
<if test="params.routhPathId != null and params.routhPathId != ''">
and hph.sequence_nbr = #{params.routhPathId}
</if>
<if test="params.ownersName != null and params.ownersName !=''">
and hph.owners_name like concat('%',#{params.ownersName},'%')
......
......@@ -36,6 +36,20 @@
</if>
</where>
GROUP BY USER_ID;
GROUP BY USER_ID
</select>
<select id="getTodoUserIdsByAmosDealer" 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.role like #{roleId}
and sub.amos_id = #{amosDealerId}
<if test="companyOrgCode != null and companyOrgCode != ''">
and hpb.regional_companies_code like #{companyOrgCode}
</if>
</where>
GROUP BY amos_user_id
</select>
</mapper>
......@@ -14,6 +14,7 @@ import com.yeejoin.amos.boot.module.hygf.api.dto.UserUnitInformationDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.*;
import com.yeejoin.amos.boot.module.hygf.api.mapper.*;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.*;
import com.yeejoin.amos.boot.module.hygf.biz.vo.RouthPathVO;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
......@@ -35,9 +36,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
/**
......
......@@ -171,8 +171,6 @@ public class AcceptanceCheckServiceImpl extends BaseService<AcceptanceCheckDto,A
basicGridAuditingDto.setPeasantHouseholdId(basicGridRecord.getPeasantHouseholdId());
basicGridAuditingDto.setPromoter(RequestContext.getExeUserId());
Sequence sequence = new Sequence();
long auditingSequenceNbr = sequence.nextId();
basicGridAuditingDto.setSequenceNbr(auditingSequenceNbr);
acceptanceCheckAuditingService.createWithModel(basicGridAuditingDto);
update.set(AcceptanceCheck::getInstanceId,basicGridAuditingDto.getInstanceId());
......@@ -193,7 +191,8 @@ public class AcceptanceCheckServiceImpl extends BaseService<AcceptanceCheckDto,A
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(basicGridRecord.getPeasantHouseholdId()));
String routhPath = toDoTasksService.getRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.验收管理.getCode(), auditingSequenceNbr, taskName, orgCode,routhPath);
String wxRouthPath = toDoTasksService.getWxRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.验收管理.getCode(), basicGridRecord.getPeasantHouseholdId(), taskName, orgCode,routhPath,wxRouthPath);
List<String> userIds = Arrays.asList(Optional.ofNullable(workflowResultDto.getNextExecuteUserIds()).orElse("").split(","));
toDoTasksService.addToDoTasksByUserIds(userIds,toDoTasks);
}
......@@ -272,7 +271,8 @@ public class AcceptanceCheckServiceImpl extends BaseService<AcceptanceCheckDto,A
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(basicGridAuditing.getPeasantHouseholdId()));
String routhPath = toDoTasksService.getRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.验收管理.getCode(), basicGridAuditing.getSequenceNbr(), taskName,orgCode,routhPath);
String wxRouthPath = toDoTasksService.getWxRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.验收管理.getCode(), basicGridAuditing.getPeasantHouseholdId(), taskName,orgCode,routhPath,wxRouthPath);
List<String> userIds = Arrays.asList(Optional.ofNullable(workflowResultDto.getNextExecuteUserIds()).orElse("").split(","));
toDoTasksService.completeAndAddToDoTask(userIds,toDoTasks,"");
}
......
......@@ -251,9 +251,6 @@ public class BasicGridAcceptanceServiceImpl extends BaseService<BasicGridAccepta
BeanUtils.copyProperties(workflowResultDto, basicGridAuditingDto);
basicGridAuditingDto.setPeasantHouseholdId(grid.getPeasantHouseholdId());
basicGridAuditingDto.setPromoter(RequestContext.getExeUserId());
Sequence sequence = new Sequence();
long auditingSequenceNbr = sequence.nextId();
basicGridAuditingDto.setSequenceNbr(auditingSequenceNbr);
basicGridAuditingService.createWithModel(basicGridAuditingDto);
update.set(BasicGridRecord::getInstanceId, basicGridAuditingDto.getInstanceId());
......@@ -274,7 +271,8 @@ public class BasicGridAcceptanceServiceImpl extends BaseService<BasicGridAccepta
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(grid.getPeasantHouseholdId()));
String routhPath = toDoTasksService.getRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.并网管理.getCode(), auditingSequenceNbr, taskName, orgCode,routhPath);
String wxRouthPath = toDoTasksService.getWxRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.并网管理.getCode(), grid.getPeasantHouseholdId(), taskName, orgCode,routhPath,wxRouthPath);
List<String> userIds = Arrays.asList(Optional.ofNullable(workflowResultDto.getNextExecuteUserIds()).orElse("").split(","));
toDoTasksService.addToDoTasksByUserIds(userIds,toDoTasks);
}
......@@ -535,7 +533,8 @@ public class BasicGridAcceptanceServiceImpl extends BaseService<BasicGridAccepta
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(basicGridAuditing.getPeasantHouseholdId()));
String routhPath = toDoTasksService.getRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.并网管理.getCode(), basicGridAuditing.getSequenceNbr(), taskName,orgCode,routhPath);
String wxRouthPath = toDoTasksService.getWxRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.并网管理.getCode(), basicGridAuditing.getPeasantHouseholdId(), taskName,orgCode,routhPath,wxRouthPath);
List<String> userIds = Arrays.asList(Optional.ofNullable(workflowResultDto.getNextExecuteUserIds()).orElse("").split(","));
toDoTasksService.completeAndAddToDoTask(userIds,toDoTasks,"");
}
......
......@@ -92,7 +92,8 @@ public class DealerReviewServiceImpl extends BaseService<DealerReviewDto, Dealer
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(dealerReview.getUnitInfoId()));
String routhPath = toDoTasksService.getRouthPath(dealerReview.getNextProcessNode(), routhPathVO);
ToDoTasks toDoTasks = new ToDoTasks(TaskTypeStationEnum.经销商审核.getCode(), dealerReview.getUnitInfoId(), "经销商"+ name +"待经销商审核", regionalCompaniesCode, routhPath);
String wxRouthPath = toDoTasksService.getWxRouthPath(dealerReview.getNextProcessNode(), routhPathVO);
ToDoTasks toDoTasks = new ToDoTasks(TaskTypeStationEnum.经销商审核.getCode(), dealerReview.getUnitInfoId(), "经销商"+ name +"待经销商审核", regionalCompaniesCode, routhPath,wxRouthPath);
String roleId = toDoTasksService.getRoleIdByName("户用光伏-管理员");
List<String> todoUserIds = toDoTasksService.getTodoUserIds(null, roleId);
toDoTasksService.addToDoTasksByUserIds(todoUserIds, toDoTasks);
......
......@@ -234,7 +234,8 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(peasantHousehold.getSequenceNbr()));
String routhPath = toDoTasksService.getRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.投融资管理.getCode(), peasantHousehold.getSequenceNbr(), taskName, orgCode,routhPath);
String wxRouthPath = toDoTasksService.getWxRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.投融资管理.getCode(), peasantHousehold.getSequenceNbr(), taskName, orgCode,routhPath,wxRouthPath);
List<String> userIds = Arrays.asList(Optional.ofNullable(workflowResultDto.getNextExecuteUserIds()).orElse("").split(","));
toDoTasksService.addToDoTasksByUserIds(userIds,toDoTasks);
}
......@@ -382,7 +383,8 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(financingAuditing.getPeasantHouseholdId()));
String routhPath = toDoTasksService.getRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.投融资管理.getCode(), peasantHousehold.getSequenceNbr(), taskName,orgCode,routhPath);
String wxRouthPath = toDoTasksService.getWxRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.投融资管理.getCode(), peasantHousehold.getSequenceNbr(), taskName,orgCode,routhPath,wxRouthPath);
List<String> userIds = Arrays.asList(Optional.ofNullable(workflowResultDto.getNextExecuteUserIds()).orElse("").split(","));
toDoTasksService.completeAndAddToDoTask(userIds,toDoTasks,"");
//节点为待整改时生成整改单
......
......@@ -205,7 +205,8 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(peasantHousehold.getSequenceNbr()));
String routhPath = toDoTasksServiceImpl.getRouthPath(HygfRouthTypeEnum.HYGF_DZKC.getCode(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.电站勘察.getCode(), peasantHousehold.getSequenceNbr(), "用户"+householdContract.getPartyA()+"电站信息勘察",householdContract.getDealerCode(),routhPath);
String wxRouthPath = toDoTasksServiceImpl.getWxRouthPath(HygfRouthTypeEnum.HYGF_DZKC.getCode(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.电站勘察.getCode(), peasantHousehold.getSequenceNbr(), "用户"+householdContract.getPartyA()+"电站信息勘察",householdContract.getDealerCode(),routhPath,wxRouthPath);
toDoTasksServiceImpl.addToDoTasksByUserIds(todoUserIds,toDoTasks);
ToDoTasks toDoTasks1= new ToDoTasks (TaskTypeStationEnum.合同填报.getCode(), householdContract.getSequenceNbr(), "用户"+householdContract.getPartyA()+"的合同待发起",householdContract.getDealerCode());
......@@ -965,7 +966,8 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(peasantHousehold.getSequenceNbr()));
String routhPath = toDoTasksServiceImpl.getRouthPath(HygfRouthTypeEnum.HYGF_DZKC.getCode(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.电站勘察.getCode(), peasantHousehold.getSequenceNbr(), "用户"+householdContract.getPartyA()+"电站信息勘察",householdContract.getDealerCode(),routhPath);
String wxRouthPath = toDoTasksServiceImpl.getWxRouthPath(HygfRouthTypeEnum.HYGF_DZKC.getCode(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.电站勘察.getCode(), peasantHousehold.getSequenceNbr(), "用户"+householdContract.getPartyA()+"电站信息勘察",householdContract.getDealerCode(),routhPath,wxRouthPath);
toDoTasksServiceImpl.addToDoTasksByUserIds(todoUserIds,toDoTasks);
ToDoTasks toDoTasks1= new ToDoTasks (TaskTypeStationEnum.合同填报.getCode(), householdContract.getSequenceNbr(), "用户"+householdContract.getPartyA()+"的合同待发起",householdContract.getDealerCode());
......
......@@ -230,15 +230,15 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(powerStation.getSequenceNbr()));
String routhPath = toDoTasksServiceImpl.getRouthPath(powerStation.getNextProcessNode(), routhPathVO);
String wxRouthPath = toDoTasksServiceImpl.getWxRouthPath(powerStation.getNextProcessNode(), routhPathVO);
if (PowerStationNodeEnum.经销商确认.getCode().equals(powerStationNodeEnum.getCode())) {
ToDoTasks toDoTasks = new ToDoTasks(TaskTypeStationEnum.电站审核.getCode(), powerStation.getSequenceNbr(), "用户" + name + "电站勘察待" + powerStationNodeEnum.getName(), peasantHousehold.getDeveloperCode(),routhPath);
ToDoTasks toDoTasks = new ToDoTasks(TaskTypeStationEnum.电站审核.getCode(), powerStation.getSequenceNbr(), "用户" + name + "电站勘察待" + powerStationNodeEnum.getName(), peasantHousehold.getDeveloperCode(),routhPath,wxRouthPath);
List<String> userIds = new ArrayList<>();
userIds.add(peasantHousehold.getDeveloperUserId());
toDoTasksServiceImpl.addToDoTasksByUserIds(userIds, toDoTasks);
}else {
ToDoTasks toDoTasks= new ToDoTasks(TaskTypeStationEnum.电站审核.getCode(), powerStation.getSequenceNbr(), "用户" + name + "电站勘察待" + powerStationNodeEnum.getName(), peasantHousehold.getDeveloperCode(),routhPath);
String roleId = toDoTasksServiceImpl.getRoleIdByName(powerStation.getNodeRole());
List<String> todoUserIds = toDoTasksServiceImpl.getTodoUserIds(null, roleId);
ToDoTasks toDoTasks= new ToDoTasks(TaskTypeStationEnum.电站审核.getCode(), powerStation.getSequenceNbr(), "用户" + name + "电站勘察待" + powerStationNodeEnum.getName(), peasantHousehold.getDeveloperCode(),routhPath,wxRouthPath);
List<String> todoUserIds = Arrays.asList(Optional.ofNullable(powerStation.getNextExecuteUserIds()).orElse("").split(","));
toDoTasksServiceImpl.completeAndAddToDoTask(todoUserIds, toDoTasks,meg);
}
} else {
......
......@@ -673,9 +673,10 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(model.getSequenceNbr()));
String routhPath = toDoTasksServiceImpl.getRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.发货管理.getCode(), model.getSequenceNbr(), "下单人"+model.getOrderUser()+"发货待确认",model.getRegionalCompaniesCode(),routhPath);
String wxRouthPath = toDoTasksServiceImpl.getWxRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.发货管理.getCode(), model.getSequenceNbr(), "下单人"+model.getOrderUser()+"发货待确认",model.getRegionalCompaniesCode(),routhPath,wxRouthPath);
List<String> userIds = Arrays.asList(Optional.ofNullable(workflowResultDto.getNextExecuteUserIds()).orElse("").split(","));
toDoTasksServiceImpl.addToDoTasksByUserIds(userIds,toDoTasks);
toDoTasksServiceImpl.completeAndAddToDoTask(userIds,toDoTasks,"");
//提交时 赋值发货时间及订单状态
model.setDeliveryTime(new Date());
model.setDeliveryState(DeliveryStateeEnum.已发货.getName());
......@@ -773,7 +774,8 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(model.getSequenceNbr()));
String routhPath = toDoTasksServiceImpl.getRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.发货管理.getCode(), model.getSequenceNbr(), "下单人"+model.getOrderUser()+"发货待确认",model.getRegionalCompaniesCode(),routhPath);
String wxRouthPath = toDoTasksServiceImpl.getWxRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.发货管理.getCode(), model.getSequenceNbr(), "下单人"+model.getOrderUser()+"发货待确认",model.getRegionalCompaniesCode(),routhPath,wxRouthPath);
List<String> userIds = Arrays.asList(Optional.ofNullable(workflowResultDto.getNextExecuteUserIds()).orElse("").split(","));
toDoTasksServiceImpl.addToDoTasksByUserIds(userIds,toDoTasks);
}else {
......@@ -1052,7 +1054,8 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(preparationMoney.getSequenceNbr()));
String routhPath = toDoTasksServiceImpl.getRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.发货管理.getCode(), preparationMoney.getSequenceNbr(), "下单人"+preparationMoney.getOrderUser()+"发货"+preparationMoney.getOrderStatus(),preparationMoney.getRegionalCompaniesCode(),routhPath);
String wxRouthPath = toDoTasksServiceImpl.getWxRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.发货管理.getCode(), preparationMoney.getSequenceNbr(), "下单人"+preparationMoney.getOrderUser()+"发货"+preparationMoney.getOrderStatus(),preparationMoney.getRegionalCompaniesCode(),routhPath,wxRouthPath);
List<String> userIds = Arrays.asList(Optional.ofNullable(workflowResultDto.getNextExecuteUserIds()).orElse("").split(","));
toDoTasksServiceImpl.completeAndAddToDoTask(userIds,toDoTasks,"");
}
......
......@@ -170,9 +170,10 @@ public class RepaymentServiceImpl extends BaseService<RepaymentDto, Repayment, R
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(repayment.getSequenceNbr()));
String routhPath = toDoTasksService.getRouthPath(HygfRouthTypeEnum.HYGF_REPAY.getCode(), routhPathVO);
ToDoTasks toDoTasks = new ToDoTasks(TaskTypeStationEnum.还款.getCode(), repayment.getSequenceNbr(), createTaskName(repayment), repayment.getRegionalCompaniesCode(), routhPath);
String wxRouthPath = toDoTasksService.getWxRouthPath(HygfRouthTypeEnum.HYGF_REPAY.getCode(), routhPathVO);
ToDoTasks toDoTasks = new ToDoTasks(TaskTypeStationEnum.还款.getCode(), repayment.getSequenceNbr(), createTaskName(repayment), repayment.getRegionalCompaniesCode(), routhPath,wxRouthPath);
String roleId = toDoTasksService.getRoleIdByName("户用光伏-投融");
List<String> todoUserIds = toDoTasksService.getTodoUserIds("%" + repayment.getRegionalCompaniesCode() + "%", roleId);
List<String> todoUserIds = toDoTasksService.getTodoUserIds(repayment.getRegionalCompaniesCode(), roleId);
toDoTasksService.addToDoTasksByUserIds(todoUserIds, toDoTasks);
if (CollectionUtil.isNotEmpty(todoUserIds)){
List<String> todoTelephones = repaymentMapper.getTodoTelephones(todoUserIds);
......
......@@ -304,9 +304,9 @@ public class SurveyInformationServiceImpl
// peasantHousehold.setSurveyOrNot(1);
} else if (OPERATION_TYPE_APPLY.equals(operationType)) {
// 提交审核
submitExamine(peasantHousehold);
ToDoTasks toDoTasks = new ToDoTasks(TaskTypeStationEnum.电站勘察.getCode(), peasantHousehold.getSequenceNbr());
toDoTasksService.completeToDoTasks(toDoTasks,"");
submitExamine(peasantHousehold);
}
peasantHouseholdServiceImpl.saveOrUpdate(peasantHousehold);
......@@ -444,10 +444,6 @@ public class SurveyInformationServiceImpl
long idsk = peasantHousehold.getSequenceNbr();
up.eq(PeasantHousehold::getSequenceNbr, idsk);
peasantHouseholdMapper.update(null, up);
//添加待办
// WorkflowResultDto workflowResultDto = workFlowService.buildWorkFlowInfo(processTaskDTOS).get(0);
// workflowResultDto.setInstanceId(powerStation.getProcessInstanceId());
// commonService.buildTaskModel(commonService.buildTaskModelDto(powerStation, workflowResultDto, BusinessTypeEnum.HYGF_DZ_SH));
} catch (Exception e) {
e.printStackTrace();
log.error("submitExamine error:", e);
......
......@@ -215,6 +215,15 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
}
constructionRecordsServiceImpl.saveBatch(constructionRecordlist);
//新增待办
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(model.getSequenceNbr()));
String routhPath = toDoTasksService.getRouthPath(HygfRouthTypeEnum.HYGF_DSG.getCode(), routhPathVO);
String wxRouthPath = toDoTasksService.getWxRouthPath(HygfRouthTypeEnum.HYGF_DSG.getCode(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.派工发料.getCode(), model.getSequenceNbr(), "有一个派单编号"+model.getWorkOrderNum()+"待施工",model.getRegionCode(),routhPath,wxRouthPath);
String roleId = toDoTasksService.getRoleIdByName("户用光伏-经销商-施工");
List<String> todoUserIds = toDoTasksService.getTodoUserIds(model.getRegionCode(), roleId, String.valueOf(model.getAmosDealerId()));
toDoTasksService.addToDoTasksByUserIds(todoUserIds,toDoTasks);
return model;
}
......@@ -385,13 +394,14 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
String taskName="派工发料提交完成,需处理";
String regionalCompaniesCode="";
if(Objects.nonNull(workOrder)){
taskName="制单人"+workOrder.getPreparer() +"派工单"+ workOrder.getWorkOrderStatus();
taskName="工程负责人"+workOrder.getPreparer() +"派工单"+ WorkOrderEnum.待登记.getCode();
regionalCompaniesCode=workOrder.getRegionCode();
}
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(powerStationConstructionData.getWorkOrderId()));
routhPathVO.setRouthPathId(String.valueOf(powerStationConstructionData.getWorkOrderPowerStationId()));
String routhPath = toDoTasksService.getRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.施工完工.getCode(), powerStationConstructionData.getWorkOrderPowerStationId(), taskName, regionalCompaniesCode,routhPath);
String wxRouthPath = toDoTasksService.getWxRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.施工完工.getCode(), powerStationConstructionData.getWorkOrderPowerStationId(), taskName, regionalCompaniesCode,routhPath,wxRouthPath);
List<String> userIds = Arrays.asList(Optional.ofNullable(workflowResultDto.getNextExecuteUserIds()).orElse("").split(","));
toDoTasksService.addToDoTasksByUserIds(userIds,toDoTasks);
}else {
......@@ -544,13 +554,14 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
String taskName="";
String regionalCompaniesCode="";
if(Objects.nonNull(workOrder)){
taskName="制单人"+workOrder.getPreparer() +"派工单"+ workflowResultDto.getNextNodeName();
taskName="工程负责人"+workOrder.getPreparer() +"派工单"+ workflowResultDto.getNextNodeName();
regionalCompaniesCode=workOrder.getRegionCode();
}
RouthPathVO routhPathVO = new RouthPathVO();
routhPathVO.setRouthPathId(String.valueOf(hygfWorkOrderStationAuditing.getWorkOrderPowerStationId()));
String routhPath = toDoTasksService.getRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.施工完工.getCode(), hygfWorkOrderStationAuditing.getWorkOrderPowerStationId(), taskName,regionalCompaniesCode,routhPath);
String wxRouthPath = toDoTasksService.getWxRouthPath(workflowResultDto.getNextNodeKey(), routhPathVO);
ToDoTasks toDoTasks= new ToDoTasks (TaskTypeStationEnum.施工完工.getCode(), hygfWorkOrderStationAuditing.getWorkOrderPowerStationId(), taskName,regionalCompaniesCode,routhPath,wxRouthPath);
List<String> userIds = Arrays.asList(Optional.ofNullable(workflowResultDto.getNextExecuteUserIds()).orElse("").split(","));
toDoTasksService.completeAndAddToDoTask(userIds,toDoTasks,"");
}
......@@ -938,7 +949,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
up4.eq(HygfOnGrid::getWorkOrderId, workOrderId);
up4.eq(HygfOnGrid::getWorkOrderPowerStationId, workOrderPowerStationId);
HygfOnGrid hygfOnGrid = hygfOnGridMapper.selectOne(up4);
//增加整改单数据
List<HygfRectificationOrder> hygfRectificationOrderList= rectificationOrderService.selectForListBySource(String.valueOf(peasantHousehold.getSequenceNbr()), RectificationOrderEnum.并网.getName());
if (CollectionUtil.isNotEmpty(hygfRectificationOrderList)){
......@@ -949,7 +960,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
hygfOnGrid.setEngineeringOrders(engineeringOrders.size()>0?engineeringOrders:null);
hygfOnGrid.setDesignOrders(designOrders.size()>0?designOrders:null);
}
surveyInfoAllDto.setHygfOnGrid(hygfOnGrid != null ? hygfOnGrid : new HygfOnGrid());
surveyInfoAllDto.setPowerStationConstructionData(powerStationConstructionData);
surveyInfoAllDto.setPowerStationEngineeringInfo(powerStationEngineeringInfo);
......@@ -1017,7 +1028,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
LambdaQueryWrapper<AcceptanceCheck> quv1 = new LambdaQueryWrapper();
quv1.eq(AcceptanceCheck::getPeasantHouseholdId, peasantHouseholdId);
AcceptanceCheck acceptanceCheck = acceptanceCheckMapper.selectOne(quv1);
//增加整改单数据
List<HygfRectificationOrder> hygfRectificationOrderListYs= rectificationOrderService.selectForListBySource(String.valueOf(peasantHousehold.getSequenceNbr()), RectificationOrderEnum.验收.getName());
if (CollectionUtil.isNotEmpty(hygfRectificationOrderListYs)){
......@@ -1430,6 +1441,9 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
if (list == null || list.isEmpty()) {
upq.set(WorkOrder::getWorkOrderStatus, WorkOrderEnum.已完工.getCode());
workOrderMapper.update(null, upq);
//完成待办
ToDoTasks toDoTasks = new ToDoTasks(TaskTypeStationEnum.派工发料.getCode(), workOrderPowerStation.getWorkOrderId());
toDoTasksService.completeToDoTasks(toDoTasks,"");
}
......
......@@ -78,10 +78,16 @@
"url": "/mixuap?appId=1677158789557547009&id=1808437079118450689"
},
{
"type": "hygf_dsg",
"pageType": "",
"name": "待施工",
"url": ""
},
{
"type": "Activity_0bs6t4g",
"pageType": "",
"name": "施工完成提交",
"url": "/mixuap?appId=1677158789557547009&id=1742435224567967746"
"url": ""
},
{
"type": "Activity_1spujef",
......@@ -114,7 +120,7 @@
"url": "/mixuap?appId=1678340647909617665&id=1823622039500492802"
},
{
"type": "hygf_bw1",
"type": "Activity_0bs6t4g",
"pageType": "",
"name": "并网登记提交",
"url": "/mixuap?appId=1677158789557547009&id=1747137335817957378"
......@@ -189,7 +195,7 @@
"type": "AuditPass",
"pageType": "",
"name": "放款确认",
"url": "/mixuap?appId=1678340647909617665&id=1831228592361574401"
"url": "/mixuap?appId=1678340647909617665&id=1831226627237875713"
},
{
"type": "hygf_repayment",
......
[
{
"type": "jxs_03",
"pageType": "",
"name": "经销商管理员审核",
"url": ""
},
{
"type": "hygf_dzkc",
"pageType": "",
"name": "电站勘察",
"url": "/view/mine/minepage/PeasantManage"
},
{
"type": "hygf_02",
"pageType": "",
"name": "经销商确认",
"url": "/view/mine/minepage/SurveyList"
},
{
"type": "hygf_03",
"pageType": "",
"name": "设计审核",
"url": "/view/mine/minepage/SurveyListgld"
},
{
"type": "hygf_05",
"pageType": "",
"name": "投融审核",
"url": "/view/mine/minepage/SurveyListgld"
},
{
"type": "hygf_07",
"pageType": "",
"name": "法务审核",
"url": "/view/mine/minepage/SurveyListgld"
},
{
"type": "hygf_09",
"pageType": "",
"name": "设计上传典型图库",
"url": "/view/mine/minepage/SurveyListgld"
},
{
"type": "hygf_10",
"pageType": "",
"name": "经销商设计人员上传设计图",
"url": "/view/mine/minepage/SurveyList"
},
{
"type": "hygf_11",
"pageType": "",
"name": "设计图纸审核",
"url": "/view/mine/minepage/SurveyListgld"
},
{
"type": "fh_dtj",
"pageType": "",
"name": "待发货",
"url": ""
},
{
"type": "fh_dyr",
"pageType": "",
"name": "待确认",
"url": "/view/mine/subPackageA/menus/shippingOrder/shippingOrderList/index"
},
{
"type": "fh_dsh",
"pageType": "",
"name": "待审核",
"url": "/view/mine/subPackageA/menus/shippingOrder/shippingOrderList/index"
},
{
"type": "fh_sqbh",
"pageType": "",
"name": "申请补货",
"url": "/view/mine/subPackageA/menus/shippingOrder/shippingOrderList/index"
},
{
"type": "hygf_dsg",
"pageType": "",
"name": "待施工",
"url": ""
},
{
"type": "Activity_0bs6t4g",
"pageType": "",
"name": "施工完成提交",
"url": "/view/mine/sggl/SgglList"
},
{
"type": "Activity_1spujef",
"pageType": "",
"name": "完工登记提交",
"url": "/view/mine/wgdj/WgdjList"
},
{
"type": "Activity_16r1828",
"pageType": "",
"name": "完工自审",
"url": "/view/mine/wgzs/WgzsList"
},
{
"type": "Activity_1bldcno",
"pageType": "",
"name": "完工自审-片区运营中心",
"url": "/view/mine/subPackageA/menus/constructionAcceptance/index"
},
{
"type": "Activity_1yftt2k",
"pageType": "",
"name": "工程审核",
"url": "/view/mine/subPackageA/menus/constructionAcceptance/index"
},
{
"type": "Activity_095if3p",
"pageType": "",
"name": "设计审核",
"url": "/view/mine/subPackageA/menus/constructionAcceptance/index"
},
{
"type": "Activity_0bs6t4g",
"pageType": "",
"name": "并网登记提交",
"url": "/view/mine/bwgl/BwglList"
},
{
"type": "Activity_0r2x1es",
"pageType": "",
"name": "经销商管理审核",
"url": "/view/mine/bwgl/BwglList"
},
{
"type": "Activity_05nlkey",
"pageType": "",
"name": "片区审核",
"url": "/view/mine/subPackageA/menus/onGridAcceptance/index"
},
{
"type": "Activity_0k4o46e",
"pageType": "",
"name": "设计审核/工程审核",
"url": "/view/mine/subPackageA/menus/onGridAcceptance/index"
},
{
"type": "Activity_0bs6t4g",
"pageType": "",
"name": "验收提交",
"url": "/view/mine/subPackageA/menus/acceptanceCheck/ysgl"
},
{
"type": "Activity_0ojajec",
"pageType": "",
"name": "经销商管理员审核",
"url": "/view/mine/subPackageA/menus/acceptanceCheck/ysgl"
},
{
"type": "Activity_0edftmv",
"pageType": "",
"name": "片区审核",
"url": "/view/mine/subPackageA/menus/acceptanceCheck/index"
},
{
"type": "Activity_1rjn5s1",
"pageType": "",
"name": "投融/法务审核",
"url": "/view/mine/subPackageA/menus/acceptanceCheck/index"
},
{
"type": "Activity_0rbc0gc",
"pageType": "",
"name": "资产审核",
"url": "/view/mine/subPackageA/menus/acceptanceCheck/index"
},
{
"type": "AbarbeitungWaitPush",
"pageType": "",
"name": "推送融资",
"url": "/view/mine/subPackageA/InvestmentAndFinancing/investment/index"
},
{
"type": "WaitAbarbeitung",
"pageType": "",
"name": "经销商重新提交验收/退回建档",
"url": "/view/mine/subPackageA/menus/acceptanceCheck/ysgl"
},
{
"type": "FinancingAudit",
"pageType": "",
"name": "融资审核",
"url": "/view/mine/subPackageA/InvestmentAndFinancing/financing/index"
},
{
"type": "AuditPass",
"pageType": "",
"name": "放款确认",
"url": "/view/mine/subPackageA/InvestmentAndFinancing/investment/index"
},
{
"type": "hygf_repayment",
"pageType": "",
"name": "还款管理",
"url": ""
}
]
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