| | |
| | | if (Cools.isEmpty(tagId)) { |
| | | tagId = getOriginTag().getId(); |
| | | } |
| | | return R.ok(matService.getPage(new Page<>(curr, limit), String.valueOf(tagId))); |
| | | return R.ok(matService.getPage(new Page<>(curr, limit) |
| | | , String.valueOf(tagId) |
| | | , param.get("matnr") |
| | | , param.get("maktx")) |
| | | ); |
| | | |
| | | } |
| | | |
| | |
| | | @Repository |
| | | public interface MatMapper extends BaseMapper<Mat> { |
| | | |
| | | List<Mat> listByPage(Page page, @Param("tagId") String tagId); |
| | | List<Mat> listByPage(Page page, @Param("tagId") String tagId, @Param("matnr") Object matnr, @Param("maktx") Object maktx); |
| | | |
| | | Mat selectByMatnr(@Param("matnr")String matnr); |
| | | |
| | |
| | | |
| | | public interface MatService extends IService<Mat> { |
| | | |
| | | Page<Mat> getPage(Page page, String tagId); |
| | | Page<Mat> getPage(Page page, String tagId, Object matnr, Object maktx); |
| | | |
| | | Mat selectByMatnr(String matnr); |
| | | |
| | |
| | | public class MatServiceImpl extends ServiceImpl<MatMapper, Mat> implements MatService { |
| | | |
| | | @Override |
| | | public Page<Mat> getPage(Page page, String tagId) { |
| | | return page.setRecords(baseMapper.listByPage(page, tagId)); |
| | | public Page<Mat> getPage(Page page, String tagId, Object matnr, Object maktx) { |
| | | return page.setRecords(baseMapper.listByPage(page, tagId, matnr, maktx)); |
| | | } |
| | | |
| | | |
| | |
| | | mapper-locations: classpath:mapper/*.xml |
| | | # global-config: |
| | | # field-strategy: 0 |
| | | # configuration: |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | |
| | | logging: |
| | | path: /stock/out/logs |
| | |
| | | LEFT JOIN man_tag mt ON mm.tag_id = mt.id |
| | | WHERE 1=1 |
| | | AND (CHARINDEX(#{tagId}, ','+mt.path+',') > 0 OR mt.id = #{tagId}) |
| | | <if test="matnr != null and matnr != ''"> |
| | | and mm.matnr like concat('%',#{matnr},'%') |
| | | </if> |
| | | <if test="maktx != null and maktx != ''"> |
| | | and mm.maktx like concat('%',#{maktx},'%') |
| | | </if> |
| | | ORDER BY mm.create_time DESC |
| | | </select> |
| | | |