优化
This commit is contained in:
@@ -250,12 +250,18 @@ public class ReceivemstServiceImpl implements ReceivemstService {
|
||||
String now = DateUtil.now();
|
||||
WQLObject orderTab = WQLObject.getWQLObject("PCS_IF_PurchaseOrderProc");
|
||||
WQLObject dtlTab = WQLObject.getWQLObject("PCS_RC_ReceiveDtl");
|
||||
WQLObject st_ivt_iostorinvdtl = WQLObject.getWQLObject("st_ivt_iostorinvdtl");
|
||||
WQLObject wo = WQLObject.getWQLObject("pcs_rc_receivemst");
|
||||
for (Long receivedtl_id : ids) {
|
||||
JSONObject jo = dtlTab.query("receivedtl_id='" + receivedtl_id + "'").uniqueResult(0);
|
||||
if (jo == null) {
|
||||
throw new BadRequestException("没有此单据!");
|
||||
}
|
||||
String receive_code = jo.getString("receive_code");
|
||||
JSONObject jonow = st_ivt_iostorinvdtl.query("source_bill_code='"+receive_code+"'").uniqueResult(0);
|
||||
if(jonow!=null){
|
||||
throw new BadRequestException("此单据"+receive_code+"生成出入库单,不可删除!");
|
||||
}
|
||||
String receive_id = jo.getString("receive_id");
|
||||
JSONObject jsonOrder = orderTab.query("id = '" + jo.getString("source_billdtl_id") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonOrder)) {
|
||||
|
||||
Reference in New Issue
Block a user