|
|
@@ -105,7 +105,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
|
|
|
@Transactional
|
|
|
public DocBaseDTO saveFormData(PurchaseFormDTO formdata) {
|
|
|
if (null == formdata || null == formdata.getMain()){
|
|
|
- throw new BizException(500, "数据为空,请填写后再保存");
|
|
|
+ throw new BizException(BizExceptionCode.EMPTY_DATA);
|
|
|
}
|
|
|
//公司ID
|
|
|
Long companyId = BaseContextHolder.getCompanyId();
|
|
|
@@ -265,7 +265,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
|
|
|
}
|
|
|
String code = purchaseMapper.validateUnAudit(id);
|
|
|
if (null != code) {
|
|
|
- throw new BizException(500, "单据:" + code + " 未审核,无法反审核");
|
|
|
+ throw new BizException(BizExceptionCode.BIZ_UNAUDITED);
|
|
|
}
|
|
|
singleUnAudit(id);
|
|
|
}
|
|
|
@@ -482,7 +482,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
- private Result singleAudit(Long id) {
|
|
|
+ public Result singleAudit(Long id) {
|
|
|
DocBaseDTO docBaseDTO = getBaseDTOById(id);
|
|
|
Result result = Result.success(docBaseDTO);
|
|
|
//检查最小包装数
|
|
|
@@ -506,7 +506,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
- private void singleUnAudit(Long id) {
|
|
|
+ public void singleUnAudit(Long id) {
|
|
|
Purchase purchase = new Purchase();
|
|
|
//检查是否已转验收单
|
|
|
Integer num = getMapper().checkTurnInstatus(id);
|
|
|
@@ -527,7 +527,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
- private void singleDelete(Long id) {
|
|
|
+ public void singleDelete(Long id) {
|
|
|
if (null != id) {
|
|
|
//从表删除
|
|
|
purchasedetailMapper.deleteByForeignKey(id);
|
|
|
@@ -588,7 +588,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
- private void calcPurchase(Long pu_id) {
|
|
|
+ public void calcPurchase(Long pu_id) {
|
|
|
purchasedetailMapper.calcPurchase(pu_id);
|
|
|
}
|
|
|
|