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