opt:修复出入库单据查询时间范围问题;增加物料查;修复ERP单据同步时间范围问题;
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
and st_ivt_iostorinvdtl.vehicle_code = #{query.vehicles}
|
||||
</if>
|
||||
<if test="query.material != null and query.material != ''">
|
||||
and (md_me_materialbase.material_spec LIKE '%${query.material}%'
|
||||
and (md_me_materialbase.material_code LIKE '%${query.material}%'
|
||||
or md_me_materialbase.material_name LIKE '%${query.material}%')
|
||||
</if>
|
||||
<if test="query.product_code != null and query.product_code != ''">
|
||||
@@ -41,6 +41,9 @@
|
||||
<if test="query.source_form_code != null and query.source_form_code != ''">
|
||||
and st_ivt_iostorinv.source_form_code = #{query.source_form_code}
|
||||
</if>
|
||||
<if test="query.start_time != null and query.start_time != '' and query.end_time != null and query.end_time != ''">
|
||||
and st_ivt_iostorinv.create_time >= #{query.start_time} and st_ivt_iostorinv.update_time <= #{query.end_time}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY st_ivt_iostorinv.id order by st_ivt_iostorinv.id desc
|
||||
</select>
|
||||
|
||||
@@ -106,7 +106,7 @@ public class SyncErpBillsScheduleService {
|
||||
MDC.put("requestIp", "127.0.0.1");
|
||||
MDC.put("requestTime", DateUtil.now());
|
||||
LuceneAppender.traceIdTL.set(BaseCode.intToChars(IdUtil.getLongId()));
|
||||
//List<SyncFormMapping> list = syncFormMappingServiceImpl.list(new LambdaQueryWrapper<SyncFormMapping>().in(SyncFormMapping::getForm_type, "BD_MATERIAL"));
|
||||
// List<SyncFormMapping> list = syncFormMappingServiceImpl.list(new LambdaQueryWrapper<SyncFormMapping>().in(SyncFormMapping::getForm_type, "ka7c19edf9d4b4b39b8cc4a06802163b0"));
|
||||
List<BmFormStruc> strucList = bmFormStrucServiceImpl.list(new LambdaQueryWrapper<BmFormStruc>().eq(BmFormStruc::getIs_sync, "1"));
|
||||
Set<String> structSet = strucList.stream().map(BmFormStruc::getForm_type).collect(Collectors.toSet());
|
||||
List<SyncFormMapping> list = syncFormMappingServiceImpl.list(new LambdaQueryWrapper<SyncFormMapping>().in(SyncFormMapping::getForm_type, structSet));
|
||||
@@ -194,7 +194,7 @@ public class SyncErpBillsScheduleService {
|
||||
timeStart = start;
|
||||
timeEnd = end;
|
||||
}
|
||||
String filterString = getFilterString(formType, code, timeEnd, timeStart);
|
||||
String filterString = getFilterString(formType, code, timeStart, timeEnd);
|
||||
ErpQuery query = new ErpQuery();
|
||||
query.setFilterString(filterString);
|
||||
query.setFormId(formType);
|
||||
@@ -222,7 +222,7 @@ public class SyncErpBillsScheduleService {
|
||||
}
|
||||
}
|
||||
|
||||
private static String getFilterString(String formType, String code, String timeEnd, String timeStart) {
|
||||
private static String getFilterString(String formType, String code, String timeStart, String timeEnd) {
|
||||
String filterString;
|
||||
if (StringUtils.isNotBlank(code)) {
|
||||
filterString = "FBillNo = '" + code + "'";
|
||||
@@ -232,7 +232,7 @@ public class SyncErpBillsScheduleService {
|
||||
filterString += "AND FDocumentStatus = 'C' AND F_PMSY_BillStatus = 'A' AND F_PMSY_CreateDate >= '" + timeStart + " 00:00:00' AND F_PMSY_CreateDate <= '" + timeEnd + " 23:59:59' ";
|
||||
} else if ("SAL_SaleOrder".equals(formType)) {
|
||||
filterString += " AND FDocumentStatus = 'C' AND FCloseStatus ='A' AND FCreateDate >= '" + timeStart + " 00:00:00' and FCreateDate <= '" + timeEnd + " 23:59:59' ";
|
||||
} else if ("STK_TransferDirect".equals(formType)||"STK_MisDelivery".equals(formType)||"PUR_MRB".equals(formType)||"SAL_RETURNSTOCK".equals(formType)) {
|
||||
} else if ("STK_TransferDirect".equals(formType) || "STK_MisDelivery".equals(formType) || "PUR_MRB".equals(formType) || "SAL_RETURNSTOCK".equals(formType)) {
|
||||
filterString += " AND FDocumentStatus ='B' AND FCreateDate >= '" + timeStart + " 00:00:00' and FCreateDate <= '" + timeEnd + " 23:59:59' ";
|
||||
} else {
|
||||
filterString += " AND FDocumentStatus = 'C' AND FCreateDate >= '" + timeStart + " 00:00:00' and FCreateDate <= '" + timeEnd + " 23:59:59' ";
|
||||
|
||||
Reference in New Issue
Block a user