Commit aca2b54b authored by libin's avatar libin

股权

parent 5628808e
package com.xxfc.platform.vehicle.pojo.dto;
import com.github.wxiaoqi.security.common.vo.PageParam;
import lombok.Data;
import java.math.BigDecimal;
/**
* @author libin
* @version 1.0
* @description
* @data 2019/8/22 19:58
*/
@Data
public class BranchCompanyStockRightFindDTO extends PageParam {
private Integer provinceCode;
private Integer cityCode;
private BigDecimal price;
}
package com.xxfc.platform.vehicle.pojo.vo;
import lombok.Data;
import java.math.BigDecimal;
/**
* @author libin
* @version 1.0
* @description
* @data 2019/8/22 20:03
*/
@Data
public class BranchCompanyStockRightForWeChatOfficeVO {
private Integer id;
private String companyName;
private Integer balance;
private Integer total;
private BigDecimal price;
private String cover;
private Integer type;
}
...@@ -51,7 +51,7 @@ public class VehicleJobHandler extends IJobHandler { ...@@ -51,7 +51,7 @@ public class VehicleJobHandler extends IJobHandler {
int betweenMonth = Integer.valueOf(dictionary.getDetail()).intValue(); int betweenMonth = Integer.valueOf(dictionary.getDetail()).intValue();
int month = nowMonth + betweenMonth> 12 ? (betweenMonth + nowMonth) - 12 : nowMonth + betweenMonth; int month = nowMonth + betweenMonth> 12 ? (betweenMonth + nowMonth) - 12 : nowMonth + betweenMonth;
year = month > nowMonth ? year : year + 1; year = month > nowMonth ? year : year + 1;
String yearAndMonth = String.format("%d-%s", year, month>10?month:"0"+month); String yearAndMonth = String.format("%d-%s", year, month>=10?month:"0"+month);
XxlJobLogger.log("----查询到的车型ids:【{}】",existVehicleIds); XxlJobLogger.log("----查询到的车型ids:【{}】",existVehicleIds);
if (CollectionUtils.isNotEmpty(existVehicleIds)) { if (CollectionUtils.isNotEmpty(existVehicleIds)) {
List<VehicleBookInfo> bookInfos = existVehicleIds.stream().map(vehicleId -> { List<VehicleBookInfo> bookInfos = existVehicleIds.stream().map(vehicleId -> {
......
...@@ -7,6 +7,7 @@ import com.xxfc.platform.vehicle.pojo.vo.BranchCompanyStockInfoRightVo; ...@@ -7,6 +7,7 @@ import com.xxfc.platform.vehicle.pojo.vo.BranchCompanyStockInfoRightVo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper; import tk.mybatis.mapper.common.Mapper;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
...@@ -25,4 +26,6 @@ public interface BranchCompanyStockRightMapper extends Mapper<BranchCompanyStock ...@@ -25,4 +26,6 @@ public interface BranchCompanyStockRightMapper extends Mapper<BranchCompanyStock
int addCompamyList(@Param("list") List<BranchCompanyStockRight> list); int addCompamyList(@Param("list") List<BranchCompanyStockRight> list);
Integer getCompanyInfo(@Param("name")String name); Integer getCompanyInfo(@Param("name")String name);
List<BranchCompanyStockRight> findWithPageByPriceOrCode(@Param("price") BigDecimal price,@Param("provinceCode") Integer provinceCode,@Param("cityCode") Integer cityCode);
} }
\ No newline at end of file
...@@ -4,6 +4,7 @@ import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken; ...@@ -4,6 +4,7 @@ import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken; import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.vehicle.biz.BranchCompanyStockApplyInfoBiz; import com.xxfc.platform.vehicle.biz.BranchCompanyStockApplyInfoBiz;
import com.xxfc.platform.vehicle.biz.BranchCompanyStockRightBiz; import com.xxfc.platform.vehicle.biz.BranchCompanyStockRightBiz;
import com.xxfc.platform.vehicle.common.BaseController; import com.xxfc.platform.vehicle.common.BaseController;
...@@ -12,7 +13,9 @@ import com.xxfc.platform.vehicle.constant.ResCode.ResCode; ...@@ -12,7 +13,9 @@ import com.xxfc.platform.vehicle.constant.ResCode.ResCode;
import com.xxfc.platform.vehicle.entity.BranchCompanyStockApplyInfo; import com.xxfc.platform.vehicle.entity.BranchCompanyStockApplyInfo;
import com.xxfc.platform.vehicle.pojo.BranchCompanyStockApplyVo; import com.xxfc.platform.vehicle.pojo.BranchCompanyStockApplyVo;
import com.xxfc.platform.vehicle.pojo.BranchCompanyStockSearchVo; import com.xxfc.platform.vehicle.pojo.BranchCompanyStockSearchVo;
import com.xxfc.platform.vehicle.pojo.dto.BranchCompanyStockRightFindDTO;
import com.xxfc.platform.vehicle.pojo.vo.BranchCompanyStockInfoRightVo; import com.xxfc.platform.vehicle.pojo.vo.BranchCompanyStockInfoRightVo;
import com.xxfc.platform.vehicle.pojo.vo.BranchCompanyStockRightForWeChatOfficeVO;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -191,4 +194,15 @@ public class BranchCompanyStockRightController extends BaseController<BranchComp ...@@ -191,4 +194,15 @@ public class BranchCompanyStockRightController extends BaseController<BranchComp
return baseBiz.importExcel(multipartfile,request); return baseBiz.importExcel(multipartfile,request);
} }
/**
* 微信公众号查询
* @param branchCompanyStockRightFindDTO
* @return
*/
@GetMapping("/webchat_office/stockrights")
public ObjectRestResponse<PageDataVO<BranchCompanyStockRightForWeChatOfficeVO>> findBranchCompanyStockRightsForWechatOffice(BranchCompanyStockRightFindDTO branchCompanyStockRightFindDTO){
PageDataVO<BranchCompanyStockRightForWeChatOfficeVO> branchCompanyStockRightForWeChatOfficeVOPageDataVO = baseBiz.findWithPageByPriceOrCode(branchCompanyStockRightFindDTO);
return ObjectRestResponse.succ(branchCompanyStockRightForWeChatOfficeVOPageDataVO);
}
} }
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<trim prefix="where" suffixOverrides="and"> <trim prefix="where" suffixOverrides="and">
c.is_del = 0 and c.is_del = 0 and
<if test="companyName != null"> <if test="companyName != null">
c.name like CONCAT('%',#{companyName},'%') c.name like CONCAT('%',#{companyName},'%')
</if> </if>
<if test="addrProvince != null"> <if test="addrProvince != null">
c.addr_province = #{addrProvince} and c.addr_province = #{addrProvince} and
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
r.price &lt;= #{priceEnd} and r.price &lt;= #{priceEnd} and
</if> </if>
</trim> </trim>
order by rank DESC,price DESC order by rank DESC,price DESC
</select> </select>
<select id="selectAllPrice" resultType="int"> <select id="selectAllPrice" resultType="int">
select distinct price from branch_company_stock_info_right where is_del=0 order by price select distinct price from branch_company_stock_info_right where is_del=0 order by price
...@@ -76,8 +76,34 @@ ...@@ -76,8 +76,34 @@
insert into branch_company_stock_info_right ( insert into branch_company_stock_info_right (
company_id,balance,total,price,state,company_pic,crt_time,upd_time company_id,balance,total,price,state,company_pic,crt_time,upd_time
) VALUES ) VALUES
<foreach collection ="list" item="item" index="index" separator =","> <foreach collection="list" item="item" index="index" separator=",">
(#{item.companyId},#{item.balance},#{item.total},#{item.price},#{item.state},#{item.companyPic},#{item.crtTime},#{item.updTime}) (#{item.companyId},#{item.balance},#{item.total},#{item.price},#{item.state},#{item.companyPic},#{item.crtTime},#{item.updTime})
</foreach> </foreach>
</insert> </insert>
<select id="findWithPageByPriceOrCode"
resultType="com.xxfc.platform.vehicle.entity.BranchCompanyStockRight">
SELECT
bcsir.id,
bcsir.balance,
bcsir.total,
bcsir.type,
bcsir.price,
cb.cover,
cb.name
FROM
( SELECT id, company_base_id, balance, total, price, type FROM `branch_company_stock_info_right` WHERE `state` =
2 AND `is_del`=0
<if test="price != null">
AND `price`=#{price}
</if>
) AS `bcsir`
INNER JOIN ( SELECT id, `name`, cover FROM `company_base` WHERE 1=1
<if test="provinceCode != null">
AND `addr_province`=#{provinceCode}
</if>
<if test="cityCode != null">
AND `addr_city`=#{provinceCode}
</if>
) AS `cb` ON cb.id = bcsir.company_base_id
</select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment