Commit ed4012c9 by jianan

续年佣金计算-来佣比对优化4

parent db6212a3
...@@ -310,7 +310,7 @@ public class LifeCommissionServiceImpl implements LifeCommissionService { ...@@ -310,7 +310,7 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
private void createCSV(List<ComeCommissionVO> dataList, HttpServletResponse response) { private void createCSV(List<ComeCommissionVO> dataList, HttpServletResponse response) {
String charset = "UTF-8"; // 读取字符编码 String charset = "UTF-8"; // 读取字符编码
String[] columnName = new String[]{"序号","来佣编号","预计来佣年月","实际来佣年月","检核年月","保险公司","保单号","保费","来佣率","来佣金额","来佣状态 ","经纪人","经纪人类型","下单时间","购买方案","产品险种","保险种类","缴费年限","保障期间"}; String[] columnName = new String[]{"序号", "来佣编号", "预计来佣年月", "实际来佣年月", "检核年月", "保险公司", "保单号", "保费", "来佣率", "来佣金额", "来佣状态 ", "经纪人", "经纪人类型", "下单时间", "购买方案", "产品险种", "保险种类", "缴费年限", "保障期间"};
String tableName = "YD_Export_ComeCommission"; String tableName = "YD_Export_ComeCommission";
String CSV_COLUMN_SEPARATOR = ",";//CSV文件列分隔符 String CSV_COLUMN_SEPARATOR = ",";//CSV文件列分隔符
String CSV_ROW_SEPARATOR = "\r\n";//CSV文件行分隔符 String CSV_ROW_SEPARATOR = "\r\n";//CSV文件行分隔符
...@@ -327,8 +327,8 @@ public class LifeCommissionServiceImpl implements LifeCommissionService { ...@@ -327,8 +327,8 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
ComeCommissionVO info = dataList.get(i);//遍历每个对象 ComeCommissionVO info = dataList.get(i);//遍历每个对象
buf.append(i + 1).append(CSV_COLUMN_SEPARATOR); buf.append(i + 1).append(CSV_COLUMN_SEPARATOR);
buf.append(info.getCommissionNo()).append(CSV_COLUMN_SEPARATOR); buf.append(info.getCommissionNo()).append(CSV_COLUMN_SEPARATOR);
buf.append(info.getCommissionYear()).append(CSV_COLUMN_SEPARATOR); buf.append("\t").append(info.getCommissionYear()).append("\t").append(CSV_COLUMN_SEPARATOR);
buf.append(info.getCommissionTime()).append(CSV_COLUMN_SEPARATOR); buf.append("\t").append(info.getCommissionTime() == null ? "" : info.getCommissionTime()).append("\t").append(CSV_COLUMN_SEPARATOR);
buf.append("\t").append(info.getCheckDate() == null ? "" : info.getCheckDate()).append("\t").append(CSV_COLUMN_SEPARATOR); buf.append("\t").append(info.getCheckDate() == null ? "" : info.getCheckDate()).append("\t").append(CSV_COLUMN_SEPARATOR);
buf.append(info.getInsurerName()).append(CSV_COLUMN_SEPARATOR); buf.append(info.getInsurerName()).append(CSV_COLUMN_SEPARATOR);
buf.append("\t").append(info.getPolicyNo()).append("\t").append(CSV_COLUMN_SEPARATOR); buf.append("\t").append(info.getPolicyNo()).append("\t").append(CSV_COLUMN_SEPARATOR);
...@@ -354,7 +354,7 @@ public class LifeCommissionServiceImpl implements LifeCommissionService { ...@@ -354,7 +354,7 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
} }
} }
// 设置文件后缀 // 设置文件后缀
String fn = tableName + System.currentTimeMillis() + ".csv"; String fn = tableName + System.currentTimeMillis() + ".csv";
String headStr = "attachment; filename=\"" + fn + "\""; String headStr = "attachment; filename=\"" + fn + "\"";
// 设置响应 // 设置响应
response.setContentType("APPLICATION/ms-csv.numberformat"); response.setContentType("APPLICATION/ms-csv.numberformat");
...@@ -370,8 +370,8 @@ public class LifeCommissionServiceImpl implements LifeCommissionService { ...@@ -370,8 +370,8 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
os.flush(); os.flush();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
}finally { } finally {
if(os != null){ if (os != null) {
try { try {
os.close(); os.close();
} catch (IOException e) { } catch (IOException e) {
......
...@@ -18,5 +18,5 @@ public interface AgPoOrderCommissionMapper { ...@@ -18,5 +18,5 @@ public interface AgPoOrderCommissionMapper {
int updateByPrimaryKey(AgPoOrderCommission record); int updateByPrimaryKey(AgPoOrderCommission record);
void updateBatchBycommissionNo(@Param("list")List<String> commissionNos, AgPoOrderCommission orderCommission); void updateBatchBycommissionNo(@Param("list")List<String> commissionNos, @Param("orderCommission")AgPoOrderCommission orderCommission);
} }
\ No newline at end of file
...@@ -322,23 +322,23 @@ ...@@ -322,23 +322,23 @@
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateBatchBycommissionNo"> <update id="updateBatchBycommissionNo" >
update ag_po_order_commission update ag_po_order_commission
<set> <set>
<if test=" commissionStatus != null"> <if test="orderCommission.commissionStatus != null">
commission_status = #{commissionStatus,jdbcType=BIGINT}, commission_status = #{orderCommission.commissionStatus,jdbcType=BIGINT},
</if> </if>
<if test="commissionTime != null"> <if test="orderCommission.commissionTime != null">
commission_time = #{commissionTime,jdbcType=VARCHAR}, commission_time = #{orderCommission.commissionTime,jdbcType=VARCHAR},
</if> </if>
<if test="commissionCheckId != null"> <if test="orderCommission.commissionCheckId != null">
commission_check_id = #{commissionCheckId,jdbcType=VARCHAR}, commission_check_id = #{orderCommission.commissionCheckId,jdbcType=VARCHAR},
</if> </if>
<if test="updatedBy != null"> <if test="orderCommission.updatedBy != null">
updated_by = #{updatedBy,jdbcType=TIMESTAMP}, updated_by = #{orderCommission.updatedBy,jdbcType=TIMESTAMP},
</if> </if>
<if test="updatedAt != null"> <if test="orderCommission.updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, updated_at = #{orderCommission.updatedAt,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where commission_no in where commission_no in
......
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