Commit 17c37ddd by zhanghj

V1.6.0--提交服务商对账周期列表

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@25818 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 45cd2110
......@@ -191,4 +191,31 @@ public class ReconciliationController extends BaseController{
result.put("items", list);
return new ResultObject(ResultCodeEnum.SUCCESS, result);
}
/**
*
* @author zhanghj
* @Title: getReconciliationList
* @Description: TODO 获取服务商的对账周期列表
* @param pageIndex
* @param pageSize
* @param request
* @return
* ResultObject
* @version
*/
@AuthCheck
@GetMapping("/getSPReconciliationList")
public ResultObject getReconciliationList(@RequestParam(defaultValue = "1") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize,
HttpServletRequest request) {
Integer userId = UserUtils.getUserId(request);
Map<String, Object> result = new HashMap<String, Object>();
List<SysReconciliation> list = reconciliationService.getSPReconciliationList(userId, pageIndex, pageSize);
Page page = new Page(pageIndex, pageSize);
com.github.pagehelper.Page<SysReconciliation> pages = (com.github.pagehelper.Page<SysReconciliation>) list;
page.setTotalCount((int) pages.getTotal());
result.put("page", page);
result.put("items", list);
return new ResultObject(ResultCodeEnum.SUCCESS, result);
}
}
......@@ -11,6 +11,8 @@ import com.glsx.ordercenter.pojo.SysReconciliation;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface SysReconciliationMapper {
int deleteByPrimaryKey(Integer id);
......@@ -64,4 +66,16 @@ public interface SysReconciliationMapper {
*/
List<SysReconciliation> getReconciliationList(
ReconciliationListQuery reconciliationListQuery);
/**
*
* @author zhanghj
* @Title: getUserReconciliationList
* @Description: TODO 获取服务商的对账周期列表
* @param userId
* @return
* List<SysReconciliation>
* @version
*/
List<SysReconciliation> getSPReconciliationList(@Param("userId")Integer userId);
}
\ No newline at end of file
......@@ -19,6 +19,10 @@ public class SysReconciliation extends BaseModel implements Serializable {
* 对账周期id
*/
private Integer reconciliationMonthlyId;
/**
* 对账周期
*/
private String reconciliationCycle;
/**
* 对账单号
......@@ -285,4 +289,12 @@ public class SysReconciliation extends BaseModel implements Serializable {
IDCard = iDCard;
}
public String getReconciliationCycle() {
return reconciliationCycle;
}
public void setReconciliationCycle(String reconciliationCycle) {
this.reconciliationCycle = reconciliationCycle;
}
}
\ No newline at end of file
......@@ -58,4 +58,19 @@ public interface ReconciliationService {
ReconciliationListQuery reconciliationListQuery, Integer pageIndex,
Integer pageSize);
/**
*
* @author zhanghj
* @Title: getSPReconciliationList
* @Description: TODO 分页获取服务商的对账周期列表
* @param userId
* @param pageIndex
* @param pageSize
* @return
* List<SysReconciliation>
* @version
*/
List<SysReconciliation> getSPReconciliationList(Integer userId,
Integer pageIndex, Integer pageSize);
}
......@@ -397,4 +397,13 @@ public class ReconciliationServiceImpl implements ReconciliationService {
return list;
}
@Override
public List<SysReconciliation> getSPReconciliationList(Integer userId,
Integer pageIndex, Integer pageSize) {
// TODO Auto-generated method stub
PageHelper.startPage(pageIndex, pageSize, true);
List<SysReconciliation> list = reconciliationMapper.getSPReconciliationList(userId);
return list;
}
}
......@@ -201,6 +201,7 @@
,#{item.updateBy}
,now()
)
</foreach>
</insert>
<delete id="deleteByOrderId" parameterType="java.lang.Integer">
delete from sys_order_subsidy
......
......@@ -27,6 +27,7 @@
<result column="update_by" jdbcType="INTEGER" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
id, reconciliation_monthly_id, reconciliation_sn, user_id, `name`, order_count, quasi_settlement_amount,
......@@ -436,4 +437,13 @@
</where>
order by quasi_settlement_amount desc, id asc
</select>
<select id="getSPReconciliationList" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
sr.*, srm.reconciliation_cycle
FROM
sys_reconciliation sr
LEFT JOIN sys_reconciliation_monthly srm ON sr.reconciliation_monthly_id = srm.id
where sr.user_id = #{userId}
</select>
</mapper>
\ 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!