Commit 8c7cbe35 authored by 罗林杰's avatar 罗林杰

完善退单

parent 7801a097
...@@ -144,13 +144,13 @@ public class StoreGoodsApply extends CyIdIncreEntity<StoreGoodsApply> { ...@@ -144,13 +144,13 @@ public class StoreGoodsApply extends CyIdIncreEntity<StoreGoodsApply> {
* @column sales_categories * @column sales_categories
* @default * @default
*/ */
private BigDecimal salesCategories; private String salesCategories;
/** /**
* @desc 是否退货 * @desc 是否退货
* @column is_return * @column is_return
* @default * @default
*/ */
private BigDecimal isReturn; private String isReturn;
/** /**
* 门店名称 * 门店名称
......
...@@ -255,6 +255,9 @@ public class StoreGoodsApplyServiceImpl extends ServiceImpl<StoreGoodsApplyRepos ...@@ -255,6 +255,9 @@ public class StoreGoodsApplyServiceImpl extends ServiceImpl<StoreGoodsApplyRepos
@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT) @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT)
@Override @Override
public CyPersistModel merge(StoreGoodsApply storeGoodsApply) { public CyPersistModel merge(StoreGoodsApply storeGoodsApply) {
//修改子表状态
storeGoodsLogServiceImpl.updateStatus(storeGoodsApply);
int line = baseMapper.updateById(storeGoodsApply); int line = baseMapper.updateById(storeGoodsApply);
log.debug(CyUserUtil.getAuthenUsername() + "修改了ID为" + storeGoodsApply.getBusinessId() + "的商品申请表信息"); log.debug(CyUserUtil.getAuthenUsername() + "修改了ID为" + storeGoodsApply.getBusinessId() + "的商品申请表信息");
return new CyPersistModel(line); return new CyPersistModel(line);
......
...@@ -2,6 +2,7 @@ package org.rcisoft.bus.storegoodslog.dao; ...@@ -2,6 +2,7 @@ package org.rcisoft.bus.storegoodslog.dao;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.rcisoft.bus.storegoodsapply.entity.StoreGoodsApply;
import org.rcisoft.bus.storegoodslog.entity.StoreGoodsLog; import org.rcisoft.bus.storegoodslog.entity.StoreGoodsLog;
import org.rcisoft.core.mapper.CyBaseMapper; import org.rcisoft.core.mapper.CyBaseMapper;
import org.rcisoft.core.model.CyPageInfo; import org.rcisoft.core.model.CyPageInfo;
...@@ -24,5 +25,8 @@ public interface StoreGoodsLogRepository extends CyBaseMapper<StoreGoodsLog> { ...@@ -24,5 +25,8 @@ public interface StoreGoodsLogRepository extends CyBaseMapper<StoreGoodsLog> {
IPage<StoreGoodsLog> queryWmsGoodsLogsPaged(CyPageInfo cyPageInfo, @Param("entity") StoreGoodsLog storeGoodsLog); IPage<StoreGoodsLog> queryWmsGoodsLogsPaged(CyPageInfo cyPageInfo, @Param("entity") StoreGoodsLog storeGoodsLog);
int batchPersist(@Param("list") List<StoreGoodsLog> list); int batchPersist(@Param("list") List<StoreGoodsLog> list);
int updateStatus(@Param("entity") StoreGoodsApply storeGoodsLog);
} }
package org.rcisoft.bus.storegoodslog.service; package org.rcisoft.bus.storegoodslog.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import org.rcisoft.bus.storegoodsapply.entity.StoreGoodsApply;
import org.rcisoft.bus.storegoodslog.entity.StoreGoodsLog; import org.rcisoft.bus.storegoodslog.entity.StoreGoodsLog;
import org.rcisoft.core.model.CyPageInfo; import org.rcisoft.core.model.CyPageInfo;
import org.rcisoft.core.model.CyPersistModel; import org.rcisoft.core.model.CyPersistModel;
...@@ -71,4 +72,11 @@ public interface StoreGoodsLogService { ...@@ -71,4 +72,11 @@ public interface StoreGoodsLogService {
List<StoreGoodsLog> export(StoreGoodsLog storeGoodsLog); List<StoreGoodsLog> export(StoreGoodsLog storeGoodsLog);
CyPersistModel batchPersist(List<StoreGoodsLog> addLogList); CyPersistModel batchPersist(List<StoreGoodsLog> addLogList);
/**
* 修改 商品记录表
* @param storeGoodsLog
* @return
*/
CyPersistModel updateStatus(StoreGoodsApply storeGoodsLog);
} }
...@@ -3,6 +3,7 @@ package org.rcisoft.bus.storegoodslog.service.impl; ...@@ -3,6 +3,7 @@ package org.rcisoft.bus.storegoodslog.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.rcisoft.bus.storegoodsapply.entity.StoreGoodsApply;
import org.rcisoft.bus.storegoodslog.dao.StoreGoodsLogRepository; import org.rcisoft.bus.storegoodslog.dao.StoreGoodsLogRepository;
import org.rcisoft.bus.storegoodslog.entity.StoreGoodsLog; import org.rcisoft.bus.storegoodslog.entity.StoreGoodsLog;
import org.rcisoft.bus.storegoodslog.service.StoreGoodsLogService; import org.rcisoft.bus.storegoodslog.service.StoreGoodsLogService;
...@@ -141,4 +142,11 @@ public class StoreGoodsLogServiceImpl extends ServiceImpl<StoreGoodsLogRepositor ...@@ -141,4 +142,11 @@ public class StoreGoodsLogServiceImpl extends ServiceImpl<StoreGoodsLogRepositor
baseMapper.batchPersist(addLogList); baseMapper.batchPersist(addLogList);
return new CyPersistModel(1); return new CyPersistModel(1);
} }
@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT)
@Override
public CyPersistModel updateStatus(StoreGoodsApply storeGoodsLog) {
int line = baseMapper.updateStatus(storeGoodsLog);
return new CyPersistModel(line);
}
} }
...@@ -168,5 +168,8 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> { ...@@ -168,5 +168,8 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
*/ */
@TableField(exist = false) @TableField(exist = false)
private BigDecimal totalPrice; private BigDecimal totalPrice;
@TableField(exist = false)
private String isReturn;
} }
...@@ -106,4 +106,8 @@ public interface WmsGoodsService { ...@@ -106,4 +106,8 @@ public interface WmsGoodsService {
List<OssInfo> findOss(WmsGoods wmsGoods); List<OssInfo> findOss(WmsGoods wmsGoods);
WmsGoods queryWmsGoods(WmsGoods wmsGoods); WmsGoods queryWmsGoods(WmsGoods wmsGoods);
//修改子表状态
} }
...@@ -113,6 +113,9 @@ ...@@ -113,6 +113,9 @@
<if test="entity.maker !=null and entity.maker != '' "> <if test="entity.maker !=null and entity.maker != '' ">
and maker like concat('%',#{entity.maker},'%') and maker like concat('%',#{entity.maker},'%')
</if> </if>
<if test="entity.inGoods !=null and entity.inGoods != '' ">
and in_goods = #{entity.inGoods}
</if>
ORDER BY store_goods_apply.business_id DESC ORDER BY store_goods_apply.business_id DESC
</select> </select>
<select id="getOrderCodeCount" resultType="java.lang.Integer"> <select id="getOrderCodeCount" resultType="java.lang.Integer">
...@@ -164,6 +167,12 @@ ...@@ -164,6 +167,12 @@
<if test="entity.maker !=null and entity.maker != '' "> <if test="entity.maker !=null and entity.maker != '' ">
and maker like concat('%',#{entity.maker},'%') and maker like concat('%',#{entity.maker},'%')
</if> </if>
<if test="entity.outGoods !=null and entity.outGoods != '' ">
and out_goods like concat('%',#{entity.outGoods},'%')
</if>
<if test="entity.isReturn !=null and entity.isReturn != '' ">
and is_return like concat('%',#{entity.isReturn},'%')
</if>
ORDER BY store_goods_apply.business_id DESC ORDER BY store_goods_apply.business_id DESC
</select> </select>
</mapper> </mapper>
...@@ -30,6 +30,11 @@ ...@@ -30,6 +30,11 @@
#{item.originalPrice},#{item.discountPrice},#{item.storePrice},#{item.totalPrice}) #{item.originalPrice},#{item.discountPrice},#{item.storePrice},#{item.totalPrice})
</foreach> </foreach>
</insert> </insert>
<update id="updateStatus">
update store_goods_log
set is_return = '1'
where apply_id = #{entity.businessId}
</update>
<!--<cache type="${corePackag!}.util.RedisCache"/>--> <!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select id="queryWmsGoodsLogs" resultMap="BaseResultMap"> <select id="queryWmsGoodsLogs" resultMap="BaseResultMap">
select * from store_goods_log select * from store_goods_log
......
...@@ -226,7 +226,8 @@ ...@@ -226,7 +226,8 @@
log.store_price as store_price, log.store_price as store_price,
log.discount_price as discount_price, log.discount_price as discount_price,
log.original_price as original_price, log.original_price as original_price,
log.total_price as total_price log.total_price as total_price,
log.is_return as is_return
FROM store_goods_log log FROM store_goods_log log
LEFT JOIN wms_goods wg ON log.goods_id = wg.business_id LEFT JOIN wms_goods wg ON log.goods_id = wg.business_id
LEFT JOIN LEFT JOIN
......
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