|
|
@ -9,6 +9,7 @@ import com.hw.common.core.exception.ServiceException;
|
|
|
|
import com.hw.common.core.utils.DateUtils;
|
|
|
|
import com.hw.common.core.utils.DateUtils;
|
|
|
|
import com.hw.common.core.utils.MailUtils;
|
|
|
|
import com.hw.common.core.utils.MailUtils;
|
|
|
|
import com.hw.common.security.utils.SecurityUtils;
|
|
|
|
import com.hw.common.security.utils.SecurityUtils;
|
|
|
|
|
|
|
|
import com.hw.mes.domain.MesRaiseCapitalBom;
|
|
|
|
import com.hw.mes.service.IMesPurchaseApplyProcessDetailService;
|
|
|
|
import com.hw.mes.service.IMesPurchaseApplyProcessDetailService;
|
|
|
|
import com.hw.mes.service.IMesRaiseCapitalBomService;
|
|
|
|
import com.hw.mes.service.IMesRaiseCapitalBomService;
|
|
|
|
import com.hw.system.api.RemoteSysCommonService;
|
|
|
|
import com.hw.system.api.RemoteSysCommonService;
|
|
|
@ -106,8 +107,10 @@ public class MesPurchaseApplyProcessServiceImpl implements IMesPurchaseApplyProc
|
|
|
|
@Transactional
|
|
|
|
@Transactional
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int deleteMesPurchaseApplyProcessByPurchaseApplyIds(Long[] purchaseApplyIds) {
|
|
|
|
public int deleteMesPurchaseApplyProcessByPurchaseApplyIds(Long[] purchaseApplyIds) {
|
|
|
|
mesPurchaseApplyProcessMapper.deleteMesPurchaseApplyProcessDetailByTaskCodes(purchaseApplyIds);
|
|
|
|
for (Long purchaseApplyId : purchaseApplyIds) {
|
|
|
|
return mesPurchaseApplyProcessMapper.deleteMesPurchaseApplyProcessByPurchaseApplyIds(purchaseApplyIds);
|
|
|
|
this.deleteMesPurchaseApplyProcessByPurchaseApplyId(purchaseApplyId);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -119,8 +122,17 @@ public class MesPurchaseApplyProcessServiceImpl implements IMesPurchaseApplyProc
|
|
|
|
@Transactional
|
|
|
|
@Transactional
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int deleteMesPurchaseApplyProcessByPurchaseApplyId(Long purchaseApplyId) {
|
|
|
|
public int deleteMesPurchaseApplyProcessByPurchaseApplyId(Long purchaseApplyId) {
|
|
|
|
mesPurchaseApplyProcessMapper.deleteMesPurchaseApplyProcessDetailByTaskCode(purchaseApplyId);
|
|
|
|
MesPurchaseApplyProcess applyProcess = mesPurchaseApplyProcessMapper.selectMesPurchaseApplyProcessByPurchaseApplyId(purchaseApplyId);
|
|
|
|
return mesPurchaseApplyProcessMapper.deleteMesPurchaseApplyProcessByPurchaseApplyId(purchaseApplyId);
|
|
|
|
String taskCode = applyProcess.getTaskCode();
|
|
|
|
|
|
|
|
MesRaiseCapitalBom capitalBom = new MesRaiseCapitalBom();
|
|
|
|
|
|
|
|
capitalBom.setTaskCode(taskCode);
|
|
|
|
|
|
|
|
List<MesRaiseCapitalBom> mesRaiseCapitalBoms = mesRaiseCapitalBomService.selectMesRaiseCapitalBomList(capitalBom);
|
|
|
|
|
|
|
|
if (!mesRaiseCapitalBoms.isEmpty()) {
|
|
|
|
|
|
|
|
throw new ServiceException("请先删除对应的提资单BOM信息");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
mesPurchaseApplyProcessMapper.deleteMesPurchaseApplyProcessDetailByTaskCode(taskCode);
|
|
|
|
|
|
|
|
mesPurchaseApplyProcessMapper.deleteMesPurchaseApplyProcessByPurchaseApplyId(purchaseApplyId);
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|