From e23c8975e6bb0934cb5db46a94d0f83c9739d9ab Mon Sep 17 00:00:00 2001
From: 935090232@qq.com <ak473600000>
Date: Sun, 20 Mar 2022 16:33:17 +0800
Subject: [PATCH] 重构:套餐项目
---
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysInstoreInfoServiceImpl.java | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysInstoreInfoServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysInstoreInfoServiceImpl.java
index f1ca701..95d1257 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysInstoreInfoServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysInstoreInfoServiceImpl.java
@@ -1,9 +1,11 @@
package com.matrix.system.hive.service.imp;
+import com.alibaba.fastjson.JSON;
import com.matrix.core.constance.MatrixConstance;
import com.matrix.core.exception.GlobleException;
import com.matrix.core.pojo.PaginationVO;
import com.matrix.core.tools.DateUtil;
+import com.matrix.core.tools.LogUtil;
import com.matrix.core.tools.WebUtil;
import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.constance.Dictionary;
@@ -50,11 +52,7 @@
sysInstoreInfo.setCheckStatus(Dictionary.CHECK_STATUS_DSH);
// 设置入库单编号
sysInstoreInfo.setInstoreId(DateUtil.getTimeMark());
-// SysShopInfo info = shopInfoDao.selectByShopName(Dictionary.SHOP_NAME_ZONGDIAN);
-// // 系统限制入库只能入库到总店,总店不存在则
-// if (info == null) {
-// throw new GlobleException("总店仓库不存在,请添加!");
-// }
+
// 插入
int i = sysInstoreInfoDao.insert(sysInstoreInfo);
// 设置总金额,并更新
@@ -69,9 +67,10 @@
Long id = sysInstoreInfo.getId();
SysInstoreInfo getInstoreInfo = sysInstoreInfoDao.selectById(id);
// 已经审核过的单据不能在修改
- if (!getInstoreInfo.getCheckStatus().equals(Dictionary.CHECK_STATUS_DSH)) {
+ if (!getInstoreInfo.getCheckStatus().equals(Dictionary.CHECK_STATUS_DSH) && !getInstoreInfo.getCheckStatus().equals(Dictionary.CHECK_STATUS_SHWTG)) {
throw new GlobleException("已审核,不能再修改");
}
+ sysInstoreInfo.setCheckStatus(Dictionary.CHECK_STATUS_DSH);
// 设置总金额
sysInstoreInfo.setSumall(savevDetatil(sysInstoreInfo));
return sysInstoreInfoDao.update(sysInstoreInfo);
@@ -179,6 +178,7 @@
@Override
@Transactional(rollbackFor = Exception.class)
public int check(SysInstoreInfo sysInstoreInfo) {
+ LogUtil.info("入库单审核:{}", JSON.toJSONString(sysInstoreInfo));
// 验证权限
SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
sysInstoreInfo.setAppmanId(user.getSuId());
@@ -186,9 +186,6 @@
sysInstoreInfo.setCompanyId(user.getCompanyId());
SysInstoreInfo checkInStore = sysInstoreInfoDao.selectById(sysInstoreInfo.getId());
-// if (!checkInStore.getAppmanId().equals(user.getSuId())) {
-// throw new GlobleException("无权审核该单据!");
-// }
if (!checkInStore.getCheckStatus().equals(Dictionary.CHECK_STATUS_DSH)) {
throw new GlobleException("该单据状态为" + checkInStore.getCheckStatus() + ",不可审核!");
}
--
Gitblit v1.9.1