代码更新完善

cert
1178634255 2 years ago
parent 6b06f767d9
commit a7328410ca

@ -1,53 +1,25 @@
package com.glxp.api.controller.purchase;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.pinyin.PinyinUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BusinessType;
import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.auth.CustomerInfoEntity;
import com.glxp.api.entity.basic.BasicCorpEntity;
import com.glxp.api.entity.purchase.CustomerContactEntity;
import com.glxp.api.entity.purchase.SupCertEntity;
import com.glxp.api.entity.purchase.SupCertSetEntity;
import com.glxp.api.entity.purchase.SupCompanyEntity;
import com.glxp.api.exception.JsonException;
import com.glxp.api.req.purchase.FilterCertSetsRequest;
import com.glxp.api.req.purchase.FilterSupCertRequest;
import com.glxp.api.req.purchase.FilterSupCompanyRequest;
import com.glxp.api.req.purchase.SelectCorpBindRequest;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.service.auth.AuthAdminService;
import com.glxp.api.service.auth.CustomerInfoService;
import com.glxp.api.service.basic.BasicCorpService;
import com.glxp.api.service.purchase.CustomerContactService;
import com.glxp.api.service.purchase.SupCertService;
import com.glxp.api.service.purchase.SupCertSetService;
import com.glxp.api.service.purchase.SupCompanyService;
import com.glxp.api.util.CustomUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List;
import java.util.ListIterator;
@RestController
public class SupCompanyController {
@ -59,18 +31,18 @@ public class SupCompanyController {
private AuthAdminService authAdminService;
@Resource
private SupCompanyService companyService;
@Resource
private CustomerContactService customerContactService;
@Resource
private SupCertService supCertService;
@Resource
BasicCorpService basicCorpService;
@Resource
SupCertSetService supCertSetService;
@Resource
SupCompanyService supCompanyService;
@Resource
CustomerInfoService customerInfoService;
// @Resource
// private CustomerContactService customerContactService;
// @Resource
// private SupCertService supCertService;
// @Resource
// BasicCorpService basicCorpService;
// @Resource
// SupCertSetService supCertSetService;
// @Resource
// SupCompanyService supCompanyService;
// @Resource
// CustomerInfoService customerInfoService;
// @Resource
// AuthRoleAdminService authRoleAdminService;

@ -1,37 +0,0 @@
package com.glxp.api.service.auth;
import com.glxp.api.entity.auth.CustomerDetailEntity;
import com.glxp.api.entity.auth.CustomerInfoEntity;
import java.util.List;
public interface CustomerInfoService {
//
// List<CustomerInfoEntity> filterCustomerInfo(CustomerInfoFilterRequest customerInfoFilterRequest);
//
// List<CustomerDetailEntity> filterDetailCustomer(CustomerInfoFilterRequest customerInfoFilterRequest);
boolean insertCustomerInfo(CustomerInfoEntity customerInfoEntity);
boolean updateCustomerInfo(CustomerInfoEntity customerInfoEntity);
boolean modifyCustomerInfo(CustomerDetailEntity customerDetailEntity);
boolean deleteById(String id);
CustomerInfoEntity selectById(String customerId);
boolean isExitRoleId(String roleId);
CustomerDetailEntity selectDetail(String customerId);
/**
* ID
*
* @param customerId
* @return
*/
CustomerInfoEntity findByCustomerId(String customerId);
}

@ -10,21 +10,21 @@ import java.util.List;
public interface SupCompanyService extends IService<SupCompanyEntity> {
SupCompanyEntity findCompanyByUnitFk(String unitFk);
// SupCompanyEntity findCompanyByUnitFk(String unitFk);
List<SupCompanyEntity> filterCompany(FilterSupCompanyRequest companyRequest);
SupCompanyEntity findCompany(String CustomerId);
List<SupCompanyEntity> getSubCompany(FilterSupCompanyRequest commitRequest);
List<SupCompanyEntity> getSubCompany2(FilterSupCompanyRequest commitRequest);
SupCompanyEntity findCompanyByName(String companyName);
boolean modifyCompany(SupCompanyEntity companyEntity);
boolean insertCompany(SupCompanyEntity companyEntity);
boolean deleteCompany(String customerId);
// SupCompanyEntity findCompany(String CustomerId);
//
// List<SupCompanyEntity> getSubCompany(FilterSupCompanyRequest commitRequest);
//
// List<SupCompanyEntity> getSubCompany2(FilterSupCompanyRequest commitRequest);
//
// SupCompanyEntity findCompanyByName(String companyName);
//
// boolean modifyCompany(SupCompanyEntity companyEntity);
//
// boolean insertCompany(SupCompanyEntity companyEntity);
//
// boolean deleteCompany(String customerId);
}

@ -20,16 +20,16 @@ public class SupCompanyServiceImpl extends ServiceImpl<SupCompanyDao,SupCompanyE
@Resource
SupCompanyDao supCompanyDao;
@Override
public SupCompanyEntity findCompanyByUnitFk(String unitFk) {
FilterSupCompanyRequest filterSupCompanyRequest = new FilterSupCompanyRequest();
filterSupCompanyRequest.setUnitIdFk(unitFk);
List<SupCompanyEntity> companyEntities = supCompanyDao.filterCompany(filterSupCompanyRequest);
if (companyEntities != null && companyEntities.size() > 0) {
return companyEntities.get(0);
}
return null;
}
// @Override
// public SupCompanyEntity findCompanyByUnitFk(String unitFk) {
// FilterSupCompanyRequest filterSupCompanyRequest = new FilterSupCompanyRequest();
// filterSupCompanyRequest.setUnitIdFk(unitFk);
// List<SupCompanyEntity> companyEntities = supCompanyDao.filterCompany(filterSupCompanyRequest);
// if (companyEntities != null && companyEntities.size() > 0) {
// return companyEntities.get(0);
// }
// return null;
// }
@Override
public List<SupCompanyEntity> filterCompany(FilterSupCompanyRequest companyRequest) {
@ -43,54 +43,54 @@ public class SupCompanyServiceImpl extends ServiceImpl<SupCompanyDao,SupCompanyE
return supCompanyDao.filterCompany(companyRequest);
}
@Override
public SupCompanyEntity findCompany(String CustomerId) {
return supCompanyDao.findCompany(CustomerId);
}
@Override
public List<SupCompanyEntity> getSubCompany(FilterSupCompanyRequest commitRequest) {
if (commitRequest == null) {
return Collections.emptyList();
}
if (commitRequest.getPage() != null) {
int offset = (commitRequest.getPage() - 1) * commitRequest.getLimit();
PageHelper.offsetPage(offset, commitRequest.getLimit());
}
List<SupCompanyEntity> companyEntities = supCompanyDao.getSubCompany(commitRequest);
return companyEntities;
}
@Override
public List<SupCompanyEntity> getSubCompany2(FilterSupCompanyRequest commitRequest) {
if (commitRequest == null) {
return Collections.emptyList();
}
int offset = (commitRequest.getPage() - 1) * commitRequest.getLimit();
PageHelper.offsetPage(offset, commitRequest.getLimit());
List<SupCompanyEntity> companyEntities = supCompanyDao.getSubCompany2(commitRequest);
return companyEntities;
}
@Override
public SupCompanyEntity findCompanyByName(String companyName) {
return supCompanyDao.findCompanyByName(companyName);
}
@Override
public boolean modifyCompany(SupCompanyEntity companyEntity) {
return supCompanyDao.modifyCompany(companyEntity);
}
@Override
public boolean insertCompany(SupCompanyEntity companyEntity) {
return supCompanyDao.insertCompany(companyEntity);
}
@Override
public boolean deleteCompany(String customerId) {
return supCompanyDao.deleteCompany(customerId);
}
// @Override
// public SupCompanyEntity findCompany(String CustomerId) {
// return supCompanyDao.findCompany(CustomerId);
// }
//
// @Override
// public List<SupCompanyEntity> getSubCompany(FilterSupCompanyRequest commitRequest) {
// if (commitRequest == null) {
// return Collections.emptyList();
// }
// if (commitRequest.getPage() != null) {
// int offset = (commitRequest.getPage() - 1) * commitRequest.getLimit();
// PageHelper.offsetPage(offset, commitRequest.getLimit());
// }
//
// List<SupCompanyEntity> companyEntities = supCompanyDao.getSubCompany(commitRequest);
// return companyEntities;
// }
//
// @Override
// public List<SupCompanyEntity> getSubCompany2(FilterSupCompanyRequest commitRequest) {
// if (commitRequest == null) {
// return Collections.emptyList();
// }
// int offset = (commitRequest.getPage() - 1) * commitRequest.getLimit();
// PageHelper.offsetPage(offset, commitRequest.getLimit());
// List<SupCompanyEntity> companyEntities = supCompanyDao.getSubCompany2(commitRequest);
// return companyEntities;
// }
//
// @Override
// public SupCompanyEntity findCompanyByName(String companyName) {
// return supCompanyDao.findCompanyByName(companyName);
// }
//
// @Override
// public boolean modifyCompany(SupCompanyEntity companyEntity) {
// return supCompanyDao.modifyCompany(companyEntity);
// }
//
// @Override
// public boolean insertCompany(SupCompanyEntity companyEntity) {
// return supCompanyDao.insertCompany(companyEntity);
// }
//
//
// @Override
// public boolean deleteCompany(String customerId) {
// return supCompanyDao.deleteCompany(customerId);
// }
}

Loading…
Cancel
Save