代码更新完善

cert
1178634255 2 years ago
parent 6b06f767d9
commit a7328410ca

@ -1,53 +1,25 @@
package com.glxp.api.controller.purchase; 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.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation; 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.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils; 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.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.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.res.PageSimpleResponse;
import com.glxp.api.service.auth.AuthAdminService; 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.basic.BasicCorpService;
import com.glxp.api.service.purchase.CustomerContactService; import com.glxp.api.service.purchase.CustomerContactService;
import com.glxp.api.service.purchase.SupCertService; import com.glxp.api.service.purchase.SupCertService;
import com.glxp.api.service.purchase.SupCertSetService; import com.glxp.api.service.purchase.SupCertSetService;
import com.glxp.api.service.purchase.SupCompanyService; import com.glxp.api.service.purchase.SupCompanyService;
import com.glxp.api.util.CustomUtil;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping; 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.bind.annotation.RestController;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.ListIterator;
@RestController @RestController
public class SupCompanyController { public class SupCompanyController {
@ -59,18 +31,18 @@ public class SupCompanyController {
private AuthAdminService authAdminService; private AuthAdminService authAdminService;
@Resource @Resource
private SupCompanyService companyService; private SupCompanyService companyService;
@Resource // @Resource
private CustomerContactService customerContactService; // private CustomerContactService customerContactService;
@Resource // @Resource
private SupCertService supCertService; // private SupCertService supCertService;
@Resource // @Resource
BasicCorpService basicCorpService; // BasicCorpService basicCorpService;
@Resource // @Resource
SupCertSetService supCertSetService; // SupCertSetService supCertSetService;
@Resource // @Resource
SupCompanyService supCompanyService; // SupCompanyService supCompanyService;
@Resource // @Resource
CustomerInfoService customerInfoService; // CustomerInfoService customerInfoService;
// @Resource // @Resource
// AuthRoleAdminService authRoleAdminService; // 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> { public interface SupCompanyService extends IService<SupCompanyEntity> {
SupCompanyEntity findCompanyByUnitFk(String unitFk); // SupCompanyEntity findCompanyByUnitFk(String unitFk);
List<SupCompanyEntity> filterCompany(FilterSupCompanyRequest companyRequest); List<SupCompanyEntity> filterCompany(FilterSupCompanyRequest companyRequest);
SupCompanyEntity findCompany(String CustomerId); // SupCompanyEntity findCompany(String CustomerId);
//
List<SupCompanyEntity> getSubCompany(FilterSupCompanyRequest commitRequest); // List<SupCompanyEntity> getSubCompany(FilterSupCompanyRequest commitRequest);
//
List<SupCompanyEntity> getSubCompany2(FilterSupCompanyRequest commitRequest); // List<SupCompanyEntity> getSubCompany2(FilterSupCompanyRequest commitRequest);
//
SupCompanyEntity findCompanyByName(String companyName); // SupCompanyEntity findCompanyByName(String companyName);
//
boolean modifyCompany(SupCompanyEntity companyEntity); // boolean modifyCompany(SupCompanyEntity companyEntity);
//
boolean insertCompany(SupCompanyEntity companyEntity); // boolean insertCompany(SupCompanyEntity companyEntity);
//
boolean deleteCompany(String customerId); // boolean deleteCompany(String customerId);
} }

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

Loading…
Cancel
Save