Commit 3fe79752 authored by tianyiming's avatar tianyiming

一码通总览bug修改

parent 67e42fa4
......@@ -699,6 +699,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
Long count = bizJdbcTemplate.queryForObject(countSql, Long.class);
String finalSelectSql = selectSql;
System.out.println(finalSelectSql);
List<Map<String, Object>> mapList = bizJdbcTemplate.queryForList(finalSelectSql);
page.setTotal(count);
page.setRecords(mapList);
......@@ -870,14 +871,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
equipmentCategoryData.setRecDate(new Date());
list.add(equipmentCategoryData);
}
if(ObjectUtils.isEmpty(unitCodes)){
equipmentCategoryDataService.saveOrUpdateBatch(list);
} else {
for (EquipmentCategoryData equipmentCategoryData : list) {
equipmentCategoryDataService.update(equipmentCategoryData,
new QueryWrapper<EquipmentCategoryData>().eq("unit_code", equipmentCategoryData.getUnitCode()).eq("org_branch_code",equipmentCategoryData.getOrgBranchCode()));
}
if(!ObjectUtils.isEmpty(unitCodes)){
equipmentCategoryDataMapper.delete(new QueryWrapper<EquipmentCategoryData>().in("unit_code",unitCodes));
}
equipmentCategoryDataService.saveOrUpdateBatch(list);
stopWatch.stop();
if(log.isInfoEnabled()){
log.info("总览数据刷新结束,耗时:{} 秒",stopWatch.getTotalTimeSeconds());
......@@ -926,13 +923,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
private EquipmentCategoryData updateEquipmentCategoryData(String unitCode,String orgBranchCode) {
private List<EquipmentCategoryData> updateEquipmentCategoryData(String unitCode,String orgBranchCode) {
List<String> unitCodeList = new ArrayList<>();
unitCodeList.add(unitCode);
List<String> orgBranchCodeList = new ArrayList<>();
orgBranchCodeList.add(orgBranchCode);
List<EquipmentCategoryData> equipmentCategoryData = getCategoryData(unitCodeList,orgBranchCodeList);
return equipmentCategoryData.get(0);
List<EquipmentCategoryData> equipmentCategoryData = getCategoryData(unitCodeList,null);
return equipmentCategoryData;
}
@Override
......
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