|
|
@ -64,6 +64,9 @@ public class SupplierController {
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private SupplierService supplierService;
|
|
|
|
private SupplierService supplierService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private RedisUtil redisUtil;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -79,15 +82,39 @@ public class SupplierController {
|
|
|
|
//处理id字段转名称,若无需转或者为空可删除
|
|
|
|
//处理id字段转名称,若无需转或者为空可删除
|
|
|
|
for(SupplierMobileEntity entity:list){
|
|
|
|
for(SupplierMobileEntity entity:list){
|
|
|
|
Map<String,Object> companyIdMap = new HashMap<>();
|
|
|
|
Map<String,Object> companyIdMap = new HashMap<>();
|
|
|
|
entity.setCompanyId(generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",entity.getCompanyId(),companyIdMap));
|
|
|
|
String companyIdKey="394016341591396805"+"F_Id"+"F_FullName"+entity.getCompanyId()+companyIdMap;
|
|
|
|
|
|
|
|
String companyId=null;
|
|
|
|
|
|
|
|
if (!redisUtil.exists(companyIdKey)) {
|
|
|
|
|
|
|
|
companyId = generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",entity.getCompanyId(),companyIdMap);
|
|
|
|
|
|
|
|
redisUtil.insert(companyIdKey, companyId,86000);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
companyId = String.valueOf(redisUtil.getString(companyIdKey));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
entity.setCompanyId(companyId);
|
|
|
|
|
|
|
|
String provinceId=null;
|
|
|
|
|
|
|
|
String provinceKey=entity.getProvince();
|
|
|
|
|
|
|
|
if (provinceKey!=null){
|
|
|
|
|
|
|
|
if (!redisUtil.exists(provinceKey)) {
|
|
|
|
|
|
|
|
provinceId = generaterSwapUtil.provinceData(entity.getProvince());
|
|
|
|
|
|
|
|
redisUtil.insert(provinceKey, provinceId,86000);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
provinceId = String.valueOf(redisUtil.getString(provinceKey));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
entity.setProvince(provinceId);
|
|
|
|
|
|
|
|
}else {
|
|
|
|
entity.setProvince(generaterSwapUtil.provinceData(entity.getProvince()));
|
|
|
|
entity.setProvince(generaterSwapUtil.provinceData(entity.getProvince()));
|
|
|
|
entity.setStatus(generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"0"));
|
|
|
|
}
|
|
|
|
|
|
|
|
String statusKey=entity.getStatus() +"1" +"0";
|
|
|
|
|
|
|
|
String statusValue=null;
|
|
|
|
|
|
|
|
if (!redisUtil.exists(statusKey)) {
|
|
|
|
|
|
|
|
statusValue = generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"0");
|
|
|
|
|
|
|
|
redisUtil.insert(statusKey, statusValue,86000);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
statusValue = String.valueOf(redisUtil.getString(statusKey));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
entity.setStatus(statusValue);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<SupplierListVO> listVO=JsonUtil.getJsonToList(list,SupplierListVO.class);
|
|
|
|
List<SupplierListVO> listVO=JsonUtil.getJsonToList(list,SupplierListVO.class);
|
|
|
|
for(SupplierListVO supplierVO:listVO){
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PageListVO vo=new PageListVO();
|
|
|
|
PageListVO vo=new PageListVO();
|
|
|
|
vo.setList(listVO);
|
|
|
|
vo.setList(listVO);
|
|
|
|
PaginationVO page=JsonUtil.getJsonToBean(supplierPagination,PaginationVO.class);
|
|
|
|
PaginationVO page=JsonUtil.getJsonToBean(supplierPagination,PaginationVO.class);
|
|
|
|