Commit affdd0e1 by yao.xiao

增加查询预计发放日期

parent 2577504d
......@@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
......@@ -210,4 +211,17 @@ public class AgmsController {
result.addResult(responseVO);
return result;
}
/**
* AGMS -- 查询预计发佣日期
* @return 响应数据
*/
@RequestMapping(value="/fortunePayoutBatchQuery",method = RequestMethod.GET)
public Object fortunePayoutBatchQuery() {
JsonResult result = new JsonResult();
FortunePayoutBatchQueryResponseVO responseVO = agmsFortuneService.fortunePayoutBatchQuery();
result.setData(responseVO);
result.addResult(responseVO);
return result;
}
}
......@@ -59,4 +59,10 @@ public interface AgmsFortuneService {
* @return 响应数据
*/
ExportFortunePayResponseVO exportFortunePay(ExportFortunePayRequestVO requestVO, HttpServletResponse response);
/**
* AGMS -- 查询预计发佣日期
* @return 响应数据
*/
FortunePayoutBatchQueryResponseVO fortunePayoutBatchQuery();
}
......@@ -808,6 +808,16 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
return responseVO;
}
@Override
public FortunePayoutBatchQueryResponseVO fortunePayoutBatchQuery() {
FortunePayoutBatchQueryResponseVO responseVO = new FortunePayoutBatchQueryResponseVO();
List<String> payoutBatch = customerFortunePayoutBatchDalService.findAll();
responseVO.setPayoutBatchInfos(payoutBatch);
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
return responseVO;
}
private void createCSV(List<FortunePayToOrderInfo> fortunePayToOrderInfos, HttpServletResponse response) {
String charset = "UTF-8"; // 读取字符编码
String[] columnName = new String[]{"序号","预计发佣年月","经纪人","佣金","保单号","保费","佣金率","发佣状态","佣金类型","手机号","职级","分公司","营业部","体系","购买方案"};
......
package com.yd.api.agms.vo.fortune;
import com.yd.api.result.CommonResult;
import java.util.ArrayList;
import java.util.List;
/**
* @author xxy
*/
public class FortunePayoutBatchQueryResponseVO {
private List<PayoutBatchInfo> payoutBatchInfos;
private CommonResult commonResult;
/**
* 获取
*
* @return payoutBatchInfos
*/
public List<PayoutBatchInfo> getPayoutBatchInfos() {
return this.payoutBatchInfos;
}
/**
* 设置
*
* @param payoutBatchInfos
*/
public void setPayoutBatchInfos(List<String> payoutBatchInfos) {
this.payoutBatchInfos = new ArrayList<>();
for (String payoutBatchInfo : payoutBatchInfos) {
PayoutBatchInfo info = new PayoutBatchInfo(payoutBatchInfo);
this.payoutBatchInfos.add(info);
}
}
/**
* 获取
*
* @return commonResult
*/
public CommonResult getCommonResult() {
return this.commonResult;
}
/**
* 设置
*
* @param commonResult
*/
public void setCommonResult(CommonResult commonResult) {
this.commonResult = commonResult;
}
@Override
public String toString() {
return "FortunePayoutBatchQueryResponseVO{" +
"payoutBatchInfos=" + payoutBatchInfos +
", commonResult=" + commonResult +
'}';
}
class PayoutBatchInfo{
private String name;
/**
* 获取
*
* @return name
*/
public String getName() {
return this.name;
}
/**
* 设置
*
* @param name
*/
public void setName(String name) {
this.name = name;
}
public PayoutBatchInfo(String name){
this.name = name;
}
@Override
public String toString() {
return "PayoutBatchInfo{" +
"name='" + name + '\'' +
'}';
}
}
}
......@@ -24,4 +24,6 @@ public interface AclCustomerFortunePayoutBatchMapper {
int batchInsert(@Param("list") List<AclCustomerFortunePayoutBatch> list);
AclCustomerFortunePayoutBatch selectByPayoutYearmonth(String payoutYearmonth);
List<String> selectAll();
}
\ No newline at end of file
......@@ -2,6 +2,8 @@ package com.yd.dal.service.customer;
import com.yd.dal.entity.customer.AclCustomerFortunePayoutBatch;
import java.util.List;
/**
* @author xxy
*/
......@@ -9,4 +11,6 @@ public interface AclCustomerFortunePayoutBatchDALService {
AclCustomerFortunePayoutBatch findByPayoutYearmonth(String payoutYearmonth);
void save(AclCustomerFortunePayoutBatch customerFortunePayoutBatch);
List<String> findAll();
}
......@@ -6,6 +6,8 @@ import com.yd.dal.service.customer.AclCustomerFortunePayoutBatchDALService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author xxy
*/
......@@ -24,4 +26,9 @@ public class AclCustomerFortunePayoutBatchDALServiceImpl implements AclCustomerF
public void save(AclCustomerFortunePayoutBatch customerFortunePayoutBatch) {
customerFortunePayoutBatchMapper.insert(customerFortunePayoutBatch);
}
@Override
public List<String> findAll() {
return customerFortunePayoutBatchMapper.selectAll();
}
}
......@@ -202,4 +202,11 @@
from ag_acl_customer_fortune_payout_batch
where payout_yearmonth = #{payoutBatch,jdbcType=VARCHAR}
</select>
<select id="selectAll" resultType="java.lang.String">
select
payout_yearmonth
from ag_acl_customer_fortune_payout_batch
order by payout_yearmonth
</select>
</mapper>
\ No newline at end of file
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