bd5bfbac2d
Root cause: LLM receiving full 34k-char JRXML would regenerate from scratch
instead of modifying coordinates in-place, shrinking output to ~3k chars.
Solution (programmatic node control, not prompt engineering):
- New agent/jrxml_windower.py: decompose JRXML into header (never sent to
LLM) + individual bands. Split bands >4000 chars at element boundaries.
Reassemble with element count validation (>10% change = rollback).
- Rewrite refine_layout: per-band windowed LLM processing (~2-4k chars
each). LLM cannot "reimagine" the entire report.
- Rewrite map_fields: 100% programmatic regex $F{field_N} -> real name
replacement. Zero LLM calls, zero content loss.
- _sanitize_field_name: non-ASCII chars escaped to _uXXXX_ format for
valid JRXML identifiers.
- Tests: 48 new unit tests (windower 28 + map_fields 20). All passing.
Full suite 385 tests, zero regressions.
24 KiB
24 KiB
出/入库单据打印
现状梳理
出入库单据-出库单 && 领料出库-出库单打印模版参数说明
出库单据定制类需求模版分类(newStockOutMaintainCustomPrint)--20250925新增
打印模版参数
HashMap<String, Object> resultMap
样列:
{
"saName":"xuetting",
"objectNameGD":"18551638685【苏ABF358】 LFV2A21K6A3092399 大众 速腾 1.4T 双离合变速器(DSG) 2011 速腾",
"creatorName":"cltest",
"showStorageName":true,
"remark":"",
"title":"流程配置ES出库单",
"showSourceBillNo":true,
"sumAmount":"860.0",
"showChineseAmount":true,
"billStatus":"完成",
"sumNumber":"1.0",
"isGdType":true,
"printCount":"3",
"billNo":"CKD20250116001",
"showDefSeat":true,
"idOwnOrg":"15870306745529549109",
"showApplyModel":true,
"memo":"",
"partInfoDetailMapList":[
{
"employeeName":"cltest",
"sortNumber":"1",
"partShowName":" 3M 燃油宝1号 PN6868 3M (PN6868)",
"defSeat":"A",
"orderBatchList":[
{
"orderNo":"20211213000001",
"totalPrice":"0.0",
"price":"0.0",
"count":"1.0"
}
],
"supplierCode":"PN6868",
"partName":"3M 燃油宝1号 PN6868",
"applyModel":"",
"customCode":"CL0000015",
"storageName":"主仓库",
"number":"1.0",
"unit":"瓶",
"price":"860.0",
"subtotal":"860.0",
"labelName":"保养",
"salesEmployeeNameList": "B2C一店新员工,B2C一店采购员"
},
{
"number":"1.0",
"subtotal":"860.0",
"sortNumber":"合计",
"orderBatchList":[
{
"orderNo":"",
"totalPrice":"0.0",
"price":"",
"count":"1.0"
}
]
}],
"sourceBillNo":"WXD20250103001",
"billDate":"2025-01-16",
"chineseAmount":"捌佰陆拾元整",
"columnCount":"5",
"showCustomCode":true,
"showBusinessLabel":true,
"batchPrintConfig":"3",
"nowDateTime":"2025-02-18 10:04",
"showInOutDate":true,
"showChineseSubtotal":true,
"objectName":"18551638685【苏ABF358】大众 速腾",
"inOutDate":"2025-01-16",
"showRemark":false
}
出入库单据-入库单 && 退料入库-入库单打印模版参数说明
入库单据定制类需求模版分类(newStockInMaintainCustomPrint)--20250925新增
打印模版参数
HashMap<String, Object> resultMap
| 字段 | 说明 | 备注 |
|---|---|---|
| title | 门店名称+ "入库单" | |
| billNo | 入库单号 | |
| sourceBillNo | 来源单号 | |
| showSourceBillNo | 显示来源单号 (boolean) 默认:true |
|
| billStatus | 单据状态(制单、完成) | |
| inOutDate | 入库日期 -- yyyy-MM-dd |
|
| showInOutDate | 是否显示入库日期(boolean) -制单是 false -完成是 true |
|
| objectName | 出入库对象 | |
| creatorName | 制单人 | |
| billDate | 制单日期 (yyyy-MM-dd) | |
| sumNumber | 材料总数量 | |
| sumAmount | 总金额 --脱敏场景显示 **** |
|
| noTaxSumAmount | 除税总金额 --脱敏场景显示 **** |
|
| chineseAmount | 总金额(中文大写) --脱敏场景显示 **** |
|
| chineseNoTaxSumAmount | 除税总金额(中文大写) --脱敏场景显示 **** |
|
| nowDateTime | 打印当前时间 (yyyy-MM-dd HH:mm) | |
| idOwnOrg | 门店ID | |
| remark | 备注信息 | |
| showRemark | 是否显示备注(boolean) -- 备注不为空时是 true |
|
| isGdType | 是否是工单类型单据出库(boolean) -- 工单出库单是 true |
|
| saName | 服务顾问姓名 -- 工单出库单场景 |
|
| printCount | 打印次数 | |
| showCustomCode | 配置出入库打印参数-是否显示材料编码(boolean) | |
| showBusinessLabel | 配置出入库打印参数-是否显示材料业务分类(boolean) | |
| showApplyModel | 配置出入库打印参数-是否显示材料适用车型(boolean) | |
| showStorageName | 配置出入库打印参数-是否显示出库仓库(boolean) | |
| showDefSeat | 配置出入库打印参数-是否显示出库货位(boolean) | |
| showChineseAmount | 配置出入库打印参数-是否显示大写金额(boolean) | |
| showChineseSubtotal | 配置出入库打印参数-是否显示大写行合计(boolean) | |
| sumSubtotal | 入库总金额 -- 脱敏场景显示 **** -- 工单退-才有 |
|
| chineseSubtotal | 大写入库总金额 -- 脱敏场景显示 **** -- 工单退-才有 |
|
| showReturnIn | 显示退料入库一行 -- 工单退-true |
|
| showSign | 【仓管签字】显示的位置 工单退-2;其它场景1 |
|
| stockInType | 退料入库 -- 工单退-才有 |
|
| columnCount | 显示几列 | |
| memo | 车主描述 | --20250925 新增 |
| partInfoDetailMapList | ||
| sortNumber | 序号 | |
| partShowName | 材料组合名称 | |
| partName | 材料名称 | |
| partBrand | 材料品牌 | |
| labelName | 业务分类 | |
| applyModel | 适用车型 | |
| customCode | 材料编码 | |
| storageName | 仓库名称 | |
| defSeat | 货位 | |
| number | 数量 -- 通用模版追加一行合计行,显示 材料出库总数 |
|
| unit | 单位 | |
| price | 单价 --脱敏场景显示 **** |
|
| noTaxPrice | 除税单价 --脱敏场景显示 **** |
|
| subtotal | 金额 --脱敏场景显示 **** |
|
| noTaxSubtotal | 除税金额 --脱敏场景显示 **** |
|
| employeeName | 入库人 | |
| salesEmployeeNameList | 材料行销售人员 | --20250925 新增 |
手工出入库-出/入库单
打印模版参数
HashMap<String, Object> resultMap
样列:
日志关键字:+"手工出入库单据打印入参是"
{
"objectNameGD":"",
"creatorName":"王◇龙",
"showStorageName":true,
"remark":"",
"title":"ISC总店出库单",
"showSourceBillNo":false,
"sumAmount":"410.0",
"showChineseAmount":true,
"billStatus":"完成",
"sumNumber":"2.0",
"printCount":"5",
"billNo":"SGC20240515001",
"showDefSeat":true,
"idOwnOrg":"4060685614490690260",
"showApplyModel":true,
"partInfoDetailMapList":[
{
"employeeName":"XN",
"sortNumber":"1",
"partShowName":" 材料09080112 123456 米其林 (1240)",
"defSeat":"A-14-02",
"orderBatchList":[
{
"orderNo":"20210909000128",
"totalPrice":"400.0",
"price":"400.0",
"count":"1.0"
}
],
"supplierCode":"1240",
"partName":"材料09080112",
"applyModel":"大众 途安",
"customCode":"CL090800112",
"storageName":"主仓库",
"number":"1.0",
"unit":"条",
"price":"400.0",
"subtotal":"400.0",
"labelName":"轮胎"
},
{
"employeeName":"XN",
"sortNumber":"2",
"partShowName":" fnst=>1 AC德科 (FNST>=1)",
"defSeat":"",
"orderBatchList":[
{
"orderNo":"20201104000002",
"totalPrice":"4.0",
"price":"4.0",
"count":"1.0"
}
],
"supplierCode":"FNST>=1",
"partName":"fnst=>1",
"applyModel":"江淮瑞风S52....",
"customCode":"fnst>=1",
"storageName":"总2仓",
"number":"1.0",
"unit":"个",
"price":"10.0",
"subtotal":"10.0",
"labelName":"保养"
},
{
"number":"2.0",
"subtotal":"410.0",
"sortNumber":"合计",
"orderBatchList":[
{
"orderNo":"",
"totalPrice":"404.0",
"price":"",
"count":"2.0"
}
]
}
],
"sourceBillNo":"",
"billDate":"2024-05-15",
"chineseAmount":"肆佰壹拾元整",
"columnCount":"5",
"showCustomCode":true,
"showBusinessLabel":true,
"batchPrintConfig":"3",
"nowDateTime":"2025-02-18 09:33",
"showInOutDate":true,
"showChineseSubtotal":true,
"objectName":"",
"inOutDate":"2024-05-15",
"showRemark":false
}
领料详情-打印领料单
打印模版参数
HashMap<String, Object> resultMap
| 字段 | 说明 | 备注 |
|---|---|---|
| idOwnOrg | 门店ID | |
| title | 门店名称+ "领料单" | |
| billNo | 工单号 | |
| nowDateTime | 打印当前时间 (yyyy-MM-dd HH:mm) | |
| employeeName | 服务顾问 | |
| carModel | 车型 | |
| carNoWhole | 车牌号 | |
| memo | 车主描述 | 2025.08.14 新增 |
| printTimes | 打印次数 | |
| columnCount | 显示几列 | |
| batchPrintConfig | 配置出入库打印参数-查询批次成本展示设置 0:都不展示,1:总成本(将批次成本合并),2和3:展示批次成本 | |
| stuffDetailVOList | ||
| index | 序号 -- 通用模版追加一行合计行,显示 合计 |
|
| partName | 材料组合名称 (材料名称 规格型号 材料品牌 零件号) | |
| unit | 单位 | |
| defSeatList | 货位 | |
| salesEmployeeNameList | 销售人员 List |
8.14新增 |
| orderBatchList --List<Map<String, String>> |
材料行成本相关 | |
| orderNo | 批次号 - batchPrintConfig = 1 场景下,显示 "" -- 均价模式下,显示 "" -- 通用模版追加一行合计,追加行,显示 "" |
|
| count | 批次出库几个 -- batchPrintConfig = 1 场景下,显示 "" -- 均价模式下,显示出库/入库个数 -- 通用模版追加一行合计,追加行,显示总数 |
|
| price | 批次单位成本 -- batchPrintConfig = 1 场景下,显示 "" -- 脱敏场景显示 **** -- 均价模式下,显示均价单位成本 -- 通用模版追加一行合计,追加行,显示 ""** |
|
| priceNoTax | 批次除税单位成本 -- batchPrintConfig = 1 场景下,显示 "" -- 脱敏场景显示 **** -- 均价模式下,显示均价单位成本 -- 通用模版追加一行合计,追加行,显示 ""** |
2025.08.14 追加 |
| totalPrice | 批次总成本 -- batchPrintConfig = 1 场景下,显示合计总成本 -- 脱敏场景显示 **** -- 均价模式下,显示均价总成本 -- 通用模版追加一行合计,追加行,显示总成本**** |
|
| totalPriceNoTax | 批次除税总成本 -- batchPrintConfig = 1 场景下,显示合计总成本 -- 脱敏场景显示 **** -- 均价模式下,显示均价总成本 -- 通用模版追加一行合计,追加行,显示总成本**** |
2025.08.14 追加 |























