This commit is contained in:
2023-02-12 10:55:03 +08:00
6 changed files with 41 additions and 7 deletions

View File

@@ -117,25 +117,26 @@ public class LogAspect {
}
}catch (Exception ex){
StringBuffer errorStack = new StringBuffer();
errorStack.append("<br/>【异常堆栈:");
String errorMsg = ex.getMessage();
int x = 0;
StackTraceElement[] stackTrace = ex.getStackTrace();
if (stackTrace!=null && stackTrace.length>0){
for (StackTraceElement stack : stackTrace) {
x++;
errorStack.append(stack.toString()).append(" | ");
errorStack.append(stack.toString().replaceAll("<",">")).append("<br/>");
if (x>10){
break;
}
}
}
log.error("[-requestError-][请求接口:{}]【异常信息:{}】[请求参数:{}][异常堆栈:{}]", url,errorMsg,params, errorStack.toString());
log.error("[-requestError-][请求接口:{}]【异常信息:{}】[请求参数:{}] {}", url,errorMsg,params, errorStack.append("").toString());
Log log = new Log("ERROR", System.currentTimeMillis() - comming);
log.setExceptionDetail(ThrowableUtil.getStackTrace(ex).getBytes());
logService.save(getUsername(), StringUtils.getBrowser(request), StringUtils.getIp(request), (ProceedingJoinPoint) joinPoint, log);
throw ex;
}finally {
log.info("[--response--][接口:{} 执行结束][耗时:{}s]",url,(System.currentTimeMillis() - comming)/1000);
log.info("[--response--][请求接口:{} 执行结束][耗时:{}s]",url,(System.currentTimeMillis() - comming)/1000);
MDC.clear();
}
return result;

View File

@@ -67,7 +67,7 @@
sys_roles_menus
WHERE
role_id IN ( SELECT role_id FROM sys_users_roles where user_id = #{user})
)
) order by menu_sort
</select>
<select id="getMenusByRole" resultType="java.util.Map">
SELECT

View File

@@ -787,6 +787,17 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
throw new BadRequestException("查不到出库单信息");
}
// 如果是发货出库则判断运费和物流公司不能为空
String bill_type = jo_mst.getString("bill_type");
if (StrUtil.equals(bill_type, "1001")) {
String trans_code = jo_mst.getString("trans_code");
String estimated_freight = jo_mst.getString("estimated_freight");
if (ObjectUtil.isEmpty(trans_code)) throw new BadRequestException("物流公司不能为空");
if (ObjectUtil.isEmpty(estimated_freight)) throw new BadRequestException("预估运费不能为空");
}
//查询生成和未分配完的明细
JSONArray dtls = WQL.getWO("QST_IVT_CHECKOUTBILL")
.addParam("flag", "2")
@@ -1010,6 +1021,17 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
throw new BadRequestException("查不到出库单信息");
}
// 如果是发货出库则判断运费和物流公司不能为空
String bill_type = jo_mst.getString("bill_type");
if (StrUtil.equals(bill_type, "1001")) {
String trans_code = jo_mst.getString("trans_code");
String estimated_freight = jo_mst.getString("estimated_freight");
if (ObjectUtil.isEmpty(trans_code)) throw new BadRequestException("物流公司不能为空");
if (ObjectUtil.isEmpty(estimated_freight)) throw new BadRequestException("预估运费不能为空");
}
//查询生成和未分配完的明细
JSONArray dtls = WQL.getWO("QST_IVT_CHECKOUTBILL")
.addParam("flag", "2")
@@ -3659,6 +3681,17 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
throw new BadRequestException("当前订单无可分配出库明细");
}
// 如果是发货出库则判断运费和物流公司不能为空
String bill_type = jo_mst.getString("bill_type");
if (StrUtil.equals(bill_type, "1001")) {
String trans_code = jo_mst.getString("trans_code");
String estimated_freight = jo_mst.getString("estimated_freight");
if (ObjectUtil.isEmpty(trans_code)) throw new BadRequestException("物流公司不能为空");
if (ObjectUtil.isEmpty(estimated_freight)) throw new BadRequestException("预估运费不能为空");
}
//查询生成和未分配完的明细
JSONObject dtl = WQL.getWO("QST_IVT_CHECKOUTBILL")
.addParam("flag", "2")