Merge remote-tracking branch 'origin/dev_fifo_z' into dev_fifo_z
						commit
						fa80a765a5
					
				| @ -1,17 +1,51 @@ | ||||
| package com.glxp.api.controller.collect; | ||||
| 
 | ||||
| import com.github.pagehelper.PageInfo; | ||||
| import com.glxp.api.common.enums.ResultEnum; | ||||
| import com.glxp.api.common.res.BaseResponse; | ||||
| import com.glxp.api.common.util.ResultVOUtils; | ||||
| import com.glxp.api.controller.BaseController; | ||||
| import com.glxp.api.req.collect.CollectOrderCodeManRequest; | ||||
| import com.glxp.api.req.collect.IoCollectCodeRequest; | ||||
| import com.glxp.api.res.PageSimpleResponse; | ||||
| import com.glxp.api.res.collect.CollectOrderCodeManResponse; | ||||
| import com.glxp.api.res.collect.IoCollectCodeResponse; | ||||
| import com.glxp.api.service.collect.IoCollectCodeService; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
| import org.springframework.validation.BindingResult; | ||||
| import org.springframework.web.bind.annotation.GetMapping; | ||||
| import org.springframework.web.bind.annotation.RestController; | ||||
| 
 | ||||
| import javax.annotation.Resource; | ||||
| import java.util.List; | ||||
| 
 | ||||
| @Slf4j | ||||
| @RestController | ||||
| public class IoCollectCodeController extends BaseController { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     @Resource | ||||
|     IoCollectCodeService collectCodeService; | ||||
| 
 | ||||
|     /** | ||||
|      * 追溯码查询 | ||||
|      * @param | ||||
|      * @param bindingResult | ||||
|      * @return | ||||
|      */ | ||||
|     @GetMapping("/udiwms/basic/collect/ioCollectCode/list") | ||||
|     public BaseResponse manuCodeList(IoCollectCodeRequest IoCollectCodeRequest, | ||||
|                                      BindingResult bindingResult) { | ||||
|         if (bindingResult.hasErrors()) { | ||||
|             return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); | ||||
|         } | ||||
|         List<IoCollectCodeResponse> collectOrderCodeManResponses = collectCodeService.filterList(IoCollectCodeRequest); | ||||
|         PageInfo<IoCollectCodeResponse> pageInfo = new PageInfo<>(collectOrderCodeManResponses); | ||||
|         PageSimpleResponse<IoCollectCodeResponse> pageSimpleResponse = new PageSimpleResponse<>(); | ||||
|         pageSimpleResponse.setTotal(pageInfo.getTotal()); | ||||
|         pageSimpleResponse.setList(collectOrderCodeManResponses); | ||||
|         return ResultVOUtils.success(pageSimpleResponse); | ||||
|     } | ||||
| 
 | ||||
| } | ||||
|  | ||||
| @ -0,0 +1,21 @@ | ||||
| package com.glxp.api.req.collect; | ||||
| 
 | ||||
| import com.glxp.api.util.page.ListPageRequest; | ||||
| import lombok.Data; | ||||
| 
 | ||||
| /** | ||||
|  * @author : zhangsan | ||||
|  * @date : 2024/8/26 16:29 | ||||
|  * @modyified By : | ||||
|  */ | ||||
| 
 | ||||
| @Data | ||||
| public class IoCollectCodeRequest extends ListPageRequest { | ||||
| 
 | ||||
|     private String code; | ||||
|     private String workPlaceCode; | ||||
|     private String billNo; | ||||
|     private String fromType; | ||||
|     private String fromCorp; | ||||
| 
 | ||||
| } | ||||
| @ -1,4 +1,37 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||
| <mapper namespace="com.glxp.api.dao.collect.IoCollectCodeMapper"> | ||||
|     <select id="filterList" resultType="com.glxp.api.res.collect.IoCollectCodeResponse"> | ||||
|         SELECT icc.*,sw.workplaceName, | ||||
|         COALESCE(thr_bustype_origin.name, basic_bussiness_type.name) as busTypeName, | ||||
|         bp.nameCode, | ||||
|         bp.cpmctymc, | ||||
|         COALESCE(bp.ggxh, bp.bzgg) AS ggxh, | ||||
|         bp.zczbhhzbapzbh, | ||||
|         bp.manufactory | ||||
|         from io_collect_code icc | ||||
|         left join sys_workplace sw on sw.workplaceId = icc.workPlaceCode | ||||
|         left join thr_bustype_origin on icc.busType = thr_bustype_origin.action | ||||
|         left join basic_bussiness_type on icc.busType = basic_bussiness_type.action | ||||
|         left join basic_udirel bu on icc.relId = bu.id | ||||
|         left join basic_products bp on bu.uuid = bp.uuid | ||||
|         <where> | ||||
|             <if test="workPlaceCode != '' and workPlaceCode != null"> | ||||
|                 AND icc.workPlaceCode LIKE concat('%', #{workPlaceCode}, '%') | ||||
|             </if> | ||||
|             <if test="code != '' and code != null"> | ||||
|                 AND icc.code LIKE concat('%', #{code}, '%') | ||||
|             </if> | ||||
|             <if test="billNo != null and billNo != ''"> | ||||
|                 AND icc.billNo LIKE concat('%', #{billNo}, '%') | ||||
|             </if> | ||||
|             <if test="fromType != null and fromType != ''"> | ||||
|                 AND icc.fromType LIKE concat('%', #{fromType}, '%') | ||||
|             </if> | ||||
|             <if test="fromCorp != null and fromCorp != ''"> | ||||
|                 AND icc.fromCorp LIKE concat('%', #{fromCorp}, '%') | ||||
|             </if> | ||||
|         </where> | ||||
|         group by icc.id | ||||
|     </select> | ||||
| </mapper> | ||||
|  | ||||
					Loading…
					
					
				
		Reference in New Issue