修复榜单表的客户与供应商的bug

product
chuang 2 years ago
parent 51bf16b40f
commit 53119c2fe2

@ -64,6 +64,9 @@ public class CustomerVOController {
@Autowired
private CustomerService customerService;
@Autowired
private RedisUtil redisUtil;
@ -79,14 +82,30 @@ public class CustomerVOController {
//处理id字段转名称若无需转或者为空可删除
for(CustomerMobileEntity entity:list){
Map<String,Object> orgIdMap = new HashMap<>();
entity.setOrgId(generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",entity.getOrgId(),orgIdMap));
String orgIdKey = "394016341591396805" + "F_Id" + "F_FullName"+entity.getOrgId()+orgIdMap;
String orgId =null;
if (orgIdKey!=null&&!redisUtil.exists(orgIdKey)) {
orgId = generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",entity.getOrgId(),orgIdMap);
redisUtil.insert(orgIdKey, orgId,86000);
} else {
orgId = String.valueOf(redisUtil.getString(orgIdKey));
}
entity.setOrgId(orgId);
String provinceKey = entity.getProvince();
String province=null;
if (provinceKey!=null){
if (!redisUtil.exists(provinceKey)) {
province = generaterSwapUtil.provinceData(entity.getProvince());
redisUtil.insert(provinceKey, province,86000);
} else {
province = String.valueOf(redisUtil.getString(provinceKey));
}
entity.setProvince(province);
}else {
entity.setProvince(generaterSwapUtil.provinceData(entity.getProvince()));
}
}
List<CustomerListVO> listVO=JsonUtil.getJsonToList(list,CustomerListVO.class);
for(CustomerListVO customerVO:listVO){
}
PageListVO vo=new PageListVO();
vo.setList(listVO);
PaginationVO page=JsonUtil.getJsonToBean(customerPagination,PaginationVO.class);

@ -35,7 +35,6 @@ import jnpf.permission.service.AuthorizeService;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.mapper.PoundlistMapper;
import jnpf.poundlist.service.PoundlistService;
import jnpf.purchaseback.entity.PurchasebackEntity;
import jnpf.purchaseorder.entity.*;
import jnpf.purchaseorder.mapper.Purchaseorder_item0Mapper;
import jnpf.purchaseorder.mapper.PurchaseorderitemMapper;
@ -1459,8 +1458,10 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
if (contractMEntities != null && contractMEntities.size() > 0) {
model.setPurchaseId(contractMEntities.get(0).getId());
// 客户id
model.setCustomerId(contractMEntities.get(0).getCode());
// 供应商id
model.setSupplierId(contractMEntities.get(0).getCode());
} else {
model.setCauseError("采购合同不存在!请添加采购合同后尝试添加!");
errList.add(model);
@ -1493,7 +1494,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
if (contractMEntities != null && contractMEntities.size() > 0) {
model.setSalesId(contractMEntities.get(0).getId());
model.setSupplierId(contractMEntities.get(0).getCode());
// 客户
model.setCustomerId(contractMEntities.get(0).getCode());
} else {
model.setCauseError("销售合同不存在!请添加销售合同后尝试添加!");
errList.add(model);

@ -64,6 +64,9 @@ public class SupplierController {
@Autowired
private SupplierService supplierService;
@Autowired
private RedisUtil redisUtil;
@ -79,15 +82,39 @@ public class SupplierController {
//处理id字段转名称若无需转或者为空可删除
for(SupplierMobileEntity entity:list){
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.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);
for(SupplierListVO supplierVO:listVO){
}
PageListVO vo=new PageListVO();
vo.setList(listVO);
PaginationVO page=JsonUtil.getJsonToBean(supplierPagination,PaginationVO.class);

@ -48,7 +48,6 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, SupplierEnt
private SupplierMapper supplierMapper;
@Override
public List<SupplierMobileEntity> getList(SupplierPagination supplierPagination){
String userId=userProvider.get().getUserId();
@ -117,8 +116,6 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, SupplierEnt
}else{
try {
String sidx = supplierPagination.getSidx();
// SupplierEntity supplierEntity = new SupplierEntity();
SupperlierMobileEntitySidex supplierEntity = new SupperlierMobileEntitySidex();
Field declaredField = supplierEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true);

Loading…
Cancel
Save