MaterialDao.dql 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. -- [selectTheTable]
  2. select * from $table$;
  3. -- [addMaterialType]
  4. insert into $table$ (id, materialTypeName, materialTypeCode, materialNextType,
  5. materialNextTypeCode, materialCount, voidFlag,
  6. createBy, createTime, createTimeLong,
  7. updateBy, updateTime, updateTimeLong ) values ( #{id}, #{materialtypename}, #{materialtypecode}, #{materialnexttype},
  8. #{materialnexttypecode}, #{materialcount}, #{voidflag},
  9. #{createby}, #{createtime}, #{createtimelong},
  10. #{updateby}, #{updatetime}, #{updatetimelong} );
  11. -- [updateMaterialInfoType]
  12. update $table$ set
  13. materialTypeName = #{materialtypename},
  14. updateBy = #{updateby},
  15. updateTime = #{updatetime},
  16. updateTimeLong = #{updatetimelong}
  17. where id = #{id};
  18. -- [voidMaterialInfoType]
  19. update $table$ set voidFlag = #{voidflag},
  20. updateBy = #{updateby},updateTime = #{updatetime}
  21. where id = #{id};
  22. -- [addMaterialInfo]
  23. insert into $table$ (id, idMaterialType, materialTypeName, materialName,
  24. mtModel, mtRule, mtUnit,
  25. byUnit, seUnit, convertUnitByToMt,
  26. convertUnitMtToSe, newestPrice, voidFlag,stockPrecision,code,
  27. remark, materialCode, barCode,
  28. createBy, createTime, createTimeLong,
  29. updateBy, updateTime, updateTimeLong,
  30. priceType, machineRequestFlag)
  31. values (
  32. #{id}, #{idmaterialtype}, #{materialtypename}, #{materialname},
  33. #{mtmodel}, #{mtrule}, #{mtunit},
  34. #{byunit}, #{seunit}, #{convertunitbytomt},
  35. #{convertunitmttose}, #{newestprice}, #{voidflag},#{stockprecision},#{code},
  36. #{remark}, #{materialcode}, #{barcode},
  37. #{createby}, #{createtime}, #{createtimelong},
  38. #{updateby}, #{updatetime}, #{updatetimelong},
  39. #{pricetype}, #{machinerequestflag});
  40. -- [updateMaterialInfo]
  41. update $table$ set
  42. idMaterialType = #{idmaterialtype},
  43. mtModel = #{mtmodel},
  44. mtRule = #{mtrule},
  45. mtUnit = #{mtunit},
  46. byUnit = #{byunit},
  47. seUnit = #{seunit},
  48. convertUnitByToMt = #{convertunitbytomt},
  49. convertUnitMtToSe = #{convertunitmttose},
  50. newestPrice = #{newestprice},
  51. remark = #{remark},
  52. barCode = #{barcode},
  53. updateBy = #{updateby},
  54. updateTime = #{updatetime},
  55. updateTimeLong = #{updatetimelong},
  56. priceType = #{pricetype},
  57. machineRequestFlag = #{machinerequestflag}
  58. where id = #{id};
  59. -- [updateMaterialStockPrecision]
  60. update $table$ set
  61. stockPrecision = #{stockprecision}
  62. where id = #{id};
  63. -- [voidMaterialInfo]
  64. update $table$ set voidFlag = #{voidflag},
  65. updateBy = #{updateby},updateTime = #{updatetime}
  66. where id = #{id};