## 2.7.2025082816
- feat: 新增功能
  - 添加定时任务以标记mtask为已完成 [caoqianming]
  - update_mtask 不再触发状态改变 [caoqianming]
  - 子任务提交会触发大任务提交 [caoqianming]
  - 优化mlog list查询 [caoqianming]
  - 增加直接userid获取token的接口 [caoqianming]
  - mlog 添加索引 [caoqianming]
  - 增加mlogbw start_test接口以优化批量操作 [caoqianming]
  - 优化mlogbw bulk update [caoqianming]
## 2.7.2025082616
- feat: 新增功能
  - 添加mlog和handover的锁 [caoqianming]
  - base 添加悲观锁及其装饰器 [caoqianming]
  - number_to_batch 支持结合工序 [caoqianming]
  - 物料清单的导出 [caoqianming]
  - mlogbw create 优化 [caoqianming]
  - material添加img字段 [caoqianming]
  - 过滤来料未完成的优化 [caoqianming]
  - mlog quick添加mlogb [caoqianming]
  - batch_gzerp添加库存等字段 [caoqianming]
  - check_sql_safe 优化一下 [caoqianming]
  - quick返回mlogId [caoqianming]
  - mlog submit revert支持放置到车间 [caoqianming]
  - 可根据work_start_time 推出handle_date [caoqianming]
  - MlogInitSerializer 可传入handle_date [caoqianming]
  - 去除commands命令权限 [caoqianming]
  - 交接记录在审批状态下对撤销的处理 [caoqianming]
  - base retreat 撤回功能提到wfservice里 [caoqianming]
- fix: 问题修复
  - mlogbw create 调换一下if顺序 [caoqianming]
  - base ComplexQueryMixin 默认null值排最后 [caoqianming]
## 2.7.2025081813
- feat: 新增功能
  - 导入出入库明细 [caoqianming]
  - mlogbw增加type查询区分inout [caoqianming]
  - 快速创建日志接口 [caoqianming]
  - 添加wamterial ava_qs方法 [caoqianming]
  - mlogbw添加排序以支持直接展示 [caoqianming]
  - WMaterialFilter filter tag优化 [caoqianming]
  - mlogbw添加筛选条件 [caoqianming]
  - MIOItemCreateSerializer 添加pack_index [caoqianming]
## 2.7.2025080716
- feat: 新增功能
  - MaterialBatch返回can_mio [caoqianming]
  - wpr 不做删除 [caoqianming]
  - wpr number_out_last 改为原始sql查询 [caoqianming]
  - base query_one_dict优化 [caoqianming]
  - mioitemw 返回wpr_number_out [caoqianming]
  - mlogbw返回wpr_number_out [caoqianming]
  - 获取物料的缺陷项列表 [caoqianming]
  - route添加params_json字段 [caoqianming]
  - wpr增加can_use筛选条件 [caoqianming]
  - mlog 创建和编辑时可变更team字段 [caoqianming]
  - get_qct 未有检验模板 [caoqianming]
  - ftestwork_submit 触发批次统计分析 [caoqianming]
  - 光子批次统计增加组合件信息 [caoqianming]
  - wmaterial添加筛选条件defect__isnull [caoqianming]
  - mioitem 返回信息时展示组合件信息 [caoqianming]
  - 仅合格品支持退回 [caoqianming]
## 2.7.2025080409
- feat: 新增功能
  - 出入库记录支持对子件批次 的搜索 [caoqianming]
  - 装箱字段简化 [caoqianming]
  - 支持消耗物料的检验 [caoqianming]
  - WproutSerializer 支持传入none [caoqianming]
  - assgin_number_out 支持置空 [caoqianming]
- fix: 问题修复
  - ftestwork_submit 关于不合格逻辑的bug [caoqianming]
  - mioitem 检索bug [caoqianming]
  - 销售发货时update_mb_item的bug [caoqianming]
## 2.7.2025073110
- feat: 新增功能
  - 通过fmlog查询batch [caoqianming]
  - 优化number_out_last [caoqianming]
  - MIOItem序列化器添加note [caoqianming]
  - wpr分配出库对外编号 [caoqianming]
  - 来料未完成的筛选控制物料类型为半成品、成品 [caoqianming]
  - 销售发货时可以设置对外编号 [caoqianming]
  - 物料导入模板及逻辑修改 [caoqianming]
  - mio创建时type得传入并校验 [caoqianming]
  - 支持领用出库和退还入库 [caoqianming]
  - wm todo排除repaired [caoqianming]
  - 交接记录关联审批暂不支持撤销 [caoqianming]
  - handover返回ticket_字段 [caoqianming]
  - dataset添加enabled字段 [caoqianming]
  - 支持采购退货 [caoqianming]
  - 交接记录添加审批工单 [caoqianming]
  - 批次统计分析时logerror后return [caoqianming]
  - qct增加筛选条件 [caoqianming]
  - qctmat添加字段以支持消耗物料参数填写 [caoqianming]
  - mlogbw编辑时可删除ftest [caoqianming]
  - wpr_bxerp调整 [caoqianming]
  - mlogbw返回equip相关信息 [caoqianming]
  - 批次统计分析中关于decimal的处理 [caoqianming]
  - batch_bxerp优化 [caoqianming]
  - 修改batchst data默认为dict [caoqianming]
  - 优化cd.py [caoqianming]
  - 单个统计优化 [caoqianming]
  - gx bx的批次统计添加大小日期 [caoqianming]
  - 批次统计分析重构 [caoqianming]
- fix: 问题修复
  - purout操作后续的bug [caoqianming]
  - 出入库类型错误bug [caoqianming]
  - mlogbw返回equip相关信息 [caoqianming]
## 2.7.2025071516
- feat: 新增功能
  - ftestwork添加cbatch查询条件 [caoqianming]
  - 出入库记录缺少明细不让操作 [caoqianming]
  - 光子batch统计增加大小日期 [caoqianming]
  - 导入daoru_mioitem_test单元格公式的处理 [caoqianming]
  - ftestprocess update 支持新的检测项和缺陷项 [caoqianming]
  - 数采做成单独服务 [caoqianming]
  - 测试cd [caoqianming]
  - gen_number_with_rule 偏离6小时 [caoqianming]
  - base complexquery value支持多种类型 支持isnull [caoqianming]
  - wpr 增加复杂查询接口 [caoqianming]
  - 返工不限制物料选择 [caoqianming]
  - mlog添加操作时间校验 [caoqianming]
  - 按个选入消耗时统计mlog数据 [caoqianming]
  - BatchSt.g_create取消传入check_mat [caoqianming]
  - 优化ana_wpr [caoqianming]
  - wpr_bxerp返回批号 [caoqianming]
  - 获取该批次的DAG图数据 支持仅直接关系 [caoqianming]
  - 批次追踪链优化 [caoqianming]
- fix: 问题修复
  - 生成dag时为防止边重复给edge设置ID [caoqianming]
  - batchst并发创建的处理 [caoqianming]
  - 日志多步骤导致的返工填写bug [caoqianming]
  - 正常交接收料工段与送料工段不能相同 [caoqianming]
## 2.7.2025070310
- feat: 新增功能
  - ana_wpr忽略模块导入错误 [caoqianming]
  - 生产日志返回提交人姓名 [caoqianming]
  - 正常交接收料工段与送料工段不能相同 [caoqianming]
  - handover_revert自己交给自己无需处理 [caoqianming]
  - base ticket list 添加create_by_name [caoqianming]
  - 单日志支持多工艺步骤 [caoqianming]
  - 单个统计的触发 [caoqianming]
  - wpr data字段数据库同步 [caoqianming]
  - 优化wpr change_or_new [caoqianming]
  - mlog添加cnumber查询条件 [caoqianming]
  - 出入库明细支持撤回并删除 [caoqianming]
  - batch_gxerp添加count_notok [caoqianming]
  - handover_revert尝试支持全部类型的撤回 [caoqianming]
  - batch_gxerp 添加need_inout查询条件 [caoqianming]
  - wpr添加对外编号字段 [caoqianming]
  - batch_gxerp添加count_pn_jgqbl [caoqianming]
  - ofm 完善1 [caoqianming]
  - sql查询有风险提示更完善 [caoqianming]
- fix: 问题修复
  - batch_gxerp添加count_pn_jgqbl 2 [caoqianming]
  - 光子get_alldata_with_batch 其他入库和人员获取获取错误 [caoqianming]
## 2.7.2025062414
- feat: 新增功能
  - 光子get_alldata_with_batch优化 [caoqianming]
  - 添加行政管理App [caoqianming]
  - cd 设置清空缓冲区 [caoqianming]
  - enm/service修改排班记录生成时间 [zty]
  - mlogbout单个产品不支持直接修改 [caoqianming]
  - mioitem添加material__type查询条件 [caoqianming]
## 2.6.2025062015
- feat: 新增功能
  - 增加交接撤回功能 [caoqianming]
  - mlogbin的bug [caoqianming]
  - mioitem返回mio数据添加单价字段 [caoqianming]
  - 物料增加主库位号 [caoqianming]
  - wmaterial添加can_handover字段 [caoqianming]
- fix: 问题修复
  - wpr不合格的话先save再创建wm.defect [caoqianming]
  - wpm/service 优化煤粉热值获取方式 [zty]
  - mioitem price 计算bug [caoqianming]
## 2.6.2025061715
- feat: 新增功能
  - mlogbin的编辑与mlogbout的联动 [caoqianming]
  - mlogb首次创建需要更新count_ok_full [caoqianming]
  - 支持从wpr处获取切片数 [caoqianming]
  - workchain通过线程执行 [caoqianming]
  - mlogbin 和 update时cal_count_notok cal_mlog传False [caoqianming]
  - ichat 添加workchain接口 [caoqianming]
  - 优化get_tyy_data [caoqianming]
  - batch_gxerp添加加工前缺陷 [caoqianming]
  - 增加check_sql_safe 稳定性 [caoqianming]
  - 放开出入库的物料匹配 [caoqianming]
  - 采购入库节点可复用 [caoqianming]
- fix: 问题修复
  - mlogbinupdate时的bug [caoqianming]
  - mlogserializer需要同步count_real [caoqianming]
  - cal_mlog_count_from_mlogb 需要传参触发 [caoqianming]
  - mlog 数值计算bug [caoqianming]
  - wmaterial get在传入query参数时完善can_do的逻辑 [caoqianming]
## 2.6.2025060913
- feat: 新增功能
  - inm 和 wpm添加wpr number的查询条件 [caoqianming]
  - 优化设备采集cd [caoqianming]
  - mlogb cal_count_pn_jgqbl [caoqianming]
## 2.6.2025060617
- feat: 新增功能
  - mlogbw也进行mlogb.cal_count_notok() [caoqianming]
  - 优化batches_to [caoqianming]
  - cal_count_notok 完全合格数有bug [caoqianming]
  - batch_gxerp 全工段查询 [caoqianming]
  - cd BrokenPipeError时尝试再建立连接 [caoqianming]
  - 获取到重复的缺陷项 打日志 [caoqianming]
  - can_fix 排除维修完成品 [caoqianming]
  - batchst 添加first_time isnull筛选 [caoqianming]
  - 获取first_time, last_time独立出一个方法 [caoqianming]
- fix: 问题修复
  - mlog 的cal_count_notok_full的bug [caoqianming]
  - 光芯批次统计"尺寸检验_完全合格率" [caoqianming]
  - handover_submit batches获取bug [caoqianming]
  - update_mb_item在检验时只做负数校验 [caoqianming]
  - handover_submit batches获取bug [caoqianming]
## 2.6.2025060409
- feat: 新增功能
  - 修改gen_number_with_rule 以获取的最后编号为准 [caoqianming]
  - handover拆批时校验批次号是否可用 [caoqianming]
  - 优化batches_to以达到自然排序功能及获取已指向的批次号 [caoqianming]
  - get_qct接口进行校验 [caoqianming]
  - get_tyy_data优化保持socket连接 [caoqianming]
  - wmaterial提供canfix的tag查询 [caoqianming]
  - base ComplexQueryMixin 支持order查询 [caoqianming]
- fix: 问题修复
  - 自动生成物料bug [caoqianming]
  - 优化 gen_material_out 防止自引用 [caoqianming]
  - batchst reuse_node逻辑完善 [caoqianming]
  - base 复杂查询ordering排序错误 [caoqianming]
## 2.6.2025052615
- feat: 新增功能
  - bachst添加复杂查询接口 [caoqianming]
  - base 独立出ComplexQueryMixin [caoqianming]
  - base with_children查询去除限制 [caoqianming]
  - 处理dag时返回edge更多信息 [caoqianming]
  - base 性能优化调整位置 [caoqianming]
  - 所有batch设为textfield并添加索引 [caoqianming]
  - mb添加batch查询条件 [caoqianming]
  - ana batch时等待10s [caoqianming]
  - batchst复用节点仅限mio创建的 [caoqianming]
  - 各工段批次生产进度统计 [caoqianming]
  - 导入棒管检验测试通过 [caoqianming]
  - 修改导入权限 [caoqianming]
  - enm 修改采集保存时间到秒 [zty]
  - auth1 utils enm 修改阿里云发送短信引入方式 [zty]
  - daoru棒管test [caoqianming]
  - mlog和handover添加cbatch查询条件 [caoqianming]
  - mloginit支持handle_users [caoqianming]
- fix: 问题修复
  - batchlog创建时避免回环 [caoqianming]
  - batch_gxerp 优化 [caoqianming]
  - 取消提交日志时时间校验 [caoqianming]
  - is_fix支持个到个的bug [caoqianming]
## 2.6.2025051913
- feat: 新增功能
  - batch_gxerp调整 [caoqianming]
  - qct排序支持number [caoqianming]
  - 添加变更服务器时间的接口 [caoqianming]
  - wpr detail [caoqianming]
  - mlogbw添加wpr等查询条件 [caoqianming]
  - wpr增加自动编号逻辑 [caoqianming]
  - get_tyy_data优化 [caoqianming]
  - mlog添加b_mlog__batch查询条件 [caoqianming]
## 2.6.2025051609
- feat: 新增功能
  - 车间库存不足提示更准确 [caoqianming]
  - batchst追加查询data__has_key条件 [caoqianming]
  - mlogb_summary选用need_inout为True的数据 [caoqianming]
  - equip_last_mlog增加报错提示 [caoqianming]
  - wpr获取material_start初始物料字段 [caoqianming]
  - mlog返回子级详情 [caoqianming]
  - ichat  修改大模型的提问 [zty]
  - 触发批次统计分析在线程里sleep下 [caoqianming]
  - qct获取通用检验表 [caoqianming]
  - wpr获取新编号 [caoqianming]
  - ichat /增加ichat模块，优化对话流处理 [zty]
- fix: 问题修复
  - count_ok_full为None的批次处理 [caoqianming]
  - need_inout 传true时也得处理 [caoqianming]
  - wpr获取mb的state [caoqianming]
## 2.6.2025051208
- feat: 新增功能
  - 光芯质检表格 [caoqianming]
  - base 短信发送功能启动抛出异常 [caoqianming]
  - batchst字段同步数据库 [caoqianming]
## 2.6.2025050816
- feat: 新增功能
  - batchst添加字段并更新光子的统计 [caoqianming]
  - 由输入转输出需考虑到加工前不良的影响 [caoqianming]
  - 初步添加光芯的批次分析函数 [caoqianming]
  - myjsonfield优化 [caoqianming]
  - mioitem添加排序字段 [caoqianming]
  - 标签物料根据模板打印功能 [caoqianming]
  - ichat 修改接口去掉langchain [zty]
- fix: 问题修复
  - gen_commands bug [caoqianming]
  - labeltemplate filter bug [caoqianming]
  - 标签模板筛选bug [caoqianming]
## 2.6.2025043014
- feat: 新增功能
  - 生产入库和领料支持b类合格品 [caoqianming]
  - 添加标签模板接口 [caoqianming]
  - 完善光子批次统计数据 [caoqianming]
  - 组合件和入库检验追加统计分析 [caoqianming]
  - get_alldata_with_batch添加内容 [caoqianming]
- fix: 问题修复
  - mio_saleout缺少import [caoqianming]
## 2.6.2025042816
- feat: 新增功能
  - 支持个号转批号及配置 [caoqianming]
  - 批次追踪链条还是可以复用批次 [caoqianming]
  - mlog结合工序支持批到个 [caoqianming]
  - mlogbw支持批量创建 [caoqianming]
  - mlogbwcreate校验增加wm所属 [caoqianming]
  - ichat 修改LLM 的接口 [zty]
  - wmaterial筛选条件优化来料已完成 [caoqianming]
  - 获取该批次的dag数据需要传入version [caoqianming]
  - 单填写mlog支持返工 [caoqianming]
  - ichat 修改大模型接口 [zty]
  - mlogbupdate支持变更批号 [caoqianming]
  - 6车间合格率统计decimal invalid [caoqianming]
  - 修改大模型文件 [zty]
  - model add note [zty]
  - ichat添加表 [caoqianming]
  - 缺陷项分类字段数据库约束放开 [caoqianming]
  - 通过django settings延迟获取BASE_PROJECT_CODE [caoqianming]
  - base 将配置文件放到单独的config文件夹中防止误操作 [caoqianming]
- fix: 问题修复
  - wpr复用number的bug [caoqianming]
  - cal_count_notok锁定mlogb以防止并发修改 [caoqianming]
  - 获取batchst时默认使用version=1 [caoqianming]
  - mloginit在返工时不接收route [caoqianming]
  - 生产入库时存入生产车间 [caoqianming]
  - 返工校验输入物料选择错误 [caoqianming]
  - 完善负数校验 [caoqianming]
  - mlogbupdate时attrs遍历时修改的bug [caoqianming]
  - batchst的version字段bug [caoqianming]
## 2.6.2025042311
- feat: 新增功能
  - 切分工序切分数量支持1 [caoqianming]
  - mlog增加team字段 [caoqianming]
  - mlog的need_inout逻辑 [caoqianming]
  - 批次关系链时创建新批次支持使用已有批次号 [caoqianming]
  - mlogb添加test_user/need_inout字段用于处理抽检逻辑 [caoqianming]
  - 工艺步骤返回组合而成的name [caoqianming]
  - 校验只有合并时才能提供新批次号 [caoqianming]
  - 交接查询可查询子批次号 [caoqianming]
  - 日志完善负值校验 [caoqianming]
  - 批号追加工段标识 [caoqianming]
  - base增加PositiveDecimalField [caoqianming]
  - 改版交接需要触发统计数量 [caoqianming]
  - 物料统计数量接口 [caoqianming]
  - update_material_count时更新组合件数量 [caoqianming]
  - 采购和其他入库可入已有批次 [caoqianming]
  - 交接需要校验物料是否一致 [caoqianming]
  - 返工可选择不合格品/根据工艺路线决定返工后是合格不合格还是返修完成 [caoqianming]
  - 检验项和缺陷项删除的时候同步删除qct [caoqianming]
  - fmlog添加工艺步骤字段及相应返回数据 [caoqianming]
- fix: 问题修复
  - mlog的need_inout逻辑 [caoqianming]
  - count_working获取逻辑优化 [caoqianming]
  - mlogbin解决负值校验存在的bug [caoqianming]
  - 日志和交接记录操作数正值校验 [caoqianming]
  - inm校验非正数 [caoqianming]
  - 其他入库时batchst.g_create传参错误 [caoqianming]
  - : 交接记录提交时校验count>0 [caoqianming]
  - 正常交接后的物料状态不变 [caoqianming]
  - 存在fmlog时将route带给mlog并进行物料校验 [caoqianming]
  - do_in保证production_dept赋值 [caoqianming]
  - 订单检索条件错误 [caoqianming]
  - fmlog填写mtask或route即可 [caoqianming]
## 2.6.2025041613
- feat: 新增功能
  - 添加count_json_from字段及相应逻辑 [caoqianming]
  - 车间库存按任务筛选时count>0 [caoqianming]
  - 工艺步骤增加排序字段 [caoqianming]
  - 物料筛选low_inm进行优化 [caoqianming]
  - 变更order状态 [caoqianming]
  - 扣减库存不足增加提示 [caoqianming]
  - update_inm关于销售发货/其他出库的bug2 [caoqianming]
  - update_inm关于销售发货/其他出库的bug [caoqianming]
  - fmlog添加is_fix字段校验 [caoqianming]
  - fmlog添加is_fix字段 [caoqianming]
  - 单个日志填写时带入wm_in的batch [caoqianming]
  - 添加ichat以支持AI对话 [caoqianming]
  - ptest性能检验样品编号字段更改为text [caoqianming]
  - 添加MyJSONEncoder以支持decimal [caoqianming]
  - copy时matin matout不自动生成 [caoqianming]
  - 通过指定mat_in/mat_out复制工艺路线 [caoqianming]
  - 销售发货编号非必填 [caoqianming]
- fix: 问题修复
  - 交接分批bug/加工前不良的bug [caoqianming]
  - mio_saleout时正确计算delivered_count [caoqianming]
  - 返修交接后物料状态都变为返修品 [caoqianming]
  - handover拆批请选择车间库存2 [caoqianming]
  - handover拆批请选择车间库存 [caoqianming]
  - get_alldata_with_batch中小数计算异常捕获 [caoqianming]
  - 光子综合查询对小数和None的处理 [caoqianming]
  - 来料加工和完成筛选完善 [caoqianming]
  - decimal存入json字段时使用myjsondecoder [caoqianming]
  - cal_x_task_count分配任务数的bug [caoqianming]
  - ftest当is_ok为True时设置defect为空 [caoqianming]
  - ftest当is_ok为false时才设置defect_main [caoqianming]
  - material_out_tracking获取时对None的情况进行处理 [caoqianming]
  - get_dag时matin matout为空时不报错 [caoqianming]
  - 通过指定mat_in/mat_out复制工艺路线 bug2 [caoqianming]
  - 通过指定mat_in/mat_out复制工艺路线 bug1 [caoqianming]
  - get_alldata_with_batch_and_store时保存json数据采用DjangoJSONEncoder以处理decimal [caoqianming]
  - 组合件入库后未添加count的bug [caoqianming]
## 2.6.2025041113
- feat: 新增功能
  - ptest性能检验样品编号字段更改为text [caoqianming]
- fix: 问题修复
  - get_alldata_with_batch中小数计算异常捕获 [caoqianming]
  - 光子综合查询对小数和None的处理 [caoqianming]
## 2.6.2025040913
- feat: 新增功能
  - 添加MyJSONEncoder以支持decimal [caoqianming]
- fix: 问题修复
  - 来料加工和完成筛选完善 [caoqianming]
  - decimal存入json字段时使用myjsondecoder [caoqianming]
  - cal_x_task_count分配任务数的bug [caoqianming]
## 2.6.2025040813
- fix: 问题修复
  - ftest当is_ok和defect_main进行幂等 [caoqianming]
  - material_out_tracking获取时对None的情况进行处理 [caoqianming]
## 2.6.2025040710
- feat: 新增功能
  - copy时matin matout不自动生成 [caoqianming]
- fix: 问题修复
  - get_dag时matin matout为空时不报错 [caoqianming]
## 2.6.2025040316
- feat: 新增功能
  - 通过指定mat_in/mat_out复制工艺路线 [caoqianming]
  - 销售发货编号非必填 [caoqianming]
- fix: 问题修复
  - get_alldata_with_batch_and_store时保存json数据采用DjangoJSONEncoder以处理decimal [caoqianming]
  - 组合件入库后未添加count的bug [caoqianming]
## 2.6.2025040211
- feat: 新增功能
  - HTML_BASE_URL 前缀统一修改 [caoqianming]
  - sysbaseview返回系统版本号 [caoqianming]
- fix: 问题修复
  - base log delay=True减少冲突 [caoqianming]
  - get_can_save_from_save_expr的match转为str [caoqianming]
## 2.6.2025040115
- feat: 新增功能
  - handover数据库变动/初步更新批次数据关系链 [caoqianming]
  - 添加mio,mlog,handover关于batch的查询条件 [caoqianming]
  - get_batch_dag节点排序改动 [caoqianming]
  - 支持退料交接 [caoqianming]
  - mlogchangeserializer增加生产设备选择 [caoqianming]
- fix: 问题修复
  - 该工艺步骤已存在的校验bug [caoqianming]
## 2.6.2025033109
- feat: 功能新增
    - 建立及完善批次号数据链 [caoqianming]
    - 添加子工序以完善同一日志的记录 [caoqianming]
    - wpr产品追溯上游链 [caoqianming]
    - 工艺路线routepack支持子图逻辑及任务量算法 [caoqianming]
    - 出入库及任务编号非必填及自动生成逻辑 [caoqianming]
- fix: 问题修复
    - 车间库存检索bug [caoqianming]
    - wpr产品创建oinfo的bug [caoqianming]
    - 其他已知的bug [caoqianming]
## 2.6.2025031919
- 初始版本