opt:修复出入库单据查询时间范围问题;增加物料查;修复ERP单据同步时间范围问题;

This commit is contained in:
2025-01-06 15:32:54 +08:00
parent b0210e70ae
commit 5adbe7cf5f
3 changed files with 65 additions and 29 deletions

View File

@@ -32,7 +32,7 @@
and st_ivt_iostorinvdtl.vehicle_code = #{query.vehicles} and st_ivt_iostorinvdtl.vehicle_code = #{query.vehicles}
</if> </if>
<if test="query.material != null and query.material != ''"> <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}%') or md_me_materialbase.material_name LIKE '%${query.material}%')
</if> </if>
<if test="query.product_code != null and query.product_code != ''"> <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 != ''"> <if test="query.source_form_code != null and query.source_form_code != ''">
and st_ivt_iostorinv.source_form_code = #{query.source_form_code} and st_ivt_iostorinv.source_form_code = #{query.source_form_code}
</if> </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 &gt;= #{query.start_time} and st_ivt_iostorinv.update_time &lt;= #{query.end_time}
</if>
</where> </where>
GROUP BY st_ivt_iostorinv.id order by st_ivt_iostorinv.id desc GROUP BY st_ivt_iostorinv.id order by st_ivt_iostorinv.id desc
</select> </select>

View File

@@ -106,7 +106,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, "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")); 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()); 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)); List<SyncFormMapping> list = syncFormMappingServiceImpl.list(new LambdaQueryWrapper<SyncFormMapping>().in(SyncFormMapping::getForm_type, structSet));
@@ -194,7 +194,7 @@ public class SyncErpBillsScheduleService {
timeStart = start; timeStart = start;
timeEnd = end; timeEnd = end;
} }
String filterString = getFilterString(formType, code, timeEnd, timeStart); String filterString = getFilterString(formType, code, timeStart, timeEnd);
ErpQuery query = new ErpQuery(); ErpQuery query = new ErpQuery();
query.setFilterString(filterString); query.setFilterString(filterString);
query.setFormId(formType); 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; String filterString;
if (StringUtils.isNotBlank(code)) { if (StringUtils.isNotBlank(code)) {
filterString = "FBillNo = '" + code + "'"; filterString = "FBillNo = '" + code + "'";

View File

@@ -20,6 +20,39 @@
class="filter-item" class="filter-item"
/> />
</el-form-item> </el-form-item>
<el-form-item label="物料编码">
<el-input
v-model="query.material_code"
clearable
style="width: 300px"
size="mini"
placeholder="请输入物料编码"
prefix-icon="el-icon-search"
class="filter-item"
/>
</el-form-item>
<el-form-item label="载具编码">
<el-input
v-model="query.vehicle_code"
clearable
style="width: 300px"
size="mini"
placeholder="请输入载具编码"
prefix-icon="el-icon-search"
class="filter-item"
/>
</el-form-item>
<el-form-item label="批次">
<el-input
v-model="query.pcsn"
clearable
style="width: 300px"
size="mini"
placeholder="请输入批次信息"
prefix-icon="el-icon-search"
class="filter-item"
/>
</el-form-item>
<el-form-item label="变动日期" prop="analyseData"> <el-form-item label="变动日期" prop="analyseData">
<el-date-picker <el-date-picker
v-model="query.datepick" v-model="query.datepick"