Fancy
2024-08-21 d8c8530752a3f19f082560f767b04471b2dd1085
get product by orderId
6个文件已修改
38 ■■■■■ 已修改文件
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProductMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrOrderMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductCtrl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductSv.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/order/OrderCtrl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductMapper.java
@@ -23,6 +23,8 @@
    List<PltProduct> selectAll(Map<String, Object> params);
    List<PltProduct> selectByOrderId(@Param("orderId") Long orderId);
    String selectMaxCode();
    boolean exists(@Param("name") String name, @Param("id") Long id);
pms-parent/pms-global/src/main/resources/mapper/PltProductMapper.xml
@@ -192,6 +192,13 @@
    </trim>
    order by id desc
  </select>
    <select id="selectByOrderId" resultType="com.dy.pmsGlobal.pojoPlt.PltProduct">
        SELECT p.* FROM
                (select * from pr_order_item WHERE deleted!=1 AND order_id = #{orderId,jdbcType=BIGINT}) poi,
                (select * from plt_product  where  deleted!=1) p
        WHERE poi.pro_id = p.id
        order by id desc
    </select>
  <select id="selectMaxCode" resultType="java.lang.String">
    select max(code) from plt_product
  </select>
pms-parent/pms-global/src/main/resources/mapper/PrOrderMapper.xml
@@ -135,7 +135,6 @@
        </trim>
        order by id desc
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from pr_order
        where  id = #{id,jdbcType=BIGINT} 
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductCtrl.java
@@ -131,6 +131,17 @@
        QueryVo vo = new QueryVo();
        return BaseResponseUtils.buildSuccess(proSv.selectAll(vo));
    }
    /**
     * 可根据orderId查询产品
     * @return
     */
    @GetMapping(path="selectByOrderId")
    @SsoPowerAop(power = "10300000")
    @Log("可根据orderId查询产品")
    public BaseResponse<List<PltProduct>> selectByOrderId(Long orderId){
        return BaseResponseUtils.buildSuccess(proSv.selectByOrderId(orderId));
    }
    @PostMapping(path="export")
    @SsoPowerAop(power = "10300001")
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductSv.java
@@ -248,7 +248,9 @@
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
        return dao.selectAll(params);
    }
    public List<PltProduct> selectByOrderId(Long orderId) {
        return dao.selectByOrderId(orderId);
    }
//    public void downloadDoc(HttpServletResponse response) {
//        PltProduct pro=dao.selectByPrimaryKey(Long.valueOf(1));
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/order/OrderCtrl.java
@@ -5,6 +5,7 @@
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pmsGlobal.aop.Log;
import com.dy.pmsGlobal.pojoPlt.PltProduct;
import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan;
import com.dy.pmsGlobal.pojoPr.PrOrder;
import com.dy.pmsProduct.order.QueryVo;
@@ -98,6 +99,18 @@
        return BaseResponseUtils.buildSuccess(list);
    }
    /**
     * 查询所有订单
     * @return
     */
    @GetMapping(path="all")
    @SsoPowerAop(power = "10300000")
    @Log("查询所有产品")
    public BaseResponse<List<PrOrder>> all(){
        QueryVo vo = new QueryVo();
        return BaseResponseUtils.buildSuccess(sv.selectAll(vo));
    }
    @PostMapping(path="updateStatus")
    @SsoPowerAop(power = "10200001")
    @Log("更新任务计划状态")