Compare commits

..

3 Commits

Author SHA1 Message Date
ic_excellent afb20960b9 修复重复问题 2023-07-27 13:07:13 +08:00
ic_excellent ef4d57f1d0 Merge branch 'dev' of https://gitea.yeyaguitu.cn/ecology/ebu_ecology_dev1 into dev
冲突
2023-07-27 12:47:32 +08:00
ic_excellent 975908717b 提交代码 2023-07-27 12:44:53 +08:00
5 changed files with 28 additions and 5 deletions

View File

@ -1,6 +1,7 @@
package aiyh.utils.response_deal; package aiyh.utils.response_deal;
import aiyh.utils.Util; import aiyh.utils.Util;
import aiyh.utils.excention.CustomerException;
import aiyh.utils.function.Bi3Function; import aiyh.utils.function.Bi3Function;
import aiyh.utils.httpUtil.ResponeVo; import aiyh.utils.httpUtil.ResponeVo;
import aiyh.utils.response_deal.constant.ResponseConfigConstant; import aiyh.utils.response_deal.constant.ResponseConfigConstant;
@ -189,10 +190,16 @@ public class ResponseMappingDeal {
.assignType(mainDataAlias.getAssignType()).build(); .assignType(mainDataAlias.getAssignType()).build();
String dataPath = mainDataAlias.getDataAlias(); String dataPath = mainDataAlias.getDataAlias();
List<RowDefinition> rowDefinitionList = new ArrayList<>(); List<RowDefinition> rowDefinitionList = new ArrayList<>();
Map<String, TableDefinition> detailTable = isMainTable ? new HashMap<>() : null;
// 如果是json数组 // 如果是json数组
if (mainDataAlias.getDataType() == ResponseConfigConstant.JSON_ARRAY) { if (mainDataAlias.getDataType() == ResponseConfigConstant.JSON_ARRAY) {
List<Map<String, Object>> mainList = (List<Map<String, Object>>) Util.getValueByKeyStr(dataPath, aliasData); List<Map<String, Object>> mainList = new ArrayList<>();
try {
mainList = (List<Map<String, Object>>) Util.getValueByKeyStr(dataPath, aliasData);
}catch (CustomerException customerException){
if(tableMainOrDetail == ResponseConfigConstant.MAIN_TABLE){
throw new ResponseException(customerException);
}
}
for (Map<String, Object> mainItem : mainList) { for (Map<String, Object> mainItem : mainList) {
aliasData.put(mainDataAlias.getDataAlias(), mainItem); aliasData.put(mainDataAlias.getDataAlias(), mainItem);
// 处理配置信息 // 处理配置信息
@ -200,6 +207,7 @@ public class ResponseMappingDeal {
RowDefinition rowDefinition = this.buildRowDefinition(fieldDefinitions, tableName, mainDataAlias.getAssignType(), mainDataAlias.getConditionScript(), mainDataAlias.getJudgmentScript()); RowDefinition rowDefinition = this.buildRowDefinition(fieldDefinitions, tableName, mainDataAlias.getAssignType(), mainDataAlias.getConditionScript(), mainDataAlias.getJudgmentScript());
rowDefinition.setMainOrDetail(ResponseConfigConstant.DETAIL_TABLE); rowDefinition.setMainOrDetail(ResponseConfigConstant.DETAIL_TABLE);
if (isMainTable) { if (isMainTable) {
Map<String, TableDefinition> detailTable = new HashMap<>();
rowDefinition.setMainOrDetail(ResponseConfigConstant.MAIN_TABLE); rowDefinition.setMainOrDetail(ResponseConfigConstant.MAIN_TABLE);
detailCallBack.apply(responseConfig, aliasData, detailTable); detailCallBack.apply(responseConfig, aliasData, detailTable);
rowDefinition.setDetailTableMap(detailTable); rowDefinition.setDetailTableMap(detailTable);
@ -214,6 +222,7 @@ public class ResponseMappingDeal {
RowDefinition rowDefinition = this.buildRowDefinition(fieldDefinitions, tableName, mainDataAlias.getAssignType(), mainDataAlias.getConditionScript(), mainDataAlias.getJudgmentScript()); RowDefinition rowDefinition = this.buildRowDefinition(fieldDefinitions, tableName, mainDataAlias.getAssignType(), mainDataAlias.getConditionScript(), mainDataAlias.getJudgmentScript());
rowDefinition.setMainOrDetail(ResponseConfigConstant.DETAIL_TABLE); rowDefinition.setMainOrDetail(ResponseConfigConstant.DETAIL_TABLE);
if (isMainTable) { if (isMainTable) {
Map<String, TableDefinition> detailTable = new HashMap<>();
rowDefinition.setMainOrDetail(ResponseConfigConstant.MAIN_TABLE); rowDefinition.setMainOrDetail(ResponseConfigConstant.MAIN_TABLE);
detailCallBack.apply(responseConfig, aliasData, detailTable); detailCallBack.apply(responseConfig, aliasData, detailTable);
rowDefinition.setDetailTableMap(detailTable); rowDefinition.setDetailTableMap(detailTable);

View File

@ -52,11 +52,11 @@ public class ReportService {
whereSql += " and dyjbr = #{param.registrationPeople} "; whereSql += " and dyjbr = #{param.registrationPeople} ";
} }
if(!"".equals(flightAndTrain)){ if(!"".equals(flightAndTrain)){
whereSql += " and hbcc like '%"+flightAndTrain+"%' "; whereSql += " and hbwb like '%"+flightAndTrain+"%' ";
} }
if(!"".equals(project)){ if(!"".equals(project)){
//whereSql += " and exits (select 1 from uf_zwfwdjjmb_dt1 where mainid = main.id and ysdx = #{param.project}) "; //whereSql += " and exits (select 1 from uf_zwfwdjjmb_dt1 where mainid = main.id and ysdx = #{param.project}) ";
whereSql += " and exits (select 1 from uf_zwfwdjjmb_dt1 where mainid = main.id and wb like '%"+project+"%') "; whereSql += " and EXISTS (select 1 from uf_zwfwdjjmb_dt1 where mainid = main.id and wb like '%"+project+"%') ";
} }
if(("".equals(beginDate) || "".equals(endDate)) && "".equals(registrationPeople) && "".equals(flightAndTrain)){ if(("".equals(beginDate) || "".equals(endDate)) && "".equals(registrationPeople) && "".equals(flightAndTrain)){
param.put("today", TimeUtil.getCurrentDateString()); param.put("today", TimeUtil.getCurrentDateString());

View File

@ -39,7 +39,7 @@ public interface BankMapper {
*/ */
@Select("SELECT t.requestid requestId,t.$t{amountField} amount,t.$t{amountField} outAmount," + @Select("SELECT t.requestid requestId,t.$t{amountField} amount,t.$t{amountField} outAmount," +
" $t{inCompany} inCompany,wb.lastoperatedate outDate," + " $t{inCompany} inCompany,wb.lastoperatedate outDate," +
" (select top 1 xmlsend from workflowToFinanceUrl where wb.requestid = t.requestId and xmlsend IS NOT NULL order by id desc) xmlsend " + " (select top 1 xmlsend from workflowToFinanceUrl where requestid = t.requestId and xmlsend IS NOT NULL order by id desc) xmlsend " +
"FROM $t{tableName} t " + "FROM $t{tableName} t " +
"INNER JOIN workflow_requestbase wb ON t.requestid = wb.requestid " + "INNER JOIN workflow_requestbase wb ON t.requestid = wb.requestid " +
"WHERE wb.currentnodetype = 3 " + "WHERE wb.currentnodetype = 3 " +

View File

@ -98,10 +98,14 @@ public class BankService {
for (Map<String, Object> tempOut : tempOutList) { for (Map<String, Object> tempOut : tempOutList) {
String xmlSend = Util.null2String(tempOut.get("xmlsend")); String xmlSend = Util.null2String(tempOut.get("xmlsend"));
String insId = CommonUtil.getNodeValue(xmlSend, "insid"); String insId = CommonUtil.getNodeValue(xmlSend, "insid");
if(insId.length() > 12){
insId = insId.substring(insId.length() - 12);
}
tempOut.put("insId",insId); tempOut.put("insId",insId);
} }
return tempOutList.stream(); return tempOutList.stream();
}) })
.filter(item -> !"".equals(item.get("insid")))
.collect(Collectors.toList()); .collect(Collectors.toList());
//List<Map<String, Object>> oaOutOtherList = outOtherParam.stream().flatMap(item -> { //List<Map<String, Object>> oaOutOtherList = outOtherParam.stream().flatMap(item -> {
// item.put("beginDate", Util.null2String(param.get("beginDate"))); // item.put("beginDate", Util.null2String(param.get("beginDate")));
@ -152,6 +156,13 @@ public class BankService {
.collect(Collectors.toList()); .collect(Collectors.toList());
List<Map<String, Object>> bankTempOutList = bankMapper.queryBankOutInfo(param); List<Map<String, Object>> bankTempOutList = bankMapper.queryBankOutInfo(param);
List<Map<String, Object>> bankTempInList = bankMapper.queryBankInInfo(param); List<Map<String, Object>> bankTempInList = bankMapper.queryBankInInfo(param);
log.info(Util.logStr("oaOutList =>{} \n oaOutOtherList =>{} \n oaInList =>{} \n bankTempOutList =>{} \n bankTempInList =>{} \n"
,JSON.toJSONString(oaOutList)
,JSON.toJSONString(oaOutOtherList)
,JSON.toJSONString(oaInList)
,JSON.toJSONString(bankTempOutList)
,JSON.toJSONString(bankTempInList)
));
//将银行流水信息进行分组有Insid为一组走银企直联无Insid代收划转为一组 //将银行流水信息进行分组有Insid为一组走银企直联无Insid代收划转为一组
Map<Boolean, List<Map<String, Object>>> bankOutMap = bankTempOutList.stream().collect(Collectors.partitioningBy(item -> StringUtils.isNotBlank(Util.null2String(item.get("insid"))))); Map<Boolean, List<Map<String, Object>>> bankOutMap = bankTempOutList.stream().collect(Collectors.partitioningBy(item -> StringUtils.isNotBlank(Util.null2String(item.get("insid")))));
Map<Boolean, List<Map<String, Object>>> bankInMap = bankTempInList.stream().collect(Collectors.partitioningBy(item -> StringUtils.isNotBlank(Util.null2String(item.get("insid"))))); Map<Boolean, List<Map<String, Object>>> bankInMap = bankTempInList.stream().collect(Collectors.partitioningBy(item -> StringUtils.isNotBlank(Util.null2String(item.get("insid")))));

View File

@ -163,6 +163,9 @@ public class HrmSyncSchedule extends CusBaseCronJob {
logEntity.setRequestJson(JSON.toJSONString(requestParam)); logEntity.setRequestJson(JSON.toJSONString(requestParam));
if (syncType == 0) { if (syncType == 0) {
logEntity.setSyncHrm(Util.null2String(syncMap.get("id"))); logEntity.setSyncHrm(Util.null2String(syncMap.get("id")));
if(dataType == 0){
//TODO 判断人员部门是否是末级部门
}
} else { } else {
logEntity.setSyncDepart(Util.null2String(syncMap.get("id"))); logEntity.setSyncDepart(Util.null2String(syncMap.get("id")));
} }