Commit 77594bc0 by dengtt

删除对账明细时,更改订单结算状态为未结算0。

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@26015 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent c13c2ed2
...@@ -218,4 +218,9 @@ public interface SysOrderMapper { ...@@ -218,4 +218,9 @@ public interface SysOrderMapper {
int batchUpdateSettlementStatus(@Param("settlementStatus") int settlementStatus, @Param("ids") List<Integer> ids); int batchUpdateSettlementStatus(@Param("settlementStatus") int settlementStatus, @Param("ids") List<Integer> ids);
/**
* 根据订单编号,更改订单的结算状态
*/
int updateSettlementStatusBySn(@Param("settlementStatus") int settlementStatus, @Param("sn") String sn );
} }
\ No newline at end of file \ No newline at end of file
...@@ -8,6 +8,8 @@ import java.util.stream.Collectors; ...@@ -8,6 +8,8 @@ import java.util.stream.Collectors;
import javax.annotation.Resource; import javax.annotation.Resource;
import com.glsx.ordercenter.constants.BizConstants;
import com.glsx.ordercenter.mapper.SysOrderMapper;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -68,6 +70,9 @@ public class ReconciliationDetailServiceImpl implements ReconciliationDetailServ ...@@ -68,6 +70,9 @@ public class ReconciliationDetailServiceImpl implements ReconciliationDetailServ
@Resource @Resource
private SysReconciliationMonthlyMapper reconciliationMonthlyMapper; private SysReconciliationMonthlyMapper reconciliationMonthlyMapper;
@Resource
private SysOrderMapper orderMapper;
/** /**
* (分页)查询对账明细列表 * (分页)查询对账明细列表
*/ */
...@@ -112,6 +117,8 @@ public class ReconciliationDetailServiceImpl implements ReconciliationDetailServ ...@@ -112,6 +117,8 @@ public class ReconciliationDetailServiceImpl implements ReconciliationDetailServ
reconciliationMapper.updateByPrimaryKeySelective(buildSysReconciliationUpdateEntity(reconciliation, detail, userId)); reconciliationMapper.updateByPrimaryKeySelective(buildSysReconciliationUpdateEntity(reconciliation, detail, userId));
// 4.更新对账周期 // 4.更新对账周期
reconciliationMonthlyMapper.updateByPrimaryKeySelective(buildSysReconciliationMonthlyUpdateEntity(monthly, detail, userId)); reconciliationMonthlyMapper.updateByPrimaryKeySelective(buildSysReconciliationMonthlyUpdateEntity(monthly, detail, userId));
// 5.更改订单状态
orderMapper.updateSettlementStatusBySn(BizConstants.ORDER_SETTLEMENT_STATUS_NO,detail.getOrderSn());
} }
/** /**
......
...@@ -1687,4 +1687,15 @@ ...@@ -1687,4 +1687,15 @@
where so.order_sn =#{orderSn} where so.order_sn =#{orderSn}
</select> </select>
<update id="updateSettlementStatusBySn" >
update sys_order
<set>
<if test="settlementStatus != null">
settlement_status = #{settlementStatus},
</if>
</set>
where
order_sn = #{sn}
</update>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!