'123'
This commit is contained in:
parent
a30fa7a018
commit
7affa3a5e5
|
@ -1,5 +1,5 @@
|
|||
#for tests only !
|
||||
#Mon May 27 16:27:32 CST 2024
|
||||
#Wed May 29 10:07:47 CST 2024
|
||||
jco.destination.pool_capacity=10
|
||||
jco.client.lang=ZH
|
||||
jco.client.ashost=172.19.0.120
|
||||
|
|
|
@ -15,10 +15,7 @@ import com.ruoyi.common.utils.DateUtils;
|
|||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.uuid.UUID;
|
||||
import com.ruoyi.customer.domain.RfcResult;
|
||||
import com.ruoyi.customer.domain.qcc.ECIIndustryVerify;
|
||||
import com.ruoyi.customer.domain.qcc.FuzzySearch;
|
||||
import com.ruoyi.customer.domain.qcc.QccECIIndustryVerifyJsonResult;
|
||||
import com.ruoyi.customer.domain.qcc.QccFuzzySearchJsonResult;
|
||||
import com.ruoyi.customer.domain.qcc.*;
|
||||
import com.ruoyi.quot.domain.Quot;
|
||||
import com.ruoyi.system.domain.SysNotice;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
|
@ -73,11 +70,15 @@ public class CustomerController extends BaseController
|
|||
private String Qcc_SecretKey;
|
||||
// 接口请求地址
|
||||
@Value("${qichacha.serviceName}")
|
||||
private String Qcc_serviceName;
|
||||
private String Qcc_serviceName; // 企查查 客户数据接口
|
||||
|
||||
// 接口请求地址
|
||||
@Value("${qichacha.serviceNameGetInfo}")
|
||||
private String Qcc_serviceName_GetInfo;
|
||||
private String Qcc_serviceName_GetInfo; // 企查查 客户行业代码数据接口
|
||||
|
||||
// 接口请求地址
|
||||
@Value("${qichacha.serviceNameVerifyInfo}")
|
||||
private String Qcc_serviceName_VerifyInfo; // 企查查 客户注册资本RegistCapi、人员规模PersonScope、参保人数InsuredCount
|
||||
|
||||
@Autowired
|
||||
private ICustomerService customerService;
|
||||
|
@ -222,27 +223,63 @@ public class CustomerController extends BaseController
|
|||
public AjaxResult commitSAPCustomer(@RequestBody Customer customer)
|
||||
{
|
||||
|
||||
if("1".equals(customer.getCusApprovalStatus())){// 数据组 提交业务员创建的客户数据提交SAP
|
||||
if(StringUtils.isNotEmpty(customer.getCusId())){// 数据组 提交业务员创建的客户数据提交SAP
|
||||
customer.setUpdateBy(getUsername());
|
||||
customer.setCusApprovalStatus("2");//客户提交 状态设置为 已审核
|
||||
}else if(StringUtils.isEmpty(customer.getCusApprovalStatus())){// 数据组创建的客户数据提交SAP
|
||||
}else{// 数据组创建的客户数据提交SAP
|
||||
customer.setCusId(UUID.fastUUID().toString());
|
||||
customer.setCusCode(IdUtils.createNo("KH_",2));
|
||||
customer.setCreateBy(getUsername());
|
||||
customer.setCusApprovalStatus("2");//客户提交 状态设置为 已审核
|
||||
customerService.insertCustomer(customer);
|
||||
}
|
||||
|
||||
// 获取企查查 客户注册资本RegistCapi、人员规模PersonScope、参保人数InsuredCount
|
||||
QccVerifyJsonResult verifyInfo = getQccVerifyInfo(customer.getCusVatNo());
|
||||
if("200".equals(verifyInfo)){
|
||||
if("1".equals(verifyInfo.getResult().getVerifyResult())){//存在数据
|
||||
customer.setCusRegistCapiQcc(verifyInfo.getResult().getData().getRegistCapi());
|
||||
customer.setCusPersonScopeQcc(verifyInfo.getResult().getData().getPersonScope());
|
||||
customer.setCusInsuredCountQcc(verifyInfo.getResult().getData().getInsuredCount());
|
||||
}
|
||||
}
|
||||
|
||||
RfcResult result = SapRfcUtils.sendSAP(customer);
|
||||
String type = result.getType();
|
||||
if("S".equals(type)){
|
||||
customer.setCusSapCode(result.getPartner());
|
||||
customerService.updateCustomer(customer);
|
||||
if(StringUtils.isNotEmpty(customer.getCusId())) {// 数据组 提交业务员创建的客户数据提交SAP
|
||||
customerService.updateCustomer(customer);
|
||||
}else{
|
||||
customerService.insertCustomer(customer);
|
||||
}
|
||||
}else{
|
||||
return error(result.getMessage());
|
||||
}
|
||||
return success(result.getMessage());
|
||||
}
|
||||
|
||||
// 获取企查查 客户注册资本RegistCapi、人员规模PersonScope、参保人数InsuredCount
|
||||
public QccVerifyJsonResult getQccVerifyInfo(String cusVatNo)
|
||||
{
|
||||
QccVerifyJsonResult result = new QccVerifyJsonResult();
|
||||
String reqInterNme = Qcc_serviceName_VerifyInfo;
|
||||
try {
|
||||
if(!StringUtils.isEmpty(cusVatNo)){
|
||||
HttpHead reqHeader = new HttpHead();
|
||||
String[] autherHeader = QiChaChaUtil.RandomAuthentHeader(Qcc_Key, Qcc_SecretKey);
|
||||
reqHeader.setHeader("Token", autherHeader[0]);
|
||||
reqHeader.setHeader("Timespan", autherHeader[1]);
|
||||
String reqUri = reqInterNme.concat("?key=").concat(Qcc_Key).concat("&").concat("searchKey=").concat(cusVatNo);
|
||||
String tokenJson = HttpHelper.httpGet(reqUri, reqHeader.getAllHeaders());
|
||||
System.out.println(String.format("==========================>this is response:{%s}", tokenJson));
|
||||
result = JSON.parseObject(tokenJson, QccVerifyJsonResult.class);
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送信息-数据组审核
|
||||
* @param customer
|
||||
|
|
|
@ -287,7 +287,7 @@ public class excelUtil {
|
|||
wsheet.addCell(label);
|
||||
|
||||
InputStream fileInputStream = new ClassPathResource("/jnlogo.png").getInputStream();
|
||||
File file = new File("logon/"+IdUtils.createNo("jnlogo",3)+".png"); // 指定输出文件路径
|
||||
File file = new File("logon/"+IdUtils.createNo("jnlogo_",3)+".png"); // 指定输出文件路径
|
||||
//转换
|
||||
FileUtils.copyInputStreamToFile(fileInputStream, file);
|
||||
|
||||
|
@ -296,7 +296,7 @@ public class excelUtil {
|
|||
wsheet.addImage(image);
|
||||
|
||||
InputStream fileInputStream2 = new ClassPathResource("/wc.png").getInputStream();
|
||||
File file2 = new File("logon/"+IdUtils.createNo("wc",3)+".png"); // 指定输出文件路径
|
||||
File file2 = new File("logon/"+IdUtils.createNo("wc_",3)+".png"); // 指定输出文件路径
|
||||
//转换
|
||||
FileUtils.copyInputStreamToFile(fileInputStream2, file2);
|
||||
|
||||
|
@ -595,7 +595,7 @@ public class excelUtil {
|
|||
wsheet.addCell(label);
|
||||
|
||||
InputStream fileInputStream = new ClassPathResource("/jnlogo.png").getInputStream();
|
||||
File file = new File("logon/"+IdUtils.createNo("jnlogo",3)+".png"); // 指定输出文件路径
|
||||
File file = new File("logon/"+IdUtils.createNo("jnlogo_",3)+".png"); // 指定输出文件路径
|
||||
//转换
|
||||
FileUtils.copyInputStreamToFile(fileInputStream, file);
|
||||
|
||||
|
@ -604,7 +604,7 @@ public class excelUtil {
|
|||
wsheet.addImage(image);
|
||||
|
||||
InputStream fileInputStream2 = new ClassPathResource("/wc.png").getInputStream();
|
||||
File file2 = new File("logon/"+IdUtils.createNo("wc",3)+".png"); // 指定输出文件路径
|
||||
File file2 = new File("logon/"+IdUtils.createNo("wc_",3)+".png"); // 指定输出文件路径
|
||||
//转换
|
||||
FileUtils.copyInputStreamToFile(fileInputStream2, file2);
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ qichacha.key: 824936f8e78c4f4788978da38b26d488
|
|||
qichacha.secretKey: 8B9EB102FD17E0CF2EDEC0FB507DEC1E
|
||||
qichacha.serviceName: https://api.qichacha.com/FuzzySearch/GetList
|
||||
qichacha.serviceNameGetInfo: https://api.qichacha.com/ECIIndustryVerify/GetInfo
|
||||
qichacha.serviceNameVerifyInfo: https://api.qichacha.com/EnterpriseInfo/Verify
|
||||
|
||||
# SAP-RFC函数
|
||||
sapRfc.ashost: 172.19.0.125 #服务器
|
||||
|
|
|
@ -54,6 +54,13 @@ public class Customer extends BaseEntity
|
|||
/** 企查查行业代码 */
|
||||
private String cusIndustryCodeQcc;
|
||||
|
||||
/** 企查查注册资本 */
|
||||
private String cusRegistCapiQcc;
|
||||
/** 企查查人员规模 */
|
||||
private String cusPersonScopeQcc;
|
||||
/** 企查查参保人数 */
|
||||
private String cusInsuredCountQcc;
|
||||
|
||||
/** 客户组类别 */
|
||||
@Excel(name = "客户组类别",dictType = "cus_group")
|
||||
private String cusGroup;
|
||||
|
@ -198,6 +205,15 @@ public class Customer extends BaseEntity
|
|||
public String getCusIndustryCodeQcc() { return cusIndustryCodeQcc; }
|
||||
|
||||
public void setCusIndustryCodeQcc(String cusIndustryCodeQcc) { this.cusIndustryCodeQcc = cusIndustryCodeQcc; }
|
||||
public String getCusRegistCapiQcc() { return cusRegistCapiQcc; }
|
||||
|
||||
public void setCusRegistCapiQcc(String cusRegistCapiQcc) { this.cusRegistCapiQcc = cusRegistCapiQcc; }
|
||||
public String getCusPersonScopeQcc() { return cusPersonScopeQcc; }
|
||||
|
||||
public void setCusPersonScopeQcc(String cusPersonScopeQcc) { this.cusPersonScopeQcc = cusPersonScopeQcc; }
|
||||
public String getCusInsuredCountQcc() { return cusInsuredCountQcc; }
|
||||
|
||||
public void setCusInsuredCountQcc(String cusInsuredCountQcc) { this.cusInsuredCountQcc = cusInsuredCountQcc; }
|
||||
public void setCusGroup(String cusGroup)
|
||||
{
|
||||
this.cusGroup = cusGroup;
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
package com.ruoyi.customer.domain.qcc;
|
||||
|
||||
public class QccVerifyJsonResult {
|
||||
private String Status;
|
||||
private Verify Result;
|
||||
|
||||
public String getStatus() {
|
||||
return Status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
Status = status;
|
||||
}
|
||||
|
||||
public Verify getResult() {
|
||||
return Result;
|
||||
}
|
||||
|
||||
public void setResult(Verify result) {
|
||||
Result = result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.ruoyi.customer.domain.qcc;
|
||||
|
||||
public class Verify {
|
||||
private String VerifyResult;
|
||||
private VerifyResultData Data;
|
||||
|
||||
public String getVerifyResult() {
|
||||
return VerifyResult;
|
||||
}
|
||||
|
||||
public void setVerifyResult(String verifyResult) {
|
||||
VerifyResult = verifyResult;
|
||||
}
|
||||
|
||||
public VerifyResultData getData() { return Data; }
|
||||
|
||||
public void setData(VerifyResultData data) { Data = data; }
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.ruoyi.customer.domain.qcc;
|
||||
|
||||
public class VerifyResultData {
|
||||
private String RegistCapi;
|
||||
private String PersonScope;
|
||||
private String InsuredCount;
|
||||
|
||||
public String getRegistCapi() {
|
||||
return RegistCapi;
|
||||
}
|
||||
|
||||
public void setRegistCapi(String registCapi) {
|
||||
RegistCapi = registCapi;
|
||||
}
|
||||
|
||||
public String getPersonScope() {
|
||||
return PersonScope;
|
||||
}
|
||||
|
||||
public void setPersonScope(String personScope) {
|
||||
PersonScope = personScope;
|
||||
}
|
||||
|
||||
public String getInsuredCount() {
|
||||
return InsuredCount;
|
||||
}
|
||||
|
||||
public void setInsuredCount(String insuredCount) {
|
||||
InsuredCount = insuredCount;
|
||||
}
|
||||
}
|
|
@ -25,7 +25,7 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="cusState">
|
||||
<!--<el-form-item label="状态" prop="cusState">
|
||||
<el-select v-model="queryParams.cusState" placeholder="请选择客户禁用状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.common_state"
|
||||
|
@ -34,7 +34,7 @@
|
|||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="审批状态" prop="cusApprovalStatus">
|
||||
<el-select v-model="queryParams.cusApprovalStatus" placeholder="请选择客户审批状态" clearable>
|
||||
<el-option
|
||||
|
@ -118,14 +118,14 @@
|
|||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed label="业务员" align="center" prop="cusSalesman"/>
|
||||
<el-table-column fixed label="客户编码" align="center" prop="cusCode" width="230px"></el-table-column>
|
||||
<el-table-column fixed label="客户名称" align="center" prop="cusName" width="300px">
|
||||
<template slot-scope="scope">
|
||||
<el-link :underline="false" type="primary" @click="handleUpdate(scope.row)">{{scope.row.cusName}}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户编码" align="center" prop="cusCode" width="300px"></el-table-column>
|
||||
<el-table-column label="SAP客户编码" align="center" prop="cusSapCode" width="150px"/>
|
||||
<el-table-column label="业务员" align="center" prop="cusSalesman"/>
|
||||
<el-table-column label="SAP客户编码" align="center" prop="cusSapCode" width="120px"/>
|
||||
<el-table-column label="客户类型" align="center" prop="cusType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.cus_type" :value="scope.row.cusType"/>
|
||||
|
@ -481,7 +481,7 @@
|
|||
<el-row :gutter="8">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账户分配组" prop="cusAccountAllocationGroup">
|
||||
<el-select v-model="form.cusAccountAllocationGroup" placeholder="请选择统驭科目" style="width: 100%;" :disabled="isDisSjz">
|
||||
<el-select v-model="form.cusAccountAllocationGroup" placeholder="请选择账户分配组" style="width: 100%;" :disabled="isDisSjz">
|
||||
<el-option
|
||||
v-for="item in accountAllocationGroupDicts"
|
||||
:key="item.value"
|
||||
|
@ -660,6 +660,14 @@ const validateCusReconciliationAccount = (rule, value, callback) => {
|
|||
callback();
|
||||
}
|
||||
};
|
||||
// 自定义校验-统驭科目
|
||||
const cusAccountAllocationGroup = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error("账户分配组不能为空"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
export default {
|
||||
name: "Customer",
|
||||
|
@ -759,7 +767,7 @@ export default {
|
|||
{ required: true, trigger: "change", validator: validateCusReconciliationAccount }
|
||||
],
|
||||
cusAccountAllocationGroup: [
|
||||
{ required: true, trigger: "change", validator: validateCusReconciliationAccount }
|
||||
{ required: true, trigger: "change", validator: cusAccountAllocationGroup }
|
||||
]
|
||||
},
|
||||
// 保存\提交 按钮显示 - 业务员
|
||||
|
@ -776,7 +784,7 @@ export default {
|
|||
// 审批中 设置禁用 - 数据组
|
||||
isDisSjz: false,
|
||||
|
||||
// 客户名称设置禁用
|
||||
// 客户名称、街道、增值税号设置禁用
|
||||
isDisCustomer: true,
|
||||
|
||||
/*****************************企查查查询模块*************************************/
|
||||
|
@ -908,7 +916,7 @@ export default {
|
|||
this.isDisSalesman = false;
|
||||
// 审批中 设置禁用 - 数据组
|
||||
this.isDisSjz = false;
|
||||
// 客户名称设置禁用
|
||||
// 客户名称、街道、增值税号设置禁用
|
||||
this.isDisCustomer = true;
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
@ -940,7 +948,7 @@ export default {
|
|||
},
|
||||
/** 新增按钮操作 */
|
||||
async handleAdd() {
|
||||
this.reset();
|
||||
await this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加客户信息";
|
||||
|
||||
|
@ -952,7 +960,7 @@ export default {
|
|||
},
|
||||
/** 修改按钮操作 */
|
||||
async handleUpdate(row) {
|
||||
this.reset();
|
||||
await this.reset();
|
||||
const cusId = row.cusId || this.ids
|
||||
getCustomer(cusId).then(response => {
|
||||
this.setInfo(response);
|
||||
|
@ -981,8 +989,8 @@ export default {
|
|||
// 业务员待审核的数据 或者 数据组审核业务员提交的数据时显示
|
||||
this.bankButtonShow = this.form.cusApprovalStatus == '0'?true:(checkRole(['ITZX_SJZ'])&&this.form.cusApprovalStatus == '1') ? true : false;
|
||||
|
||||
// (有客户错误修订角色 且 审核中状态)或者 数据组创建或者审核时 客户名称可编辑
|
||||
this.isDisCustomer = (checkRole(['CUSTOMER_RETURN_UPDATE'])&&this.form.cusApprovalStatus == '1') ? false:(checkRole(['ITZX_SJZ'])&&this.form.cusApprovalStatus != '2')?false:true;
|
||||
// 数据组创建或者审核时 客户名称、街道、增值税号可编辑
|
||||
this.isDisCustomer = (checkRole(['ITZX_SJZ'])&&this.form.cusApprovalStatus != '2'&&this.form.cusApprovalStatus != '3')?false:true;
|
||||
|
||||
this.bankList = response.data.bankList;
|
||||
if(this.bankList.length==0){
|
||||
|
@ -1044,11 +1052,18 @@ export default {
|
|||
},
|
||||
/** 驳回 */
|
||||
returnForm() {
|
||||
returnCustomer(this.form).then(response => {
|
||||
this.$modal.msgSuccess("驳回成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
if(!this.form.cusReturnRemark){
|
||||
this.$modal.msgError("请填写驳回备注");
|
||||
return;
|
||||
}
|
||||
|
||||
this.$modal.confirm('是否确认驳回该客户?').then(function() {}).then(() => {
|
||||
returnCustomer(this.form).then(response => {
|
||||
this.$modal.msgSuccess("驳回成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 提交SAP按钮 */
|
||||
commitSAPForm() {
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="selectedResultLoading" width="100%;" :row-class-name="selectedResultIndex" :data="selectedResultData" height="300px">
|
||||
<el-table v-loading="selectedResultLoading" width="100%;" :row-class-name="selectedResultIndex" :data="selectedResultData">
|
||||
<el-table-column fixed="left" label="" align="center" prop="index" width="50"/>
|
||||
<el-table-column label="版本uid" align="center" prop="uid_0" v-if="false"/>
|
||||
<el-table-column fixed="left" label="产品型号" align="center" prop="name_0" width="180"/>
|
||||
|
|
Loading…
Reference in New Issue