Browse Source

新品流程ok

master
常熟吴彦祖 2 weeks ago
parent
commit
b9792e2489
  1. 34
      src/main/java/com/xujie/modules/order/entity/PODetail.java
  2. 12
      src/main/java/com/xujie/modules/order/service/Impl/PODetailServiceImpl.java
  3. 160
      src/main/java/com/xujie/modules/order/service/Impl/PoCustomerFieldAuthServiceImpl.java
  4. 10
      src/main/java/com/xujie/modules/order/support/PoFieldAuthSupport.java
  5. 6
      src/main/java/com/xujie/modules/order/support/PoFieldCodeSupport.java
  6. 28
      src/main/java/com/xujie/modules/order/vo/PODetailVo.java
  7. 38
      src/main/resources/mapper/order/PODetailMapper.xml

34
src/main/java/com/xujie/modules/order/entity/PODetail.java

@ -182,6 +182,40 @@ public class PODetail extends QueryPage {
@TableField("c_real_crd")
private Date realCrd;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "PO place date")
@TableField("c_po_place_date")
private Date poPlaceDate;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "PO promise ready date")
@TableField("c_po_promise_ready_date")
private Date poPromiseReadyDate;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "PO actual ready date")
@TableField("c_po_actual_ready_date")
private Date poActualReadyDate;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "China office inspection date")
@TableField("c_china_office_inspection_date")
private Date chinaOfficeInspectionDate;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "ship to NPC date")
@TableField("c_ship_to_npc_date")
private Date shipToNpcDate;
@ApiModelProperty(value = "inspection result")
@TableField("c_inspection_result")
private String inspectionResult;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "预估到货时间")

12
src/main/java/com/xujie/modules/order/service/Impl/PODetailServiceImpl.java

@ -989,6 +989,12 @@ public class PODetailServiceImpl extends ServiceImpl<PODetailMapper, PODetail> i
poDetailVo.setRemark(importVo.getRemark());
poDetailVo.setStatus("草稿");
poDetailVo.setWantReceiveDate(importVo.getWantReceiveDate());
poDetailVo.setPoPlaceDate(importVo.getPoPlaceDate());
poDetailVo.setPoPromiseReadyDate(importVo.getPoPromiseReadyDate());
poDetailVo.setPoActualReadyDate(importVo.getPoActualReadyDate());
poDetailVo.setChinaOfficeInspectionDate(importVo.getChinaOfficeInspectionDate());
poDetailVo.setShipToNpcDate(importVo.getShipToNpcDate());
poDetailVo.setInspectionResult(importVo.getInspectionResult());
poDetailVo.setExtValues(importVo.getExtValues());
poDetailVo.setCustomer(customer);
poDetailVo.setCrdOri(null);
@ -1085,6 +1091,12 @@ public class PODetailServiceImpl extends ServiceImpl<PODetailMapper, PODetail> i
poDetailVo.setCrdOri(null);
poDetailVo.setInspection(vo.getInspection());
poDetailVo.setRealCrd(vo.getRealCrd());
poDetailVo.setPoPlaceDate(vo.getPoPlaceDate());
poDetailVo.setPoPromiseReadyDate(vo.getPoPromiseReadyDate());
poDetailVo.setPoActualReadyDate(vo.getPoActualReadyDate());
poDetailVo.setChinaOfficeInspectionDate(vo.getChinaOfficeInspectionDate());
poDetailVo.setShipToNpcDate(vo.getShipToNpcDate());
poDetailVo.setInspectionResult(vo.getInspectionResult());
poDetailVo.setFlexid(vo.getFlexid());
poDetailVo.setObd(vo.getObd());
poDetailVo.setDocSent(vo.getDocSent());

160
src/main/java/com/xujie/modules/order/service/Impl/PoCustomerFieldAuthServiceImpl.java

@ -34,6 +34,7 @@ import java.util.Set;
public class PoCustomerFieldAuthServiceImpl implements IPoCustomerFieldAuthService {
private static final String ORDER_EXT_DICT_CREATE_BY = "订单扩展字段";
private static final String ORDER_EXT_DICT_REMARK_PREFIX = "订单扩展字段:";
@Autowired
private PoFieldAuthSupport fieldAuthSupport;
@ -151,9 +152,22 @@ public class PoCustomerFieldAuthServiceImpl implements IPoCustomerFieldAuthServi
return rows;
}
/**
* 批量保存 customer 字段权限poCustomer/fieldAuth/saveBatch
* 1) 先校验 site/customer/rows 基础参数
* 2) 读取字段元数据必有字段集合以及当前 customer 已有扩展配置
* 3) 逐行解析前端提交内容生成 po_customer_field_auth 待保存数据
* 4) 对扩展字段同步生成/更新 po_customer_field_config显示名字典类型编辑器类型
* 5) 完成字段权限与配置的 upsert dictType 自动补齐 sys_dict_type
* 6) 自动补齐字典时强制遵循
* - dict_type = 用户维护的字典类型
* - dict_name = 用户维护的字典类型
* - remark = "订单扩展字段:customer-显示名称"
*/
@Override
@Transactional
public R saveFieldAuthBatch(String site, String customerCode, List<Map<String, Object>> rows) {
// ====== 基础参数校验site 必传customer 必传rows 不能为空 ======
fieldAuthSupport.requireSite(site);
if (!StringUtils.hasText(customerCode)) {
return R.error("customerCode不能为空");
@ -161,42 +175,75 @@ public class PoCustomerFieldAuthServiceImpl implements IPoCustomerFieldAuthServi
if (CollectionUtils.isEmpty(rows)) {
return R.error("字段权限数据不能为空");
}
// ====== 统一清洗上下文参数避免后续多处重复 trim ======
String resolvedSite = site.trim();
String resolvedCustomer = customerCode.trim();
// ====== 预加载元数据字段定义必有字段已有 customer 配置 ======
// metaMap: 当前 site 下所有可用字段元数据field_code -> meta
Map<String, PoFieldMeta> metaMap = toMetaMap(fieldMetaMapper.listBySite(resolvedSite));
// mandatoryMap: 系统强制可见的必有字段field_code -> meta
Map<String, PoFieldMeta> mandatoryMap = mandatoryFieldMapFromMeta(metaMap);
// existingConfigMap: 当前 customer 已存在的扩展字段配置field_code -> config
Map<String, PoCustomerFieldConfig> existingConfigMap = toConfigMap(
fieldConfigMapper.listByCustomer(resolvedSite, resolvedCustomer));
// ====== 通用审计字段与容器初始化 ======
String operator = currentUserName();
Date now = new Date();
// extLabelSet: 同一 customer 下扩展字段 display_label 去重校验忽略大小写
Set<String> extLabelSet = new HashSet<String>();
// saveRows: 待写入 po_customer_field_auth 的行
List<PoCustomerFieldAuth> saveRows = new ArrayList<PoCustomerFieldAuth>();
// saveConfigRows: 待写入 po_customer_field_config 的扩展配置行
List<PoCustomerFieldConfig> saveConfigRows = new ArrayList<PoCustomerFieldConfig>();
Map<String, String> autoCreateDictTypeNameMap = new LinkedHashMap<String, String>();
// autoCreateDictTypeDisplayLabelMap: 自动建字典时使用dictType -> 显示名称
// 说明dict_name 最终固定写成 dictType map value 只用于 remark 组装
Map<String, String> autoCreateDictTypeDisplayLabelMap = new LinkedHashMap<String, String>();
// ====== 遍历前端提交的每一行字段权限 ======
for (Map<String, Object> row : rows) {
// 空行直接跳过
if (row == null) {
continue;
}
// 读取并校验 fieldCode fieldCode 的行不参与保存
String fieldCode = asString(row.get("fieldCode"));
if (!StringUtils.hasText(fieldCode)) {
continue;
}
String resolvedFieldCode = fieldCode.trim();
// 仅处理当前 site 已启用且存在元数据的字段避免写入脏 fieldCode
PoFieldMeta meta = metaMap.get(resolvedFieldCode);
if (meta == null || !"Y".equalsIgnoreCase(meta.getActive())) {
continue;
}
// 判断是否扩展字段ext_*扩展字段会额外进入 config 处理分支
boolean extField = isExtField(resolvedFieldCode);
// 可见标识优先前端传值若未传则回退元数据默认值
String visible = defaultFlag(asString(row.get("visibleFlag")), defaultVisibleByMeta(meta, extField));
// 必有字段不可设置为不可见硬约束
PoFieldMeta mandatory = mandatoryMap.get(resolvedFieldCode);
if (mandatory != null && "N".equalsIgnoreCase(visible)) {
return R.error("必有权限字段不可设为不可见: " + mandatory.getFieldLabel());
}
// required/editable/queryable/exportable 的计算规则
// - required: 前端传值优先未传回退元数据默认
// - editable: 当前项目按元数据控制不按 customer 动态覆盖
// - queryable/exportable: 基于 visible + 元数据规则推导
String required = defaultFlag(asString(row.get("requiredFlag")), defaultFlag(meta.getDefaultRequired(), "N"));
String editable = defaultFlag(meta.getDefaultEditable(), "N");
String queryable = deriveQueryable(meta, visible);
String exportable = deriveExportable(visible);
// 构建字段权限实体po_customer_field_auth
PoCustomerFieldAuth auth = new PoCustomerFieldAuth();
auth.setSite(resolvedSite);
auth.setCustomerCode(resolvedCustomer);
@ -213,25 +260,45 @@ public class PoCustomerFieldAuthServiceImpl implements IPoCustomerFieldAuthServi
auth.setUpdateTime(now);
saveRows.add(auth);
// 扩展字段还需要同步维护 po_customer_field_config
if (extField) {
// displayLabelInput: 前端输入的显示名称原始值
String displayLabelInput = normalizeNullable(asString(row.get("displayLabel")));
// displayNameForDictType: remark 用显示名称优先 displayLabel其次字段标签再次 fieldCode
String displayNameForDictType = resolveExtDisplayName(displayLabelInput, meta, resolvedFieldCode);
// displayLabel: 入库 display_label如果和系统字段名一致则清空保留默认命名语义
String displayLabel = displayLabelInput;
if (StringUtils.hasText(displayLabel)
&& StringUtils.hasText(meta.getFieldLabel())
&& displayLabel.equals(meta.getFieldLabel().trim())) {
displayLabel = null;
}
// display_label 唯一性校验同一 customer 内不允许重复忽略大小写
if (StringUtils.hasText(displayLabel)) {
String labelKey = displayLabel.toLowerCase();
if (!extLabelSet.add(labelKey)) {
return R.error("同一customer内display_label不能重复: " + displayLabel);
}
}
// 读取扩展字段字典类型
String dictType = normalizeNullable(asString(row.get("dictType")));
if (StringUtils.hasText(dictType) && !autoCreateDictTypeNameMap.containsKey(dictType)) {
autoCreateDictTypeNameMap.put(dictType, displayNameForDictType);
// 日期扩展字段ext_dtxx禁止维护 dictType强制置空
if (isExtDateField(resolvedFieldCode)) {
dictType = null;
}
// 记录需要自动建字典的 dictType仅首次记录
if (StringUtils.hasText(dictType) && !autoCreateDictTypeDisplayLabelMap.containsKey(dictType)) {
autoCreateDictTypeDisplayLabelMap.put(dictType, displayNameForDictType);
}
// 只有满足以下任一条件才需要落一条 customer 字段配置
// 1) 数据库已有该字段配置需要继续维护
// 2) 本次提交了 displayLabel
// 3) 本次提交了 dictType
PoCustomerFieldConfig existingConfig = existingConfigMap.get(resolvedFieldCode);
if (existingConfig != null || StringUtils.hasText(displayLabel) || StringUtils.hasText(dictType)) {
PoCustomerFieldConfig config = new PoCustomerFieldConfig();
@ -252,13 +319,18 @@ public class PoCustomerFieldAuthServiceImpl implements IPoCustomerFieldAuthServi
}
}
}
// ====== 批量 upsert 字段权限与扩展配置 ======
if (!saveRows.isEmpty()) {
fieldAuthMapper.saveOrUpdate(saveRows);
}
if (!saveConfigRows.isEmpty()) {
fieldConfigMapper.saveOrUpdate(saveConfigRows);
}
ensureDictTypeExists(resolvedSite, resolvedCustomer, autoCreateDictTypeNameMap);
// ====== 自动补齐字典类型sys_dict_type ======
// 按约束写入dict_type=dictTypedict_name=dictTyperemark=订单扩展字段customer-显示名称
ensureDictTypeExists(resolvedSite, resolvedCustomer, autoCreateDictTypeDisplayLabelMap);
return R.ok();
}
@ -320,6 +392,9 @@ public class PoCustomerFieldAuthServiceImpl implements IPoCustomerFieldAuthServi
}
}
String dictType = normalizeNullable(asString(row.get("dictType")));
if (isExtDateField(resolvedFieldCode)) {
dictType = null;
}
if (StringUtils.hasText(dictType) && !autoCreateDictTypeNameMap.containsKey(dictType)) {
autoCreateDictTypeNameMap.put(dictType, displayNameForDictType);
}
@ -418,6 +493,9 @@ public class PoCustomerFieldAuthServiceImpl implements IPoCustomerFieldAuthServi
}
private String resolveDictType(PoFieldMeta meta, PoCustomerFieldConfig config, boolean extField) {
if (extField && isExtDateField(meta == null ? null : meta.getFieldCode())) {
return null;
}
if (extField && config != null && StringUtils.hasText(config.getDictType())) {
return config.getDictType().trim();
}
@ -456,52 +534,96 @@ public class PoCustomerFieldAuthServiceImpl implements IPoCustomerFieldAuthServi
return "input";
}
private void ensureDictTypeExists(String site, String customerCode, Map<String, String> dictTypeNameMap) {
if (!StringUtils.hasText(site) || dictTypeNameMap == null || dictTypeNameMap.isEmpty()) {
private void ensureDictTypeExists(String site, String customerCode, Map<String, String> dictTypeDisplayLabelMap) {
if (!StringUtils.hasText(site) || dictTypeDisplayLabelMap == null || dictTypeDisplayLabelMap.isEmpty()) {
return;
}
for (Map.Entry<String, String> entry : dictTypeNameMap.entrySet()) {
for (Map.Entry<String, String> entry : dictTypeDisplayLabelMap.entrySet()) {
String dictType = normalizeNullable(entry.getKey());
if (!StringUtils.hasText(dictType)) {
continue;
}
long exists = dictTypeService.lambdaQuery()
String displayLabel = normalizeNullable(entry.getValue());
String expectedRemark = buildOrderExtDictRemark(customerCode, displayLabel, dictType);
List<DictType> existingList = dictTypeService.lambdaQuery()
.eq(DictType::getDictType, dictType)
.and(w -> w.eq(DictType::getSite, site).or().eq(DictType::getSite, "*"))
.count();
if (exists > 0) {
.list();
if (!CollectionUtils.isEmpty(existingList)) {
syncAutoCreatedDictType(existingList, dictType, expectedRemark);
continue;
}
String dictName = normalizeNullable(entry.getValue());
if (!StringUtils.hasText(dictName)) {
dictName = dictType;
}
DictType model = new DictType();
model.setSite(site);
model.setDictType(dictType);
model.setDictName(dictName);
model.setDictName(dictType);
model.setStatus("Y");
model.setCreateBy(ORDER_EXT_DICT_CREATE_BY);
model.setUpdateBy(ORDER_EXT_DICT_CREATE_BY);
model.setRemark(dictName + "-" + customerCode);
model.setRemark(expectedRemark);
try {
dictTypeService.save(model);
} catch (Exception ex) {
long concurrentExists = dictTypeService.lambdaQuery()
List<DictType> concurrentExists = dictTypeService.lambdaQuery()
.eq(DictType::getDictType, dictType)
.and(w -> w.eq(DictType::getSite, site).or().eq(DictType::getSite, "*"))
.count();
if (concurrentExists == 0) {
.list();
if (CollectionUtils.isEmpty(concurrentExists)) {
throw ex;
}
syncAutoCreatedDictType(concurrentExists, dictType, expectedRemark);
}
}
}
private String buildOrderExtDictRemark(String customerCode, String displayLabel, String dictType) {
String resolvedCustomer = normalizeNullable(customerCode);
String resolvedLabel = normalizeNullable(displayLabel);
if (!StringUtils.hasText(resolvedCustomer)) {
resolvedCustomer = "-";
}
if (!StringUtils.hasText(resolvedLabel)) {
resolvedLabel = dictType;
}
return ORDER_EXT_DICT_REMARK_PREFIX + resolvedCustomer + "-" + resolvedLabel;
}
private void syncAutoCreatedDictType(List<DictType> existingList, String dictType, String expectedRemark) {
if (CollectionUtils.isEmpty(existingList)) {
return;
}
for (DictType existing : existingList) {
if (existing == null || !ORDER_EXT_DICT_CREATE_BY.equals(existing.getCreateBy())) {
continue;
}
boolean needUpdate = false;
if (!dictType.equals(normalizeNullable(existing.getDictName()))) {
existing.setDictName(dictType);
needUpdate = true;
}
if (!expectedRemark.equals(normalizeNullable(existing.getRemark()))) {
existing.setRemark(expectedRemark);
needUpdate = true;
}
if (!needUpdate) {
continue;
}
existing.setUpdateBy(ORDER_EXT_DICT_CREATE_BY);
dictTypeService.updateById(existing);
}
}
private boolean isExtField(String fieldCode) {
return StringUtils.hasText(fieldCode) && fieldCode.trim().toLowerCase().startsWith("ext_");
}
private boolean isExtDateField(String fieldCode) {
if (!StringUtils.hasText(fieldCode)) {
return false;
}
return fieldCode.trim().toLowerCase().matches("^ext_dt\\d{2}$");
}
private String currentUserName() {
SysUserEntity currentUser = (SysUserEntity) SecurityUtils.getSubject().getPrincipal();
return currentUser != null && StringUtils.hasText(currentUser.getUsername())

10
src/main/java/com/xujie/modules/order/support/PoFieldAuthSupport.java

@ -404,6 +404,9 @@ public class PoFieldAuthSupport {
}
private String resolveDictType(PoFieldMeta meta, PoCustomerFieldConfig config, boolean extField) {
if (extField && isExtDateField(meta == null ? null : meta.getFieldCode())) {
return null;
}
if (extField && config != null && StringUtils.hasText(config.getDictType())) {
return config.getDictType().trim();
}
@ -429,6 +432,13 @@ public class PoFieldAuthSupport {
return StringUtils.hasText(fieldCode) && fieldCode.trim().toLowerCase().startsWith("ext_");
}
private boolean isExtDateField(String fieldCode) {
if (!StringUtils.hasText(fieldCode)) {
return false;
}
return fieldCode.trim().toLowerCase().matches("^ext_dt\\d{2}$");
}
private String defaultVisibleByMeta(PoFieldMeta meta) {
if (isExtField(meta.getFieldCode())) {
return "N";

6
src/main/java/com/xujie/modules/order/support/PoFieldCodeSupport.java

@ -43,6 +43,12 @@ public final class PoFieldCodeSupport {
register("crdOri", "crd_ori");
register("inspection", "inspection");
register("realCrd", "real_crd");
register("poPlaceDate", "po_place_date");
register("poPromiseReadyDate", "po_promise_ready_date");
register("poActualReadyDate", "po_actual_ready_date");
register("chinaOfficeInspectionDate", "china_office_inspection_date");
register("shipToNpcDate", "ship_to_npc_date");
register("inspectionResult", "inspection_result");
register("eta", "eta");
register("flexid", "flexid");
register("obd", "obd");

28
src/main/java/com/xujie/modules/order/vo/PODetailVo.java

@ -170,6 +170,34 @@ public class PODetailVo extends QueryPage {
@ApiModelProperty(value = "实际完货日期")
private Date realCrd;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "PO place date")
private Date poPlaceDate;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "PO promise ready date")
private Date poPromiseReadyDate;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "PO actual ready date")
private Date poActualReadyDate;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "China office inspection date")
private Date chinaOfficeInspectionDate;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "ship to NPC date")
private Date shipToNpcDate;
@ApiModelProperty(value = "inspection result")
private String inspectionResult;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "预估到货时间")

38
src/main/resources/mapper/order/PODetailMapper.xml

@ -48,6 +48,12 @@
<result column="c_crd_ori" property="crdOri" />
<result column="c_inspection" property="inspection" />
<result column="c_real_crd" property="realCrd" />
<result column="c_po_place_date" property="poPlaceDate" />
<result column="c_po_promise_ready_date" property="poPromiseReadyDate" />
<result column="c_po_actual_ready_date" property="poActualReadyDate" />
<result column="c_china_office_inspection_date" property="chinaOfficeInspectionDate" />
<result column="c_ship_to_npc_date" property="shipToNpcDate" />
<result column="c_inspection_result" property="inspectionResult" />
<result column="c_eta" property="eta" />
<result column="c_flexid" property="flexid" />
<result column="c_obd" property="obd" />
@ -91,7 +97,7 @@
<!-- 通用查询结果列 -->
<sql id="BaseColumnList">
po_header_id, order_no, site, item_no, part_no, status, qty, umid, convert_factor, price, base_price, want_receive_date, tax_rate, tax, additional_cost, freight, duty, arrive_qty, receive_qty, qty_returned, qty_replace, qty_scrapt, invoice_qty, approve_result, need_inspect_flag, remark, iqc_qty, last_update_by, pr_convert_note, inspect_type_db, inspect_type, inspect_qty, inspect_percent, inspection_level_no, close_tolerance, over_receive_tolerance, item, c_value, c_ship_qty, c_sum_price, c_narrival, c_crd, c_crd_ori, c_inspection, c_real_crd, c_eta, c_flexid, c_obd, c_doc_sent, c_telex_release, c_advance_payment, c_advance_paid, create_time, c_planner, c_edit, c_end_planner, c_remark_delay, c_customer, qty_cancelled, inspect_method_db, to_inv_nofity_qty, upload_date, order_ref1, order_ref5, batch_no, order_ref4, pre_pay_amount, upload_by, pur_lead_time, order_ref_type, order_ref3, need_receive_flag, upload_flag, id, pre_pay_reverse_amount, out_work_order_flag, order_ref2, qty_rbjs, pre_pay_pay_amount, need_date, inspect_method, inv_notify_qty, standard_tt
po_header_id, order_no, site, item_no, part_no, status, qty, umid, convert_factor, price, base_price, want_receive_date, tax_rate, tax, additional_cost, freight, duty, arrive_qty, receive_qty, qty_returned, qty_replace, qty_scrapt, invoice_qty, approve_result, need_inspect_flag, remark, iqc_qty, last_update_by, pr_convert_note, inspect_type_db, inspect_type, inspect_qty, inspect_percent, inspection_level_no, close_tolerance, over_receive_tolerance, item, c_value, c_ship_qty, c_sum_price, c_narrival, c_crd, c_crd_ori, c_inspection, c_real_crd, c_po_place_date, c_po_promise_ready_date, c_po_actual_ready_date, c_china_office_inspection_date, c_ship_to_npc_date, c_inspection_result, c_eta, c_flexid, c_obd, c_doc_sent, c_telex_release, c_advance_payment, c_advance_paid, create_time, c_planner, c_edit, c_end_planner, c_remark_delay, c_customer, qty_cancelled, inspect_method_db, to_inv_nofity_qty, upload_date, order_ref1, order_ref5, batch_no, order_ref4, pre_pay_amount, upload_by, pur_lead_time, order_ref_type, order_ref3, need_receive_flag, upload_flag, id, pre_pay_reverse_amount, out_work_order_flag, order_ref2, qty_rbjs, pre_pay_pay_amount, need_date, inspect_method, inv_notify_qty, standard_tt
</sql>
@ -143,6 +149,12 @@
<if test="crdOri != null and crdOri != '' "> and c_crd_ori = #{crdOri}</if>
<if test="inspection != null and inspection != '' "> and c_inspection = #{inspection}</if>
<if test="realCrd != null and realCrd != '' "> and c_real_crd = #{realCrd}</if>
<if test="poPlaceDate != null and poPlaceDate != '' "> and c_po_place_date = #{poPlaceDate}</if>
<if test="poPromiseReadyDate != null and poPromiseReadyDate != '' "> and c_po_promise_ready_date = #{poPromiseReadyDate}</if>
<if test="poActualReadyDate != null and poActualReadyDate != '' "> and c_po_actual_ready_date = #{poActualReadyDate}</if>
<if test="chinaOfficeInspectionDate != null and chinaOfficeInspectionDate != '' "> and c_china_office_inspection_date = #{chinaOfficeInspectionDate}</if>
<if test="shipToNpcDate != null and shipToNpcDate != '' "> and c_ship_to_npc_date = #{shipToNpcDate}</if>
<if test="inspectionResult != null and inspectionResult != '' "> and c_inspection_result = #{inspectionResult}</if>
<if test="eta != null and eta != '' "> and c_eta = #{eta}</if>
<if test="flexid != null and flexid != '' "> and c_flexid = #{flexid}</if>
<if test="obd != null and obd != '' "> and c_obd = #{obd}</if>
@ -194,6 +206,12 @@
,pod.c_crd_ori as crdOri
,pod.c_inspection as inspection
,pod.c_real_crd as realCrd
,pod.c_po_place_date as poPlaceDate
,pod.c_po_promise_ready_date as poPromiseReadyDate
,pod.c_po_actual_ready_date as poActualReadyDate
,pod.c_china_office_inspection_date as chinaOfficeInspectionDate
,pod.c_ship_to_npc_date as shipToNpcDate
,pod.c_inspection_result as inspectionResult
,pod.c_eta as eta
,pod.c_flexid as flexid
,pod.c_obd as obd
@ -296,6 +314,12 @@
<if test="query.crdOri != null and query.crdOri != '' "> and pod.c_crd_ori like '%${query.crdOri}%'</if>
<if test="query.inspection != null and query.inspection != '' "> and pod.c_inspection like '%${query.inspection}%'</if>
<if test="query.realCrd != null and query.realCrd != '' "> and pod.c_real_crd like '%${query.realCrd}%'</if>
<if test="query.poPlaceDate != null and query.poPlaceDate != '' "> and pod.c_po_place_date like '%${query.poPlaceDate}%'</if>
<if test="query.poPromiseReadyDate != null and query.poPromiseReadyDate != '' "> and pod.c_po_promise_ready_date like '%${query.poPromiseReadyDate}%'</if>
<if test="query.poActualReadyDate != null and query.poActualReadyDate != '' "> and pod.c_po_actual_ready_date like '%${query.poActualReadyDate}%'</if>
<if test="query.chinaOfficeInspectionDate != null and query.chinaOfficeInspectionDate != '' "> and pod.c_china_office_inspection_date like '%${query.chinaOfficeInspectionDate}%'</if>
<if test="query.shipToNpcDate != null and query.shipToNpcDate != '' "> and pod.c_ship_to_npc_date like '%${query.shipToNpcDate}%'</if>
<if test="query.inspectionResult != null and query.inspectionResult != '' "> and pod.c_inspection_result like '%${query.inspectionResult}%'</if>
<if test="query.eta != null and query.eta != '' "> and pod.c_eta like '%${query.eta}%'</if>
<if test="query.flexid != null and query.flexid != '' "> and pod.c_flexid like '%${query.flexid}%'</if>
<if test="query.obd != null and query.obd != '' "> and pod.c_obd like '%${query.obd}%'</if>
@ -350,6 +374,12 @@
,pod.c_crd_ori as crdOri
,pod.c_inspection as inspection
,pod.c_real_crd as realCrd
,pod.c_po_place_date as poPlaceDate
,pod.c_po_promise_ready_date as poPromiseReadyDate
,pod.c_po_actual_ready_date as poActualReadyDate
,pod.c_china_office_inspection_date as chinaOfficeInspectionDate
,pod.c_ship_to_npc_date as shipToNpcDate
,pod.c_inspection_result as inspectionResult
,pod.c_eta as eta
,pod.c_flexid as flexid
,pod.c_obd as obd
@ -502,6 +532,12 @@
<if test="crdOri != null">c_crd_ori = #{crdOri},</if>
<if test="inspection != null">c_inspection = #{inspection},</if>
<if test="realCrd != null">c_real_crd = #{realCrd},</if>
<if test="poPlaceDate != null">c_po_place_date = #{poPlaceDate},</if>
<if test="poPromiseReadyDate != null">c_po_promise_ready_date = #{poPromiseReadyDate},</if>
<if test="poActualReadyDate != null">c_po_actual_ready_date = #{poActualReadyDate},</if>
<if test="chinaOfficeInspectionDate != null">c_china_office_inspection_date = #{chinaOfficeInspectionDate},</if>
<if test="shipToNpcDate != null">c_ship_to_npc_date = #{shipToNpcDate},</if>
<if test="inspectionResult != null">c_inspection_result = #{inspectionResult},</if>
<if test="eta != null">c_eta = #{eta},</if>
<if test="flexid != null">c_flexid = #{flexid},</if>
<if test="obd != null">c_obd = #{obd},</if>

Loading…
Cancel
Save