Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
59c0dc4fc8
|
@ -1,20 +1,19 @@
|
||||||
package nccloud.web.mmpac.pickm.query;
|
package nccloud.web.mmpac.pickm.query;
|
||||||
|
|
||||||
import nc.itf.mmpac.pickm.IPickmQueryService;
|
import nc.bs.dao.BaseDAO;
|
||||||
|
import nc.jdbc.framework.processor.ColumnProcessor;
|
||||||
import nc.util.mmf.framework.base.MMValueCheck;
|
import nc.util.mmf.framework.base.MMValueCheck;
|
||||||
import nc.vo.mmpac.pickm.consts.PickmLangConsts;
|
|
||||||
import nc.vo.mmpac.pickm.entity.PickmItemVO;
|
|
||||||
import nccloud.dto.mmpac.pickm.pub.entity.PickmQueryInfoDTO;
|
import nccloud.dto.mmpac.pickm.pub.entity.PickmQueryInfoDTO;
|
||||||
import nccloud.framework.core.exception.ExceptionUtils;
|
import nccloud.framework.core.exception.ExceptionUtils;
|
||||||
import nccloud.framework.core.json.IJson;
|
import nccloud.framework.core.json.IJson;
|
||||||
import nccloud.framework.service.ServiceLocator;
|
|
||||||
import nccloud.framework.web.action.itf.ICommonAction;
|
import nccloud.framework.web.action.itf.ICommonAction;
|
||||||
import nccloud.framework.web.container.IRequest;
|
import nccloud.framework.web.container.IRequest;
|
||||||
import nccloud.framework.web.json.JsonFactory;
|
import nccloud.framework.web.json.JsonFactory;
|
||||||
import nccloud.framework.web.ui.pattern.grid.Grid;
|
|
||||||
import nccloud.framework.web.ui.pattern.grid.GridOperator;
|
import java.util.ArrayList;
|
||||||
import nccloud.web.mmpac.pickm.util.PickmScaleUtil;
|
import java.util.HashMap;
|
||||||
import nccloud.web.mmpub.pub.action.NCCTempletQueryAction;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备料计划-借料入库弹窗查询
|
* 备料计划-借料入库弹窗查询
|
||||||
|
@ -29,35 +28,37 @@ public class PickmItemsQuery implements ICommonAction {
|
||||||
PickmQueryInfoDTO queryInfo = json.fromJson(read, PickmQueryInfoDTO.class);
|
PickmQueryInfoDTO queryInfo = json.fromJson(read, PickmQueryInfoDTO.class);
|
||||||
try {
|
try {
|
||||||
String[] cpickmbids = queryInfo.getCpickmbids();
|
String[] cpickmbids = queryInfo.getCpickmbids();
|
||||||
|
List<String> bids = new ArrayList<>();
|
||||||
if (null != cpickmbids && cpickmbids.length != 0) {
|
if (null != cpickmbids && cpickmbids.length != 0) {
|
||||||
IPickmQueryService service = ServiceLocator.find(IPickmQueryService.class);
|
for (String cpickmbid : cpickmbids) {
|
||||||
PickmItemVO[] itemVOS = service.queryItemsByIds(cpickmbids);
|
String countSql = "SELECT count(1) FROM ic_generalin_b"
|
||||||
if (MMValueCheck.isEmpty(itemVOS)) {
|
+ " WHERE dr = 0 and csourcebillbid = '" + cpickmbid + "'";
|
||||||
ExceptionUtils.wrapBusinessException(PickmLangConsts.getHIT_BODYNOTNULL());
|
Integer num = (Integer) new BaseDAO().executeQuery(countSql, new ColumnProcessor());
|
||||||
|
if (num <= 0) {
|
||||||
|
bids.add(cpickmbid);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (MMValueCheck.isEmpty(bids)) {
|
||||||
|
ExceptionUtils.wrapBusinessException("不存在符合条件的备料计划明细");
|
||||||
}
|
}
|
||||||
|
|
||||||
GridOperator operator = new GridOperator(queryInfo.getPageid());
|
Map<String, Object> returnMap = new HashMap<>();
|
||||||
if (MMValueCheck.isNotEmpty(queryInfo.getAppcode())) {
|
returnMap.put("data", bids);
|
||||||
String templetid = NCCTempletQueryAction.getTempletIdByAppCode(queryInfo.getAppcode(), queryInfo.getPageid());
|
returnMap.put("success", true);
|
||||||
operator = new GridOperator(templetid, queryInfo.getPageid());
|
return returnMap;
|
||||||
}
|
|
||||||
|
|
||||||
Grid grid = operator.toGrid(itemVOS);
|
|
||||||
// Translator translator = new Translator();
|
|
||||||
// translator.translate(grid);
|
|
||||||
// this.afterProcess(grid);
|
|
||||||
return grid;
|
|
||||||
} else {
|
} else {
|
||||||
return null;
|
Map<String, Object> returnMap = new HashMap<>();
|
||||||
|
returnMap.put("data", null);
|
||||||
|
returnMap.put("success", false);
|
||||||
|
return returnMap;
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
ExceptionUtils.wrapBusinessException(ex.getMessage());
|
ExceptionUtils.wrapBusinessException(ex.getMessage());
|
||||||
return null;
|
Map<String, Object> returnMap = new HashMap<>();
|
||||||
|
returnMap.put("data", null);
|
||||||
|
returnMap.put("success", false);
|
||||||
|
return returnMap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void afterProcess(Grid grid) {
|
|
||||||
PickmScaleUtil scaleUtil = new PickmScaleUtil();
|
|
||||||
scaleUtil.processHeadBodyGrid(grid);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -536,6 +536,7 @@ public class IAPISaleInvMaitainImpl {
|
||||||
newInvBVO.setNtotalincomemny(null); // 累计确认应收金额
|
newInvBVO.setNtotalincomemny(null); // 累计确认应收金额
|
||||||
newInvBVO.setNtotalincomenum(null); // 累计确认应收数量
|
newInvBVO.setNtotalincomenum(null); // 累计确认应收数量
|
||||||
newInvBVO.setVbdef10(null); // 回写BIP成功标志
|
newInvBVO.setVbdef10(null); // 回写BIP成功标志
|
||||||
|
newInvBVO.setVbdef14(bipBvoJson.getString("vbdef14")); // bip旗舰版发票明细主键
|
||||||
|
|
||||||
newSaleInvoiceBVOs[i++] = newInvBVO;
|
newSaleInvoiceBVOs[i++] = newInvBVO;
|
||||||
sumNum = sumNum.add(new UFDouble(bipBvoJson.getString("nnum")));
|
sumNum = sumNum.add(new UFDouble(bipBvoJson.getString("nnum")));
|
||||||
|
@ -567,6 +568,7 @@ public class IAPISaleInvMaitainImpl {
|
||||||
newSaleInvoiceHVO.setVdef20(null); // 电子发票回传标识
|
newSaleInvoiceHVO.setVdef20(null); // 电子发票回传标识
|
||||||
newSaleInvoiceHVO.setVdef34(null); // 回写BIP成功标志
|
newSaleInvoiceHVO.setVdef34(null); // 回写BIP成功标志
|
||||||
newSaleInvoiceHVO.setVdef35(null); // 回写BIP失败原因
|
newSaleInvoiceHVO.setVdef35(null); // 回写BIP失败原因
|
||||||
|
newSaleInvoiceHVO.setVdef38(bject.getString("vdef38")); // bip旗舰版发票主键
|
||||||
|
|
||||||
// 组装VO
|
// 组装VO
|
||||||
saleInvoiceVO.setParentVO(newSaleInvoiceHVO);
|
saleInvoiceVO.setParentVO(newSaleInvoiceHVO);
|
||||||
|
|
Loading…
Reference in New Issue