@@ -105,6 +105,8 @@ public class ConstructionManage { | |||
private final TaskService taskService; | |||
private final IXinchuangInstService xinchuangInstService; | |||
/** | |||
* 待采购的-项目列表 | |||
* | |||
@@ -639,6 +641,15 @@ public class ConstructionManage { | |||
xinhcuang.setInstCode(instanceId); | |||
xinhcuang.setStatus(TenderXcfhxApplyStatus.ON_XCFHX_APPLY.getCode()); | |||
xinchuangService.updateById(xinhcuang); | |||
XinchuangInst xinchuangInst = new XinchuangInst(); | |||
xinchuangInst.setXinchuangId(xinhcuang.getId()); | |||
xinchuangInst.setInstType(ProjectProcessType.XC_APPROVAL_PROCESS.getCode()); | |||
xinchuangInst.setInstCode(instanceId); | |||
xinchuangInst.setCreateOn(LocalDateTime.now()); | |||
xinchuangInst.setCreateBy(user.getUserId()); | |||
xinchuangInstService.save(xinchuangInst); | |||
return instanceId; | |||
} | |||
@@ -0,0 +1,16 @@ | |||
package com.hz.pm.api.projectdeclared.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.hz.pm.api.projectdeclared.model.entity.XinchuangInst; | |||
/** | |||
* <p> | |||
* Mapper 接口 | |||
* </p> | |||
* | |||
* @author Poffy | |||
* @since 2023-7-3 | |||
*/ | |||
public interface XinchuangInstMapper extends BaseMapper<XinchuangInst> { | |||
} |
@@ -0,0 +1,51 @@ | |||
package com.hz.pm.api.projectdeclared.model.entity; | |||
import com.baomidou.mybatisplus.annotation.*; | |||
import com.hz.pm.api.common.enumeration.ProjectProcessType; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.time.LocalDateTime; | |||
/** | |||
* <p> | |||
* XinchuangInst | |||
* </p> | |||
* | |||
* @authorPF | |||
* @since 23:06 2024/7/3 | |||
*/ | |||
@Data | |||
@TableName("nd_xinchuang_inst") | |||
public class XinchuangInst { | |||
@ApiModelProperty("主键") | |||
@TableId(type = IdType.AUTO) | |||
private Long id; | |||
@ApiModelProperty("信创ID") | |||
private Long xinchuangId; | |||
@ApiModelProperty("实例ID") | |||
private String instCode; | |||
@ApiModelProperty("实例类型 1单位内部审批流程 2项目预审审批流程 3部门联合审批流程 4建设方案审批流程 5验收申报审批流程") | |||
private Integer instType; | |||
@ApiModelProperty("创建时间") | |||
@TableField(fill = FieldFill.INSERT) | |||
private LocalDateTime createOn; | |||
@ApiModelProperty("创建人") | |||
@TableField(fill = FieldFill.INSERT) | |||
private Long createBy; | |||
public void setInstType(ProjectProcessType processStage) { | |||
this.instType = processStage.getCode(); | |||
} | |||
public void setInstType(Integer instType) { | |||
this.instType = instType; | |||
} | |||
} |
@@ -0,0 +1,20 @@ | |||
package com.hz.pm.api.projectdeclared.service; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
import com.hz.pm.api.projectdeclared.model.entity.XinchuangInst; | |||
import java.util.List; | |||
/** | |||
* <p> | |||
* IXinchuangInstService | |||
* </p> | |||
* | |||
* @author ZPF | |||
* @since 00:12 2024/7/3 | |||
*/ | |||
public interface IXinchuangInstService extends IService<XinchuangInst> { | |||
List<XinchuangInst> listByXinchuangIds(List<Long> xinchuangIds); | |||
} |
@@ -0,0 +1,28 @@ | |||
package com.hz.pm.api.projectdeclared.service.impl; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
import com.hz.pm.api.projectdeclared.mapper.XinchuangInstMapper; | |||
import com.hz.pm.api.projectdeclared.model.entity.XinchuangInst; | |||
import com.hz.pm.api.projectdeclared.service.IXinchuangInstService; | |||
import org.springframework.stereotype.Service; | |||
import java.util.List; | |||
/** | |||
* <p> | |||
* XinchuangInstServiceImpl | |||
* </p> | |||
* | |||
* @author ZPF | |||
* @since 00:13 2024/7/3 | |||
*/ | |||
@Service | |||
public class XinchuangInstServiceImpl extends ServiceImpl<XinchuangInstMapper, XinchuangInst> | |||
implements IXinchuangInstService { | |||
@Override | |||
public List<XinchuangInst> listByXinchuangIds(List<Long> xinchuangIds) { | |||
return list(Wrappers.lambdaQuery(XinchuangInst.class) | |||
.in(XinchuangInst::getXinchuangId, xinchuangIds)); | |||
} | |||
} |
@@ -24,7 +24,9 @@ import com.hz.pm.api.irs.sign.IRSAPIRequest; | |||
import com.hz.pm.api.projectdeclared.manage.DeclaredProjectHelper; | |||
import com.hz.pm.api.projectdeclared.model.entity.PurchaseInst; | |||
import com.hz.pm.api.projectdeclared.model.entity.Xinchuang; | |||
import com.hz.pm.api.projectdeclared.model.entity.XinchuangInst; | |||
import com.hz.pm.api.projectdeclared.service.IPurchaseInstService; | |||
import com.hz.pm.api.projectdeclared.service.IXinchuangInstService; | |||
import com.hz.pm.api.projectdeclared.service.IXinchuangService; | |||
import com.hz.pm.api.projectlib.manage.ProjectLibManage; | |||
import com.hz.pm.api.projectlib.model.dto.ProjectApplicationDTO; | |||
@@ -148,6 +150,8 @@ public class TodoCenterManage { | |||
private final IXinchuangService xinchuangService; | |||
private final IXinchuangInstService xinchuangInstService; | |||
/** | |||
* 待办中心待我处理项目列表查询 | |||
* | |||
@@ -248,9 +252,15 @@ public class TodoCenterManage { | |||
if (CollUtil.isEmpty(xinchuangs)) { | |||
return PageVo.empty(); | |||
} | |||
Map<String, Xinchuang> xinchuangMap = CollUtils.listToMap(xinchuangs, Xinchuang::getInstCode); | |||
List<String> instCodes = CollUtils.fieldList(xinchuangs, Xinchuang::getInstCode); | |||
List<Long> xinchuangIds = CollUtils.fieldList(xinchuangs, Xinchuang::getId); | |||
List<XinchuangInst> xinchuangInsts = xinchuangInstService.listByXinchuangIds(xinchuangIds); | |||
Map<String, Xinchuang> xinchuangMap = CollUtils.listToMap(xinchuangs, Xinchuang::getInstCode); | |||
List<String> instCodes = CollUtils.fieldList(xinchuangInsts, XinchuangInst::getInstCode); | |||
if (CollUtil.isEmpty(instCodes)) { | |||
return PageVo.empty(); | |||
} | |||
// 查出用户工作流 | |||
TodoCenterListReqDTO req = new TodoCenterListReqDTO(); | |||
req.setInstCodes(instCodes); | |||
@@ -929,9 +939,14 @@ public class TodoCenterManage { | |||
if (xinchuangs.isEmpty()) { | |||
return PageVo.empty(); | |||
} | |||
List<Long> xinchuangIds = CollUtils.fieldList(xinchuangs, Xinchuang::getId); | |||
List<XinchuangInst> xinchuangInsts = xinchuangInstService.listByXinchuangIds(xinchuangIds); | |||
Map<String, Xinchuang> xinchuangMap = CollUtils.listToMap(xinchuangs, Xinchuang::getInstCode, v -> v); | |||
List<String> instCodes = CollUtils.fieldList(xinchuangs, Xinchuang::getInstCode); | |||
Map<String, Xinchuang> xinchuangMap = CollUtils.listToMap(xinchuangs, Xinchuang::getInstCode); | |||
List<String> instCodes = CollUtils.fieldList(xinchuangInsts, XinchuangInst::getInstCode); | |||
if (CollUtil.isEmpty(instCodes)) { | |||
return PageVo.empty(); | |||
} | |||
// 查出用户工作流 | |||
TodoCenterListReqDTO req = new TodoCenterListReqDTO(); | |||
@@ -1124,8 +1139,14 @@ public class TodoCenterManage { | |||
if (CollUtil.isEmpty(xinchuangs)) { | |||
return PageVo.empty(); | |||
} | |||
Map<String, Xinchuang> xinchuangMap = CollUtils.listToMap(xinchuangs, Xinchuang::getInstCode, v -> v); | |||
List<String> instCodes = CollUtils.fieldList(xinchuangs,Xinchuang::getInstCode); | |||
List<Long> xinchuangIds = CollUtils.fieldList(xinchuangs, Xinchuang::getId); | |||
List<XinchuangInst> xinchuangInsts = xinchuangInstService.listByXinchuangIds(xinchuangIds); | |||
Map<String, Xinchuang> xinchuangMap = CollUtils.listToMap(xinchuangs, Xinchuang::getInstCode); | |||
List<String> instCodes = CollUtils.fieldList(xinchuangInsts, XinchuangInst::getInstCode); | |||
if (CollUtil.isEmpty(instCodes)) { | |||
return PageVo.empty(); | |||
} | |||
// 查出用户工作流 | |||
TodoCenterListReqDTO req = new TodoCenterListReqDTO(); | |||