Commit af0a77df authored by 1650842865's avatar 1650842865

客供料根据计划订单查询,如果没有就新增,有就修改;SAP删除的BPM也标记删除

parent 07f77776
...@@ -35,9 +35,11 @@ import com.huigou.util.StringUtil; ...@@ -35,9 +35,11 @@ import com.huigou.util.StringUtil;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.io.IOException; import java.io.IOException;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* @Auther: Lxh * @Auther: Lxh
...@@ -137,7 +139,31 @@ public class ClientMaterialsApplicationImpl extends BaseApplication implements C ...@@ -137,7 +139,31 @@ public class ClientMaterialsApplicationImpl extends BaseApplication implements C
List<Map<String, Object>> personMaps = this.sqlExecutorDao.queryToListMap(queryDescriptor.getSql(), null); List<Map<String, Object>> personMaps = this.sqlExecutorDao.queryToListMap(queryDescriptor.getSql(), null);
//推送待办任务 //推送待办任务
this.pushTask(clientMaterialsDb,personMaps); this.pushTask(clientMaterialsDb,personMaps);
}else {
//不为空,更新数据
BeanUtil.copyProperties(clientMaterialsVo,clientMaterialsDb);
clientMaterialsRepository.save(clientMaterialsDb);
}
} }
//删除已关单的数据
List<ClientMaterials> clientMaterialsList = clientMaterialsRepository.findAll();
Set<String> plnumSet = sapClientMaterialsList.stream()
.map(ClientMaterialsVo::getPlnum)
.collect(Collectors.toSet());
List<ClientMaterials> materialsList = clientMaterialsList.stream()
.filter(obj ->StringUtil.isBlank(obj.getClosed()))
.filter(obj -> !plnumSet.contains(obj.getPlnum()))
.collect(Collectors.toList());
//标记已删除
if (!CollectionUtils.isEmpty(materialsList)){
materialsList
.stream()
.forEach(obj -> {
obj.setClosed("1");
clientMaterialsRepository.save(obj);
});
} }
} }
......
...@@ -170,7 +170,7 @@ public class CostCenterController extends CommonController { ...@@ -170,7 +170,7 @@ public class CostCenterController extends CommonController {
/** /**
* 成本中心ES查询接口 * 成本中心ES查询接口
*/ */
/*@EasySearch(queryName = "queryCostCenter") @EasySearch(queryName = "queryCostCenter")
public Map<String, Object> queryCostCenter(SDO sdo) { public Map<String, Object> queryCostCenter(SDO sdo) {
Integer intPage = sdo.getInteger("intPage", 1); Integer intPage = sdo.getInteger("intPage", 1);
Integer pageSize = sdo.getInteger("pageSize", 10); Integer pageSize = sdo.getInteger("pageSize", 10);
...@@ -203,7 +203,7 @@ public class CostCenterController extends CommonController { ...@@ -203,7 +203,7 @@ public class CostCenterController extends CommonController {
MemEasySearcher<Map<String, String>> memEasySearcher = new MemEasySearcherImpl<>(); MemEasySearcher<Map<String, String>> memEasySearcher = new MemEasySearcherImpl<>();
Map<String, Object> model = memEasySearcher.search(mapList, easySearchParse, pageRequest, null); Map<String, Object> model = memEasySearcher.search(mapList, easySearchParse, pageRequest, null);
return model; return model;
}*/ }
/** /**
* 冻结成本中心 * 冻结成本中心
......
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