rev:修改采购入库回传;
This commit is contained in:
@@ -64,7 +64,7 @@ public class SyncErpService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private BmMeasureUnitServiceImpl bmMeasureUnitServiceImpl;
|
private BmMeasureUnitServiceImpl bmMeasureUnitServiceImpl;
|
||||||
|
|
||||||
public List<Object> syncData(SyncFormMapping syncFormMapping) {
|
public List<Object> syncData1(SyncFormMapping syncFormMapping) {
|
||||||
List<StIvtBsrealstorattr> list = stIvtBsrealstorattrServiceImpl.list();
|
List<StIvtBsrealstorattr> list = stIvtBsrealstorattrServiceImpl.list();
|
||||||
list.forEach(r -> {
|
list.forEach(r -> {
|
||||||
syncUnit(r.getStor_code());
|
syncUnit(r.getStor_code());
|
||||||
@@ -179,27 +179,48 @@ public class SyncErpService {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 回传测试
|
* 下推回传测试
|
||||||
*/
|
*/
|
||||||
|
public JSONObject push(JSONObject from) {
|
||||||
|
String result = "";
|
||||||
|
//执行回传
|
||||||
|
try {
|
||||||
|
//要回传的json数据
|
||||||
|
//todo 需要封装
|
||||||
|
IdentifyInfo identifyInfo = new IdentifyInfo();
|
||||||
|
BeanUtils.copyProperties(erpSec, identifyInfo);
|
||||||
|
K3CloudApi cloudApi = new K3CloudApi(identifyInfo);
|
||||||
|
String json =from.toJSONString();
|
||||||
|
result = cloudApi.push(from.getString("TargetFormId"), json);
|
||||||
|
from.put("result",result);
|
||||||
|
Integer sd = 0;
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.error(ex.getMessage());
|
||||||
|
from.put("result",ex.getMessage());
|
||||||
|
String sd = result;
|
||||||
|
}
|
||||||
|
return from;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 回传测试
|
* 回传测试
|
||||||
*/
|
*/
|
||||||
public JSONObject process(JSONObject from) {
|
public JSONObject process(JSONObject from) {
|
||||||
String result = "";
|
String result = "";
|
||||||
//执行回传
|
//执行回传
|
||||||
String formType = from.getString("formid");
|
|
||||||
try {
|
try {
|
||||||
//要回传的json数据
|
//要回传的json数据
|
||||||
JSONObject formData = from.getJSONObject("data");
|
|
||||||
//todo 需要封装
|
//todo 需要封装
|
||||||
IdentifyInfo identifyInfo = new IdentifyInfo();
|
IdentifyInfo identifyInfo = new IdentifyInfo();
|
||||||
BeanUtils.copyProperties(erpSec, identifyInfo);
|
BeanUtils.copyProperties(erpSec, identifyInfo);
|
||||||
K3CloudApi cloudApi = new K3CloudApi(identifyInfo);
|
K3CloudApi cloudApi = new K3CloudApi(identifyInfo);
|
||||||
String json =formData.toJSONString();
|
String json =from.toJSONString();
|
||||||
result = cloudApi.save(formType, formData.toJSONString());
|
result = cloudApi.save(from.getString("formid"), json);
|
||||||
|
from.put("result",result);
|
||||||
Integer sd = 0;
|
Integer sd = 0;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Log.error(ex.getMessage());
|
Log.error(ex.getMessage());
|
||||||
|
from.put("result",ex.getMessage());
|
||||||
String sd = result;
|
String sd = result;
|
||||||
}
|
}
|
||||||
return from;
|
return from;
|
||||||
@@ -290,7 +311,7 @@ public class SyncErpService {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public List<Object> syncData1(SyncFormMapping syncFormMapping) {
|
public List<Object> syncData(SyncFormMapping syncFormMapping) {
|
||||||
List<Object> result = new ArrayList<>();
|
List<Object> result = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
log.info("开始同步ERP" + syncFormMapping.getForm_name());
|
log.info("开始同步ERP" + syncFormMapping.getForm_name());
|
||||||
@@ -298,12 +319,13 @@ public class SyncErpService {
|
|||||||
BeanUtils.copyProperties(erpSec, identifyInfo);
|
BeanUtils.copyProperties(erpSec, identifyInfo);
|
||||||
K3CloudApi cloudApi = new K3CloudApi(identifyInfo);
|
K3CloudApi cloudApi = new K3CloudApi(identifyInfo);
|
||||||
String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
||||||
String filterString = "FBillNo ='MO102241101889'";
|
//String filterString = "FUseOrgId='750572'";
|
||||||
|
String filterString = "FBillNo ='JDSCLLSQ240200009'";
|
||||||
//String filterString = "FCreateDate >= '" + today + " 00:00:00' and FCreateDate <= '" + today + " 23:59:59'";
|
//String filterString = "FCreateDate >= '" + today + " 00:00:00' and FCreateDate <= '" + today + " 23:59:59'";
|
||||||
ErpQuery query = new ErpQuery();
|
ErpQuery query = new ErpQuery();
|
||||||
query.setFilterString(filterString);
|
query.setFilterString(filterString);
|
||||||
//query.setFormId(syncFormMapping.getForm_type());
|
//query.setFormId(syncFormMapping.getForm_type());
|
||||||
query.setFormId("PRD_MO");
|
query.setFormId(syncFormMapping.getForm_type());
|
||||||
query.setFieldKeys("FID");
|
query.setFieldKeys("FID");
|
||||||
query.setLimit(1);
|
query.setLimit(1);
|
||||||
String jsonString = JSON.toJSONString(query);
|
String jsonString = JSON.toJSONString(query);
|
||||||
@@ -323,7 +345,7 @@ public class SyncErpService {
|
|||||||
Map<String, String> error = new HashMap<>();
|
Map<String, String> error = new HashMap<>();
|
||||||
for (String id : ids) {
|
for (String id : ids) {
|
||||||
param.setId(id);
|
param.setId(id);
|
||||||
OperatorResult view = cloudApi.view("PRD_MO", param);
|
OperatorResult view = cloudApi.view(syncFormMapping.getForm_type(), param);
|
||||||
RepoStatus status = view.getResult().getResponseStatus();
|
RepoStatus status = view.getResult().getResponseStatus();
|
||||||
if (status.isIsSuccess()) {
|
if (status.isIsSuccess()) {
|
||||||
result.add(view.getResult().getResult());
|
result.add(view.getResult().getResult());
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.nl.wms.flow_manage.flow.service.classprocessimpl;
|
package org.nl.wms.flow_manage.flow.service.classprocessimpl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
@@ -11,6 +12,7 @@ import com.kingdee.bos.webapi.sdk.K3CloudApi;
|
|||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.nl.common.domain.exception.BadRequestException;
|
import org.nl.common.domain.exception.BadRequestException;
|
||||||
|
import org.nl.common.enums.StatusEnum;
|
||||||
import org.nl.wms.external_system.erp.dto.ErpSec;
|
import org.nl.wms.external_system.erp.dto.ErpSec;
|
||||||
import org.nl.wms.flow_manage.flow.framework.process.nodeType.excess.impl.process.classprocess.ClassProcess;
|
import org.nl.wms.flow_manage.flow.framework.process.nodeType.excess.impl.process.classprocess.ClassProcess;
|
||||||
import org.nl.wms.pm_manage.form_data.service.IPmFormDataService;
|
import org.nl.wms.pm_manage.form_data.service.IPmFormDataService;
|
||||||
@@ -47,21 +49,21 @@ public class SyncReceiptProcessHandler implements ClassProcess {
|
|||||||
String formType = from.getString("form_type");
|
String formType = from.getString("form_type");
|
||||||
String id = from.getString("id");
|
String id = from.getString("id");
|
||||||
PmFormData pmFormData = iPmFormDataService.getById(id);
|
PmFormData pmFormData = iPmFormDataService.getById(id);
|
||||||
try {
|
//要回传的json数据
|
||||||
|
JSONObject formData = pmFormData.getForm_data();
|
||||||
if (!formType.contains("RECEIPT")) {
|
if (!formType.contains("RECEIPT")) {
|
||||||
throw new BadRequestException("回传失败:单据类型不是回传类型单据");
|
throw new BadRequestException("回传失败:单据类型不是回传类型单据");
|
||||||
}
|
}
|
||||||
//要回传的json数据
|
|
||||||
JSONObject formData = pmFormData.getForm_data();
|
|
||||||
String formid = formData.getString("formid");
|
String formid = formData.getString("formid");
|
||||||
if (StringUtils.isEmpty(formid)) {
|
if (StringUtils.isEmpty(formid)) {
|
||||||
throw new BadRequestException("回传失败:回传数据form_data中数据格式不是formid,data类型");
|
throw new BadRequestException("回传失败:回传数据form_data中数据格式不是formid,data类型");
|
||||||
}
|
}
|
||||||
|
String json = formData.toJSONString();
|
||||||
|
try {
|
||||||
//todo 需要封装
|
//todo 需要封装
|
||||||
IdentifyInfo identifyInfo = new IdentifyInfo();
|
IdentifyInfo identifyInfo = new IdentifyInfo();
|
||||||
BeanUtils.copyProperties(erpSec, identifyInfo);
|
BeanUtils.copyProperties(erpSec, identifyInfo);
|
||||||
K3CloudApi cloudApi = new K3CloudApi(identifyInfo);
|
K3CloudApi cloudApi = new K3CloudApi(identifyInfo);
|
||||||
String json = formData.toJSONString();
|
|
||||||
String result = cloudApi.save(formid, formData.toJSONString());
|
String result = cloudApi.save(formid, formData.toJSONString());
|
||||||
JSONObject res = JSONObject.parseObject(result);
|
JSONObject res = JSONObject.parseObject(result);
|
||||||
JSONObject responseStatus = res.getJSONObject("Result").getJSONObject("ResponseStatus");
|
JSONObject responseStatus = res.getJSONObject("Result").getJSONObject("ResponseStatus");
|
||||||
@@ -73,21 +75,21 @@ public class SyncReceiptProcessHandler implements ClassProcess {
|
|||||||
.map(error -> ((JSONObject) error).getString("Message"))
|
.map(error -> ((JSONObject) error).getString("Message"))
|
||||||
.collect(Collectors.joining("; "));
|
.collect(Collectors.joining("; "));
|
||||||
}
|
}
|
||||||
|
LambdaUpdateWrapper<PmFormData> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
|
updateWrapper.eq(PmFormData::getId, pmFormData.getId());
|
||||||
|
updateWrapper.set(PmFormData::getUpdate_time, DateUtil.now());
|
||||||
if (isSuccess) {
|
if (isSuccess) {
|
||||||
LambdaUpdateWrapper<PmFormData> updateWrapper = new LambdaUpdateWrapper<>();
|
updateWrapper.set(PmFormData::getStatus, StatusEnum.FORM_STATUS.code("完成"));
|
||||||
updateWrapper.eq(PmFormData::getId, pmFormData.getId());
|
updateWrapper.set(PmFormData::getRemark, "回执单创建成功,回传Erp数据为:" + json);
|
||||||
updateWrapper.set(PmFormData::getRemark, "回执单创建成功");
|
|
||||||
iPmFormDataService.update(updateWrapper);
|
|
||||||
} else {
|
} else {
|
||||||
LambdaUpdateWrapper<PmFormData> updateWrapper = new LambdaUpdateWrapper<>();
|
updateWrapper.set(PmFormData::getStatus, StatusEnum.FORM_STATUS.code("暂停"));
|
||||||
updateWrapper.eq(PmFormData::getId, pmFormData.getId());
|
updateWrapper.set(PmFormData::getRemark,"回执单创建失败,原因为:"+errorMessages + ",回传Erp数据为:" + json);
|
||||||
updateWrapper.set(PmFormData::getRemark, errorMessages);
|
|
||||||
iPmFormDataService.update(updateWrapper);
|
|
||||||
}
|
}
|
||||||
|
iPmFormDataService.update(updateWrapper);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
LambdaUpdateWrapper<PmFormData> updateWrapper = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<PmFormData> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
updateWrapper.eq(PmFormData::getId, pmFormData.getId());
|
updateWrapper.eq(PmFormData::getId, pmFormData.getId());
|
||||||
updateWrapper.set(PmFormData::getRemark, ex.getMessage());
|
updateWrapper.set(PmFormData::getRemark, "回执单创建失败,原因为:"+ex.getMessage() + ",回传Erp数据为:" + json);
|
||||||
iPmFormDataService.update(updateWrapper);
|
iPmFormDataService.update(updateWrapper);
|
||||||
Log.error(ex.getMessage());
|
Log.error(ex.getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class PdaCommonController {
|
|||||||
@Log("获取升级地址")
|
@Log("获取升级地址")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Map> apkUrl() {
|
public ResponseEntity<Map> apkUrl() {
|
||||||
Map of = MapOf.of("versionName", "1.0.1", "url", "http://192.168.10.241:8012/api/pda/download/app-release");
|
Map of = MapOf.of("versionName", "1.0.1", "url", "http://192.168.18.218:8012/api/pda/download/app-release");
|
||||||
return new ResponseEntity<>(of,HttpStatus.OK);
|
return new ResponseEntity<>(of,HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@RequestMapping("/download/app-release")
|
@RequestMapping("/download/app-release")
|
||||||
|
|||||||
@@ -248,6 +248,11 @@ public class PdaFormInMst implements Serializable {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 源头订单号编号
|
||||||
|
*/
|
||||||
|
private String srcBillCode;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -204,14 +204,23 @@ public class PdaIOService {
|
|||||||
result.setStockOrgId(pFormJson.getString("StockOrgId"));
|
result.setStockOrgId(pFormJson.getString("StockOrgId"));
|
||||||
result.setSupplierId(pFormJson.getString("SupplierId"));
|
result.setSupplierId(pFormJson.getString("SupplierId"));
|
||||||
result.setMaterial_id(receiveBillData.getMaterial_id());
|
result.setMaterial_id(receiveBillData.getMaterial_id());
|
||||||
result.setPcsn(receiveBillData.getPCode());
|
result.setPcsn(StringUtils.isBlank(receiveBillData.getPcsn()) ? "001" : receiveBillData.getPcsn());
|
||||||
result.setPurchaserId(pFormJson.getString("PurchaserId"));
|
result.setPurchaserId(pFormJson.getString("PurchaserId"));
|
||||||
result.setUnit_id(receiveBillData.getUnit_id());
|
result.setUnit_id(receiveBillData.getUnit_id());
|
||||||
result.setQty(new BigDecimal(dFormJson.getString("ActReceiveQty")));
|
result.setQty(new BigDecimal(dFormJson.getString("ActReceiveQty")));
|
||||||
result.setTaxPrice(dFormJson.getString("taxPrice"));
|
result.setTaxPrice(dFormJson.getString("taxPrice"));
|
||||||
result.setMoNumber(receiveBillData.getPCode());
|
result.setMoNumber(receiveBillData.getPCode());
|
||||||
result.setMoEntryId(receiveBillData.getDId());
|
result.setMoEntryId(receiveBillData.getDId());
|
||||||
|
//源单信息校验
|
||||||
|
if (StringUtils.isBlank(dFormJson.getString("OrderBillNo"))) {
|
||||||
|
result.setSrcBillNo(null);
|
||||||
|
} else {
|
||||||
|
if (dFormJson.getString("OrderBillNo").equals("0")) {
|
||||||
|
result.setSrcBillNo(null);
|
||||||
|
} else {
|
||||||
result.setSrcBillNo(dFormJson.getString("OrderBillNo"));
|
result.setSrcBillNo(dFormJson.getString("OrderBillNo"));
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new BadRequestException("查询合格证关联的收料通知单信息异常!");
|
throw new BadRequestException("查询合格证关联的收料通知单信息异常!");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.nl.wms.pda_manage.iostorage.sevice;
|
package org.nl.wms.pda_manage.iostorage.sevice;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.nl.common.domain.exception.BadRequestException;
|
import org.nl.common.domain.exception.BadRequestException;
|
||||||
import org.nl.common.utils.ListOf;
|
import org.nl.common.utils.ListOf;
|
||||||
import org.nl.wms.base_manage.material.service.IMdMeMaterialbaseService;
|
import org.nl.wms.base_manage.material.service.IMdMeMaterialbaseService;
|
||||||
@@ -42,17 +43,23 @@ public class PdaInIOService {
|
|||||||
String materialId = mst.getMaterial_id();
|
String materialId = mst.getMaterial_id();
|
||||||
String vehicleCode = mst.getVehicle_code();
|
String vehicleCode = mst.getVehicle_code();
|
||||||
String unitId = mst.getUnit_id();
|
String unitId = mst.getUnit_id();
|
||||||
Assert.noNullElements(new Object[]{mst.getStor_code(),mst.getQty(),mst.getMaterial_code(),mst.getBar_code(), materialId,mst.getQty(),mst.getSingle_weight(),mst.getStockOrgId()},"入库失败:请求参数不全");
|
if (StringUtils.isBlank(mst.getSrcBillNo())) {
|
||||||
|
throw new BadRequestException("操作失败,源单信息不存在!");
|
||||||
|
}
|
||||||
|
if (StringUtils.isBlank(mst.getMaterial_code())) {
|
||||||
|
throw new BadRequestException("操作失败,物料信息不存在!");
|
||||||
|
}
|
||||||
|
Assert.noNullElements(new Object[]{mst.getStor_code(), mst.getQty(), mst.getMaterial_code(), mst.getBar_code(), materialId, mst.getQty(), mst.getSingle_weight(), mst.getStockOrgId()}, "入库失败:请求参数不全");
|
||||||
MaterGroupDto groupDto = new MaterGroupDto();
|
MaterGroupDto groupDto = new MaterGroupDto();
|
||||||
groupDto.setStor_code(mst.getStor_code());
|
groupDto.setStor_code(mst.getStor_code());
|
||||||
String form_type;
|
String form_type;
|
||||||
if (mst.getBillNo().contains("OP")||mst.getBillNo().contains("op")) {
|
if (mst.getBillNo().contains("OP") || mst.getBillNo().contains("op")) {
|
||||||
form_type = "PRD_INSTOCK";
|
form_type = "PRD_INSTOCK";
|
||||||
}else {
|
} else {
|
||||||
form_type = "STK_InStock";
|
form_type = "STK_InStock";
|
||||||
}
|
}
|
||||||
MdMeMaterialbase meMaterialbase = iMdMeMaterialbaseService.getById(materialId);
|
MdMeMaterialbase meMaterialbase = iMdMeMaterialbaseService.getById(materialId);
|
||||||
if (meMaterialbase==null){
|
if (meMaterialbase == null) {
|
||||||
throw new BadRequestException("入库失败,物料id在系统中不存在");
|
throw new BadRequestException("入库失败,物料id在系统中不存在");
|
||||||
}
|
}
|
||||||
BmMeasureUnit measureUnit = iBmMeasureUnitService.getById(unitId);
|
BmMeasureUnit measureUnit = iBmMeasureUnitService.getById(unitId);
|
||||||
|
|||||||
@@ -133,6 +133,13 @@ public class SyncFormMappingController {
|
|||||||
return new ResponseEntity<>(result,HttpStatus.OK);
|
return new ResponseEntity<>(result,HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/push")
|
||||||
|
@Log("下推测试")
|
||||||
|
public ResponseEntity<Object> push(@RequestBody JSONObject form){
|
||||||
|
//参数判读,参数解析,调用参数入库
|
||||||
|
JSONObject result = syncErpService.push(form);
|
||||||
|
return new ResponseEntity<>(result,HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import org.apache.commons.lang3.ObjectUtils;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.nl.common.utils.BaseCode;
|
import org.nl.common.utils.BaseCode;
|
||||||
import org.nl.common.utils.IdUtil;
|
import org.nl.common.utils.IdUtil;
|
||||||
|
import org.nl.common.utils.MapOf;
|
||||||
import org.nl.config.lucene.LuceneAppender;
|
import org.nl.config.lucene.LuceneAppender;
|
||||||
import org.nl.wms.external_system.erp.dto.ErpQuery;
|
import org.nl.wms.external_system.erp.dto.ErpQuery;
|
||||||
import org.nl.wms.external_system.erp.dto.ErpSec;
|
import org.nl.wms.external_system.erp.dto.ErpSec;
|
||||||
@@ -50,7 +51,10 @@ public class SyncErpBillsScheduleService {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private PmFormDataMapper pmFormDataMapper;
|
private PmFormDataMapper pmFormDataMapper;
|
||||||
|
private static Map<String, String> BillOrg_Mapping = MapOf.of(
|
||||||
|
"PRD_PPBOM", "FPrdOrgId", "PRD_MO", "FPrdOrgId"
|
||||||
|
, "SAL_SaleOrder", "StockOrgId", "PUR_ReceiveBill", "StockOrgId"
|
||||||
|
, "ka7c19edf9d4b4b39b8cc4a06802163b0", "F_PMSY_PrdOrgId_Id");
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
@@ -58,7 +62,7 @@ public class SyncErpBillsScheduleService {
|
|||||||
MDC.put("requestIp", "127.0.0.1");
|
MDC.put("requestIp", "127.0.0.1");
|
||||||
MDC.put("requestTime", DateUtil.now());
|
MDC.put("requestTime", DateUtil.now());
|
||||||
LuceneAppender.traceIdTL.set(BaseCode.intToChars(IdUtil.getLongId()));
|
LuceneAppender.traceIdTL.set(BaseCode.intToChars(IdUtil.getLongId()));
|
||||||
List<SyncFormMapping> list = syncFormMappingServiceImpl.list(new LambdaQueryWrapper<SyncFormMapping>().in(SyncFormMapping::getForm_type, "PRD_MO","PUR_ReceiveBill","PRD_PPBOM","SP_PickMtrl"));
|
List<SyncFormMapping> list = syncFormMappingServiceImpl.list(new LambdaQueryWrapper<SyncFormMapping>().in(SyncFormMapping::getForm_type, "ka7c19edf9d4b4b39b8cc4a06802163b0", "PRD_PPBOM", "PRD_MO", "PUR_ReceiveBill", "SAL_SaleOrder"));
|
||||||
for (SyncFormMapping m : list) {
|
for (SyncFormMapping m : list) {
|
||||||
JSONArray mappingJson = m.getMapping_json();
|
JSONArray mappingJson = m.getMapping_json();
|
||||||
String mappingString = JSON.toJSONString(mappingJson);
|
String mappingString = JSON.toJSONString(mappingJson);
|
||||||
@@ -157,8 +161,11 @@ public class SyncErpBillsScheduleService {
|
|||||||
BeanUtils.copyProperties(erpSec, identifyInfo);
|
BeanUtils.copyProperties(erpSec, identifyInfo);
|
||||||
K3CloudApi cloudApi = new K3CloudApi(identifyInfo);
|
K3CloudApi cloudApi = new K3CloudApi(identifyInfo);
|
||||||
String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
||||||
//String filterString = " FDocumentStatus='C' AND FCreateDate >= '2024-11-22 00:00:00' and FCreateDate <= '2024-11-30 23:59:59'";
|
//String filterString = "FBillNo ='CGSL241101132'";
|
||||||
String filterString = "FDocumentStatus='C' AND FCreateDate >= '" + today + " 00:00:00' and FCreateDate <= '" + today + " 23:59:59'";
|
String BillOrg = BillOrg_Mapping.get(formType);
|
||||||
|
String filterString = BillOrg + "='750572' AND FDocumentStatus='C' AND FCreateDate >= '2024-12-02 00:00:00' and FCreateDate <= '2024-12-02 23:59:59'";
|
||||||
|
// String filterString = " FDocumentStatus='C' AND FCreateDate >= '2024-12-02 00:00:00' and FCreateDate <= '2024-12-02 23:59:59'";
|
||||||
|
//String filterString = "FDocumentStatus='C' AND FCreateDate >= '" + today + " 00:00:00' and FCreateDate <= '" + today + " 23:59:59'";
|
||||||
ErpQuery query = new ErpQuery();
|
ErpQuery query = new ErpQuery();
|
||||||
query.setFilterString(filterString);
|
query.setFilterString(filterString);
|
||||||
query.setFormId(formType);
|
query.setFormId(formType);
|
||||||
|
|||||||
Reference in New Issue
Block a user