'123'
This commit is contained in:
parent
eda91f92ee
commit
14465188a6
|
@ -1,5 +1,5 @@
|
||||||
#for tests only !
|
#for tests only !
|
||||||
#Tue Jun 04 14:39:31 CST 2024
|
#Tue Jun 04 16:46:03 CST 2024
|
||||||
jco.destination.pool_capacity=10
|
jco.destination.pool_capacity=10
|
||||||
jco.client.lang=ZH
|
jco.client.lang=ZH
|
||||||
jco.client.ashost=172.19.0.120
|
jco.client.ashost=172.19.0.120
|
||||||
|
@ -7,5 +7,5 @@ jco.client.saprouter=
|
||||||
jco.client.user=RFC
|
jco.client.user=RFC
|
||||||
jco.client.sysnr=00
|
jco.client.sysnr=00
|
||||||
jco.destination.peak_limit=10
|
jco.destination.peak_limit=10
|
||||||
jco.client.passwd=g5KKZrvN-+Xtpu=Z,M*tL_-D%OFI;:Yt+;TW!Ku,Y~NxIG%z
|
jco.client.passwd=654321
|
||||||
jco.client.client=300
|
jco.client.client=300
|
||||||
|
|
|
@ -141,7 +141,15 @@ public class CustomerController extends BaseController
|
||||||
public AjaxResult getReturnUpdateInfo(@PathVariable("cusId") String cusId)
|
public AjaxResult getReturnUpdateInfo(@PathVariable("cusId") String cusId)
|
||||||
{
|
{
|
||||||
Customer customer = customerService.selectCustomerByCusId(cusId);
|
Customer customer = customerService.selectCustomerByCusId(cusId);
|
||||||
|
if("2".equals(customer.getCusApprovalStatus())){
|
||||||
customer.setCusApprovalStatus("1");// 提交状态设置为 审核中
|
customer.setCusApprovalStatus("1");// 提交状态设置为 审核中
|
||||||
|
}else if("0".equals(customer.getCusApprovalStatus())){
|
||||||
|
return error("该客户当前状态为【待提交】状态,无法修改");
|
||||||
|
}else if("1".equals(customer.getCusApprovalStatus())){
|
||||||
|
return error("该客户当前状态为【审批中】状态,无法修改");
|
||||||
|
}else if("3".equals(customer.getCusApprovalStatus())){
|
||||||
|
return error("该报价单当前状态为【已驳回】状态,无法修改");
|
||||||
|
}
|
||||||
return success(customer);
|
return success(customer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,8 +126,17 @@ public class QuotController extends BaseController
|
||||||
public AjaxResult getReturnUpdateInfo(@PathVariable("quotId") String quotId)
|
public AjaxResult getReturnUpdateInfo(@PathVariable("quotId") String quotId)
|
||||||
{
|
{
|
||||||
Quot quot = quotService.selectQuotByQuotId(quotId);
|
Quot quot = quotService.selectQuotByQuotId(quotId);
|
||||||
|
if("2".equals(quot.getQuotApprovalStatus())){
|
||||||
quot.setQuotApprovalStatus("1");// 提交状态设置为 协助中
|
quot.setQuotApprovalStatus("1");// 提交状态设置为 协助中
|
||||||
quotService.updateQuot(quot);
|
quotService.updateQuot(quot);
|
||||||
|
}else if("0".equals(quot.getQuotApprovalStatus())){
|
||||||
|
return error("该报价单当前状态为【待提交】状态,无法修改");
|
||||||
|
}else if("1".equals(quot.getQuotApprovalStatus())){
|
||||||
|
return error("该报价单当前状态为【协助中】状态,无法修改");
|
||||||
|
}else if("3".equals(quot.getQuotApprovalStatus())){
|
||||||
|
return error("该报价单当前状态为【已驳回】状态,无法修改");
|
||||||
|
}
|
||||||
|
|
||||||
return success(quot);
|
return success(quot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ruoyi.web.controller.tool.quot;
|
package com.ruoyi.web.controller.tool.quot;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
@ -49,60 +50,106 @@ public class quotJswController extends BaseController {
|
||||||
try{
|
try{
|
||||||
quotModel quot = JSON.parseObject(quotJson, quotModel.class);
|
quotModel quot = JSON.parseObject(quotJson, quotModel.class);
|
||||||
if(quot==null){
|
if(quot==null){
|
||||||
|
String errMsg = "参数异常为空,同步失败";
|
||||||
sysOperLog.setStatus(1);
|
sysOperLog.setStatus(1);
|
||||||
long endTime = System.currentTimeMillis();
|
long endTime = System.currentTimeMillis();
|
||||||
sysOperLog.setCostTime(endTime - startTime);
|
sysOperLog.setCostTime(endTime - startTime);
|
||||||
|
sysOperLog.setErrorMsg(errMsg);
|
||||||
|
sysOperLog.setJsonResult(JSONArray.toJSONString(R.fail(errMsg)));
|
||||||
iSysOperLogService.insertOperlog(sysOperLog);
|
iSysOperLogService.insertOperlog(sysOperLog);
|
||||||
return R.fail("参数异常为空");
|
return R.fail(errMsg);
|
||||||
}
|
}
|
||||||
if(StringUtils.isBlank(quot.getQuotJswCode())){
|
if(StringUtils.isBlank(quot.getQuotJswCode())){
|
||||||
|
String errMsg = "金思维报价单号为空,同步失败";
|
||||||
sysOperLog.setStatus(1);
|
sysOperLog.setStatus(1);
|
||||||
long endTime = System.currentTimeMillis();
|
long endTime = System.currentTimeMillis();
|
||||||
sysOperLog.setCostTime(endTime - startTime);
|
sysOperLog.setCostTime(endTime - startTime);
|
||||||
|
sysOperLog.setErrorMsg(errMsg);
|
||||||
|
sysOperLog.setJsonResult(JSONArray.toJSONString(R.fail(errMsg)));
|
||||||
iSysOperLogService.insertOperlog(sysOperLog);
|
iSysOperLogService.insertOperlog(sysOperLog);
|
||||||
return R.fail("金思维报价单号不能为空");
|
return R.fail(errMsg);
|
||||||
}
|
}
|
||||||
if(StringUtils.isBlank(quot.getQuotCode())){
|
if(StringUtils.isBlank(quot.getQuotCode())){
|
||||||
|
String errMsg = "客户报价单号为空,同步失败";
|
||||||
sysOperLog.setStatus(1);
|
sysOperLog.setStatus(1);
|
||||||
long endTime = System.currentTimeMillis();
|
long endTime = System.currentTimeMillis();
|
||||||
sysOperLog.setCostTime(endTime - startTime);
|
sysOperLog.setCostTime(endTime - startTime);
|
||||||
|
sysOperLog.setErrorMsg(errMsg);
|
||||||
|
sysOperLog.setJsonResult(JSONArray.toJSONString(R.fail(errMsg)));
|
||||||
iSysOperLogService.insertOperlog(sysOperLog);
|
iSysOperLogService.insertOperlog(sysOperLog);
|
||||||
return R.fail("客户报价单号不能为空");
|
return R.fail(errMsg);
|
||||||
}
|
}
|
||||||
if(StringUtils.isBlank(quot.getQuotTongPrice())){
|
if(StringUtils.isBlank(quot.getQuotTongPrice())){
|
||||||
|
String errMsg = "铜价为空,同步失败";
|
||||||
sysOperLog.setStatus(1);
|
sysOperLog.setStatus(1);
|
||||||
long endTime = System.currentTimeMillis();
|
long endTime = System.currentTimeMillis();
|
||||||
sysOperLog.setCostTime(endTime - startTime);
|
sysOperLog.setCostTime(endTime - startTime);
|
||||||
|
sysOperLog.setErrorMsg(errMsg);
|
||||||
|
sysOperLog.setJsonResult(JSONArray.toJSONString(R.fail(errMsg)));
|
||||||
iSysOperLogService.insertOperlog(sysOperLog);
|
iSysOperLogService.insertOperlog(sysOperLog);
|
||||||
return R.fail("铜价不能为空");
|
return R.fail(errMsg);
|
||||||
}
|
}
|
||||||
if(StringUtils.isBlank(quot.getQuotLvPrice())){
|
if(StringUtils.isBlank(quot.getQuotLvPrice())){
|
||||||
|
String errMsg = "铝价为空,同步失败";
|
||||||
sysOperLog.setStatus(1);
|
sysOperLog.setStatus(1);
|
||||||
long endTime = System.currentTimeMillis();
|
long endTime = System.currentTimeMillis();
|
||||||
sysOperLog.setCostTime(endTime - startTime);
|
sysOperLog.setCostTime(endTime - startTime);
|
||||||
|
sysOperLog.setErrorMsg(errMsg);
|
||||||
|
sysOperLog.setJsonResult(JSONArray.toJSONString(R.fail(errMsg)));
|
||||||
iSysOperLogService.insertOperlog(sysOperLog);
|
iSysOperLogService.insertOperlog(sysOperLog);
|
||||||
return R.fail("铝价不能为空");
|
return R.fail(errMsg);
|
||||||
}
|
}
|
||||||
if(StringUtils.isBlank(quot.getQuotMatpriceDiff())){
|
if(StringUtils.isBlank(quot.getQuotMatpriceDiff())){
|
||||||
|
String errMsg = "整单料价价差率为空,同步失败";
|
||||||
sysOperLog.setStatus(1);
|
sysOperLog.setStatus(1);
|
||||||
long endTime = System.currentTimeMillis();
|
long endTime = System.currentTimeMillis();
|
||||||
sysOperLog.setCostTime(endTime - startTime);
|
sysOperLog.setCostTime(endTime - startTime);
|
||||||
|
sysOperLog.setErrorMsg(errMsg);
|
||||||
|
sysOperLog.setJsonResult(JSONArray.toJSONString(R.fail(errMsg)));
|
||||||
iSysOperLogService.insertOperlog(sysOperLog);
|
iSysOperLogService.insertOperlog(sysOperLog);
|
||||||
return R.fail("整单料价价差率不能为空");
|
return R.fail(errMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<quotMaterialModel> materials = quot.getQuotMaterial();
|
List<quotMaterialModel> materials = quot.getQuotMaterial();
|
||||||
if(materials==null || materials.size()==0){
|
if(materials==null || materials.size()==0){
|
||||||
|
String errMsg = "无明细数据,同步失败";
|
||||||
sysOperLog.setStatus(1);
|
sysOperLog.setStatus(1);
|
||||||
long endTime = System.currentTimeMillis();
|
long endTime = System.currentTimeMillis();
|
||||||
sysOperLog.setCostTime(endTime - startTime);
|
sysOperLog.setCostTime(endTime - startTime);
|
||||||
|
sysOperLog.setErrorMsg(errMsg);
|
||||||
|
sysOperLog.setJsonResult(JSONArray.toJSONString(R.fail(errMsg)));
|
||||||
iSysOperLogService.insertOperlog(sysOperLog);
|
iSysOperLogService.insertOperlog(sysOperLog);
|
||||||
return R.fail("明细不能为空");
|
return R.fail(errMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新报价单
|
// 更新报价单
|
||||||
String quotId = quotService.selectQuotByQuotCode(quot.getQuotCode());
|
String quotId = quotService.selectQuotByQuotCode(quot.getQuotCode());
|
||||||
|
if(StringUtils.isEmpty(quotId)){
|
||||||
|
String errMsg = "报价单号:"+quot.getQuotCode()+" 系统中不存在,同步失败";
|
||||||
|
sysOperLog.setStatus(1);
|
||||||
|
long endTime = System.currentTimeMillis();
|
||||||
|
sysOperLog.setCostTime(endTime - startTime);
|
||||||
|
sysOperLog.setErrorMsg(errMsg);
|
||||||
|
sysOperLog.setJsonResult(JSONArray.toJSONString(R.fail(errMsg)));
|
||||||
|
iSysOperLogService.insertOperlog(sysOperLog);
|
||||||
|
return R.fail(errMsg);
|
||||||
|
}
|
||||||
|
|
||||||
Quot q = quotService.selectQuotByQuotId(quotId);
|
Quot q = quotService.selectQuotByQuotId(quotId);
|
||||||
|
String quotApprovalStatus = q.getQuotApprovalStatus();
|
||||||
|
if(!"1".equals(quotApprovalStatus)){
|
||||||
|
String errMsg = "报价单号:"+quot.getQuotCode()+" 非协助中状态,同步失败";
|
||||||
|
sysOperLog.setStatus(1);
|
||||||
|
long endTime = System.currentTimeMillis();
|
||||||
|
sysOperLog.setCostTime(endTime - startTime);
|
||||||
|
sysOperLog.setErrorMsg(errMsg);
|
||||||
|
sysOperLog.setJsonResult(JSONArray.toJSONString(R.fail(errMsg)));
|
||||||
|
iSysOperLogService.insertOperlog(sysOperLog);
|
||||||
|
return R.fail(errMsg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
q.setQuotJswCode(quot.getQuotJswCode());
|
q.setQuotJswCode(quot.getQuotJswCode());
|
||||||
q.setQuotLvPrice(quot.getQuotLvPrice());
|
q.setQuotLvPrice(quot.getQuotLvPrice());
|
||||||
q.setQuotTongPrice(quot.getQuotTongPrice());
|
q.setQuotTongPrice(quot.getQuotTongPrice());
|
||||||
|
@ -133,16 +180,20 @@ public class quotJswController extends BaseController {
|
||||||
q.setQuotMaterialList(qmaterials);
|
q.setQuotMaterialList(qmaterials);
|
||||||
quotService.updateQuot(q);
|
quotService.updateQuot(q);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
|
String errMsg = "接口异常,同步失败";
|
||||||
sysOperLog.setStatus(1);
|
sysOperLog.setStatus(1);
|
||||||
long endTime = System.currentTimeMillis();
|
long endTime = System.currentTimeMillis();
|
||||||
sysOperLog.setCostTime(endTime - startTime);
|
sysOperLog.setCostTime(endTime - startTime);
|
||||||
|
sysOperLog.setErrorMsg(errMsg);
|
||||||
|
sysOperLog.setJsonResult(JSONArray.toJSONString(R.fail(errMsg)));
|
||||||
iSysOperLogService.insertOperlog(sysOperLog);
|
iSysOperLogService.insertOperlog(sysOperLog);
|
||||||
return R.fail(e.getMessage());
|
return R.fail(errMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
sysOperLog.setStatus(0);
|
sysOperLog.setStatus(0);
|
||||||
long endTime = System.currentTimeMillis();
|
long endTime = System.currentTimeMillis();
|
||||||
sysOperLog.setCostTime(endTime - startTime);
|
sysOperLog.setCostTime(endTime - startTime);
|
||||||
|
sysOperLog.setJsonResult(R.ok().toString());
|
||||||
iSysOperLogService.insertOperlog(sysOperLog);
|
iSysOperLogService.insertOperlog(sysOperLog);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue