Merge #91 into master from cc_20230331_device

feat:添加阶段状态

* cc_20230331_device: (21 commits squashed)

  - feat:添加采购审批

  - Merge branch 'master' into cc_20230331_device

  - feat:设备发货阶段

  - feat:设备发货

  - feat:设备发货

  - feat:接口调整

  - feat:接口调整

  - feat:接口调整

  - feat:接口调整

  - feat:接口调整

  - feat:接口调整

  - feat:接口调整

  - feat:接口调整

  - feat:查询订单设备明细

  - feat:测试

  - feat:短信模板切换

  - feat:getPendingList

  - feat:代办调整

  - feat:处理人

  - feat:添加阶段状态

  - Merge branch 'master' into cc_20230331_device
    
    # Conflicts:
    #	coolstore-partner-service/src/main/java/com/cool/store/service/order/impl/MiniStoreOrderServiceImpl.java
    #	coolstore-partner-web/src/main/java/com/cool/store/controller/webc/TestController.java

Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>

CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/91
This commit is contained in:
正新
2026-04-12 09:16:48 +00:00
parent 77ca18b6fc
commit 1a77d8fc37
48 changed files with 1874 additions and 106 deletions

View File

@@ -0,0 +1,77 @@
package com.cool.store.dao;
import com.cool.store.entity.plan.ShopDeliveryPlanDO;
import com.cool.store.mapper.ShopDeliveryPlanMapper;
import com.cool.store.vo.desk.DeliveryPendingVO;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@Repository
public class ShopDeliveryPlanDAO {
@Resource
private ShopDeliveryPlanMapper shopDeliveryPlanMapper;
/**
* 根据ID查询
*/
public ShopDeliveryPlanDO getById(Long id) {
if (id == null) {
return null;
}
return shopDeliveryPlanMapper.getById(id);
}
/**
* 根据门店ID查询
*/
public ShopDeliveryPlanDO getByShopId(Long shopId) {
if (shopId == null) {
return null;
}
return shopDeliveryPlanMapper.getByShopId(shopId);
}
/**
* 插入
*/
public int insert(ShopDeliveryPlanDO record) {
record.setCreateTime(new Date());
record.setUpdateTime(new Date());
return shopDeliveryPlanMapper.insert(record);
}
/**
* 更新
*/
public int update(ShopDeliveryPlanDO record) {
record.setUpdateTime(new Date());
return shopDeliveryPlanMapper.update(record);
}
/**
* 删除
*/
public int deleteById(Long id) {
if (id == null) {
return 0;
}
return shopDeliveryPlanMapper.deleteById(id);
}
public List<DeliveryPendingVO> getPendingList(String keyword, Integer type) {
return shopDeliveryPlanMapper.getPendingList(keyword,type);
}
/**
* 查询所有
*/
public List<ShopDeliveryPlanDO> listAll() {
return shopDeliveryPlanMapper.listAll();
}
}

View File

@@ -0,0 +1,93 @@
package com.cool.store.dao;
import com.cool.store.entity.plan.ShopDeliveryPlanItemDO;
import com.cool.store.mapper.ShopDeliveryPlanItemMapper;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.Collection;
import java.util.Date;
import java.util.List;
@Repository
public class ShopDeliveryPlanItemDAO {
@Resource
private ShopDeliveryPlanItemMapper shopDeliveryPlanItemMapper;
/**
* 根据ID查询
*/
public ShopDeliveryPlanItemDO getById(Long id) {
if (id == null) {
return null;
}
return shopDeliveryPlanItemMapper.getById(id);
}
/**
* 根据主表ID查询明细列表
*/
public List<ShopDeliveryPlanItemDO> listByPlanId(Long planId) {
if (planId == null) {
return null;
}
return shopDeliveryPlanItemMapper.listByPlanId(planId);
}
/**
* 根据主表ID和类型查询明细
*/
public ShopDeliveryPlanItemDO getByPlanIdAndItemType(Long planId, Integer itemType) {
if (planId == null || itemType == null) {
return null;
}
return shopDeliveryPlanItemMapper.getByPlanIdAndItemType(planId, itemType);
}
/**
* 插入
*/
public int insert(ShopDeliveryPlanItemDO record) {
record.setCreateTime(new Date());
record.setUpdateTime(new Date());
return shopDeliveryPlanItemMapper.insert(record);
}
public int batchInsert(List<ShopDeliveryPlanItemDO> recordList) {
if (CollectionUtils.isEmpty(recordList)){
return 0;
}
return shopDeliveryPlanItemMapper.batchInsert(recordList);
}
/**
* 更新
*/
public int update(ShopDeliveryPlanItemDO record) {
record.setUpdateTime(new Date());
return shopDeliveryPlanItemMapper.update(record);
}
/**
* 删除
*/
public int deleteById(Long id) {
if (id == null) {
return 0;
}
return shopDeliveryPlanItemMapper.deleteById(id);
}
/**
* 根据主表ID删除明细
*/
public int deleteByPlanId(Long planId) {
if (planId == null) {
return 0;
}
return shopDeliveryPlanItemMapper.deleteByPlanId(planId);
}
}

View File

@@ -489,6 +489,15 @@ public class ShopStageInfoDAO {
example.createCriteria().andIn("shopId",shopIds).andEqualTo("shopStage",shopStage);
return shopStageInfoMapper.selectByExample(example);
}
public List<ShopStageInfoDO> getStageByShopSubStage(List<Long> shopIds, Integer shopSubStage){
if (CollectionUtils.isEmpty(shopIds) || shopSubStage == null){
return null;
}
Example example = new Example(ShopStageInfoDO.class);
example.createCriteria().andIn("shopId",shopIds).andEqualTo("shopSubStage",shopSubStage);
return shopStageInfoMapper.selectByExample(example);
}
//查询处于xx状态的数据
public List<ShopStageInfoDO> getShopStageInfoByShopSubStageStatus(Integer shopSubStageStatus) {
Example example = new Example(ShopStageInfoDO.class);

View File

@@ -0,0 +1,51 @@
package com.cool.store.mapper;
import com.cool.store.entity.plan.ShopDeliveryPlanItemDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface ShopDeliveryPlanItemMapper {
/**
* 根据ID查询
*/
ShopDeliveryPlanItemDO getById(@Param("id") Long id);
/**
* 根据主表ID查询明细列表
*/
List<ShopDeliveryPlanItemDO> listByPlanId(@Param("planId") Long planId);
/**
* 根据主表ID和类型查询明细
*/
ShopDeliveryPlanItemDO getByPlanIdAndItemType(@Param("planId") Long planId, @Param("itemType") Integer itemType);
/**
* 插入
*/
int insert(ShopDeliveryPlanItemDO record);
/**
* 批 liqu量插入
*/
int batchInsert(@Param("list") List<ShopDeliveryPlanItemDO> list);
/**
* 更新
*/
int update(ShopDeliveryPlanItemDO record);
/**
* 删除
*/
int deleteById(@Param("id") Long id);
/**
* 根据主表ID删除明细
*/
int deleteByPlanId(@Param("planId") Long planId);
}

View File

@@ -0,0 +1,50 @@
package com.cool.store.mapper;
import com.cool.store.entity.plan.ShopDeliveryPlanDO;
import com.cool.store.vo.desk.DeliveryPendingVO;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface ShopDeliveryPlanMapper {
/**
* 根据ID查询
*/
ShopDeliveryPlanDO getById(@Param("id") Long id);
/**
* 根据门店ID查询
*/
ShopDeliveryPlanDO getByShopId(@Param("shopId") Long shopId);
/**
* 插入
*/
int insert(ShopDeliveryPlanDO record);
/**
* 更新
*/
int update(ShopDeliveryPlanDO record);
/**
* 删除
*/
int deleteById(@Param("id") Long id);
/**
* 查询所有
*/
List<ShopDeliveryPlanDO> listAll();
/**
* 查询代办
* @param keyword
* @return
*/
List<DeliveryPendingVO> getPendingList(@Param("keyword") String keyword, @Param("type") Integer type);
}

View File

@@ -0,0 +1,92 @@
<?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.cool.store.mapper.ShopDeliveryPlanItemMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.plan.ShopDeliveryPlanItemDO">
<id column="id" property="id" jdbcType="BIGINT"/>
<result column="plan_id" property="planId" jdbcType="BIGINT"/>
<result column="item_type" property="itemType" jdbcType="INTEGER"/>
<result column="delivery_status" property="deliveryStatus" jdbcType="INTEGER"/>
<result column="delivery_remark" property="deliveryRemark" jdbcType="VARCHAR"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id, plan_id, item_type, delivery_status, delivery_remark, create_time, update_time
</sql>
<select id="getById" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM zxjp_shop_delivery_plan_item
WHERE id = #{id}
</select>
<select id="listByPlanId" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM zxjp_shop_delivery_plan_item
WHERE plan_id = #{planId}
ORDER BY id ASC
</select>
<select id="getByPlanIdAndItemType" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM zxjp_shop_delivery_plan_item
WHERE plan_id = #{planId} AND item_type = #{itemType}
LIMIT 1
</select>
<insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.cool.store.entity.plan.ShopDeliveryPlanItemDO">
INSERT INTO zxjp_shop_delivery_plan_item
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="planId != null">plan_id,</if>
<if test="itemType != null">item_type,</if>
<if test="deliveryStatus != null">delivery_status,</if>
<if test="deliveryRemark != null">delivery_remark,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="planId != null">#{planId,jdbcType=BIGINT},</if>
<if test="itemType != null">#{itemType,jdbcType=INTEGER},</if>
<if test="deliveryStatus != null">#{deliveryStatus,jdbcType=INTEGER},</if>
<if test="deliveryRemark != null">#{deliveryRemark,jdbcType=VARCHAR},</if>
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
</trim>
</insert>
<insert id="batchInsert">
INSERT INTO zxjp_shop_delivery_plan_item
(plan_id, item_type, delivery_status, delivery_remark, create_time, update_time)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.planId}, #{item.itemType}, #{item.deliveryStatus}, #{item.deliveryRemark}, now(), now())
</foreach>
</insert>
<update id="update" parameterType="com.cool.store.entity.plan.ShopDeliveryPlanItemDO">
UPDATE zxjp_shop_delivery_plan_item
<set>
<if test="planId != null">plan_id = #{planId,jdbcType=BIGINT},</if>
<if test="itemType != null">item_type = #{itemType,jdbcType=INTEGER},</if>
<if test="deliveryStatus != null">delivery_status = #{deliveryStatus,jdbcType=INTEGER},</if>
<if test="deliveryRemark != null">delivery_remark = #{deliveryRemark,jdbcType=VARCHAR},</if>
<if test="updateTime != null">update_time = #{updateTime,jdbcType=TIMESTAMP},</if>
</set>
WHERE id = #{id,jdbcType=BIGINT}
</update>
<delete id="deleteById">
DELETE FROM zxjp_shop_delivery_plan_item
WHERE id = #{id}
</delete>
<delete id="deleteByPlanId">
DELETE FROM zxjp_shop_delivery_plan_item
WHERE plan_id = #{planId}
</delete>
</mapper>

View File

@@ -0,0 +1,101 @@
<?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.cool.store.mapper.ShopDeliveryPlanMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.plan.ShopDeliveryPlanDO">
<id column="id" property="id" jdbcType="BIGINT"/>
<result column="shop_id" property="shopId" jdbcType="BIGINT"/>
<result column="expected_delivery_time" property="expectedDeliveryTime" jdbcType="TIMESTAMP"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/>
<result column="create_user" property="createUser" jdbcType="VARCHAR"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id, shop_id, expected_delivery_time, remark, create_user, create_time, update_time
</sql>
<select id="getById" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM zxjp_shop_delivery_plan
WHERE id = #{id}
</select>
<select id="getByShopId" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM zxjp_shop_delivery_plan
WHERE shop_id = #{shopId}
</select>
<insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.cool.store.entity.plan.ShopDeliveryPlanDO">
INSERT INTO zxjp_shop_delivery_plan
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="shopId != null">shop_id,</if>
<if test="expectedDeliveryTime != null">expected_delivery_time,</if>
<if test="remark != null">remark,</if>
<if test="createUser != null">create_user,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="shopId != null">#{shopId,jdbcType=BIGINT},</if>
<if test="expectedDeliveryTime != null">#{expectedDeliveryTime,jdbcType=TIMESTAMP},</if>
<if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
<if test="createUser != null">#{createUser,jdbcType=VARCHAR},</if>
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
</trim>
</insert>
<update id="update" parameterType="com.cool.store.entity.plan.ShopDeliveryPlanDO">
UPDATE zxjp_shop_delivery_plan
<set>
<if test="shopId != null">shop_id = #{shopId,jdbcType=BIGINT},</if>
<if test="expectedDeliveryTime != null">expected_delivery_time = #{expectedDeliveryTime,jdbcType=TIMESTAMP},</if>
<if test="remark != null">remark = #{remark,jdbcType=VARCHAR},</if>
<if test="createUser != null">create_user = #{createUser,jdbcType=VARCHAR},</if>
<if test="updateTime != null">update_time = #{updateTime,jdbcType=TIMESTAMP},</if>
</set>
WHERE id = #{id,jdbcType=BIGINT}
</update>
<delete id="deleteById">
DELETE FROM zxjp_shop_delivery_plan
WHERE id = #{id}
</delete>
<select id="listAll" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM zxjp_shop_delivery_plan
ORDER BY create_time DESC
</select>
<select id="getPendingList" resultType="com.cool.store.vo.desk.DeliveryPendingVO">
select
a.shop_id as shopId,
c.shop_name as shopName,
c.line_id as lineId,
c.region_id as regionId,
c.invest_region_id as investRegionId,
c.detail_address as address,
b.item_type as itemType,
b.delivery_status as deliveryStatus
from zxjp_shop_delivery_plan a
left join zxjp_shop_delivery_plan_item b on a.id = b.plan_id
left join xfsg_shop_info c on a.shop_id = c.id
<where>
and b.delivery_status = 0
<if test="keyword!=null and keyword!=''">
and (c.shop_name like concat('%', #{keyword}, '%') or c.shop_code like concat('%', #{keyword}, '%'))
</if>
<if test="type != null">
and item_type = #{type}
</if>
</where>
</select>
</mapper>