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

完善退单

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