| | |
| | | FROM `work_plans` `a` |
| | | LEFT JOIN `department` `dmodel` ON a.DEPART_ID=dmodel.ID |
| | | LEFT JOIN `material_distribute` `mdmodel` ON a.MATERIAL_ID=mdmodel.ID |
| | | LEFT JOIN `material` `mmodel` ON mdmodel.MATERIAL_ID=mmodel.ID |
| | | LEFT JOIN `material` `mmodel` ON mdmodel.MATERIAL_ID=mmodel.ID |
| | | LEFT JOIN `department` `fmodel` ON a.FACTORY_ID=fmodel.ID |
| | | LEFT JOIN `unit` `umodel` ON a.UNIT_ID=umodel.ID |
| | | LEFT JOIN `system_user` `usermodel` ON a.USER_ID=usermodel.ID |
| | |
| | | <if test="batch != null and batch != ''"> |
| | | AND `a`.`batch` like concat('%',#{batch},'%') |
| | | </if> |
| | | <if test="salesorder != null and salesorder != ''"> |
| | | AND `a`.`SALESORDER` like concat('%',#{salesorder},'%') |
| | | </if> |
| | | <if test="startDateStart != null and startDateStart != ''"> |
| | | AND `a`.`START_DATE` >= concat(#{planDateStart},' 00:00:00') |
| | | </if> |
| | | <if test="startDateEnd != null and startDateEnd != ''"> |
| | | AND concat(#{planDateEnd},' 23:59:59') >= `a`.`START_DATE` |
| | | </if> |
| | | <if test="planDateStart != null and planDateStart != ''"> |
| | | AND `a`.`PLAN_DATE` >= concat(#{planDateStart},' 00:00:00') |
| | | </if> |