中繼服務優化

version1
anthonyywj2 3 years ago
parent 0409c47ca6
commit d0b58849f5

@ -1,397 +0,0 @@
package com.glxp.sale.admin.controller.auth;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.glxp.sale.admin.entity.auth.AuthAdmin;
import com.glxp.sale.admin.entity.auth.CustomerContactEntity;
import com.glxp.sale.admin.entity.auth.CustomerInfoEntity;
import com.glxp.sale.admin.entity.auth.UserRegisterEntity;
import com.glxp.sale.admin.entity.info.ApilogEntity;
import com.glxp.sale.admin.entity.info.CompanyEntity;
import com.glxp.sale.admin.entity.info.SetupEntity;
import com.glxp.sale.admin.entity.param.SystemParamConfigEntity;
import com.glxp.sale.admin.req.auth.RegisterCheckRequest;
import com.glxp.sale.admin.req.auth.ResetPasswdRequest;
import com.glxp.sale.admin.req.auth.UserResisterFilterRequest;
import com.glxp.sale.admin.req.info.DeleteRequest;
import com.glxp.sale.admin.req.info.FilterAliCertRequest;
import com.glxp.sale.admin.res.PageSimpleResponse;
import com.glxp.sale.admin.res.auth.CheckCodeRequest;
import com.glxp.sale.admin.service.auth.AuthAdminService;
import com.glxp.sale.admin.service.auth.AuthRoleAdminService;
import com.glxp.sale.admin.service.auth.CustomerInfoService;
import com.glxp.sale.admin.service.auth.UserRegisterService;
import com.glxp.sale.admin.service.auth.impl.CustomerContactService;
import com.glxp.sale.admin.service.info.AliCertService;
import com.glxp.sale.admin.service.info.ApilogService;
import com.glxp.sale.admin.service.info.CompanyService;
import com.glxp.sale.admin.service.info.SetupService;
import com.glxp.sale.admin.service.param.SystemParamConfigService;
import com.glxp.sale.admin.util.DateUtil;
import com.glxp.sale.admin.util.UuidUtils;
import com.glxp.sale.common.enums.ResultEnum;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@Slf4j
public class RegisterController {
private static String Url = "http://106.ihuyi.com/webservice/sms.php?method=Submit";
@Resource
UserRegisterService userRegisterService;
@Resource
private AuthRoleAdminService authRoleAdminService;
@Resource
private AuthAdminService authAdminService;
@Resource
private CustomerInfoService customerInfoService;
@Resource
private CustomerContactService customerContactService;
@Resource
private SetupService setupService;
@Resource
private CompanyService companyService;
@Resource
private AliCertService aliCertService;
@Resource
ApilogService apilogService;
@Resource
private SystemParamConfigService systemParamConfigService;
@GetMapping("salewarehouse/register/list")
public BaseResponse filterList(UserResisterFilterRequest userResisterFilterRequest) {
List<UserRegisterEntity> userRegisterEntities = userRegisterService.filterUserRegisters(userResisterFilterRequest);
PageInfo<UserRegisterEntity> pageInfo;
pageInfo = new PageInfo<>(userRegisterEntities);
PageSimpleResponse<UserRegisterEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(userRegisterEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
@PostMapping("salewarehouse/register/getCheckcode")
public BaseResponse getCheckcode(@RequestBody CheckCodeRequest checkCodeRequest, HttpSession httpSession) {
if (checkCodeRequest.getUserName() != null) {
AuthAdmin authAdmin = authAdminService.findByUserName(checkCodeRequest.getUserName());
if (authAdmin == null) {
return ResultVOUtils.error(500, "未找到该用户");
}
UserRegisterEntity userRegisterEntity = userRegisterService.selectByCustomerId(Long.valueOf(String.valueOf(authAdmin.getCustomerId())));
if (!userRegisterEntity.getMobile().equals(checkCodeRequest.getPhoneNum())) {
return ResultVOUtils.error(500, "手机号与注册时不一致");
}
}
RestTemplate restTemplate = new RestTemplate();
int mobile_code = (int) ((Math.random() * 9 + 1) * 100000);
MultiValueMap<String, Object> postParameters = new LinkedMultiValueMap<>();
int time = 5;
String content = new String("您正在进行手机验证,验证码是" + mobile_code + "" + time + "分钟内有效。");
postParameters.add("account", "C07086222");
postParameters.add("password", "2dddbbf73636c193c5903324bdb47c5c");
postParameters.add("mobile", checkCodeRequest.getPhoneNum());
postParameters.add("content", content);
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Type", "application/x-www-form-urlencoded;charset=GBK");
HttpEntity<MultiValueMap<String, Object>> httpEntity = new HttpEntity<>(postParameters, headers);
String response = restTemplate.postForObject(Url, httpEntity, String.class);
if (response.contains("提交成功")) {
JSONObject json = new JSONObject();
json.put("memPhone", checkCodeRequest.getPhoneNum());
json.put("code", mobile_code);
json.put("createTime", System.currentTimeMillis());
// 将认证码存入SESSION
httpSession.setAttribute("code", json);
log.info(httpSession.getId() + "---" + httpSession);
return ResultVOUtils.success("发送成功" + " " + mobile_code);
} else
return ResultVOUtils.error(500, "验证码发送失败");
}
@GetMapping("salewarehouse/register/getRegisterConfig")
public BaseResponse getRegisterConfig() {
Map<String, Object> rMap = new HashMap<>();
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("register_company_check");
if (systemParamConfigEntity == null
|| StringUtils.isBlank(systemParamConfigEntity.getParamValue())
|| systemParamConfigEntity.getParamValue().equals("0")) {
rMap.put("companyCheckStatus", false);
} else {
rMap.put("companyCheckStatus", true);
}
return ResultVOUtils.success(rMap);
}
@PostMapping("salewarehouse/register/deleteResiter")
public BaseResponse deleteResiter(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
String id = deleteRequest.getId();
userRegisterService.deleteById(Long.parseLong(id));
return ResultVOUtils.success("删除成功");
}
@PostMapping("salewarehouse/register/update")
public BaseResponse updateRegister(@RequestBody @Valid UserRegisterEntity userRegisterEntity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
boolean b = userRegisterService.updateUserRegister(userRegisterEntity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success("添加成功");
}
@PostMapping("salewarehouse/register/save")
public BaseResponse saveRegister(@RequestBody @Valid UserRegisterEntity userRegisterEntity, HttpSession httpSession,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
log.info(httpSession.getId());
JSONObject userCode = (JSONObject) httpSession.getAttribute("code");
if (userCode == null) {
return ResultVOUtils.error(500, "验证码已失效,请重新获取");
}
long lastTime = userCode.getLong("createTime");
int checkCode = (Integer) userCode.get("code");
String phoneNum = userCode.getString("memPhone");
if ((System.currentTimeMillis() - lastTime) > 1000 * 60 * 5) {
return ResultVOUtils.error(500, "验证码已过期,请重新获取");
}
if (checkCode != userRegisterEntity.getCheckCode()) {
return ResultVOUtils.error(500, "验证码错误,请重新获取");
}
if (!phoneNum.equals(userRegisterEntity.getMobile())) {
return ResultVOUtils.error(500, "手机号与获取验证码不一致");
}
boolean isExitPhone = userRegisterService.isExit(userRegisterEntity.getMobile());
if (isExitPhone) {
return ResultVOUtils.error(500, "该手机号已被注册");
}
userRegisterEntity.setRegisterTime(DateUtil.getDateTime());
userRegisterEntity.setCheckType(0);//未审核
String userName = UuidUtils.getShortUuid(4);
switch (userRegisterEntity.getBussinessStatus()) {
case 1:
userName = "YY" + userName;
break;
case 2:
userName = "JYQY" + userName;
break;
default:
userName = "JYQY" + userName;
break;
}
userRegisterEntity.setUserName(userName);
boolean b = userRegisterService.insertUserRegister(userRegisterEntity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success(userRegisterEntity.getUserName());
}
@PostMapping("salewarehouse/reset/passwd")
public BaseResponse resetPasswd(@RequestBody @Valid ResetPasswdRequest resetPasswdRequest, HttpSession httpSession,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
log.info(httpSession.getId());
JSONObject userCode = (JSONObject) httpSession.getAttribute("code");
if (userCode == null) {
return ResultVOUtils.error(500, "验证码已失效,请重新获取");
}
long lastTime = userCode.getLong("createTime");
int checkCode = (Integer) userCode.get("code");
String phoneNum = userCode.getString("memPhone");
if ((System.currentTimeMillis() - lastTime) > 1000 * 60 * 5) {
return ResultVOUtils.error(500, "验证码已过期,请重新获取");
}
if (checkCode != resetPasswdRequest.getCheckCode()) {
return ResultVOUtils.error(500, "验证码错误,请重新获取");
}
if (!phoneNum.equals(resetPasswdRequest.getMobile())) {
return ResultVOUtils.error(500, "手机号与获取验证码不一致");
}
AuthAdmin authAdmin = authAdminService.findByUserName(resetPasswdRequest.getUserName());
if (authAdmin == null) {
return ResultVOUtils.error(500, "该用户不存在");
}
CustomerContactEntity customerContactEntity = customerContactService.selectById(Long.valueOf(String.valueOf(authAdmin.getCustomerId())));
if (customerContactEntity != null && customerContactEntity.getMobile().equals(phoneNum)) {
authAdmin.setPassWord(resetPasswdRequest.getPassword());
authAdminService.updateAuthAdmin(authAdmin);
} else {
return ResultVOUtils.error(500, "手机号与该用户不匹配");
}
// if (!b) {
// return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
// }
return ResultVOUtils.success("密码修改成功");
}
@PostMapping("salewarehouse/register/check")
public BaseResponse checkRegister(@RequestBody @Valid RegisterCheckRequest registerCheckRequest,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
long userId = generateUserId();
if (StringUtils.isNotBlank(registerCheckRequest.getCompanyName())) {
UserRegisterEntity userRegisterEntity = new UserRegisterEntity();
userRegisterEntity.setId(registerCheckRequest.getId());
userRegisterEntity.setCompanyId(registerCheckRequest.getCompanyId());
userRegisterEntity.setCompanyName(registerCheckRequest.getCompanyName());
userRegisterService.updateUserRegister(userRegisterEntity);
}
UserRegisterEntity userRegisterEntity = userRegisterService.selectById(registerCheckRequest.getId());
userRegisterEntity.setCheckType(registerCheckRequest.getCheckType());
userRegisterEntity.setCheckTime(DateUtil.getDateTime());
userRegisterEntity.setUserId(userId + "");
boolean b = userRegisterService.updateUserRegister(userRegisterEntity);
if (registerCheckRequest.getCheckType() != 1) {
return ResultVOUtils.success("修改成功");
}
//创建新用户
AuthAdmin authAdmin = new AuthAdmin();
// authAdmin.setCustomerId(Integer.valueOf(String.valueOf(userId)));
authAdmin.setCustomerId(userId);
authAdmin.setPassWord(userRegisterEntity.getPassword());
authAdmin.setCreateTime(DateUtil.parseDate(userRegisterEntity.getCheckTime()));
authAdmin.setUserName(userRegisterEntity.getUserName()); //用手机号当用户名,通过手机号登录
authAdmin.setEmployeeName(userRegisterEntity.getNickName());
authAdmin.setUserFlag(1);
authAdminService.insertAuthAdmin(authAdmin);
authAdmin = authAdminService.findByUserName(authAdmin.getUserName());
//分配角色
// List<Long> roles = new ArrayList<>();
// roles.add(Long.valueOf(13));//默认角色
//生产客户信息表
CustomerInfoEntity customerInfoEntity = new CustomerInfoEntity();
// customerInfoEntity.setCustomerId(Long.valueOf(String.valueOf(authAdmin.getCustomerId())));
customerInfoEntity.setCustomerId(userId);
customerInfoEntity.setArea(userRegisterEntity.getArea());
customerInfoEntity.setDetailAddr(userRegisterEntity.getDetailAddr());
customerInfoEntity.setBussinessStatus(userRegisterEntity.getBussinessStatus());
customerInfoEntity.setCreditNum(userRegisterEntity.getCreditNum());
customerInfoEntity.setCustomerName(userRegisterEntity.getNickName());
customerInfoEntity.setUserFlag(1);
customerInfoEntity.setUserMax(2);
customerInfoEntity.setRoleId(registerCheckRequest.getRoles() + "");
customerInfoEntity.setCompanyName(userRegisterEntity.getCompanyName());
List<Long> roles = new ArrayList<>();
if (registerCheckRequest.getRoles() != null) {
roles.add(registerCheckRequest.getRoles());
authRoleAdminService.insertRolesAdminIdAll(roles, authAdmin.getId());
}
customerInfoService.insertCustomerInfo(customerInfoEntity);
//生产客户信息联系人表
CustomerContactEntity customerContactEntity = new CustomerContactEntity();
customerContactEntity.setContacts(userRegisterEntity.getRealName());
customerContactEntity.setCustomerId(userId);
customerContactEntity.setEmail(userRegisterEntity.getEmail());
customerContactEntity.setMobile(userRegisterEntity.getMobile());
customerContactEntity.setTel(userRegisterEntity.getTel());
customerContactService.insertCustomerContact(customerContactEntity);
//生产本企业信息
CompanyEntity companyEntity = new CompanyEntity();
companyEntity.setCustomerId(userId);
companyEntity.setArea(userRegisterEntity.getArea());
companyEntity.setAreaCode(userRegisterEntity.getAreaCode());
companyEntity.setDetailAddr(userRegisterEntity.getDetailAddr());
companyEntity.setContacts(customerContactEntity.getContacts());
companyEntity.setEmail(userRegisterEntity.getEmail());
companyEntity.setMobile(userRegisterEntity.getMobile());
companyEntity.setTel(userRegisterEntity.getTel());
companyEntity.setCompanyName(userRegisterEntity.getCompanyName());
companyEntity.setUnitIdFk(userRegisterEntity.getCompanyId());
companyEntity.setClasses(userRegisterEntity.getBussinessStatus() + "");
companyEntity.setBussinessStatus(userRegisterEntity.getBussinessStatus());
companyEntity.setCreditNum(userRegisterEntity.getCreditNum());
FilterAliCertRequest filterAliCertRequest = new FilterAliCertRequest();
filterAliCertRequest.setId(registerCheckRequest.getAliCertId());
companyService.insertCompany(companyEntity);//TODO !!!!!!!!!!!
//生产用户配置表
SetupEntity setupEntity = new SetupEntity();
setupEntity.setCheckStock(true);
setupEntity.setCheckUpbill(true);
setupEntity.setCheckRepeat(true);
setupEntity.setDownloadRelation(true);
setupEntity.setUploadTime(24);
setupEntity.setCustomerId(userId + "");
setupService.insertSetup(setupEntity);
//生产接口调用日志
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(userId + "");
apilogEntity.setLsyd_query_getentinfo(1);
apilogService.insertApilog(apilogEntity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success("添加成功");
}
public long generateUserId() {
String userId = System.currentTimeMillis() + "";
userId = userId.substring(1, userId.length());
int max = 100, min = 1;
int ran2 = (int) (Math.random() * (max - min) + min);
userId = userId + ran2;
return Long.parseLong(userId);
}
}

@ -1,110 +0,0 @@
package com.glxp.sale.admin.controller.info;
import com.github.pagehelper.PageInfo;
import com.glxp.sale.admin.entity.auth.AuthAdmin;
import com.glxp.sale.admin.entity.info.CompanyCertEntity;
import com.glxp.sale.admin.exception.JsonException;
import com.glxp.sale.admin.req.info.CompanyRequest;
import com.glxp.sale.admin.req.info.DeleteCompanyFileRequest;
import com.glxp.sale.admin.req.info.DeleteRequest;
import com.glxp.sale.admin.req.info.FilterCompanyCertRequest;
import com.glxp.sale.admin.res.PageSimpleResponse;
import com.glxp.sale.admin.service.auth.AuthAdminService;
import com.glxp.sale.admin.service.info.CompanyCertService;
import com.glxp.sale.common.enums.ResultEnum;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
import org.springframework.validation.BindingResult;
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.io.File;
import java.util.Date;
import java.util.List;
@RestController
public class CompanyCertController {
@Resource
private AuthAdminService authAdminService;
@Resource
private CompanyCertService companyCertService;
@GetMapping("/sale/info/company/cert/filter")
public BaseResponse filterCompanyCert(FilterCompanyCertRequest filterCompanyCertRequest,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
List<CompanyCertEntity> companyCertEntityList
= companyCertService.filterCompanyCert(filterCompanyCertRequest);
PageInfo<CompanyCertEntity> pageInfo;
pageInfo = new PageInfo<>(companyCertEntityList);
PageSimpleResponse<CompanyCertEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(companyCertEntityList);
return ResultVOUtils.success(pageSimpleResponse);
}
@GetMapping("/sale/info/companyCert")
public BaseResponse getCompanyCertInfo(CompanyRequest companyRequest) {
CompanyCertEntity companyCertEntity = companyCertService.findCompanyCert(companyRequest.getCustomerId());
if (companyCertEntity != null) {
return ResultVOUtils.success(companyCertEntity);
}
return ResultVOUtils.error(500, "空");
}
@GetMapping("/sale/info/getCompanyCert")
public BaseResponse getCompanyCert(FilterCompanyCertRequest filterCompanyCertRequest) {
filterCompanyCertRequest.setCustomerId(getCustomerId());
List<CompanyCertEntity> companyCertEntities = companyCertService.getCompanyCert(filterCompanyCertRequest);
PageInfo<CompanyCertEntity> pageInfo = new PageInfo<>(companyCertEntities);
PageSimpleResponse<CompanyCertEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(companyCertEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
@PostMapping("/sale/info/insertCompanyCert")
public BaseResponse insertCompanyCert(@RequestBody CompanyCertEntity companyCertEntity) {
companyCertEntity.setCreate_time(new Date());
companyCertEntity.setUpdate_time(new Date());
boolean b = companyCertService.insertCompanyCert(companyCertEntity);
return ResultVOUtils.success("成功");
}
@PostMapping("/sale/info/updateCompanyCert")
public BaseResponse updateCompanyCert(@RequestBody CompanyCertEntity companyCertEntity) {
boolean b = companyCertService.updateCompanyCert(companyCertEntity);
return ResultVOUtils.success("修改成功");
}
@PostMapping("/sale/info/deleteCompanyCert")
public BaseResponse deleteCompanyCert(@RequestBody DeleteCompanyFileRequest deleteCompanyFileRequest, BindingResult bindingResult) {
boolean b = companyCertService.deleteById(deleteCompanyFileRequest.getId());
String URL="d:/1s/udiwms/register/file/image2/" + deleteCompanyFileRequest.getFilePath();
File file=new File(URL);
if(file.exists()&&file.isFile()) {
file.delete();
}
return ResultVOUtils.success("成功");
}
public String getCustomerId() {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
if (attributes == null) {
throw new JsonException(ResultEnum.NOT_NETWORK);
}
HttpServletRequest request = attributes.getRequest();
String userId = request.getHeader("ADMIN_ID");
AuthAdmin authAdmin = authAdminService.findById(Long.parseLong(userId));
return authAdmin.getCustomerId() + "";
}
}

@ -12,7 +12,6 @@ import com.glxp.sale.admin.res.PageSimpleResponse;
import com.glxp.sale.admin.service.auth.AuthAdminService;
import com.glxp.sale.admin.service.auth.impl.CustomerContactService;
import com.glxp.sale.admin.service.info.CompanyService;
import com.glxp.sale.admin.service.info.CompanyUpdateLogService;
import com.glxp.sale.common.enums.ResultEnum;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
@ -38,8 +37,6 @@ public class CompanyController {
private CompanyService companyService;
@Resource
CustomerContactService customerContactService;
@Resource
private CompanyUpdateLogService companyUpdateLogService;
@GetMapping("/warehouse/info/company")
public BaseResponse getCompanyInfo(CompanyRequest companyRequest) {
@ -139,7 +136,6 @@ public class CompanyController {
} else {
companyUpdateLogEntity.setStatus("3");
}
companyUpdateLogService.insertCompanyUpdateLog(companyUpdateLogEntity);
}
boolean b = companyService.modifyCompany(companyEntity);
CustomerContactEntity customerContactEntity = new CustomerContactEntity();

@ -1,141 +0,0 @@
package com.glxp.sale.admin.controller.info;
import com.github.pagehelper.PageInfo;
import com.glxp.sale.admin.entity.auth.AuthAdmin;
import com.glxp.sale.admin.entity.info.CompanySalesmanEntity;
import com.glxp.sale.admin.exception.JsonException;
import com.glxp.sale.admin.req.info.CompanyRequest;
import com.glxp.sale.admin.req.info.DeleteCompanyFileRequest;
import com.glxp.sale.admin.req.info.FilterCompanySalesmanRequest;
import com.glxp.sale.admin.res.PageSimpleResponse;
import com.glxp.sale.admin.service.auth.AuthAdminService;
import com.glxp.sale.admin.service.info.CompanySalesmanService;
import com.glxp.sale.common.enums.ResultEnum;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.validation.BindingResult;
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.io.File;
import java.util.Date;
import java.util.List;
@RestController
public class CompanySalesmanController {
@Resource
private AuthAdminService authAdminService;
@Resource
private CompanySalesmanService companySalesmanService;
@GetMapping("/sale/info/company/salesman/filter")
public BaseResponse filterCompanySalesman(FilterCompanySalesmanRequest filterCompanySalesmanRequest,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
List<CompanySalesmanEntity> companySalesmanEntityList
= companySalesmanService.filterCompanySalesman(filterCompanySalesmanRequest);
PageInfo<CompanySalesmanEntity> pageInfo;
pageInfo = new PageInfo<>(companySalesmanEntityList);
PageSimpleResponse<CompanySalesmanEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(companySalesmanEntityList);
return ResultVOUtils.success(pageSimpleResponse);
}
@GetMapping("/sale/info/companySalesman")
public BaseResponse getCompanySalesmanInfo(CompanyRequest companyRequest) {
CompanySalesmanEntity companySalesmanEntity = companySalesmanService.findCompanySalesman(companyRequest.getCustomerId());
if (companySalesmanEntity != null) {
return ResultVOUtils.success(companySalesmanEntity);
}
return ResultVOUtils.error(500, "空");
}
@GetMapping("/sale/info/getCompanySalesman")
public BaseResponse getCompanySalesman(FilterCompanySalesmanRequest filterCompanySalesmanRequest) {
filterCompanySalesmanRequest.setCustomerId(getCustomerId());
List<CompanySalesmanEntity> companySalesmanEntities = companySalesmanService.getCompanySalesman(filterCompanySalesmanRequest);
PageInfo<CompanySalesmanEntity> pageInfo = new PageInfo<>(companySalesmanEntities);
PageSimpleResponse<CompanySalesmanEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(companySalesmanEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
@PostMapping("/sale/info/insertCompanySalesman")
public BaseResponse insertCompanySalesman(@RequestBody CompanySalesmanEntity companySalesmanEntity) {
companySalesmanEntity.setCreate_time(new Date());
companySalesmanEntity.setUpdate_time(new Date());
companySalesmanEntity.setAuditStatus("3");
boolean b = companySalesmanService.insertCompanySalesman(companySalesmanEntity);
return ResultVOUtils.success("成功");
}
@PostMapping("/sale/info/updateCompanySalesman")
public BaseResponse updateCompanySalesman(@RequestBody CompanySalesmanEntity companySalesmanEntity) {
companySalesmanEntity.setUpdate_time(new Date());
if (StringUtils.isNotBlank(companySalesmanEntity.getNewFilePath())) {
if (StringUtils.isNotBlank(companySalesmanEntity.getFilePath())) {
String URL="d:/1s/udiwms/register/file/image5/" + companySalesmanEntity.getFilePath();
File file=new File(URL);
if(file.exists()&&file.isFile()) {
file.delete();
}
}
companySalesmanEntity.setFilePath(companySalesmanEntity.getNewFilePath());
}
if (StringUtils.isNotBlank(companySalesmanEntity.getNewFilePath2())) {
if (StringUtils.isNotBlank(companySalesmanEntity.getFilePath2())) {
String URL="d:/1s/udiwms/register/file/image5/" + companySalesmanEntity.getFilePath2();
File file=new File(URL);
if(file.exists()&&file.isFile()) {
file.delete();
}
}
companySalesmanEntity.setFilePath2(companySalesmanEntity.getNewFilePath2());
}
companySalesmanEntity.setAuditStatus("4");
boolean b = companySalesmanService.updateCompanySalesman(companySalesmanEntity);
return ResultVOUtils.success("修改成功");
}
@PostMapping("/sale/info/deleteCompanySalesman")
public BaseResponse deleteCompanySalesman(@RequestBody DeleteCompanyFileRequest deleteCompanyFileRequest, BindingResult bindingResult) {
boolean b = companySalesmanService.deleteById(deleteCompanyFileRequest.getId());
if (StringUtils.isNotBlank(deleteCompanyFileRequest.getFilePath())) {
String URL="d:/1s/udiwms/register/file/image5/" + deleteCompanyFileRequest.getFilePath();
File file=new File(URL);
if(file.exists()&&file.isFile()) {
file.delete();
}
}
if (StringUtils.isNotBlank(deleteCompanyFileRequest.getFilePath2())) {
String URL="d:/1s/udiwms/register/file/image5/" + deleteCompanyFileRequest.getFilePath2();
File file=new File(URL);
if(file.exists()&&file.isFile()) {
file.delete();
}
}
return ResultVOUtils.success("成功");
}
public String getCustomerId() {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
if (attributes == null) {
throw new JsonException(ResultEnum.NOT_NETWORK);
}
HttpServletRequest request = attributes.getRequest();
String userId = request.getHeader("ADMIN_ID");
AuthAdmin authAdmin = authAdminService.findById(Long.parseLong(userId));
return authAdmin.getCustomerId() + "";
}
}

@ -1,138 +0,0 @@
package com.glxp.sale.admin.controller.info;
import com.github.pagehelper.PageInfo;
import com.glxp.sale.admin.entity.auth.AuthAdmin;
import com.glxp.sale.admin.entity.info.CompanySalesmanEntity;
import com.glxp.sale.admin.entity.info.CompanySalesmanUpdateLogEntity;
import com.glxp.sale.admin.exception.JsonException;
import com.glxp.sale.admin.req.info.CompanyRequest;
import com.glxp.sale.admin.req.info.DeleteCompanyFileRequest;
import com.glxp.sale.admin.req.info.FilterCompanySalesmanUpdateLogRequest;
import com.glxp.sale.admin.res.PageSimpleResponse;
import com.glxp.sale.admin.service.auth.AuthAdminService;
import com.glxp.sale.admin.service.info.CompanySalesmanService;
import com.glxp.sale.admin.service.info.CompanySalesmanUpdateLogService;
import com.glxp.sale.common.enums.ResultEnum;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.validation.BindingResult;
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.io.File;
import java.util.Date;
import java.util.List;
@RestController
public class CompanySalesmanUpdateLogController {
@Resource
private AuthAdminService authAdminService;
@Resource
private CompanySalesmanUpdateLogService companySalesmanUpdateLogService;
@Resource
private CompanySalesmanService companySalesmanService;
@GetMapping("/sale/info/company/salesman/update/log/filter")
public BaseResponse filterCompanySalesmanUpdateLog(FilterCompanySalesmanUpdateLogRequest filterCompanySalesmanUpdateLogRequest,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
List<CompanySalesmanUpdateLogEntity> companySalesmanUpdateLogEntityList
= companySalesmanUpdateLogService.filterCompanySalesmanUpdateLog(filterCompanySalesmanUpdateLogRequest);
PageInfo<CompanySalesmanUpdateLogEntity> pageInfo;
pageInfo = new PageInfo<>(companySalesmanUpdateLogEntityList);
PageSimpleResponse<CompanySalesmanUpdateLogEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(companySalesmanUpdateLogEntityList);
return ResultVOUtils.success(pageSimpleResponse);
}
@GetMapping("/sale/info/companySalesmanUpdateLog")
public BaseResponse getCompanySalesmanUpdateLogInfo(CompanyRequest companyRequest) {
CompanySalesmanUpdateLogEntity companySalesmanUpdateLogEntity = companySalesmanUpdateLogService.findCompanySalesmanUpdateLog(companyRequest.getCustomerId());
if (companySalesmanUpdateLogEntity != null) {
return ResultVOUtils.success(companySalesmanUpdateLogEntity);
}
return ResultVOUtils.error(500, "空");
}
@GetMapping("/sale/info/getCompanySalesmanUpdateLog")
public BaseResponse getCompanySalesmanUpdateLog(FilterCompanySalesmanUpdateLogRequest filterCompanySalesmanUpdateLogRequest) {
filterCompanySalesmanUpdateLogRequest.setCustomerId(getCustomerId());
List<CompanySalesmanUpdateLogEntity> companySalesmanUpdateLogEntities = companySalesmanUpdateLogService.getCompanySalesmanUpdateLog(filterCompanySalesmanUpdateLogRequest);
PageInfo<CompanySalesmanUpdateLogEntity> pageInfo = new PageInfo<>(companySalesmanUpdateLogEntities);
PageSimpleResponse<CompanySalesmanUpdateLogEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(companySalesmanUpdateLogEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
@PostMapping("/sale/info/insertCompanySalesmanUpdateLog")
public BaseResponse insertCompanySalesmanUpdateLog(@RequestBody CompanySalesmanUpdateLogEntity companySalesmanUpdateLogEntity) {
CompanySalesmanEntity companySalesmanEntity = new CompanySalesmanEntity();
companySalesmanEntity.setId(Integer.parseInt(String.valueOf(companySalesmanUpdateLogEntity.getSalesmanId())));
companySalesmanEntity.setAuditStatus("4");
companySalesmanEntity.setUpdate_time(new Date());
companySalesmanService.updateCompanySalesman(companySalesmanEntity);
companySalesmanUpdateLogEntity.setCreate_time(new Date());
companySalesmanUpdateLogEntity.setStatus("1");
companySalesmanUpdateLogEntity.setLogType("2");//变更审核
boolean b = companySalesmanUpdateLogService.insertCompanySalesmanUpdateLog(companySalesmanUpdateLogEntity);
return ResultVOUtils.success("成功");
}
@PostMapping("/sale/info/updateCompanySalesmanUpdateLog")
public BaseResponse updateCompanySalesmanUpdateLog(@RequestBody CompanySalesmanUpdateLogEntity companySalesmanUpdateLogEntity) {
CompanySalesmanEntity companySalesmanEntity = new CompanySalesmanEntity();
companySalesmanEntity.setId(Integer.parseInt(String.valueOf(companySalesmanUpdateLogEntity.getSalesmanId())));
String auditStatus = "";
if (companySalesmanUpdateLogEntity.getStatus().equals("2")) {
auditStatus = "3";
} else if (companySalesmanUpdateLogEntity.getStatus().equals("3")) {
auditStatus = "5";
}
companySalesmanEntity.setAuditStatus(auditStatus);
companySalesmanEntity.setUpdate_time(new Date());
companySalesmanService.updateCompanySalesman(companySalesmanEntity);
companySalesmanUpdateLogEntity.setUpdate_time(new Date());
FilterCompanySalesmanUpdateLogRequest filterCompanySalesmanUpdateLogRequest = new FilterCompanySalesmanUpdateLogRequest();
filterCompanySalesmanUpdateLogRequest.setPage(1);
filterCompanySalesmanUpdateLogRequest.setLimit(1);
filterCompanySalesmanUpdateLogRequest.setCustomerId(String.valueOf(companySalesmanUpdateLogEntity.getCustomerId()));
filterCompanySalesmanUpdateLogRequest.setSalesmanId(String.valueOf(companySalesmanUpdateLogEntity.getSalesmanId()));
List<CompanySalesmanUpdateLogEntity> companySalesmanUpdateLogEntities =
companySalesmanUpdateLogService.filterCompanySalesmanUpdateLog(filterCompanySalesmanUpdateLogRequest);
if (companySalesmanUpdateLogEntities.size() > 0) {
CompanySalesmanUpdateLogEntity tCompanySalesmanUpdateLogEntity = companySalesmanUpdateLogEntities.get(0);
companySalesmanUpdateLogEntity.setId(tCompanySalesmanUpdateLogEntity.getId());
}
boolean b = companySalesmanUpdateLogService.updateCompanySalesmanUpdateLog(companySalesmanUpdateLogEntity);
return ResultVOUtils.success("成功");
}
@PostMapping("/sale/info/deleteCompanySalesmanUpdateLog")
public BaseResponse deleteCompanySalesmanUpdateLog(@RequestBody DeleteCompanyFileRequest deleteCompanyFileRequest, BindingResult bindingResult) {
boolean b = companySalesmanUpdateLogService.deleteById(deleteCompanyFileRequest.getId());
return ResultVOUtils.success("成功");
}
public String getCustomerId() {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
if (attributes == null) {
throw new JsonException(ResultEnum.NOT_NETWORK);
}
HttpServletRequest request = attributes.getRequest();
String userId = request.getHeader("ADMIN_ID");
AuthAdmin authAdmin = authAdminService.findById(Long.parseLong(userId));
return authAdmin.getCustomerId() + "";
}
}

@ -1,202 +0,0 @@
package com.glxp.sale.admin.controller.info;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.glxp.sale.admin.entity.auth.AuthAdmin;
import com.glxp.sale.admin.entity.auth.CustomerContactEntity;
import com.glxp.sale.admin.entity.info.CompanyEntity;
import com.glxp.sale.admin.entity.info.CompanySalesmanEntity;
import com.glxp.sale.admin.entity.info.CompanyUpdateLogEntity;
import com.glxp.sale.admin.exception.JsonException;
import com.glxp.sale.admin.req.info.CompanyRequest;
import com.glxp.sale.admin.req.info.DeleteCompanyFileRequest;
import com.glxp.sale.admin.req.info.FilterCompanyUpdateLogRequest;
import com.glxp.sale.admin.res.PageSimpleResponse;
import com.glxp.sale.admin.service.auth.AuthAdminService;
import com.glxp.sale.admin.service.info.CompanySalesmanService;
import com.glxp.sale.admin.service.info.CompanyService;
import com.glxp.sale.admin.service.info.CompanyUpdateLogService;
import com.glxp.sale.common.enums.ResultEnum;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.validation.BindingResult;
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.io.File;
import java.util.Date;
import java.util.List;
@RestController
public class CompanyUpdateLogController {
@Resource
private AuthAdminService authAdminService;
@Resource
private CompanyUpdateLogService companyUpdateLogService;
@Resource
private CompanySalesmanService companySalesmanService;
@Resource
private CompanyService companyService;
@GetMapping("/sale/info/company/update/log/filter")
public BaseResponse filterCompanyUpdateLog(FilterCompanyUpdateLogRequest filterCompanyUpdateLogRequest,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
if (StringUtils.isBlank(filterCompanyUpdateLogRequest.getCustomerId())) {
filterCompanyUpdateLogRequest.setNoStatus("-1");
}
List<CompanyUpdateLogEntity> companyUpdateLogEntityList
= companyUpdateLogService.filterCompanyUpdateLog(filterCompanyUpdateLogRequest);
PageInfo<CompanyUpdateLogEntity> pageInfo;
pageInfo = new PageInfo<>(companyUpdateLogEntityList);
PageSimpleResponse<CompanyUpdateLogEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(companyUpdateLogEntityList);
return ResultVOUtils.success(pageSimpleResponse);
}
@GetMapping("/sale/info/companyUpdateLog")
public BaseResponse getCompanyUpdateLogInfo(CompanyRequest companyRequest) {
CompanyUpdateLogEntity companyUpdateLogEntity = companyUpdateLogService.findCompanyUpdateLog(companyRequest.getCustomerId());
if (companyUpdateLogEntity != null) {
return ResultVOUtils.success(companyUpdateLogEntity);
}
return ResultVOUtils.error(500, "空");
}
@GetMapping("/sale/info/getCompanyUpdateLog")
public BaseResponse getCompanyUpdateLog(FilterCompanyUpdateLogRequest filterCompanyUpdateLogRequest) {
filterCompanyUpdateLogRequest.setCustomerId(getCustomerId());
List<CompanyUpdateLogEntity> companyUpdateLogEntities = companyUpdateLogService.getCompanyUpdateLog(filterCompanyUpdateLogRequest);
PageInfo<CompanyUpdateLogEntity> pageInfo = new PageInfo<>(companyUpdateLogEntities);
PageSimpleResponse<CompanyUpdateLogEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(companyUpdateLogEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
@GetMapping("/sale/info/getCompanyUpdateLogOne")
public BaseResponse getCompanyUpdateLogOne(FilterCompanyUpdateLogRequest filterCompanyUpdateLogRequest) {
filterCompanyUpdateLogRequest.setCustomerId(getCustomerId());
filterCompanyUpdateLogRequest.setPage(1);
filterCompanyUpdateLogRequest.setLimit(1);
List<CompanyUpdateLogEntity> companyUpdateLogEntities = companyUpdateLogService.filterCompanyUpdateLog(filterCompanyUpdateLogRequest);
if (companyUpdateLogEntities.size() > 0) {
CompanyUpdateLogEntity companyUpdateLogEntity = companyUpdateLogEntities.get(0);
return ResultVOUtils.success(companyUpdateLogEntity);
}
return ResultVOUtils.error(ResultEnum.DATA_NOT);
}
@PostMapping("/sale/info/addCompanyUpdateLog")
public BaseResponse addCompanyUpdateLog(@RequestBody CompanyEntity companyEntity) {
String jsonStr = JSON.toJSONString(companyEntity);
JSONObject jsonObject = JSONObject.parseObject(jsonStr);
CompanyEntity tempCompanyEntity = JSON.toJavaObject(jsonObject, CompanyEntity.class);
return ResultVOUtils.success("添加成功");
}
@PostMapping("/sale/info/applyUpdate")
public BaseResponse applyUpdate(@RequestBody CompanyUpdateLogEntity companyUpdateLogEntity) {
CompanyEntity companyEntity = new CompanyEntity();
companyEntity.setCustomerId(companyUpdateLogEntity.getCustomerId());
companyEntity.setAuditStatus("4");//申请变更
companyService.modifyCompany(companyEntity);
companyUpdateLogEntity.setCreate_time(new Date());
companyUpdateLogEntity.setStatus("1");//未审核
companyUpdateLogEntity.setLogType("2");//变更审核
boolean b = companyUpdateLogService.insertCompanyUpdateLog(companyUpdateLogEntity);
return ResultVOUtils.success("提交成功");
}
@PostMapping("/sale/info/applyUpdateManage")
public BaseResponse applyUpdateManage(@RequestBody CompanyUpdateLogEntity companyUpdateLogEntity) {
CompanyEntity companyEntity = new CompanyEntity();
companyEntity.setCustomerId(companyUpdateLogEntity.getCustomerId());
String auditStatus = "";
if (companyUpdateLogEntity.getStatus().equals("2")) {
auditStatus = "3";//允许变更
} else {
auditStatus = "1";//通过拒绝变更5恢复为通过
}
companyEntity.setAuditStatus(auditStatus);
companyService.modifyCompany(companyEntity);
companyUpdateLogEntity.setUpdate_time(new Date());
boolean b = companyUpdateLogService.updateCompanyUpdateLog(companyUpdateLogEntity);
return ResultVOUtils.success("成功");
}
@PostMapping("/sale/info/insertCompanyUpdateLog")
public BaseResponse insertCompanyUpdateLog(@RequestBody CompanyUpdateLogEntity companyUpdateLogEntity) {
CompanySalesmanEntity companySalesmanEntity = new CompanySalesmanEntity();
// companySalesmanEntity.setId(Integer.parseInt(String.valueOf(companyUpdateLogEntity.getSalesmanId())));
companySalesmanEntity.setAuditStatus("4");
companySalesmanEntity.setUpdate_time(new Date());
// companySalesmanService.updateCompanySalesman(companySalesmanEntity);
companyUpdateLogEntity.setCreate_time(new Date());
companyUpdateLogEntity.setUpdate_time(new Date());
companyUpdateLogEntity.setStatus("1");
boolean b = companyUpdateLogService.insertCompanyUpdateLog(companyUpdateLogEntity);
return ResultVOUtils.success("成功");
}
@PostMapping("/sale/info/updateCompanyUpdateLog")
public BaseResponse updateCompanyUpdateLog(@RequestBody CompanyUpdateLogEntity companyUpdateLogEntity) {
CompanySalesmanEntity companySalesmanEntity = new CompanySalesmanEntity();
// companySalesmanEntity.setId(Integer.parseInt(String.valueOf(companyUpdateLogEntity.getSalesmanId())));
String auditStatus = "";
if (companyUpdateLogEntity.getStatus().equals("2")) {
auditStatus = "3";//允许变更
} else if (companyUpdateLogEntity.getStatus().equals("3")) {
auditStatus = "1";//通过拒绝变更5恢复为通过
}
companySalesmanEntity.setAuditStatus(auditStatus);
companySalesmanEntity.setUpdate_time(new Date());
// companySalesmanService.updateCompanySalesman(companyCertEntity);
companyUpdateLogEntity.setUpdate_time(new Date());
FilterCompanyUpdateLogRequest filterCompanyUpdateLogRequest = new FilterCompanyUpdateLogRequest();
filterCompanyUpdateLogRequest.setPage(1);
filterCompanyUpdateLogRequest.setLimit(1);
filterCompanyUpdateLogRequest.setCustomerId(String.valueOf(companyUpdateLogEntity.getCustomerId()));
List<CompanyUpdateLogEntity> companyUpdateLogEntities =
companyUpdateLogService.filterCompanyUpdateLog(filterCompanyUpdateLogRequest);
if (companyUpdateLogEntities.size() > 0) {
CompanyUpdateLogEntity tCompanyUpdateLogEntity = companyUpdateLogEntities.get(0);
companyUpdateLogEntity.setId(tCompanyUpdateLogEntity.getId());
}
boolean b = companyUpdateLogService.updateCompanyUpdateLog(companyUpdateLogEntity);
return ResultVOUtils.success("成功");
}
@PostMapping("/sale/info/deleteCompanyUpdateLog")
public BaseResponse deleteCompanyUpdateLog(@RequestBody DeleteCompanyFileRequest deleteCompanyFileRequest, BindingResult bindingResult) {
boolean b = companyUpdateLogService.deleteById(deleteCompanyFileRequest.getId());
return ResultVOUtils.success("成功");
}
public String getCustomerId() {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
if (attributes == null) {
throw new JsonException(ResultEnum.NOT_NETWORK);
}
HttpServletRequest request = attributes.getRequest();
String userId = request.getHeader("ADMIN_ID");
AuthAdmin authAdmin = authAdminService.findById(Long.parseLong(userId));
return authAdmin.getCustomerId() + "";
}
}

@ -1,91 +0,0 @@
package com.glxp.sale.admin.controller.info;
import com.github.pagehelper.PageInfo;
import com.glxp.sale.admin.entity.info.DeviceKeyEntity;
import com.glxp.sale.admin.req.info.FilterDeviceKeyRequest;
import com.glxp.sale.admin.res.PageSimpleResponse;
import com.glxp.sale.admin.service.info.DeviceKeyService;
import com.glxp.sale.admin.util.DateUtil;
import com.glxp.sale.common.enums.ResultEnum;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
import org.springframework.validation.BindingResult;
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 javax.annotation.Resource;
import javax.validation.Valid;
import java.security.MessageDigest;
import java.util.List;
@RestController
public class DeviceKeyController {
@Resource
DeviceKeyService deviceKeyService;
@GetMapping("sale/device/registerList")
public BaseResponse registerList(FilterDeviceKeyRequest filterDeviceKeyRequest) {
List<DeviceKeyEntity> deviceKeyEntities = deviceKeyService.findDeviceKey(filterDeviceKeyRequest);
PageInfo<DeviceKeyEntity> pageInfo;
pageInfo = new PageInfo<>(deviceKeyEntities);
PageSimpleResponse<DeviceKeyEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(deviceKeyEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
@PostMapping("sale/device/check")
public BaseResponse checkRegister(@RequestBody @Valid DeviceKeyEntity deviceKeyEntity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
deviceKeyEntity.setDate(DateUtil.getDate());
deviceKeyService.updateDeviceKey(deviceKeyEntity);
return ResultVOUtils.success("审核成功");
}
@PostMapping("/sale/info/registerKey")
public BaseResponse registerKey(@RequestBody DeviceKeyEntity deviceKeyEntity) {
String key = md5("glxp2020" + deviceKeyEntity.getImei());
FilterDeviceKeyRequest filterDeviceKeyRequest = new FilterDeviceKeyRequest();
filterDeviceKeyRequest.setImei(deviceKeyEntity.getImei());
DeviceKeyEntity deviceKeyEntity1 = deviceKeyService.findDeviceByImei(filterDeviceKeyRequest);
if (deviceKeyEntity1 == null) {
deviceKeyEntity.setImeiKey(key);
deviceKeyEntity.setDate(DateUtil.getDate());
deviceKeyEntity.setIsCheck(0);
deviceKeyService.insertDeviceKey(deviceKeyEntity);
}
if (deviceKeyEntity1.getIsCheck() != 0)
return ResultVOUtils.success(key);
else
return ResultVOUtils.success("0");
}
public String md5(String password) {
try {
MessageDigest digest = MessageDigest.getInstance("MD5");
byte[] bytes = digest.digest(password.getBytes());
StringBuilder sb = new StringBuilder();
for (byte b : bytes) {
int c = b & 0xff; //负数转换成正数
String result = Integer.toHexString(c); //把十进制的数转换成十六进制的书
if (result.length() < 2) {
sb.append(0); //让十六进制全部都是两位数
}
sb.append(result);
}
return sb.toString(); //返回加密后的密文
} catch (Exception ex) {
ex.printStackTrace();
return "";
}
}
}

@ -1,113 +0,0 @@
package com.glxp.sale.admin.controller.info;
import com.github.pagehelper.PageInfo;
import com.glxp.sale.admin.entity.auth.AuthAdmin;
import com.glxp.sale.admin.entity.info.SupplierEnterpriseBasicCertEntity;
import com.glxp.sale.admin.entity.info.SupplierEnterpriseBasicCertEntity;
import com.glxp.sale.admin.exception.JsonException;
import com.glxp.sale.admin.req.info.CompanyRequest;
import com.glxp.sale.admin.req.info.DeleteCompanyFileRequest;
import com.glxp.sale.admin.req.info.FilterSuppliersEnterpriseBasicCertRequest;
import com.glxp.sale.admin.req.info.FilterSuppliersEnterpriseBasicCertRequest;
import com.glxp.sale.admin.res.PageSimpleResponse;
import com.glxp.sale.admin.service.auth.AuthAdminService;
import com.glxp.sale.admin.service.info.SuppliersEnterpriseBasicCertService;
import com.glxp.sale.admin.service.info.SuppliersEnterpriseBasicCertService;
import com.glxp.sale.common.enums.ResultEnum;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
import org.springframework.validation.BindingResult;
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.io.File;
import java.util.Date;
import java.util.List;
@RestController
public class SuppliersEnterpriseBasicCertController {
@Resource
private AuthAdminService authAdminService;
@Resource
private SuppliersEnterpriseBasicCertService suppliersEnterpriseBasicCertService;
@GetMapping("/udiwms/info/suppliers/enterprise/basic/cert/filter")
public BaseResponse filterCompanyCert(FilterSuppliersEnterpriseBasicCertRequest filterSuppliersEnterpriseBasicCertRequest,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
List<SupplierEnterpriseBasicCertEntity> supplierEnterpriseBasicCertEntityList
= suppliersEnterpriseBasicCertService.filterCompanyCert(filterSuppliersEnterpriseBasicCertRequest);
PageInfo<SupplierEnterpriseBasicCertEntity> pageInfo;
pageInfo = new PageInfo<>(supplierEnterpriseBasicCertEntityList);
PageSimpleResponse<SupplierEnterpriseBasicCertEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(supplierEnterpriseBasicCertEntityList);
return ResultVOUtils.success(pageSimpleResponse);
}
@GetMapping("/udiwms/info/suppliers/enterprise/basic/cert/companyCert")
public BaseResponse getCompanyCertInfo(FilterSuppliersEnterpriseBasicCertRequest filterSuppliersEnterpriseBasicCertRequest) {
SupplierEnterpriseBasicCertEntity supplierEnterpriseBasicCertEntity =
suppliersEnterpriseBasicCertService.findCompanyCert(filterSuppliersEnterpriseBasicCertRequest.getEnterpriseId());
if (supplierEnterpriseBasicCertEntity != null) {
return ResultVOUtils.success(supplierEnterpriseBasicCertEntity);
}
return ResultVOUtils.error(500, "空");
}
@GetMapping("/udiwms/info/suppliers/enterprise/basic/cert/getCompanyCert")
public BaseResponse getCompanyCert(FilterSuppliersEnterpriseBasicCertRequest filterSuppliersEnterpriseBasicCertRequest) {
// filterSuppliersEnterpriseBasicCertRequest.setEnterpriseId(getCustomerId());
List<SupplierEnterpriseBasicCertEntity> companyCertEntities = suppliersEnterpriseBasicCertService.getCompanyCert(filterSuppliersEnterpriseBasicCertRequest);
PageInfo<SupplierEnterpriseBasicCertEntity> pageInfo = new PageInfo<>(companyCertEntities);
PageSimpleResponse<SupplierEnterpriseBasicCertEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(companyCertEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
@PostMapping("/udiwms/info/suppliers/enterprise/basic/cert/insertCompanyCert")
public BaseResponse insertCompanyCert(@RequestBody SupplierEnterpriseBasicCertEntity supplierEnterpriseBasicCertEntity) {
supplierEnterpriseBasicCertEntity.setCreate_time(new Date());
supplierEnterpriseBasicCertEntity.setUpdate_time(new Date());
boolean b = suppliersEnterpriseBasicCertService.insertCompanyCert(supplierEnterpriseBasicCertEntity);
return ResultVOUtils.success("成功");
}
@PostMapping("/udiwms/info/suppliers/enterprise/basic/cert/updateCompanyCert")
public BaseResponse updateCompanyCert(@RequestBody SupplierEnterpriseBasicCertEntity supplierEnterpriseBasicCertEntity) {
boolean b = suppliersEnterpriseBasicCertService.updateCompanyCert(supplierEnterpriseBasicCertEntity);
return ResultVOUtils.success("修改成功");
}
@PostMapping("/udiwms/info/suppliers/enterprise/basic/cert/deleteCompanyCert")
public BaseResponse deleteCompanyCert(@RequestBody DeleteCompanyFileRequest deleteCompanyFileRequest, BindingResult bindingResult) {
boolean b = suppliersEnterpriseBasicCertService.deleteById(deleteCompanyFileRequest.getId());
String URL="d:/1s/udiwms/register/file/image3/" + deleteCompanyFileRequest.getFilePath();
File file=new File(URL);
if(file.exists()&&file.isFile()) {
file.delete();
}
return ResultVOUtils.success("成功");
}
public String getCustomerId() {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
if (attributes == null) {
throw new JsonException(ResultEnum.NOT_NETWORK);
}
HttpServletRequest request = attributes.getRequest();
String userId = request.getHeader("ADMIN_ID");
AuthAdmin authAdmin = authAdminService.findById(Long.parseLong(userId));
return authAdmin.getCustomerId() + "";
}
}

@ -1,149 +0,0 @@
package com.glxp.sale.admin.controller.info;
import com.github.pagehelper.PageInfo;
import com.glxp.sale.admin.entity.auth.AuthAdmin;
import com.glxp.sale.admin.entity.auth.CustomerContactEntity;
import com.glxp.sale.admin.entity.auth.CustomerDetailEntity;
import com.glxp.sale.admin.entity.info.CompanyEntity;
import com.glxp.sale.admin.entity.info.SupplierEnterpriseBasicCertEntity;
import com.glxp.sale.admin.entity.info.SuppliersEnterpriseBasicEntity;
import com.glxp.sale.admin.entity.info.SuppliersRegistrationBasicEntity;
import com.glxp.sale.admin.exception.JsonException;
import com.glxp.sale.admin.req.auth.CustomerInfoFilterRequest;
import com.glxp.sale.admin.req.info.DeleteRequest;
import com.glxp.sale.admin.req.info.FilterSuppliersEnterpriseBasicCertRequest;
import com.glxp.sale.admin.req.info.SuppliersEnterpriseBasicRequest;
import com.glxp.sale.admin.req.info.SuppliersRegistrationBasicRequest;
import com.glxp.sale.admin.res.PageSimpleResponse;
import com.glxp.sale.admin.service.auth.AuthAdminService;
import com.glxp.sale.admin.service.auth.impl.CustomerContactService;
import com.glxp.sale.admin.service.info.SuppliersEnterpriseBasicCertService;
import com.glxp.sale.admin.service.info.SuppliersEnterpriseBasicService;
import com.glxp.sale.admin.service.info.SuppliersRegistrationBasicService;
import com.glxp.sale.common.enums.ResultEnum;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
import org.apache.commons.lang3.StringUtils;
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.io.File;
import java.util.Date;
import java.util.List;
@RestController
public class SuppliersEnterpriseBasicController {
@Resource
private AuthAdminService authAdminService;
@Resource
private SuppliersEnterpriseBasicService suppliersEnterpriseBasicService;
@Resource
private SuppliersRegistrationBasicService suppliersRegistrationBasicService;
@Resource
private SuppliersEnterpriseBasicCertService suppliersEnterpriseBasicCertService;
@GetMapping("/udiwms/info/suppliers/enterprise/basic/getCompanyInfo")
public BaseResponse getCompanyInfo(SuppliersEnterpriseBasicRequest suppliersEnterpriseBasicRequest) {
SuppliersEnterpriseBasicEntity suppliersEnterpriseBasicEntity = suppliersEnterpriseBasicService.findCompany(suppliersEnterpriseBasicRequest.getId());
if (suppliersEnterpriseBasicEntity != null) {
return ResultVOUtils.success(suppliersEnterpriseBasicEntity);
}
return ResultVOUtils.error(500, "企业信息为空");
}
@GetMapping("/udiwms/info/suppliers/enterprise/basic/getCompanyList")
public BaseResponse getCompanyList(SuppliersEnterpriseBasicRequest suppliersEnterpriseBasicRequest) {
// suppliersEnterpriseBasicRequest.setId(suppliersEnterpriseBasicRequest.getId());
List<SuppliersEnterpriseBasicEntity> companyEntities = suppliersEnterpriseBasicService.getCompany(suppliersEnterpriseBasicRequest);
PageInfo<SuppliersEnterpriseBasicEntity> pageInfo = new PageInfo<>(companyEntities);
PageSimpleResponse<SuppliersEnterpriseBasicEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(companyEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
@PostMapping("/udiwms/info/suppliers/enterprise/basic/addCompany")
public BaseResponse addCompany(@RequestBody SuppliersEnterpriseBasicEntity suppliersEnterpriseBasicEntity) {
suppliersEnterpriseBasicEntity.setCreateDate(new Date());
suppliersEnterpriseBasicEntity.setUpdateDate(new Date());
boolean b = suppliersEnterpriseBasicService.insertCompany(suppliersEnterpriseBasicEntity);
if (b) {
return ResultVOUtils.success("添加成功");
} else {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
}
@PostMapping("/udiwms/info/suppliers/enterprise/basic/modifyCompany")
public BaseResponse modifyCompany(@RequestBody SuppliersEnterpriseBasicEntity suppliersEnterpriseBasicEntity) {
suppliersEnterpriseBasicEntity.setUpdateDate(new Date());
boolean b = suppliersEnterpriseBasicService.modifyCompany(suppliersEnterpriseBasicEntity);
if (b) {
return ResultVOUtils.success("修改成功");
} else {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
}
@GetMapping("/udiwms/info/suppliers/enterprise/basic/delete")
public BaseResponse deleteContact(DeleteRequest deleteRequest) {
FilterSuppliersEnterpriseBasicCertRequest filterSuppliersEnterpriseBasicCertRequest =
new FilterSuppliersEnterpriseBasicCertRequest();
filterSuppliersEnterpriseBasicCertRequest.setEnterpriseId(Long.parseLong(deleteRequest.getId()));
List<SupplierEnterpriseBasicCertEntity> supplierEnterpriseBasicCertEntityList =
suppliersEnterpriseBasicCertService.getCompanyCert(filterSuppliersEnterpriseBasicCertRequest);
for (SupplierEnterpriseBasicCertEntity supplierEnterpriseBasicCertEntity : supplierEnterpriseBasicCertEntityList) {
if (StringUtils.isNotBlank(supplierEnterpriseBasicCertEntity.getFilePath())) {
String URL="d:/1s/udiwms/register/file/image3/" + supplierEnterpriseBasicCertEntity.getFilePath();
File file=new File(URL);
if(file.exists()&&file.isFile()) {
file.delete();
}
}
}
SuppliersRegistrationBasicRequest suppliersRegistrationBasicRequest =
new SuppliersRegistrationBasicRequest();
suppliersRegistrationBasicRequest.setEnterpriseId(Long.parseLong(deleteRequest.getId()));
List<SuppliersRegistrationBasicEntity> suppliersRegistrationBasicEntityList =
suppliersRegistrationBasicService.getRegistration(suppliersRegistrationBasicRequest);
for (SuppliersRegistrationBasicEntity suppliersRegistrationBasicEntity : suppliersRegistrationBasicEntityList) {
if (StringUtils.isNotBlank(suppliersRegistrationBasicEntity.getFilePath())) {
String URL="d:/1s/udiwms/register/file/image4/" + suppliersRegistrationBasicEntity.getFilePath();
File file=new File(URL);
if(file.exists()&&file.isFile()) {
file.delete();
}
}
if (StringUtils.isNotBlank(suppliersRegistrationBasicEntity.getInstructions())) {
String URL="d:/1s/udiwms/register/file/image4/" + suppliersRegistrationBasicEntity.getInstructions();
File file=new File(URL);
if(file.exists()&&file.isFile()) {
file.delete();
}
}
}
boolean b = suppliersEnterpriseBasicService.deleteById(deleteRequest.getId());
if (b)
return ResultVOUtils.success("删除成功");
else {
return ResultVOUtils.error(500, "删除失败");
}
}
public String getCustomerId() {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
if (attributes == null) {
throw new JsonException(ResultEnum.NOT_NETWORK);
}
HttpServletRequest request = attributes.getRequest();
String userId = request.getHeader("ADMIN_ID");
AuthAdmin authAdmin = authAdminService.findById(Long.parseLong(userId));
return authAdmin.getCustomerId() + "";
}
}

@ -1,134 +0,0 @@
package com.glxp.sale.admin.controller.info;
import com.github.pagehelper.PageInfo;
import com.glxp.sale.admin.entity.auth.AuthAdmin;
import com.glxp.sale.admin.entity.info.SuppliersRegistrationBasicEntity;
import com.glxp.sale.admin.exception.JsonException;
import com.glxp.sale.admin.req.info.DeleteCompanyFileRequest;
import com.glxp.sale.admin.req.info.DeleteRequest;
import com.glxp.sale.admin.req.info.SuppliersRegistrationBasicRequest;
import com.glxp.sale.admin.res.PageSimpleResponse;
import com.glxp.sale.admin.service.auth.AuthAdminService;
import com.glxp.sale.admin.service.info.SuppliersRegistrationBasicService;
import com.glxp.sale.common.enums.ResultEnum;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
import org.apache.commons.lang3.StringUtils;
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.io.File;
import java.util.Date;
import java.util.List;
@RestController
public class SuppliersRegistrationBasicController {
@Resource
private AuthAdminService authAdminService;
@Resource
private SuppliersRegistrationBasicService suppliersRegistrationBasicService;
@GetMapping("/udiwms/info/suppliers/registration/basic/getRegistrationInfo")
public BaseResponse getRegistrationInfo(SuppliersRegistrationBasicRequest suppliersRegistrationBasicRequest) {
SuppliersRegistrationBasicEntity suppliersRegistrationBasicEntity = suppliersRegistrationBasicService.findRegistration(suppliersRegistrationBasicRequest.getId());
if (suppliersRegistrationBasicEntity != null) {
return ResultVOUtils.success(suppliersRegistrationBasicEntity);
}
return ResultVOUtils.error(500, "企业信息为空");
}
@GetMapping("/udiwms/info/suppliers/registration/basic/getRegistrationList")
public BaseResponse getRegistrationList(SuppliersRegistrationBasicRequest suppliersRegistrationBasicRequest) {
// suppliersRegistrationBasicRequest.setId(suppliersRegistrationBasicRequest.getId());
List<SuppliersRegistrationBasicEntity> companyEntities = suppliersRegistrationBasicService.getRegistration(suppliersRegistrationBasicRequest);
PageInfo<SuppliersRegistrationBasicEntity> pageInfo = new PageInfo<>(companyEntities);
PageSimpleResponse<SuppliersRegistrationBasicEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(companyEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
@PostMapping("/udiwms/info/suppliers/registration/basic/addRegistration")
public BaseResponse addRegistration(@RequestBody SuppliersRegistrationBasicEntity suppliersRegistrationBasicEntity) {
suppliersRegistrationBasicEntity.setCreate_date(new Date());
suppliersRegistrationBasicEntity.setUpdate_date(new Date());
boolean b = suppliersRegistrationBasicService.insertRegistration(suppliersRegistrationBasicEntity);
if (b) {
return ResultVOUtils.success("添加成功");
} else {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
}
@PostMapping("/udiwms/info/suppliers/registration/basic/modifyRegistration")
public BaseResponse modifyRegistration(@RequestBody SuppliersRegistrationBasicEntity suppliersRegistrationBasicEntity) {
suppliersRegistrationBasicEntity.setUpdate_date(new Date());
if (StringUtils.isNotBlank(suppliersRegistrationBasicEntity.getNewFilePath())) {
if (StringUtils.isNotBlank(suppliersRegistrationBasicEntity.getFilePath())) {
String URL="d:/1s/udiwms/register/file/image4/" + suppliersRegistrationBasicEntity.getFilePath();
File file=new File(URL);
if(file.exists()&&file.isFile()) {
file.delete();
}
}
suppliersRegistrationBasicEntity.setFilePath(suppliersRegistrationBasicEntity.getNewFilePath());
}
if (StringUtils.isNotBlank(suppliersRegistrationBasicEntity.getNewInstructions())) {
if (StringUtils.isNotBlank(suppliersRegistrationBasicEntity.getInstructions())) {
String URL="d:/1s/udiwms/register/file/image4/" + suppliersRegistrationBasicEntity.getInstructions();
File file=new File(URL);
if(file.exists()&&file.isFile()) {
file.delete();
}
}
suppliersRegistrationBasicEntity.setInstructions(suppliersRegistrationBasicEntity.getNewInstructions());
}
boolean b = suppliersRegistrationBasicService.modifyRegistration(suppliersRegistrationBasicEntity);
if (b) {
return ResultVOUtils.success("修改成功");
} else {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
}
@GetMapping("/udiwms/info/suppliers/registration/basic/delete")
public BaseResponse delete(DeleteCompanyFileRequest deleteCompanyFileRequest) {
if (StringUtils.isNotBlank(deleteCompanyFileRequest.getFilePath())) {
String URL="d:/1s/udiwms/register/file/image4/" + deleteCompanyFileRequest.getFilePath();
File file=new File(URL);
if(file.exists()&&file.isFile()) {
file.delete();
}
}
if (StringUtils.isNotBlank(deleteCompanyFileRequest.getFilePath2())) {
String URL="d:/1s/udiwms/register/file/image4/" + deleteCompanyFileRequest.getFilePath2();
File file=new File(URL);
if(file.exists()&&file.isFile()) {
file.delete();
}
}
boolean b = suppliersRegistrationBasicService.deleteById(deleteCompanyFileRequest.getId());
if (b)
return ResultVOUtils.success("删除成功");
else {
return ResultVOUtils.error(500, "删除失败");
}
}
public String getCustomerId() {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
if (attributes == null) {
throw new JsonException(ResultEnum.NOT_NETWORK);
}
HttpServletRequest request = attributes.getRequest();
String userId = request.getHeader("ADMIN_ID");
AuthAdmin authAdmin = authAdminService.findById(Long.parseLong(userId));
return authAdmin.getCustomerId() + "";
}
}

@ -1,21 +0,0 @@
package com.glxp.sale.admin.dao.info;
import com.glxp.sale.admin.entity.info.AliCertEntity;
import com.glxp.sale.admin.req.info.DeleteAliCertRequest;
import com.glxp.sale.admin.req.info.FilterAliCertRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface AliCertDao {
boolean insertAliCert(AliCertEntity aliCertEntity);
boolean insertAliCertList(@Param("aliCertEntities") List<AliCertEntity> aliCertEntities);
List<AliCertEntity> filterAliCert(FilterAliCertRequest filterAliCertRequest);
boolean deleteAliCert(DeleteAliCertRequest deleteAliCertRequest);
}

@ -1,17 +0,0 @@
package com.glxp.sale.admin.dao.info;
import com.glxp.sale.admin.entity.info.ApilogEntity;
import com.glxp.sale.admin.req.info.DeleteApilogRequest;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ApilogDao {
boolean insertApilog(ApilogEntity apilogEntity);
boolean updateApilog(ApilogEntity apilogEntity);
boolean deleteApilog(DeleteApilogRequest deleteApilogRequest);
boolean addApilog(ApilogEntity apilogEntity);
}

@ -1,25 +0,0 @@
package com.glxp.sale.admin.dao.info;
import com.glxp.sale.admin.entity.info.CompanyCertEntity;
import com.glxp.sale.admin.req.info.FilterCompanyCertRequest;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface CompanyCertDao {
List<CompanyCertEntity> filterCompanyCert(FilterCompanyCertRequest filterCompanyCertRequest);
CompanyCertEntity findCompanyCert(Long CustomerId);
CompanyCertEntity findCompanyCertByName(String name);
List<CompanyCertEntity> getCompanyCert(FilterCompanyCertRequest filterCompanyCertRequest);
boolean updateCompanyCert(CompanyCertEntity companyCertEntity);
boolean insertCompanyCert(CompanyCertEntity companyCertEntity);
boolean deleteById(String id);
}

@ -1,6 +1,5 @@
package com.glxp.sale.admin.dao.info;
import com.glxp.sale.admin.entity.info.AliKeyEntity;
import com.glxp.sale.admin.entity.info.CompanyEntity;
import com.glxp.sale.admin.req.info.FilterCompanyRequest;
import org.apache.ibatis.annotations.Mapper;
@ -22,5 +21,4 @@ public interface CompanyDao {
boolean insertCompany(CompanyEntity companyEntity);
AliKeyEntity findKey(String customerId);
}

@ -1,25 +0,0 @@
package com.glxp.sale.admin.dao.info;
import com.glxp.sale.admin.entity.info.CompanySalesmanEntity;
import com.glxp.sale.admin.req.info.FilterCompanySalesmanRequest;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface CompanySalesmanDao {
List<CompanySalesmanEntity> filterCompanySalesman(FilterCompanySalesmanRequest filterCompanySalesmanRequest);
CompanySalesmanEntity findCompanySalesman(Long CustomerId);
CompanySalesmanEntity findCompanySalesmanByName(String name);
List<CompanySalesmanEntity> getCompanySalesman(FilterCompanySalesmanRequest filterCompanySalesmanRequest);
boolean updateCompanySalesman(CompanySalesmanEntity companySalesmanEntity);
boolean insertCompanySalesman(CompanySalesmanEntity companySalesmanEntity);
boolean deleteById(String id);
}

@ -1,25 +0,0 @@
package com.glxp.sale.admin.dao.info;
import com.glxp.sale.admin.entity.info.CompanySalesmanUpdateLogEntity;
import com.glxp.sale.admin.req.info.FilterCompanySalesmanUpdateLogRequest;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface CompanySalesmanUpdateLogDao {
List<CompanySalesmanUpdateLogEntity> filterCompanySalesmanUpdateLog(FilterCompanySalesmanUpdateLogRequest filterCompanySalesmanUpdateLogRequest);
CompanySalesmanUpdateLogEntity findCompanySalesmanUpdateLog(Long CustomerId);
CompanySalesmanUpdateLogEntity findCompanySalesmanUpdateLogBySubmit(String submit);
List<CompanySalesmanUpdateLogEntity> getCompanySalesmanUpdateLog(FilterCompanySalesmanUpdateLogRequest filterCompanySalesmanUpdateLogRequest);
boolean updateCompanySalesmanUpdateLog(CompanySalesmanUpdateLogEntity companySalesmanUpdateLogEntity);
boolean insertCompanySalesmanUpdateLog(CompanySalesmanUpdateLogEntity companySalesmanUpdateLogEntity);
boolean deleteById(String id);
}

@ -1,25 +0,0 @@
package com.glxp.sale.admin.dao.info;
import com.glxp.sale.admin.entity.info.CompanyUpdateLogEntity;
import com.glxp.sale.admin.req.info.FilterCompanyUpdateLogRequest;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface CompanyUpdateLogDao {
List<CompanyUpdateLogEntity> filterCompanyUpdateLog(FilterCompanyUpdateLogRequest filterCompanyUpdateLogRequest);
CompanyUpdateLogEntity findCompanyUpdateLog(Long CustomerId);
CompanyUpdateLogEntity findCompanyUpdateLogBySubmit(String submit);
List<CompanyUpdateLogEntity> getCompanyUpdateLog(FilterCompanyUpdateLogRequest filterCompanyUpdateLogRequest);
boolean updateCompanyUpdateLog(CompanyUpdateLogEntity companyUpdateLogEntity);
boolean insertCompanyUpdateLog(CompanyUpdateLogEntity companyUpdateLogEntity);
boolean deleteById(String id);
}

@ -1,22 +0,0 @@
package com.glxp.sale.admin.dao.info;
import com.glxp.sale.admin.entity.info.DeviceKeyEntity;
import com.glxp.sale.admin.req.info.DeleteRequest;
import com.glxp.sale.admin.req.info.FilterDeviceKeyRequest;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface DeviceKeyDao {
DeviceKeyEntity findDeviceByImei(FilterDeviceKeyRequest filterDeviceKeyRequest);
List<DeviceKeyEntity> findDeviceKey(FilterDeviceKeyRequest filterDeviceKeyRequest);
void insertDeviceKey(DeviceKeyEntity deviceKeyEntity);
void updateDeviceKey(DeviceKeyEntity deviceKeyEntity);
void updateDeviceKeyByImei(DeviceKeyEntity deviceKeyEntity);
void deleteDeviceKey(DeleteRequest deleteRequest);
}

@ -1,28 +0,0 @@
package com.glxp.sale.admin.dao.info;
import com.glxp.sale.admin.entity.info.SupplierEnterpriseBasicCertEntity;
import com.glxp.sale.admin.req.info.FilterSuppliersEnterpriseBasicCertRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface SuppliersEnterpriseBasicCertDao {
List<SupplierEnterpriseBasicCertEntity> filterCompanyCert(FilterSuppliersEnterpriseBasicCertRequest filterSuppliersEnterpriseBasicCertRequest);
SupplierEnterpriseBasicCertEntity findCompanyCert(Long enterpriseId);
SupplierEnterpriseBasicCertEntity findCompanyCertByName(String name);
List<SupplierEnterpriseBasicCertEntity> getCompanyCert(FilterSuppliersEnterpriseBasicCertRequest filterSuppliersEnterpriseBasicCertRequest);
boolean updateCompanyCert(SupplierEnterpriseBasicCertEntity supplierEnterpriseBasicCertEntity);
boolean insertCompanyCert(SupplierEnterpriseBasicCertEntity supplierEnterpriseBasicCertEntity);
boolean deleteById(String id);
boolean deleteByEnterpriseId(@Param("enterpriseId") String enterpriseId);
}

@ -1,24 +0,0 @@
package com.glxp.sale.admin.dao.info;
import com.glxp.sale.admin.entity.info.SuppliersEnterpriseBasicEntity;
import com.glxp.sale.admin.req.info.SuppliersEnterpriseBasicRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface SuppliersEnterpriseBasicDao {
SuppliersEnterpriseBasicEntity findCompany(Long id);
SuppliersEnterpriseBasicEntity findCompanyByName(String companyName);
List<SuppliersEnterpriseBasicEntity> getCompany(SuppliersEnterpriseBasicRequest suppliersEnterpriseBasicRequest);
boolean modifyCompany(SuppliersEnterpriseBasicEntity suppliersEnterpriseBasicEntity);
boolean insertCompany(SuppliersEnterpriseBasicEntity suppliersEnterpriseBasicEntity);
boolean deleteById(@Param("id") String id);
}

@ -1,26 +0,0 @@
package com.glxp.sale.admin.dao.info;
import com.glxp.sale.admin.entity.info.SuppliersRegistrationBasicEntity;
import com.glxp.sale.admin.req.info.SuppliersRegistrationBasicRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface SuppliersRegistrationBasicDao {
SuppliersRegistrationBasicEntity findRegistration(Long id);
SuppliersRegistrationBasicEntity findRegistrationByName(String recordProductName);
List<SuppliersRegistrationBasicEntity> getRegistration(SuppliersRegistrationBasicRequest suppliersRegistrationBasicRequest);
boolean modifyRegistration(SuppliersRegistrationBasicEntity suppliersRegistrationBasicEntity);
boolean insertRegistration(SuppliersRegistrationBasicEntity suppliersRegistrationBasicEntity);
boolean deleteById(@Param("id") String id);
boolean deleteByEnterpriseId(@Param("enterpriseId") String enterpriseId);
}

@ -1,23 +0,0 @@
package com.glxp.sale.admin.dao.param;
import com.glxp.sale.admin.entity.param.SystemExcelTemplateEntity;
import com.glxp.sale.admin.req.param.SystemExcelTemplateRequest;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface SystemExcelTemplateDao {
List<SystemExcelTemplateEntity> filterSystemExcelTemplate(SystemExcelTemplateRequest systemExcelTemplateRequest);
SystemExcelTemplateEntity findSystemExcelTemplateByName(String name);
List<SystemExcelTemplateEntity> getSystemExcelTemplate(SystemExcelTemplateRequest systemExcelTemplateRequest);
boolean updateSystemExcelTemplate(SystemExcelTemplateEntity companyCertEntity);
boolean insertSystemExcelTemplate(SystemExcelTemplateEntity companyCertEntity);
boolean deleteById(String id);
}

@ -1,26 +0,0 @@
package com.glxp.sale.admin.dao.param;
import com.glxp.sale.admin.entity.param.SystemPDFModuleEntity;
import com.glxp.sale.admin.req.param.SystemPDFModuleRequest;
import com.glxp.sale.admin.req.param.SystemPDFModuleSaveRequest;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface SystemPDFModuleDao {
List<SystemPDFModuleEntity> queryPage(SystemPDFModuleRequest systemPDFModuleRequest);
List<SystemPDFModuleEntity> listPDFModules();
SystemPDFModuleEntity findSystemPDFModule(SystemPDFModuleRequest systemPDFModuleRequest);
SystemPDFModuleEntity selectById(String id);
boolean updateById(SystemPDFModuleSaveRequest systemPDFModuleSaveRequest);
boolean insert(SystemPDFModuleEntity systemPDFModuleEntity);
boolean deleteById(Integer id);
}

@ -1,26 +0,0 @@
package com.glxp.sale.admin.dao.param;
import com.glxp.sale.admin.entity.param.SystemPDFTemplateEntity;
import com.glxp.sale.admin.req.param.SystemPDFTemplateRequest;
import com.glxp.sale.admin.req.param.SystemPDFTemplateSaveRequest;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface SystemPDFTemplateDao {
List<SystemPDFTemplateEntity> queryPage(SystemPDFTemplateRequest systemPDFTemplateRequest);
List<SystemPDFTemplateEntity> listPDFTemplates();
SystemPDFTemplateEntity findSystemPDFTemplate(SystemPDFTemplateRequest systemPDFTemplateRequest);
SystemPDFTemplateEntity selectById(String id);
boolean updateById(SystemPDFTemplateSaveRequest systemPDFTemplateSaveRequest);
boolean insert(SystemPDFTemplateEntity systemPDFTemplateEntity);
boolean deleteById(Integer id);
}

@ -1,49 +0,0 @@
package com.glxp.sale.admin.dao.param;
import com.glxp.sale.admin.entity.param.SystemPDFTemplateRelevanceEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface SystemPDFTemplateRelevanceDao {
/**
* customerId
* @param customerId customerId
* @return
*/
List<SystemPDFTemplateRelevanceEntity> listByCustomerId(Long customerId);
/**
* customerId
* @param customerIds customerIds
* @return
*/
List<SystemPDFTemplateRelevanceEntity> listByCustomerIdIn(List<Long> customerIds);
/**
* template_id customer_id
* @param templateId templateId
* @return
*/
List<SystemPDFTemplateRelevanceEntity> listByTemplateId(int templateId);
/**
*
* @param systemPDFTemplateRelevanceEntityList
* @return
*/
int insertSystemPDFTemplateRelevanceAll(List<SystemPDFTemplateRelevanceEntity> systemPDFTemplateRelevanceEntityList);
boolean insert(SystemPDFTemplateRelevanceEntity systemPDFTemplateRelevanceEntity);
/**
* customerId
* @param customerId
* @return
*/
boolean deleteByCustomerId(Long customerId);
}

@ -1,14 +0,0 @@
package com.glxp.sale.admin.entity.info;
import lombok.Data;
@Data
public class AliCertEntity {
private int id;
private String appKey;
private String appSecret;
private String companyName;
private String aliUser;
private String aliPasswd;
}

@ -1,13 +0,0 @@
package com.glxp.sale.admin.entity.info;
import lombok.Data;
@Data
public class AliKeyEntity {
private String refEntId;
private String entId;
private String appKey;
private String appSecret;
}

@ -1,251 +0,0 @@
package com.glxp.sale.admin.entity.info;
import lombok.Data;
@Data
public class ApilogEntity {
private String customerId;
private Integer lsyd_uploadretail;
private Integer lsyd_uploadinoutbill;
private Integer lsyd_query_billstatus;
private Integer lsyd_query_upbillcode;
private Integer lsyd_query_upbilldetail;
private Integer lsyd_query_relation;
private Integer lsyd_query_codedetail;
private Integer lsyd_query_getentinfo;
private Integer lsyd_listupout;
private Integer lsyd_listupout_detail;
private Integer kyt_uploadcircubill;
private Integer kyt_searchstatus;
private Integer kyt_getbyentid;
private Integer kyt_getbyrefentid;
private Integer kyt_listparts;
private Integer kyt_synonymauths;
private Integer kyt_drugtable;
private Integer kyt_listupout;
private Integer kyt_uploadrelation;
private Integer kyt_uploadinoutbill;
private Integer kyt_singlerelation;
private Integer kyt_codeprocess;
private Integer bill_upbill_detail_withcode;
private Integer kyt_getentinfo;
private Integer kyt_searchbill;
private Integer kyt_querycodeactive;
private Integer kyt_querycode;
private Integer kyt_listparts_byagent;
private Integer kyt_drugrescode;
private Integer kyt_remnantbill_upload;
public static ApilogEntity getLsyd_uploadretail(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setLsyd_uploadretail(1);
return apilogEntity;
}
public static ApilogEntity getLsyd_uploadinoutbill(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setLsyd_uploadinoutbill(1);
return apilogEntity;
}
public static ApilogEntity getLsyd_query_billstatus(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setLsyd_uploadinoutbill(1);
return apilogEntity;
}
public static ApilogEntity getLsyd_query_upbillcode(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setLsyd_query_upbillcode(1);
return apilogEntity;
}
public static ApilogEntity getLsyd_query_upbilldetail(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setLsyd_listupout_detail(1);
return apilogEntity;
}
public static ApilogEntity getLsyd_query_relation(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setLsyd_uploadinoutbill(1);
return apilogEntity;
}
public static ApilogEntity getLsyd_query_codedetail(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setLsyd_query_relation(1);
return apilogEntity;
}
public static ApilogEntity getLsyd_query_getentinfo(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_getentinfo(1);
return apilogEntity;
}
public static ApilogEntity getLsyd_listupout(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setLsyd_listupout(1);
return apilogEntity;
}
public static ApilogEntity getLsyd_listupout_detail(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setLsyd_uploadinoutbill(1);
return apilogEntity;
}
public static ApilogEntity getKyt_uploadcircubill(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_uploadcircubill(1);
return apilogEntity;
}
public static ApilogEntity getKyt_searchstatus(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_searchstatus(1);
return apilogEntity;
}
public static ApilogEntity getKyt_getbyentid(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_getbyentid(1);
return apilogEntity;
}
public static ApilogEntity getKyt_getbyrefentid(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setLsyd_uploadinoutbill(1);
return apilogEntity;
}
public static ApilogEntity getKyt_listparts(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_listparts(1);
return apilogEntity;
}
public static ApilogEntity getKyt_synonymauths(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_synonymauths(1);
return apilogEntity;
}
public static ApilogEntity getKyt_drugtable(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_drugtable(1);
return apilogEntity;
}
public static ApilogEntity getKyt_listupout(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_listupout(1);
return apilogEntity;
}
public static ApilogEntity getKyt_uploadrelation(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_uploadrelation(1);
return apilogEntity;
}
public static ApilogEntity getKyt_uploadinoutbill(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_uploadinoutbill(1);
return apilogEntity;
}
public static ApilogEntity getKyt_singlerelation(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_singlerelation(1);
return apilogEntity;
}
public static ApilogEntity getKyt_codeprocess(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_codeprocess(1);
return apilogEntity;
}
public static ApilogEntity getBill_upbill_detail_withcode(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setBill_upbill_detail_withcode(1);
return apilogEntity;
}
public static ApilogEntity getKyt_getentinfo(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setKyt_getentinfo(1);
apilogEntity.setCustomerId(customerId);
return apilogEntity;
}
public static ApilogEntity getKyt_searchbill(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_searchbill(1);
return apilogEntity;
}
public static ApilogEntity getKyt_querycodeactive(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_querycodeactive(1);
return apilogEntity;
}
public static ApilogEntity getKyt_querycode(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_querycode(1);
return apilogEntity;
}
public static ApilogEntity getKyt_listparts_byagent(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_listparts_byagent(1);
return apilogEntity;
}
public static ApilogEntity getKyt_drugrescode(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_drugrescode(1);
return apilogEntity;
}
public static ApilogEntity getKyt_remnantbill_upload(String customerId) {
ApilogEntity apilogEntity = new ApilogEntity();
apilogEntity.setCustomerId(customerId);
apilogEntity.setKyt_remnantbill_upload(1);
return apilogEntity;
}
}

@ -1,19 +0,0 @@
package com.glxp.sale.admin.entity.info;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class CompanyCertEntity {
private Integer id;
private Long customerId;
private String name;
private String filePath;
private String remark;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date create_time;
private Date update_time;
}

@ -1,28 +0,0 @@
package com.glxp.sale.admin.entity.info;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class CompanySalesmanEntity {
private Integer id;
private Long customerId;
private String name;
private String tel;
private String phone;
private String email;
private String certType;
private String certCode;
private String filePath;
private String filePath2;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date create_time;
private Date update_time;
private String auditStatus;
private String newFilePath;
private String newFilePath2;
}

@ -1,25 +0,0 @@
package com.glxp.sale.admin.entity.info;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class CompanySalesmanUpdateLogEntity {
private Integer id;
private Long customerId;
private Long salesmanId;
private String updateCause;
private String status;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date create_time;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date update_time;
private String submit;
private String auditor;
private String noPassCause;
private String param;
private String logType;
}

@ -1,15 +0,0 @@
package com.glxp.sale.admin.entity.info;
import lombok.Data;
@Data
public class DeviceKeyEntity {
private String id;
private String imei;
private int isCheck;
private String companyName;
private String phone;
private String contact;
private String imeiKey;
private String date;
}

@ -1,10 +0,0 @@
package com.glxp.sale.admin.entity.info;
import lombok.Data;
@Data
public class MipsServiceEntity {
private String mipsName;
private String url;
private String remark;
}

@ -1,19 +0,0 @@
package com.glxp.sale.admin.entity.info;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class SupplierEnterpriseBasicCertEntity {
private Integer id;
private Long enterpriseId;
private String name;
private String filePath;
private String remark;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date create_time;
private Date update_time;
}

@ -1,33 +0,0 @@
package com.glxp.sale.admin.entity.info;
import lombok.Data;
import java.util.Date;
@Data
public class SuppliersEnterpriseBasicEntity {
private Long id;
private String companyName;
private String creditCode;
private String companyType;
private String placeArea;
private String placeAreaCode;
private String placeAddress;
private String detailAddr;
private String legalPersonName;
private String legalPersonPapersType;
private String legalPersonPapersCode;
private String productionArea;
private String productionAreaCode;
private String productionAddress;
private String registerStatus;
private String productionLicenceNum;
private Date productionLicenceDate;
private String productionRecordNum;
private String productionRecordSection;
private Date productionRecordDate;
private String remark;
private Date createDate;
private Date updateDate;
}

@ -1,45 +0,0 @@
package com.glxp.sale.admin.entity.info;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class SuppliersRegistrationBasicEntity {
private Long id;
private Long enterpriseId;
private String recordCode;
private String recordProductName;
private String productManageType;
private String recordPeopleName;
private String recordPeopleArea;
private String recordPeopleAreaCode;
private String recordPeopleAddress;
private String productType;
private String productDirectoryCode;
private String agentName;
private String agentArea;
private String agentAreaCode;
private String agentAddress;
private String instructions;
private String productAddress;
private String recordText;
private String placeOrigin;
private String productionRegion;
private String productionCompanyName;
private String afterSale;
private String specification;
private String structure;
private String scope;
private String other;
private String filePath;
private String remark;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date create_date;
private Date update_date;
private String newFilePath;
private String newInstructions;
}

@ -1,18 +0,0 @@
package com.glxp.sale.admin.entity.param;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class SystemExcelTemplateEntity {
private Integer id;
private String name;
private String filePath;
private String remark;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date create_time;
private Date update_time;
}

@ -1,18 +0,0 @@
package com.glxp.sale.admin.entity.param;
import lombok.Data;
import java.util.Date;
@Data
public class SystemPDFModuleEntity {
private int id;
private String name;
private String param;
private String fieldExplain;
private int templateId;
private String remark;
private Date create_time;
private Date update_time;
}

@ -1,21 +0,0 @@
package com.glxp.sale.admin.entity.param;
import lombok.Data;
import java.util.Date;
@Data
public class SystemPDFTemplateEntity {
private int id;
private String name;
private int type;
private int module;
private String param;
private String path;
private int rowCount;
private int qrcodeCount;
private String remark;
private Date create_time;
private Date update_time;
}

@ -1,15 +0,0 @@
package com.glxp.sale.admin.entity.param;
import lombok.Data;
/**
*
*/
@Data
public class SystemPDFTemplateRelevanceEntity {
private int id;
private int template_id;
private Long customerId;
private int admin_id;
}

@ -1,18 +0,0 @@
package com.glxp.sale.admin.service.info;
import com.glxp.sale.admin.entity.info.AliCertEntity;
import com.glxp.sale.admin.req.info.DeleteAliCertRequest;
import com.glxp.sale.admin.req.info.FilterAliCertRequest;
import java.util.List;
public interface AliCertService {
boolean insertAliCert(AliCertEntity aliCertEntity);
boolean insertAliCertList(List<AliCertEntity> aliCertEntities);
List<AliCertEntity> filterAliCert(FilterAliCertRequest filterAliCertRequest);
boolean deleteAliCert(DeleteAliCertRequest deleteAliCertRequest);
}

@ -1,15 +0,0 @@
package com.glxp.sale.admin.service.info;
import com.glxp.sale.admin.entity.info.ApilogEntity;
import com.glxp.sale.admin.req.info.DeleteApilogRequest;
public interface ApilogService {
boolean insertApilog(ApilogEntity apilogEntity);
boolean updateApilog(ApilogEntity apilogEntity);
boolean deleteApilog(DeleteApilogRequest deleteApilogRequest);
boolean addApilog(ApilogEntity apilogEntity);
}

@ -1,24 +0,0 @@
package com.glxp.sale.admin.service.info;
import com.glxp.sale.admin.entity.info.CompanyCertEntity;
import com.glxp.sale.admin.req.info.FilterCompanyCertRequest;
import java.util.List;
public interface CompanyCertService {
List<CompanyCertEntity> filterCompanyCert(FilterCompanyCertRequest filterCompanyCertRequest);
CompanyCertEntity findCompanyCert(Long CustomerId);
CompanyCertEntity findCompanyCertByName(String name);
List<CompanyCertEntity> getCompanyCert(FilterCompanyCertRequest filterCompanyCertRequest);
boolean updateCompanyCert(CompanyCertEntity companyCertEntity);
boolean insertCompanyCert(CompanyCertEntity companyCertEntity);
boolean deleteById(String id);
}

@ -1,26 +0,0 @@
package com.glxp.sale.admin.service.info;
import com.glxp.sale.admin.entity.info.CompanyCertEntity;
import com.glxp.sale.admin.entity.info.CompanySalesmanEntity;
import com.glxp.sale.admin.req.info.FilterCompanyCertRequest;
import com.glxp.sale.admin.req.info.FilterCompanySalesmanRequest;
import java.util.List;
public interface CompanySalesmanService {
List<CompanySalesmanEntity> filterCompanySalesman(FilterCompanySalesmanRequest filterCompanySalesmanRequest);
CompanySalesmanEntity findCompanySalesman(Long CustomerId);
CompanySalesmanEntity findCompanySalesmanByName(String name);
List<CompanySalesmanEntity> getCompanySalesman(FilterCompanySalesmanRequest filterCompanySalesmanRequest);
boolean updateCompanySalesman(CompanySalesmanEntity companyCertEntity);
boolean insertCompanySalesman(CompanySalesmanEntity companyCertEntity);
boolean deleteById(String id);
}

@ -1,26 +0,0 @@
package com.glxp.sale.admin.service.info;
import com.glxp.sale.admin.entity.info.CompanySalesmanEntity;
import com.glxp.sale.admin.entity.info.CompanySalesmanUpdateLogEntity;
import com.glxp.sale.admin.req.info.FilterCompanySalesmanRequest;
import com.glxp.sale.admin.req.info.FilterCompanySalesmanUpdateLogRequest;
import java.util.List;
public interface CompanySalesmanUpdateLogService {
List<CompanySalesmanUpdateLogEntity> filterCompanySalesmanUpdateLog(FilterCompanySalesmanUpdateLogRequest filterCompanySalesmanUpdateLogRequest);
CompanySalesmanUpdateLogEntity findCompanySalesmanUpdateLog(Long CustomerId);
CompanySalesmanUpdateLogEntity findCompanySalesmanUpdateLogBySubmit(String submit);
List<CompanySalesmanUpdateLogEntity> getCompanySalesmanUpdateLog(FilterCompanySalesmanUpdateLogRequest filterCompanySalesmanUpdateLogRequest);
boolean updateCompanySalesmanUpdateLog(CompanySalesmanUpdateLogEntity companySalesmanUpdateLogEntity);
boolean insertCompanySalesmanUpdateLog(CompanySalesmanUpdateLogEntity companySalesmanUpdateLogEntity);
boolean deleteById(String id);
}

@ -1,7 +1,6 @@
package com.glxp.sale.admin.service.info;
import com.glxp.sale.admin.entity.info.AliKeyEntity;
import com.glxp.sale.admin.entity.info.CompanyEntity;
import com.glxp.sale.admin.req.info.FilterCompanyRequest;
@ -21,6 +20,5 @@ public interface CompanyService {
boolean insertCompany(CompanyEntity companyEntity);
AliKeyEntity findKey(String customerId);
}

@ -1,26 +0,0 @@
package com.glxp.sale.admin.service.info;
import com.glxp.sale.admin.entity.info.CompanySalesmanUpdateLogEntity;
import com.glxp.sale.admin.entity.info.CompanyUpdateLogEntity;
import com.glxp.sale.admin.req.info.FilterCompanySalesmanUpdateLogRequest;
import com.glxp.sale.admin.req.info.FilterCompanyUpdateLogRequest;
import java.util.List;
public interface CompanyUpdateLogService {
List<CompanyUpdateLogEntity> filterCompanyUpdateLog(FilterCompanyUpdateLogRequest filterCompanyUpdateLogRequest);
CompanyUpdateLogEntity findCompanyUpdateLog(Long CustomerId);
CompanyUpdateLogEntity findCompanyUpdateLogBySubmit(String submit);
List<CompanyUpdateLogEntity> getCompanyUpdateLog(FilterCompanyUpdateLogRequest filterCompanyUpdateLogRequest);
boolean updateCompanyUpdateLog(CompanyUpdateLogEntity companyUpdateLogEntity);
boolean insertCompanyUpdateLog(CompanyUpdateLogEntity companyUpdateLogEntity);
boolean deleteById(String id);
}

@ -1,20 +0,0 @@
package com.glxp.sale.admin.service.info;
import com.glxp.sale.admin.entity.info.DeviceKeyEntity;
import com.glxp.sale.admin.req.info.DeleteRequest;
import com.glxp.sale.admin.req.info.FilterDeviceKeyRequest;
import java.util.List;
public interface DeviceKeyService {
List<DeviceKeyEntity> findDeviceKey(FilterDeviceKeyRequest filterDeviceKeyRequest);
DeviceKeyEntity findDeviceByImei(FilterDeviceKeyRequest filterDeviceKeyRequest);
void insertDeviceKey(DeviceKeyEntity deviceKeyEntity);
void updateDeviceKeyByImei(DeviceKeyEntity deviceKeyEntity);
void updateDeviceKey(DeviceKeyEntity deviceKeyEntity);
void deleteDeviceKey(DeleteRequest deleteRequest);
}

@ -1,29 +0,0 @@
package com.glxp.sale.admin.service.info;
import com.glxp.sale.admin.entity.info.CompanyCertEntity;
import com.glxp.sale.admin.entity.info.SupplierEnterpriseBasicCertEntity;
import com.glxp.sale.admin.req.info.FilterCompanyCertRequest;
import com.glxp.sale.admin.req.info.FilterSuppliersEnterpriseBasicCertRequest;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface SuppliersEnterpriseBasicCertService {
List<SupplierEnterpriseBasicCertEntity> filterCompanyCert(FilterSuppliersEnterpriseBasicCertRequest filterSuppliersEnterpriseBasicCertRequest);
SupplierEnterpriseBasicCertEntity findCompanyCert(Long enterpriseId);
SupplierEnterpriseBasicCertEntity findCompanyCertByName(String name);
List<SupplierEnterpriseBasicCertEntity> getCompanyCert(FilterSuppliersEnterpriseBasicCertRequest filterSuppliersEnterpriseBasicCertRequest);
boolean updateCompanyCert(SupplierEnterpriseBasicCertEntity supplierEnterpriseBasicCertEntity);
boolean insertCompanyCert(SupplierEnterpriseBasicCertEntity supplierEnterpriseBasicCertEntity);
boolean deleteById(String id);
boolean deleteByEnterpriseId(@Param("enterpriseId") String enterpriseId);
}

@ -1,23 +0,0 @@
package com.glxp.sale.admin.service.info;
import com.glxp.sale.admin.entity.info.SuppliersEnterpriseBasicEntity;
import com.glxp.sale.admin.req.info.SuppliersEnterpriseBasicRequest;
import java.util.List;
public interface SuppliersEnterpriseBasicService {
SuppliersEnterpriseBasicEntity findCompany(Long id);
SuppliersEnterpriseBasicEntity findCompanyByName(String companyName);
List<SuppliersEnterpriseBasicEntity> getCompany(SuppliersEnterpriseBasicRequest suppliersEnterpriseBasicRequest);
boolean modifyCompany(SuppliersEnterpriseBasicEntity suppliersEnterpriseBasicEntity);
boolean insertCompany(SuppliersEnterpriseBasicEntity suppliersEnterpriseBasicEntity);
boolean deleteById(String id);
}

@ -1,24 +0,0 @@
package com.glxp.sale.admin.service.info;
import com.glxp.sale.admin.entity.info.SuppliersRegistrationBasicEntity;
import com.glxp.sale.admin.req.info.SuppliersRegistrationBasicRequest;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface SuppliersRegistrationBasicService {
SuppliersRegistrationBasicEntity findRegistration(Long id);
SuppliersRegistrationBasicEntity findRegistrationByName(String recordProductName);
List<SuppliersRegistrationBasicEntity> getRegistration(SuppliersRegistrationBasicRequest suppliersRegistrationBasicRequest);
boolean modifyRegistration(SuppliersRegistrationBasicEntity suppliersRegistrationBasicEntity);
boolean insertRegistration(SuppliersRegistrationBasicEntity suppliersRegistrationBasicEntity);
boolean deleteById(@Param("id") String id);
boolean deleteByEnterpriseId(@Param("enterpriseId") String enterpriseId);
}

@ -1,39 +0,0 @@
package com.glxp.sale.admin.service.info.impl;
import com.glxp.sale.admin.dao.info.AliCertDao;
import com.glxp.sale.admin.entity.info.AliCertEntity;
import com.glxp.sale.admin.req.info.DeleteAliCertRequest;
import com.glxp.sale.admin.req.info.FilterAliCertRequest;
import com.glxp.sale.admin.service.info.AliCertService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
public class AliCertServiceImpl implements AliCertService {
@Resource
AliCertDao aliCertDao;
@Override
public boolean insertAliCert(AliCertEntity aliCertEntity) {
return aliCertDao.insertAliCert(aliCertEntity);
}
@Override
public boolean insertAliCertList(List<AliCertEntity> aliCertEntities) {
return aliCertDao.insertAliCertList(aliCertEntities);
}
@Override
public List<AliCertEntity> filterAliCert(FilterAliCertRequest filterAliCertRequest) {
return aliCertDao.filterAliCert(filterAliCertRequest);
}
@Override
public boolean deleteAliCert(DeleteAliCertRequest deleteAliCertRequest) {
return aliCertDao.deleteAliCert(deleteAliCertRequest);
}
}

@ -1,35 +0,0 @@
package com.glxp.sale.admin.service.info.impl;
import com.glxp.sale.admin.dao.info.ApilogDao;
import com.glxp.sale.admin.entity.info.ApilogEntity;
import com.glxp.sale.admin.req.info.DeleteApilogRequest;
import com.glxp.sale.admin.service.info.ApilogService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class ApilogServiceImpl implements ApilogService {
@Resource
ApilogDao apilogDao;
@Override
public boolean insertApilog(ApilogEntity apilogEntity) {
return apilogDao.insertApilog(apilogEntity);
}
@Override
public boolean updateApilog(ApilogEntity apilogEntity) {
return apilogDao.updateApilog(apilogEntity);
}
@Override
public boolean deleteApilog(DeleteApilogRequest deleteApilogRequest) {
return apilogDao.deleteApilog(deleteApilogRequest);
}
@Override
public boolean addApilog(ApilogEntity apilogEntity) {
return apilogDao.addApilog(apilogEntity);
}
}

@ -1,67 +0,0 @@
package com.glxp.sale.admin.service.info.impl;
import com.github.pagehelper.PageHelper;
import com.glxp.sale.admin.dao.info.CompanyCertDao;
import com.glxp.sale.admin.entity.info.CompanyCertEntity;
import com.glxp.sale.admin.req.info.FilterCompanyCertRequest;
import com.glxp.sale.admin.service.info.CompanyCertService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Service
public class CompanyCertServiceImpl implements CompanyCertService {
@Resource
CompanyCertDao companyCertDao;
@Override
public List<CompanyCertEntity> filterCompanyCert(FilterCompanyCertRequest filterCompanyCertRequest) {
if (filterCompanyCertRequest == null) {
return Collections.emptyList();
}
if (filterCompanyCertRequest.getPage() != null) {
int offset = (filterCompanyCertRequest.getPage() - 1) * filterCompanyCertRequest.getLimit();
PageHelper.offsetPage(offset, filterCompanyCertRequest.getLimit());
}
return companyCertDao.filterCompanyCert(filterCompanyCertRequest);
}
@Override
public CompanyCertEntity findCompanyCert(Long CustomerId) {
return companyCertDao.findCompanyCert(CustomerId);
}
@Override
public List<CompanyCertEntity> getCompanyCert(FilterCompanyCertRequest filterCompanyCertRequest) {
if (filterCompanyCertRequest == null) {
return Collections.emptyList();
}
int offset = (filterCompanyCertRequest.getPage() - 1) * filterCompanyCertRequest.getLimit();
PageHelper.offsetPage(offset, filterCompanyCertRequest.getLimit());
List<CompanyCertEntity> companyEntities = companyCertDao.getCompanyCert(filterCompanyCertRequest);
return companyEntities;
}
@Override
public CompanyCertEntity findCompanyCertByName(String companyName) {
return companyCertDao.findCompanyCertByName(companyName);
}
@Override
public boolean updateCompanyCert(CompanyCertEntity companyCertEntity) {
return companyCertDao.updateCompanyCert(companyCertEntity);
}
@Override
public boolean insertCompanyCert(CompanyCertEntity companyCertEntity) {
return companyCertDao.insertCompanyCert(companyCertEntity);
}
@Override
public boolean deleteById(String id) {
return companyCertDao.deleteById(id);
}
}

@ -1,67 +0,0 @@
package com.glxp.sale.admin.service.info.impl;
import com.github.pagehelper.PageHelper;
import com.glxp.sale.admin.dao.info.CompanySalesmanDao;
import com.glxp.sale.admin.entity.info.CompanySalesmanEntity;
import com.glxp.sale.admin.req.info.FilterCompanySalesmanRequest;
import com.glxp.sale.admin.service.info.CompanySalesmanService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Service
public class CompanySalesmanServiceImpl implements CompanySalesmanService {
@Resource
CompanySalesmanDao companySalesmanDao;
@Override
public List<CompanySalesmanEntity> filterCompanySalesman(FilterCompanySalesmanRequest filterCompanySalesmanRequest) {
if (filterCompanySalesmanRequest == null) {
return Collections.emptyList();
}
if (filterCompanySalesmanRequest.getPage() != null) {
int offset = (filterCompanySalesmanRequest.getPage() - 1) * filterCompanySalesmanRequest.getLimit();
PageHelper.offsetPage(offset, filterCompanySalesmanRequest.getLimit());
}
return companySalesmanDao.filterCompanySalesman(filterCompanySalesmanRequest);
}
@Override
public CompanySalesmanEntity findCompanySalesman(Long CustomerId) {
return companySalesmanDao.findCompanySalesman(CustomerId);
}
@Override
public List<CompanySalesmanEntity> getCompanySalesman(FilterCompanySalesmanRequest filterCompanySalesmanRequest) {
if (filterCompanySalesmanRequest == null) {
return Collections.emptyList();
}
int offset = (filterCompanySalesmanRequest.getPage() - 1) * filterCompanySalesmanRequest.getLimit();
PageHelper.offsetPage(offset, filterCompanySalesmanRequest.getLimit());
List<CompanySalesmanEntity> companyEntities = companySalesmanDao.getCompanySalesman(filterCompanySalesmanRequest);
return companyEntities;
}
@Override
public CompanySalesmanEntity findCompanySalesmanByName(String companyName) {
return companySalesmanDao.findCompanySalesmanByName(companyName);
}
@Override
public boolean updateCompanySalesman(CompanySalesmanEntity companySalesmanEntity) {
return companySalesmanDao.updateCompanySalesman(companySalesmanEntity);
}
@Override
public boolean insertCompanySalesman(CompanySalesmanEntity companySalesmanEntity) {
return companySalesmanDao.insertCompanySalesman(companySalesmanEntity);
}
@Override
public boolean deleteById(String id) {
return companySalesmanDao.deleteById(id);
}
}

@ -1,67 +0,0 @@
package com.glxp.sale.admin.service.info.impl;
import com.github.pagehelper.PageHelper;
import com.glxp.sale.admin.dao.info.CompanySalesmanUpdateLogDao;
import com.glxp.sale.admin.entity.info.CompanySalesmanUpdateLogEntity;
import com.glxp.sale.admin.req.info.FilterCompanySalesmanUpdateLogRequest;
import com.glxp.sale.admin.service.info.CompanySalesmanUpdateLogService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Service
public class CompanySalesmanUpdateLogServiceImpl implements CompanySalesmanUpdateLogService {
@Resource
CompanySalesmanUpdateLogDao companySalesmanUpdateLogDao;
@Override
public List<CompanySalesmanUpdateLogEntity> filterCompanySalesmanUpdateLog(FilterCompanySalesmanUpdateLogRequest filterCompanySalesmanUpdateLogRequest) {
if (filterCompanySalesmanUpdateLogRequest == null) {
return Collections.emptyList();
}
if (filterCompanySalesmanUpdateLogRequest.getPage() != null) {
int offset = (filterCompanySalesmanUpdateLogRequest.getPage() - 1) * filterCompanySalesmanUpdateLogRequest.getLimit();
PageHelper.offsetPage(offset, filterCompanySalesmanUpdateLogRequest.getLimit());
}
return companySalesmanUpdateLogDao.filterCompanySalesmanUpdateLog(filterCompanySalesmanUpdateLogRequest);
}
@Override
public CompanySalesmanUpdateLogEntity findCompanySalesmanUpdateLog(Long CustomerId) {
return companySalesmanUpdateLogDao.findCompanySalesmanUpdateLog(CustomerId);
}
@Override
public List<CompanySalesmanUpdateLogEntity> getCompanySalesmanUpdateLog(FilterCompanySalesmanUpdateLogRequest filterCompanySalesmanUpdateLogRequest) {
if (filterCompanySalesmanUpdateLogRequest == null) {
return Collections.emptyList();
}
int offset = (filterCompanySalesmanUpdateLogRequest.getPage() - 1) * filterCompanySalesmanUpdateLogRequest.getLimit();
PageHelper.offsetPage(offset, filterCompanySalesmanUpdateLogRequest.getLimit());
List<CompanySalesmanUpdateLogEntity> companyEntities = companySalesmanUpdateLogDao.getCompanySalesmanUpdateLog(filterCompanySalesmanUpdateLogRequest);
return companyEntities;
}
@Override
public CompanySalesmanUpdateLogEntity findCompanySalesmanUpdateLogBySubmit(String submit) {
return companySalesmanUpdateLogDao.findCompanySalesmanUpdateLogBySubmit(submit);
}
@Override
public boolean updateCompanySalesmanUpdateLog(CompanySalesmanUpdateLogEntity companySalesmanUpdateLogEntity) {
return companySalesmanUpdateLogDao.updateCompanySalesmanUpdateLog(companySalesmanUpdateLogEntity);
}
@Override
public boolean insertCompanySalesmanUpdateLog(CompanySalesmanUpdateLogEntity companySalesmanUpdateLogEntity) {
return companySalesmanUpdateLogDao.insertCompanySalesmanUpdateLog(companySalesmanUpdateLogEntity);
}
@Override
public boolean deleteById(String id) {
return companySalesmanUpdateLogDao.deleteById(id);
}
}

@ -2,7 +2,6 @@ package com.glxp.sale.admin.service.info.impl;
import com.github.pagehelper.PageHelper;
import com.glxp.sale.admin.dao.info.CompanyDao;
import com.glxp.sale.admin.entity.info.AliKeyEntity;
import com.glxp.sale.admin.entity.info.CompanyEntity;
import com.glxp.sale.admin.req.info.FilterCompanyRequest;
import com.glxp.sale.admin.service.info.CompanyService;
@ -60,8 +59,4 @@ public class CompanyServiceImpl implements CompanyService {
return companyDao.insertCompany(companyEntity);
}
@Override
public AliKeyEntity findKey(String customerId) {
return companyDao.findKey(customerId);
}
}

@ -1,67 +0,0 @@
package com.glxp.sale.admin.service.info.impl;
import com.github.pagehelper.PageHelper;
import com.glxp.sale.admin.dao.info.CompanyUpdateLogDao;
import com.glxp.sale.admin.entity.info.CompanyUpdateLogEntity;
import com.glxp.sale.admin.req.info.FilterCompanyUpdateLogRequest;
import com.glxp.sale.admin.service.info.CompanyUpdateLogService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Service
public class CompanyUpdateLogServiceImpl implements CompanyUpdateLogService {
@Resource
CompanyUpdateLogDao companyUpdateLogDao;
@Override
public List<CompanyUpdateLogEntity> filterCompanyUpdateLog(FilterCompanyUpdateLogRequest filterCompanyUpdateLogRequest) {
if (filterCompanyUpdateLogRequest == null) {
return Collections.emptyList();
}
if (filterCompanyUpdateLogRequest.getPage() != null) {
int offset = (filterCompanyUpdateLogRequest.getPage() - 1) * filterCompanyUpdateLogRequest.getLimit();
PageHelper.offsetPage(offset, filterCompanyUpdateLogRequest.getLimit());
}
return companyUpdateLogDao.filterCompanyUpdateLog(filterCompanyUpdateLogRequest);
}
@Override
public CompanyUpdateLogEntity findCompanyUpdateLog(Long CustomerId) {
return companyUpdateLogDao.findCompanyUpdateLog(CustomerId);
}
@Override
public List<CompanyUpdateLogEntity> getCompanyUpdateLog(FilterCompanyUpdateLogRequest filterCompanyUpdateLogRequest) {
if (filterCompanyUpdateLogRequest == null) {
return Collections.emptyList();
}
int offset = (filterCompanyUpdateLogRequest.getPage() - 1) * filterCompanyUpdateLogRequest.getLimit();
PageHelper.offsetPage(offset, filterCompanyUpdateLogRequest.getLimit());
List<CompanyUpdateLogEntity> companyEntities = companyUpdateLogDao.getCompanyUpdateLog(filterCompanyUpdateLogRequest);
return companyEntities;
}
@Override
public CompanyUpdateLogEntity findCompanyUpdateLogBySubmit(String submit) {
return companyUpdateLogDao.findCompanyUpdateLogBySubmit(submit);
}
@Override
public boolean updateCompanyUpdateLog(CompanyUpdateLogEntity companyUpdateLogEntity) {
return companyUpdateLogDao.updateCompanyUpdateLog(companyUpdateLogEntity);
}
@Override
public boolean insertCompanyUpdateLog(CompanyUpdateLogEntity companyUpdateLogEntity) {
return companyUpdateLogDao.insertCompanyUpdateLog(companyUpdateLogEntity);
}
@Override
public boolean deleteById(String id) {
return companyUpdateLogDao.deleteById(id);
}
}

@ -1,55 +0,0 @@
package com.glxp.sale.admin.service.info.impl;
import com.github.pagehelper.PageHelper;
import com.glxp.sale.admin.dao.info.DeviceKeyDao;
import com.glxp.sale.admin.entity.info.DeviceKeyEntity;
import com.glxp.sale.admin.req.info.DeleteRequest;
import com.glxp.sale.admin.req.info.FilterDeviceKeyRequest;
import com.glxp.sale.admin.service.info.DeviceKeyService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Service
public class DeviceKeyServiceImpl implements DeviceKeyService {
@Resource
DeviceKeyDao deviceKeyDao;
@Override
public List<DeviceKeyEntity> findDeviceKey(FilterDeviceKeyRequest filterDeviceKeyRequest) {
if (filterDeviceKeyRequest == null) {
return Collections.emptyList();
}
int offset = (filterDeviceKeyRequest.getPage() - 1) * filterDeviceKeyRequest.getLimit();
PageHelper.offsetPage(offset, filterDeviceKeyRequest.getLimit());
return deviceKeyDao.findDeviceKey(filterDeviceKeyRequest);
}
@Override
public DeviceKeyEntity findDeviceByImei(FilterDeviceKeyRequest filterDeviceKeyRequest) {
return deviceKeyDao.findDeviceByImei(filterDeviceKeyRequest);
}
@Override
public void insertDeviceKey(DeviceKeyEntity deviceKeyEntity) {
deviceKeyDao.insertDeviceKey(deviceKeyEntity);
}
@Override
public void updateDeviceKeyByImei(DeviceKeyEntity deviceKeyEntity) {
deviceKeyDao.updateDeviceKeyByImei(deviceKeyEntity);
}
@Override
public void updateDeviceKey(DeviceKeyEntity deviceKeyEntity) {
deviceKeyDao.updateDeviceKey(deviceKeyEntity);
}
@Override
public void deleteDeviceKey(DeleteRequest deleteRequest) {
deviceKeyDao.deleteDeviceKey(deleteRequest);
}
}

@ -1,55 +0,0 @@
package com.glxp.sale.admin.service.info.impl;
import com.github.pagehelper.PageHelper;
import com.glxp.sale.admin.dao.info.SuppliersEnterpriseBasicDao;
import com.glxp.sale.admin.entity.info.SuppliersEnterpriseBasicEntity;
import com.glxp.sale.admin.req.info.SuppliersEnterpriseBasicRequest;
import com.glxp.sale.admin.service.info.SuppliersEnterpriseBasicService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Service
public class SuppliersEnterpriseBasicServiceImpl implements SuppliersEnterpriseBasicService {
@Resource
SuppliersEnterpriseBasicDao suppliersEnterpriseBasicDao;
@Override
public SuppliersEnterpriseBasicEntity findCompany(Long id) {
return suppliersEnterpriseBasicDao.findCompany(id);
}
@Override
public SuppliersEnterpriseBasicEntity findCompanyByName(String companyName) {
return suppliersEnterpriseBasicDao.findCompanyByName(companyName);
}
@Override
public List<SuppliersEnterpriseBasicEntity> getCompany(SuppliersEnterpriseBasicRequest suppliersEnterpriseBasicRequest) {
if (suppliersEnterpriseBasicRequest == null) {
return Collections.emptyList();
}
int offset = (suppliersEnterpriseBasicRequest.getPage() - 1) * suppliersEnterpriseBasicRequest.getLimit();
PageHelper.offsetPage(offset, suppliersEnterpriseBasicRequest.getLimit());
List<SuppliersEnterpriseBasicEntity> companyEntities = suppliersEnterpriseBasicDao.getCompany(suppliersEnterpriseBasicRequest);
return companyEntities;
}
@Override
public boolean modifyCompany(SuppliersEnterpriseBasicEntity companyEntity) {
return suppliersEnterpriseBasicDao.modifyCompany(companyEntity);
}
@Override
public boolean insertCompany(SuppliersEnterpriseBasicEntity companyEntity) {
return suppliersEnterpriseBasicDao.insertCompany(companyEntity);
}
@Override
public boolean deleteById(String id) {
return suppliersEnterpriseBasicDao.deleteById(id);
}
}

@ -1,75 +0,0 @@
package com.glxp.sale.admin.service.info.impl;
import com.github.pagehelper.PageHelper;
import com.glxp.sale.admin.dao.info.SuppliersEnterpriseBasicCertDao;
import com.glxp.sale.admin.entity.info.SupplierEnterpriseBasicCertEntity;
import com.glxp.sale.admin.req.info.FilterSuppliersEnterpriseBasicCertRequest;
import com.glxp.sale.admin.service.info.CompanyCertService;
import com.glxp.sale.admin.service.info.SuppliersEnterpriseBasicCertService;
import com.glxp.sale.admin.service.info.SuppliersEnterpriseBasicService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Service
public class SuppliersEnterpriseCertServiceImpl implements SuppliersEnterpriseBasicCertService {
@Resource
SuppliersEnterpriseBasicCertDao suppliersEnterpriseBasicCertDao;
@Override
public List<SupplierEnterpriseBasicCertEntity> filterCompanyCert(FilterSuppliersEnterpriseBasicCertRequest filterSuppliersEnterpriseBasicCertRequest) {
if (filterSuppliersEnterpriseBasicCertRequest == null) {
return Collections.emptyList();
}
if (filterSuppliersEnterpriseBasicCertRequest.getPage() != null) {
int offset = (filterSuppliersEnterpriseBasicCertRequest.getPage() - 1) * filterSuppliersEnterpriseBasicCertRequest.getLimit();
PageHelper.offsetPage(offset, filterSuppliersEnterpriseBasicCertRequest.getLimit());
}
return suppliersEnterpriseBasicCertDao.filterCompanyCert(filterSuppliersEnterpriseBasicCertRequest);
}
@Override
public SupplierEnterpriseBasicCertEntity findCompanyCert(Long enterpriseId) {
return suppliersEnterpriseBasicCertDao.findCompanyCert(enterpriseId);
}
@Override
public List<SupplierEnterpriseBasicCertEntity> getCompanyCert(FilterSuppliersEnterpriseBasicCertRequest filterSuppliersEnterpriseBasicCertRequest) {
if (filterSuppliersEnterpriseBasicCertRequest == null) {
return Collections.emptyList();
}
int offset = (filterSuppliersEnterpriseBasicCertRequest.getPage() - 1) * filterSuppliersEnterpriseBasicCertRequest.getLimit();
PageHelper.offsetPage(offset, filterSuppliersEnterpriseBasicCertRequest.getLimit());
List<SupplierEnterpriseBasicCertEntity> companyEntities = suppliersEnterpriseBasicCertDao.getCompanyCert(filterSuppliersEnterpriseBasicCertRequest);
return companyEntities;
}
@Override
public SupplierEnterpriseBasicCertEntity findCompanyCertByName(String companyName) {
return suppliersEnterpriseBasicCertDao.findCompanyCertByName(companyName);
}
@Override
public boolean updateCompanyCert(SupplierEnterpriseBasicCertEntity supplierEnterpriseBasicCertEntity) {
return suppliersEnterpriseBasicCertDao.updateCompanyCert(supplierEnterpriseBasicCertEntity);
}
@Override
public boolean insertCompanyCert(SupplierEnterpriseBasicCertEntity supplierEnterpriseBasicCertEntity) {
return suppliersEnterpriseBasicCertDao.insertCompanyCert(supplierEnterpriseBasicCertEntity);
}
@Override
public boolean deleteById(String id) {
return suppliersEnterpriseBasicCertDao.deleteById(id);
}
@Override
public boolean deleteByEnterpriseId(String enterpriseId) {
return suppliersEnterpriseBasicCertDao.deleteByEnterpriseId(enterpriseId);
}
}

@ -1,61 +0,0 @@
package com.glxp.sale.admin.service.info.impl;
import com.github.pagehelper.PageHelper;
import com.glxp.sale.admin.dao.info.SuppliersRegistrationBasicDao;
import com.glxp.sale.admin.entity.info.SuppliersRegistrationBasicEntity;
import com.glxp.sale.admin.req.info.SuppliersRegistrationBasicRequest;
import com.glxp.sale.admin.service.info.SuppliersRegistrationBasicService;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Service
public class SuppliersRegistrationBasicServiceImpl implements SuppliersRegistrationBasicService {
@Resource
SuppliersRegistrationBasicDao suppliersRegistrationBasicDao;
@Override
public SuppliersRegistrationBasicEntity findRegistration(Long id) {
return suppliersRegistrationBasicDao.findRegistration(id);
}
@Override
public SuppliersRegistrationBasicEntity findRegistrationByName(String recordProductName) {
return suppliersRegistrationBasicDao.findRegistrationByName(recordProductName);
}
@Override
public List<SuppliersRegistrationBasicEntity> getRegistration(SuppliersRegistrationBasicRequest suppliersRegistrationBasicRequest) {
if (suppliersRegistrationBasicRequest == null) {
return Collections.emptyList();
}
int offset = (suppliersRegistrationBasicRequest.getPage() - 1) * suppliersRegistrationBasicRequest.getLimit();
PageHelper.offsetPage(offset, suppliersRegistrationBasicRequest.getLimit());
List<SuppliersRegistrationBasicEntity> companyEntities = suppliersRegistrationBasicDao.getRegistration(suppliersRegistrationBasicRequest);
return companyEntities;
}
@Override
public boolean modifyRegistration(SuppliersRegistrationBasicEntity companyEntity) {
return suppliersRegistrationBasicDao.modifyRegistration(companyEntity);
}
@Override
public boolean insertRegistration(SuppliersRegistrationBasicEntity companyEntity) {
return suppliersRegistrationBasicDao.insertRegistration(companyEntity);
}
@Override
public boolean deleteById(String id) {
return suppliersRegistrationBasicDao.deleteById(id);
}
@Override
public boolean deleteByEnterpriseId(String enterpriseId) {
return suppliersRegistrationBasicDao.deleteByEnterpriseId(enterpriseId);
}
}

@ -32,10 +32,10 @@ back_file_path=D:/share/udisps/back/
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8
#UDI管理系统地址
UDIWMS_IP=http://139.9.178.73:8080/UDI_WMS_MC
UDIWMS_IP=http://192.168.0.109:9991
#UDIWMS_IP=http://127.0.0.1:9991
#自助平台地址
SPMS_IP=http://127.0.0.1:9996
SPMS_IP=http://192.168.0.109:9996
#SPMS_IP=http://139.9.178.73:8080/SPMS_SERVER
API_KEY=1101
API_SECRET=zBITspLNvuoEd4FaamlSoqxRHmNsmQ9L

@ -1,59 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.sale.admin.dao.info.AliCertDao">
<insert id="insertAliCert" keyProperty="id"
parameterType="com.glxp.sale.admin.entity.info.AliCertEntity">
replace INTO alicert
(appKey,appSecret,companyName,aliUser,aliPasswd)
values
(
#{appKey},
#{appSecret},
#{companyName},
#{aliUser},
#{aliPasswd}
)
</insert>
<insert id="insertAliCertList" keyProperty="id"
parameterType="com.glxp.sale.admin.entity.info.AliCertEntity">
replace INTO alicert
(appKey,appSecret,companyName,aliUser,aliPasswd)
VALUES
<foreach collection="aliCertEntities" item="item" index="index"
separator=",">
(
#{item.appKey},
#{item.appSecret},
#{item.companyName},
#{item.aliUser},
#{item.aliPasswd}
)
</foreach>
</insert>
<delete id="deleteAliCert" parameterType="com.glxp.sale.admin.req.info.DeleteAliCertRequest">
delete from alicert where id = #{id}
</delete>
<select id="filterAliCert" parameterType="com.glxp.sale.admin.req.info.FilterAliCertRequest"
resultType="com.glxp.sale.admin.entity.info.AliCertEntity">
select * from alicert
<where>
<if test="id != null and id != ''">
and id = #{id}
</if>
</where>
</select>
</mapper>

@ -1,140 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.sale.admin.dao.info.ApilogDao">
<insert id="insertApilog" keyProperty="id"
parameterType="com.glxp.sale.admin.entity.info.ApilogEntity">
insert INTO api_log
(customerId,lsyd_uploadretail,lsyd_uploadinoutbill,lsyd_query_billstatus,
lsyd_query_upbillcode,lsyd_query_upbilldetail,lsyd_query_relation,
lsyd_query_codedetail,lsyd_query_getentinfo,lsyd_listupout,lsyd_listupout_detail,
kyt_uploadcircubill,kyt_searchstatus,kyt_getbyentid,kyt_getbyrefentid,kyt_listparts,
kyt_synonymauths,kyt_drugtable,kyt_listupout,kyt_uploadrelation,kyt_uploadinoutbill,
kyt_singlerelation,kyt_codeprocess,bill_upbill_detail_withcode,kyt_getentinfo,
kyt_searchbill,kyt_querycodeactive,kyt_querycode,kyt_listparts_byagent,kyt_drugrescode,kyt_remnantbill_upload)
values
(
#{customerId},
#{lsyd_uploadretail},
#{lsyd_uploadinoutbill},
#{lsyd_query_billstatus},
#{lsyd_query_upbillcode},
#{lsyd_query_upbilldetail},
#{lsyd_query_relation},
#{lsyd_query_codedetail},
#{lsyd_query_getentinfo},
#{lsyd_listupout},
#{lsyd_listupout_detail},
#{kyt_uploadcircubill},
#{kyt_searchstatus},
#{kyt_getbyentid},
#{kyt_getbyrefentid},
#{kyt_listparts},
#{kyt_synonymauths},
#{kyt_drugtable},
#{kyt_listupout},
#{kyt_uploadrelation},
#{kyt_uploadinoutbill},
#{kyt_singlerelation},
#{kyt_codeprocess},
#{bill_upbill_detail_withcode},
#{kyt_getentinfo},
#{kyt_searchbill},
#{kyt_querycodeactive},
#{kyt_querycode},
#{kyt_listparts_byagent},
#{kyt_drugrescode},
#{kyt_remnantbill_upload}
)
</insert>
<delete id="deleteApilog" parameterType="com.glxp.sale.admin.req.info.DeleteApilogRequest">
delete from api_log where id = #{id}
</delete>
<update id="updateApilog" parameterType="com.glxp.sale.admin.entity.info.ApilogEntity">
UPDATE api_log
<set>
<if test="lsyd_uploadretail != null">lsyd_uploadretail=#{lsyd_uploadretail},</if>
<if test="lsyd_uploadinoutbill != null">lsyd_uploadinoutbill=#{lsyd_uploadinoutbill},</if>
<if test="lsyd_query_billstatus != null">lsyd_query_billstatus=#{lsyd_query_billstatus},</if>
<if test="lsyd_query_upbillcode != null">lsyd_query_upbillcode=#{lsyd_query_upbillcode},</if>
<if test="lsyd_query_upbilldetail != null">lsyd_query_upbilldetail=#{lsyd_query_upbilldetail},</if>
<if test="lsyd_query_relation != null">lsyd_query_relation=#{lsyd_query_relation},</if>
<if test="lsyd_query_codedetail != null">lsyd_query_codedetail=#{lsyd_query_codedetail},</if>
<if test="lsyd_query_getentinfo != null">lsyd_query_getentinfo=#{lsyd_query_getentinfo},</if>
<if test="lsyd_listupout != null">lsyd_listupout=#{lsyd_listupout},</if>
<if test="lsyd_listupout_detail != null">lsyd_listupout_detail=#{lsyd_listupout_detail},</if>
<if test="kyt_uploadcircubill != null">kyt_uploadcircubill=#{kyt_uploadcircubill},</if>
<if test="kyt_searchstatus != null">kyt_searchstatus=#{kyt_searchstatus},</if>
<if test="kyt_getbyentid != null">kyt_getbyentid=#{kyt_getbyentid},</if>
<if test="kyt_getbyrefentid != null">kyt_getbyrefentid=#{kyt_getbyrefentid},</if>
<if test="kyt_listparts != null">kyt_listparts=#{kyt_listparts},</if>
<if test="kyt_synonymauths != null">kyt_synonymauths=#{kyt_synonymauths},</if>
<if test="kyt_drugtable != null">kyt_drugtable=#{kyt_drugtable},</if>
<if test="kyt_listupout != null">kyt_listupout=#{kyt_listupout},</if>
<if test="kyt_uploadrelation != null">kyt_uploadrelation=#{kyt_uploadrelation},</if>
<if test="kyt_uploadinoutbill != null">kyt_uploadinoutbill=#{kyt_uploadinoutbill},</if>
<if test="kyt_singlerelation != null">kyt_singlerelation=#{kyt_singlerelation},</if>
<if test="kyt_codeprocess != null">kyt_codeprocess=#{kyt_codeprocess},</if>
<if test="bill_upbill_detail_withcode != null">bill_upbill_detail_withcode=#{bill_upbill_detail_withcode},</if>
<if test="kyt_getentinfo != null">kyt_getentinfo=#{kyt_getentinfo},</if>
<if test="kyt_searchbill != null">kyt_searchbill=#{kyt_searchbill},</if>
<if test="kyt_querycodeactive != null">kyt_querycodeactive=#{kyt_querycodeactive},</if>
<if test="kyt_querycode != null">kyt_querycode=#{kyt_querycode},</if>
<if test="kyt_listparts_byagent != null">kyt_listparts_byagent=#{kyt_listparts_byagent},</if>
<if test="kyt_drugrescode != null">kyt_drugrescode=#{kyt_drugrescode},</if>
<if test="kyt_remnantbill_upload != null">kyt_remnantbill_upload=#{kyt_remnantbill_upload},</if>
</set>
WHERE customerId=#{customerId}
</update>
<update id="addApilog" parameterType="com.glxp.sale.admin.entity.info.ApilogEntity">
UPDATE api_log
<set>
<if test="lsyd_uploadretail != null">lsyd_uploadretail=lsyd_uploadretail+1,</if>
<if test="lsyd_uploadinoutbill != null">lsyd_uploadinoutbill=lsyd_uploadinoutbill+1,</if>
<if test="lsyd_query_billstatus != null">lsyd_query_billstatus=lsyd_query_billstatus+1,</if>
<if test="lsyd_query_upbillcode != null">lsyd_query_upbillcode=lsyd_query_upbillcode+1,</if>
<if test="lsyd_query_upbilldetail != null">lsyd_query_upbilldetail=lsyd_query_upbilldetail+1,</if>
<if test="lsyd_query_relation != null">lsyd_query_relation=lsyd_query_relation+1,</if>
<if test="lsyd_query_codedetail != null">lsyd_query_codedetail=lsyd_query_codedetail+1,</if>
<if test="lsyd_query_getentinfo != null">lsyd_query_getentinfo=lsyd_query_getentinfo+1,</if>
<if test="lsyd_listupout != null">lsyd_listupout=lsyd_listupout+1,</if>
<if test="lsyd_listupout_detail != null">lsyd_listupout_detail=lsyd_listupout_detail+1,</if>
<if test="kyt_uploadcircubill != null">kyt_uploadcircubill=kyt_uploadcircubill+1,</if>
<if test="kyt_searchstatus != null">kyt_searchstatus=kyt_searchstatus+1,</if>
<if test="kyt_getbyentid != null">kyt_getbyentid=kyt_getbyentid+1,</if>
<if test="kyt_getbyrefentid != null">kyt_getbyrefentid=kyt_getbyrefentid+1,</if>
<if test="kyt_listparts != null">kyt_listparts=kyt_listparts+1,</if>
<if test="kyt_synonymauths != null">kyt_synonymauths=kyt_synonymauths+1,</if>
<if test="kyt_drugtable != null">kyt_drugtable=kyt_drugtable+1,</if>
<if test="kyt_listupout != null">kyt_listupout=kyt_listupout+1,</if>
<if test="kyt_uploadrelation != null">kyt_uploadrelation=kyt_uploadrelation+1,</if>
<if test="kyt_uploadinoutbill != null">kyt_uploadinoutbill=kyt_uploadinoutbill+1,</if>
<if test="kyt_singlerelation != null">kyt_singlerelation=kyt_singlerelation+1,</if>
<if test="kyt_codeprocess != null">kyt_codeprocess=kyt_codeprocess+1,</if>
<if test="bill_upbill_detail_withcode != null">bill_upbill_detail_withcode=bill_upbill_detail_withcode+1,</if>
<if test="kyt_getentinfo != null">kyt_getentinfo=kyt_getentinfo+1,</if>
<if test="kyt_searchbill != null">kyt_searchbill=kyt_searchbill+1,</if>
<if test="kyt_querycodeactive != null">kyt_querycodeactive=kyt_querycodeactive+1,</if>
<if test="kyt_querycode != null">kyt_querycode=kyt_querycode+1,</if>
<if test="kyt_listparts_byagent != null">kyt_listparts_byagent=kyt_listparts_byagent+1,</if>
<if test="kyt_drugrescode != null">kyt_drugrescode=kyt_drugrescode+1,</if>
<if test="kyt_remnantbill_upload != null">kyt_remnantbill_upload=kyt_remnantbill_upload+1,</if>
</set>
WHERE customerId=#{customerId}
</update>
</mapper>

@ -1,70 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.sale.admin.dao.info.CompanyCertDao">
<select id="filterCompanyCert" parameterType="com.glxp.sale.admin.req.info.FilterCompanyCertRequest"
resultType="com.glxp.sale.admin.entity.info.CompanyCertEntity">
select * from company_cert
<where>
<if test="customerId != '' and customerId!=null">
and customerId = #{customerId}
</if>
</where>
ORDER BY id DESC
</select>
<select id="findCompanyCert" parameterType="java.lang.Long"
resultType="com.glxp.sale.admin.entity.info.CompanyCertEntity">
SELECT * FROM company_cert where customerId = #{customerId}
</select>
<select id="findCompanyCertByName" parameterType="java.lang.String"
resultType="com.glxp.sale.admin.entity.info.CompanyCertEntity">
SELECT * FROM company_cert where name = #{name}
</select>
<select id="getCompanyCert" parameterType="com.glxp.sale.admin.req.info.FilterCompanyCertRequest"
resultType="com.glxp.sale.admin.entity.info.CompanyCertEntity">
SELECT * FROM company_cert
<where>
<if test="customerId != null and customerId != ''">
and customerId = #{customerId}
</if>
<if test="name != null and name != ''">
and name like concat('%',#{name},'%')
</if>
</where>
</select>
<update id="updateCompanyCert" parameterType="com.glxp.sale.admin.entity.info.CompanyCertEntity">
UPDATE company_cert
<set>
<if test="name != null">name=#{name},</if>
<if test="customerId != null">customerId=#{customerId},</if>
<if test="filePath != null">filePath=#{filePath},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="create_time != null">create_time=#{create_time},</if>
<if test="update_time != null">update_time=#{update_time},</if>
</set>
WHERE id = #{id}
</update>
<insert id="insertCompanyCert" parameterType="com.glxp.sale.admin.entity.info.CompanyCertEntity">
INSERT INTO company_cert(name,customerId,filePath,remark,create_time,update_time) values
( #{name},
#{customerId},
#{filePath},
#{remark},
#{create_time},
#{update_time})
</insert>
<delete id="deleteById" parameterType="Map">
DELETE
FROM company_cert
WHERE id = #{id}
</delete>
</mapper>

@ -166,14 +166,6 @@
#{filePath4},#{unitIdFk}
)
</insert>
<select id="findKey" parameterType="java.lang.String"
resultType="com.glxp.sale.admin.entity.info.AliKeyEntity">
SELECT
company.refEntId,company.entId,
alicert.appKey,alicert.appSecret
from company INNER JOIN alicert on company.certIdFk = alicert.id
where company.customerId = #{customerId}
</select>
</mapper>

@ -1,91 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.sale.admin.dao.info.CompanySalesmanDao">
<select id="filterCompanySalesman" parameterType="com.glxp.sale.admin.req.info.FilterCompanySalesmanRequest"
resultType="com.glxp.sale.admin.entity.info.CompanySalesmanEntity">
select * from company_salesman
<where>
<if test="customerId != '' and customerId!=null">
and customerId = #{customerId}
</if>
<if test="name != '' and name!=null">
AND name LIKE concat(#{name},'%')
</if>
<if test="auditStatus != '' and auditStatus!=null">
and auditStatus = #{auditStatus}
</if>
</where>
ORDER BY id DESC
</select>
<select id="findCompanySalesman" parameterType="java.lang.Long"
resultType="com.glxp.sale.admin.entity.info.CompanySalesmanEntity">
SELECT * FROM company_salesman where customerId = #{customerId}
</select>
<select id="findCompanySalesmanByName" parameterType="java.lang.String"
resultType="com.glxp.sale.admin.entity.info.CompanySalesmanEntity">
SELECT * FROM company_salesman where name = #{name}
</select>
<select id="getCompanySalesman" parameterType="com.glxp.sale.admin.req.info.FilterCompanySalesmanRequest"
resultType="com.glxp.sale.admin.entity.info.CompanySalesmanEntity">
SELECT * FROM company_salesman
<where>
<if test="customerId != null and customerId != ''">
and customerId = #{customerId}
</if>
<if test="name != null and name != ''">
and name like concat('%',#{name},'%')
</if>
</where>
</select>
<update id="updateCompanySalesman" parameterType="com.glxp.sale.admin.entity.info.CompanySalesmanEntity">
UPDATE company_salesman
<set>
<if test="customerId != null">customerId=#{customerId},</if>
<if test="name != null">name=#{name},</if>
<if test="tel != null">tel=#{tel},</if>
<if test="phone != null">phone=#{phone},</if>
<if test="email != null">email=#{email},</if>
<if test="certType != null">certType=#{certType},</if>
<if test="certCode != null">certCode=#{certCode},</if>
<if test="filePath != null">filePath=#{filePath},</if>
<if test="filePath2 != null">filePath2=#{filePath2},</if>
<if test="create_time != null">create_time=#{create_time},</if>
<if test="update_time != null">update_time=#{update_time},</if>
<if test="auditStatus != null">auditStatus=#{auditStatus},</if>
</set>
WHERE id = #{id}
</update>
<insert id="insertCompanySalesman" parameterType="com.glxp.sale.admin.entity.info.CompanySalesmanEntity">
INSERT INTO company_salesman(customerId,name,tel,phone,email,certType,certCode,filePath,filePath2,create_time,update_time,
auditStatus) values
(
#{customerId},
#{name},
#{tel},
#{phone},
#{email},
#{certType},
#{certCode},
#{filePath},
#{filePath2},
#{create_time},
#{update_time},
#{auditStatus}
)
</insert>
<delete id="deleteById" parameterType="Map">
DELETE
FROM company_salesman
WHERE id = #{id}
</delete>
</mapper>

@ -1,93 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.sale.admin.dao.info.CompanySalesmanUpdateLogDao">
<select id="filterCompanySalesmanUpdateLog" parameterType="com.glxp.sale.admin.req.info.FilterCompanySalesmanUpdateLogRequest"
resultType="com.glxp.sale.admin.entity.info.CompanySalesmanUpdateLogEntity">
select * from company_salesman_update_log
<where>
<if test="customerId != '' and customerId!=null">
and customerId = #{customerId}
</if>
<if test="submit != null and submit != ''">
and submit like concat('%',#{submit},'%')
</if>
<if test="status != '' and status!=null">
and status = #{status}
</if>
<if test="salesmanId != '' and salesmanId!=null">
and salesmanId = #{salesmanId}
</if>
</where>
ORDER BY id DESC
</select>
<select id="findCompanySalesmanUpdateLog" parameterType="java.lang.Long"
resultType="com.glxp.sale.admin.entity.info.CompanySalesmanUpdateLogEntity">
SELECT * FROM company_salesman_update_log where customerId = #{customerId}
</select>
<select id="findCompanySalesmanUpdateLogBySubmit" parameterType="java.lang.String"
resultType="com.glxp.sale.admin.entity.info.CompanySalesmanUpdateLogEntity">
SELECT * FROM company_salesman_update_log where submit = #{submit}
</select>
<select id="getCompanySalesmanUpdateLog" parameterType="com.glxp.sale.admin.req.info.FilterCompanySalesmanUpdateLogRequest"
resultType="com.glxp.sale.admin.entity.info.CompanySalesmanUpdateLogEntity">
SELECT * FROM company_salesman_update_log
<where>
<if test="customerId != null and customerId != ''">
and customerId = #{customerId}
</if>
<if test="submit != null and submit != ''">
and submit like concat('%',#{submit},'%')
</if>
<if test="status != '' and status!=null">
and status = #{status}
</if>
</where>
</select>
<update id="updateCompanySalesmanUpdateLog" parameterType="com.glxp.sale.admin.entity.info.CompanySalesmanUpdateLogEntity">
UPDATE company_salesman_update_log
<set>
<if test="customerId != null">customerId=#{customerId},</if>
<if test="updateCause != null">updateCause=#{updateCause},</if>
<if test="status != null">status=#{status},</if>
<if test="create_time != null">create_time=#{create_time},</if>
<if test="update_time != null">update_time=#{update_time},</if>
<if test="submit != null">submit=#{submit},</if>
<if test="auditor != null">auditor=#{auditor},</if>
<if test="noPassCause != null">noPassCause=#{noPassCause},</if>
<if test="param != null">param=#{param},</if>
<if test="salesmanId != null">salesmanId=#{salesmanId},</if>
</set>
WHERE id = #{id}
</update>
<insert id="insertCompanySalesmanUpdateLog" parameterType="com.glxp.sale.admin.entity.info.CompanySalesmanUpdateLogEntity">
INSERT INTO company_salesman_update_log(customerId,updateCause,status,create_time,update_time,
submit,auditor,noPassCause,param,salesmanId) values
(
#{customerId},
#{updateCause},
#{status},
#{create_time},
#{update_time},
#{submit},
#{auditor},
#{noPassCause},
#{param},
#{salesmanId}
)
</insert>
<delete id="deleteById" parameterType="Map">
DELETE
FROM company_salesman_update_log
WHERE id = #{id}
</delete>
</mapper>

@ -1,99 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.sale.admin.dao.info.CompanyUpdateLogDao">
<select id="filterCompanyUpdateLog" parameterType="com.glxp.sale.admin.req.info.FilterCompanyUpdateLogRequest"
resultType="com.glxp.sale.admin.entity.info.CompanyUpdateLogEntity">
select * from company_update_log
<where>
<if test="customerId != '' and customerId!=null">
and customerId = #{customerId}
</if>
<if test="submit != null and submit != ''">
and submit like concat('%',#{submit},'%')
</if>
<if test="status != '' and status!=null">
and status = #{status}
</if>
<if test="logType != '' and logType!=null">
and logType = #{logType}
</if>
<if test="noStatus != '' and noStatus!=null">
and status != #{noStatus}
</if>
</where>
ORDER BY id DESC
</select>
<select id="findCompanyUpdateLog" parameterType="java.lang.Long"
resultType="com.glxp.sale.admin.entity.info.CompanyUpdateLogEntity">
SELECT * FROM company_update_log where customerId = #{customerId}
</select>
<select id="findCompanyUpdateLogBySubmit" parameterType="java.lang.String"
resultType="com.glxp.sale.admin.entity.info.CompanyUpdateLogEntity">
SELECT * FROM company_update_log where submit = #{submit}
</select>
<select id="getCompanyUpdateLog" parameterType="com.glxp.sale.admin.req.info.FilterCompanyUpdateLogRequest"
resultType="com.glxp.sale.admin.entity.info.CompanyUpdateLogEntity">
SELECT * FROM company_update_log
<where>
<if test="customerId != null and customerId != ''">
and customerId = #{customerId}
</if>
<if test="submit != null and submit != ''">
and submit like concat('%',#{submit},'%')
</if>
<if test="status != '' and status!=null">
and status = #{status}
</if>
<if test="logType != '' and logType!=null">
and logType = #{logType}
</if>
</where>
</select>
<update id="updateCompanyUpdateLog" parameterType="com.glxp.sale.admin.entity.info.CompanyUpdateLogEntity">
UPDATE company_update_log
<set>
<if test="customerId != null">customerId=#{customerId},</if>
<if test="updateCause != null">updateCause=#{updateCause},</if>
<if test="status != null">status=#{status},</if>
<if test="create_time != null">create_time=#{create_time},</if>
<if test="update_time != null">update_time=#{update_time},</if>
<if test="submit != null">submit=#{submit},</if>
<if test="auditor != null">auditor=#{auditor},</if>
<if test="noPassCause != null">noPassCause=#{noPassCause},</if>
<if test="param != null">param=#{param},</if>
<if test="logType != null">logType=#{logType},</if>
</set>
WHERE id = #{id}
</update>
<insert id="insertCompanyUpdateLog" parameterType="com.glxp.sale.admin.entity.info.CompanyUpdateLogEntity">
INSERT INTO company_update_log(customerId,updateCause,status,create_time,update_time,
submit,auditor,noPassCause,param,logType) values
(
#{customerId},
#{updateCause},
#{status},
#{create_time},
#{update_time},
#{submit},
#{auditor},
#{noPassCause},
#{param},
#{logType}
)
</insert>
<delete id="deleteById" parameterType="Map">
DELETE
FROM company_update_log
WHERE id = #{id}
</delete>
</mapper>

@ -1,85 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.sale.admin.dao.info.DeviceKeyDao">
<select id="findDeviceKey" parameterType="com.glxp.sale.admin.req.info.FilterDeviceKeyRequest"
resultType="com.glxp.sale.admin.entity.info.DeviceKeyEntity">
SELECT * FROM device_check
<where>
<if test="imei != null and imei != ''">
and imei = #{imei}
</if>
<if test="isCheck != null and isCheck != ''">
and isCheck = #{isCheck}
</if>
</where>
</select>
<select id="findDeviceByImei" parameterType="com.glxp.sale.admin.req.info.FilterDeviceKeyRequest"
resultType="com.glxp.sale.admin.entity.info.DeviceKeyEntity">
SELECT * FROM device_check
<where>
<if test="imei != null and imei != ''">
and imei = #{imei}
</if>
</where>
</select>
<update id="updateDeviceKey" parameterType="com.glxp.sale.admin.entity.info.DeviceKeyEntity">
UPDATE device_check
<set>
<if test="isCheck != null">isCheck=#{isCheck},</if>
<if test="companyName != null">companyName=#{companyName},</if>
<if test="phone != null">phone=#{phone},</if>
<if test="contact != null">contact=#{contact},</if>
<if test="imeiKey != null">imeiKey=#{imeiKey},</if>
<if test="date != null">date=#{date},</if>
</set>
WHERE id=#{id}
</update>
<update id="updateDeviceKeyByImei" parameterType="com.glxp.sale.admin.entity.info.DeviceKeyEntity">
UPDATE device_check
<set>
<if test="isCheck != null">isCheck=#{isCheck},</if>
<if test="companyName != null">companyName=#{companyName},</if>
<if test="phone != null">phone=#{phone},</if>
<if test="contact != null">contact=#{contact},</if>
<if test="imeiKey != null">imeiKey=#{imeiKey},</if>
<if test="date != null">date=#{date},</if>
<if test="imei != null">imei=#{imei},</if>
</set>
WHERE imei=#{imei}
</update>
<insert id="insertDeviceKey" parameterType="com.glxp.sale.admin.entity.info.DeviceKeyEntity">
INSERT INTO device_check(
imei,
isCheck,
companyName,
phone,
contact,
date,
imeiKey) values
(
#{imei},
#{isCheck},
#{companyName},
#{phone},
#{contact},
#{date},
#{imeiKey}
)
</insert>
<delete id="deleteDeviceKey" parameterType="Map">
DELETE FROM device_check WHERE id = #{id}
</delete>
</mapper>

@ -1,92 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.sale.admin.dao.info.SuppliersEnterpriseBasicDao">
<select id="findCompany" parameterType="java.lang.Long"
resultType="com.glxp.sale.admin.entity.info.SuppliersEnterpriseBasicEntity">
SELECT * FROM suppliers_enterprise_basic where id = #{id}
</select>
<select id="findCompanyByName" parameterType="java.lang.String"
resultType="com.glxp.sale.admin.entity.info.SuppliersEnterpriseBasicEntity">
SELECT * FROM suppliers_enterprise_basic where companyName = #{companyName}
</select>
<select id="getCompany" parameterType="com.glxp.sale.admin.req.info.SuppliersEnterpriseBasicRequest"
resultType="com.glxp.sale.admin.entity.info.SuppliersEnterpriseBasicEntity">
SELECT * FROM suppliers_enterprise_basic
<where>
<if test="id != null and id != ''">
and id = #{id}
</if>
<if test="companyName != null and companyName != ''">
and companyName like concat('%',#{companyName},'%')
</if>
<if test="creditCode != null and creditCode != ''">
and creditCode like concat('%',#{creditCode},'%')
</if>
<if test="placeArea != null and placeArea != ''">
and placeArea like concat('%',#{placeArea},'%')
</if>
</where>
</select>
<update id="modifyCompany" parameterType="com.glxp.sale.admin.entity.info.SuppliersEnterpriseBasicEntity">
UPDATE suppliers_enterprise_basic
<set>
<if test="companyName != null">companyName=#{companyName},</if>
<if test="creditCode != null">creditCode=#{creditCode},</if>
<if test="companyType != null">companyType=#{companyType},</if>
<if test="placeArea != null">placeArea=#{placeArea},</if>
<if test="placeAreaCode != null">placeAreaCode=#{placeAreaCode},</if>
<if test="placeAddress != null">placeAddress=#{placeAddress},</if>
<if test="legalPersonName != null">legalPersonName=#{legalPersonName},</if>
<if test="legalPersonPapersType != null">legalPersonPapersType=#{legalPersonPapersType},</if>
<if test="legalPersonPapersCode != null">legalPersonPapersCode=#{legalPersonPapersCode},</if>
<if test="productionArea != null">productionArea=#{productionArea},</if>
<if test="productionAreaCode != null">productionAreaCode=#{productionAreaCode},</if>
<if test="productionAddress != null">productionAddress=#{productionAddress},</if>
<if test="registerStatus != null">registerStatus=#{registerStatus},</if>
<if test="productionLicenceNum != null">productionLicenceNum=#{productionLicenceNum},</if>
<if test="productionLicenceDate != null">productionLicenceDate=#{productionLicenceDate},</if>
<if test="productionRecordNum != null">productionRecordNum=#{productionRecordNum},</if>
<if test="productionRecordSection != null">productionRecordSection=#{productionRecordSection},</if>
<if test="productionRecordDate != null">productionRecordDate=#{productionRecordDate},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="createDate != null">create_date=#{createDate},</if>
<if test="updateDate != null">update_date=#{updateDate},</if>
</set>
WHERE id=#{id}
</update>
<insert id="insertCompany" parameterType="com.glxp.sale.admin.entity.info.SuppliersEnterpriseBasicEntity">
INSERT INTO suppliers_enterprise_basic(
companyName,creditCode,companyType,
placeArea,placeAreaCode,placeAddress,
legalPersonName,legalPersonPapersType,legalPersonPapersCode,
productionArea,productionAreaCode,productionAddress,
registerStatus,productionLicenceNum,productionLicenceDate,
productionRecordNum,productionRecordSection,productionRecordDate,
remark,create_date,update_date
) values
(
#{companyName},#{creditCode},#{companyType},
#{placeArea},#{placeAreaCode},#{placeAddress},
#{legalPersonName},#{legalPersonPapersType},#{legalPersonPapersCode},
#{productionArea},#{productionAreaCode},#{productionAddress},
#{registerStatus},#{productionLicenceNum},#{productionLicenceDate},
#{productionRecordNum},#{productionRecordSection},#{productionRecordDate},
#{remark},#{createDate},#{updateDate}
)
</insert>
<delete id="deleteById" parameterType="Map">
DELETE
FROM suppliers_enterprise_basic
WHERE id = #{id}
</delete>
</mapper>

@ -1,76 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.sale.admin.dao.info.SuppliersEnterpriseBasicCertDao">
<select id="filterCompanyCert" parameterType="com.glxp.sale.admin.req.info.FilterSuppliersEnterpriseBasicCertRequest"
resultType="com.glxp.sale.admin.entity.info.SupplierEnterpriseBasicCertEntity">
select * from suppliers_enterprise_basic_cert
<where>
<if test="enterpriseId != '' and enterpriseId!=null">
and enterpriseId = #{enterpriseId}
</if>
</where>
ORDER BY id DESC
</select>
<select id="findCompanyCert" parameterType="java.lang.Long"
resultType="com.glxp.sale.admin.entity.info.SupplierEnterpriseBasicCertEntity">
SELECT * FROM suppliers_enterprise_basic_cert where enterpriseId = #{enterpriseId}
</select>
<select id="findCompanyCertByName" parameterType="java.lang.String"
resultType="com.glxp.sale.admin.entity.info.SupplierEnterpriseBasicCertEntity">
SELECT * FROM suppliers_enterprise_basic_cert where name = #{name}
</select>
<select id="getCompanyCert" parameterType="com.glxp.sale.admin.req.info.FilterSuppliersEnterpriseBasicCertRequest"
resultType="com.glxp.sale.admin.entity.info.SupplierEnterpriseBasicCertEntity">
SELECT * FROM suppliers_enterprise_basic_cert
<where>
<if test="customerId != null and customerId != ''">
and enterpriseId = #{enterpriseId}
</if>
<if test="name != null and name != ''">
and name like concat('%',#{name},'%')
</if>
</where>
</select>
<update id="updateCompanyCert" parameterType="com.glxp.sale.admin.entity.info.SupplierEnterpriseBasicCertEntity">
UPDATE suppliers_enterprise_basic_cert
<set>
<if test="name != null">name=#{name},</if>
<if test="enterpriseId != null">enterpriseId=#{enterpriseId},</if>
<if test="filePath != null">filePath=#{filePath},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="create_time != null">create_time=#{create_time},</if>
<if test="update_time != null">update_time=#{update_time},</if>
</set>
WHERE id = #{id}
</update>
<insert id="insertCompanyCert" parameterType="com.glxp.sale.admin.entity.info.SupplierEnterpriseBasicCertEntity">
INSERT INTO suppliers_enterprise_basic_cert(name,enterpriseId,filePath,remark,create_time,update_time) values
( #{name},
#{enterpriseId},
#{filePath},
#{remark},
#{create_time},
#{update_time})
</insert>
<delete id="deleteById" parameterType="Map">
DELETE
FROM suppliers_enterprise_basic_cert
WHERE id = #{id}
</delete>
<delete id="deleteByEnterpriseId" parameterType="Map">
DELETE
FROM suppliers_enterprise_basic_cert
WHERE enterpriseId = #{enterpriseId}
</delete>
</mapper>

@ -1,115 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.sale.admin.dao.info.SuppliersRegistrationBasicDao">
<select id="findRegistration" parameterType="java.lang.Long"
resultType="com.glxp.sale.admin.entity.info.SuppliersRegistrationBasicEntity">
SELECT * FROM suppliers_registration_basic where id = #{id}
</select>
<select id="findRegistrationByName" parameterType="java.lang.String"
resultType="com.glxp.sale.admin.entity.info.SuppliersRegistrationBasicEntity">
SELECT * FROM suppliers_registration_basic where recordProductName = #{recordProductName}
</select>
<select id="getRegistration" parameterType="com.glxp.sale.admin.req.info.SuppliersRegistrationBasicRequest"
resultType="com.glxp.sale.admin.entity.info.SuppliersRegistrationBasicEntity">
SELECT * FROM suppliers_registration_basic
<where>
<if test="id != null and id != ''">
and id = #{id}
</if>
<if test="enterpriseId != null and enterpriseId != ''">
and enterpriseId = #{enterpriseId}
</if>
<if test="recordCode != null and recordCode != ''">
and recordCode like concat('%',#{recordCode},'%')
</if>
<if test="recordProductName != null and recordProductName != ''">
and recordProductName like concat('%',#{recordProductName},'%')
</if>
<if test="recordPeopleName != null and recordPeopleName != ''">
and recordPeopleName like concat('%',#{recordPeopleName},'%')
</if>
</where>
</select>
<update id="modifyRegistration" parameterType="com.glxp.sale.admin.entity.info.SuppliersRegistrationBasicEntity">
UPDATE suppliers_registration_basic
<set>
<if test="enterpriseId != null">enterpriseId=#{enterpriseId},</if>
<if test="recordCode != null">recordCode=#{recordCode},</if>
<if test="recordProductName != null">recordProductName=#{recordProductName},</if>
<if test="productManageType != null">productManageType=#{productManageType},</if>
<if test="recordPeopleName != null">recordPeopleName=#{recordPeopleName},</if>
<if test="recordPeopleArea != null">recordPeopleArea=#{recordPeopleArea},</if>
<if test="recordPeopleAreaCode != null">recordPeopleAreaCode=#{recordPeopleAreaCode},</if>
<if test="recordPeopleAddress != null">recordPeopleAddress=#{recordPeopleAddress},</if>
<if test="productType != null">productType=#{productType},</if>
<if test="productDirectoryCode != null">productDirectoryCode=#{productDirectoryCode},</if>
<if test="agentName != null">agentName=#{agentName},</if>
<if test="agentArea != null">agentArea=#{agentArea},</if>
<if test="agentAreaCode != null">agentAreaCode=#{agentAreaCode},</if>
<if test="agentAddress != null">agentAddress=#{agentAddress},</if>
<if test="instructions != null">instructions=#{instructions},</if>
<if test="productAddress != null">productAddress=#{productAddress},</if>
<if test="recordText != null">recordText=#{recordText},</if>
<if test="placeOrigin != null">placeOrigin=#{placeOrigin},</if>
<if test="productionRegion != null">productionRegion=#{productionRegion},</if>
<if test="productionCompanyName != null">productionCompanyName=#{productionCompanyName},</if>
<if test="afterSale != null">afterSale=#{afterSale},</if>
<if test="specification != null">specification=#{specification},</if>
<if test="structure != null">structure=#{structure},</if>
<if test="scope != null">scope=#{scope},</if>
<if test="other != null">other=#{other},</if>
<if test="filePath != null">filePath=#{filePath},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="create_date != null">create_date=#{create_date},</if>
<if test="update_date != null">update_date=#{update_date},</if>
</set>
WHERE id=#{id}
</update>
<insert id="insertRegistration" parameterType="com.glxp.sale.admin.entity.info.SuppliersRegistrationBasicEntity">
INSERT INTO suppliers_registration_basic(
enterpriseId,recordCode,recordProductName,
productManageType,recordPeopleName,recordPeopleArea,
recordPeopleAreaCode,recordPeopleAddress,productType,
productDirectoryCode,agentName,agentArea,
agentAreaCode,agentAddress,instructions,
productAddress,recordText,placeOrigin,
productionRegion,productionCompanyName,afterSale,
specification,structure,scope,
other,filePath,remark,
create_date,update_date
) values
(
#{enterpriseId},#{recordCode},#{recordProductName},
#{productManageType},#{recordPeopleName},#{recordPeopleArea},
#{recordPeopleAreaCode},#{recordPeopleAddress},#{productType},
#{productDirectoryCode},#{agentName},#{agentArea},
#{agentAreaCode},#{agentAddress},#{instructions},
#{productAddress},#{recordText},#{placeOrigin},
#{productionRegion},#{productionCompanyName},#{afterSale},
#{specification},#{structure},#{scope},
#{other},#{filePath},#{remark},
#{create_date},#{update_date}
)
</insert>
<delete id="deleteById" parameterType="Map">
DELETE
FROM suppliers_registration_basic
WHERE id = #{id}
</delete>
<delete id="deleteByEnterpriseId" parameterType="Map">
DELETE
FROM suppliers_registration_basic
WHERE enterpriseId = #{enterpriseId}
</delete>
</mapper>
Loading…
Cancel
Save