feat: There is no way the, 改改改 从企标计划开始 改到 企标标准入库及企标库 改至计划已确认关联之多 改为测
This commit is contained in:
+6
@@ -81,6 +81,12 @@ public class EsRevisePlanController extends BaseController<EsRevisePlan> {
|
||||
return Result.success(iEsRevisePlanService.modPlanByState(esRevisePlan));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "编辑企标计划-流程")
|
||||
@PostMapping("modPlanByProcess")
|
||||
public ResponseMessage<Object> modPlanByProcess(@RequestBody EsRevisePlan esRevisePlan){
|
||||
return Result.success(iEsRevisePlanService.modPlanByProcess(esRevisePlan));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "编辑企标计划")
|
||||
@PostMapping("/modPlanByWk")
|
||||
public ResponseMessage<Object> modPlanByWk(@RequestBody EsRevisePlan esRevisePlan){
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.adc.da.slrs.esRevisePlan.dao;
|
||||
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan;
|
||||
import com.adc.da.slrs.wgdCensusZ.entity.WgdAssocCost;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,6 +15,7 @@ import java.util.List;
|
||||
* @author zcr
|
||||
* @since 2021-11-14
|
||||
*/
|
||||
@Repository
|
||||
public interface EsRevisePlanDao extends BaseMapper<EsRevisePlan> {
|
||||
Integer getTotal();
|
||||
Integer getQueryTotal(EsRevisePlan esRevisePlan);
|
||||
|
||||
@@ -125,4 +125,10 @@ public class EsRevisePlan extends BasePage {
|
||||
@ApiModelProperty(value = "立项单")
|
||||
@TableField("LXD")
|
||||
private String lxd;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standCode;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String processType;
|
||||
}
|
||||
|
||||
+1
@@ -20,6 +20,7 @@ public interface IEsRevisePlanService extends IService<EsRevisePlan> {
|
||||
|
||||
String modPlan(EsRevisePlan esRevisePlan);//编辑
|
||||
String modPlanByState(EsRevisePlan esRevisePlan);//编辑
|
||||
String modPlanByProcess(EsRevisePlan esRevisePlan);//编辑
|
||||
String addPlan(EsRevisePlan esRevisePlan);//插入
|
||||
int delPlan(String id);//删除
|
||||
int delPlans(String ids);//批量删除
|
||||
|
||||
+48
-1
@@ -7,6 +7,8 @@ import com.adc.da.slrs.esRevisePlan.dao.EsRevisePlanDao;
|
||||
import com.adc.da.slrs.esRevisePlan.service.IEsRevisePlanService;
|
||||
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
|
||||
import com.adc.da.slrs.esStandRelation.service.IEsStandRelationService;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -14,6 +16,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@@ -38,6 +41,8 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
IEsMatingRelationService esMatingRelationService;
|
||||
@Autowired
|
||||
IEsStandRelationService esStandRelationService;
|
||||
@Autowired
|
||||
private ISarBussionessStandService iSarBussionessStandService;
|
||||
|
||||
@Override
|
||||
public List<EsRevisePlan> getAllPlans(EsRevisePlan esRevisePlan) {
|
||||
@@ -76,11 +81,53 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
}
|
||||
|
||||
@Override
|
||||
public String modPlanByState(EsRevisePlan esRevisePlan) {
|
||||
public String modPlanByProcess(EsRevisePlan esRevisePlan) {
|
||||
esRevisePlanDao.updateById(esRevisePlan);
|
||||
return "操作成功";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String modPlanByState(EsRevisePlan esRevisePlan) {
|
||||
// 更新 企标库 制修订状态
|
||||
if(StringUtils.isNotBlank(esRevisePlan.getStandCode())){
|
||||
List<String> list= Arrays.stream(esRevisePlan.getStandCode().split(",")).map(String::trim).collect(Collectors.toList());
|
||||
if(!list.isEmpty()){
|
||||
QueryWrapper qw = new QueryWrapper();
|
||||
qw.in("STAND_CODE",list);
|
||||
List<SarBussionessStand> standList = iSarBussionessStandService.list(qw);
|
||||
standList.forEach(stand -> {
|
||||
if(StringUtils.isBlank(esRevisePlan.getPlanStatus()) || !"4".equals(esRevisePlan.getPlanStatus())){
|
||||
if("1".equals(esRevisePlan.getReviseStatus())){
|
||||
stand.setRevisionStatus(esRevisePlan.getProcessType()+"_"+"1");
|
||||
}else if("2".equals(esRevisePlan.getReviseStatus())){
|
||||
stand.setRevisionStatus(esRevisePlan.getProcessType()+"_"+"2");
|
||||
}else if("3".equals(esRevisePlan.getReviseStatus())){
|
||||
stand.setRevisionStatus(esRevisePlan.getProcessType()+"_"+"3");
|
||||
}
|
||||
}else{
|
||||
stand.setRevisionStatus(esRevisePlan.getProcessType()+"_"+"4");
|
||||
}
|
||||
});
|
||||
iSarBussionessStandService.updateBatchById(standList);
|
||||
}
|
||||
}
|
||||
|
||||
// 技术标准 更新计划库
|
||||
if(StringUtils.isNotBlank(esRevisePlan.getId())){
|
||||
if(StringUtils.isBlank(esRevisePlan.getPlanStatus()) || !"4".equals(esRevisePlan.getPlanStatus())){
|
||||
if("1".equals(esRevisePlan.getReviseStatus())){
|
||||
esRevisePlan.setPlanStatus("1");
|
||||
}else if("2".equals(esRevisePlan.getReviseStatus())){
|
||||
esRevisePlan.setPlanStatus("2");
|
||||
}else if("3".equals(esRevisePlan.getReviseStatus())){
|
||||
esRevisePlan.setPlanStatus("3");
|
||||
}
|
||||
}
|
||||
esRevisePlanDao.updateById(esRevisePlan);
|
||||
}
|
||||
return "操作成功";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String addPlan(EsRevisePlan esRevisePlan) {
|
||||
esRevisePlan.setId(UUIDUtils.randomUUID(32));
|
||||
|
||||
Reference in New Issue
Block a user