关联人参数传递处理

master
shijie 4 years ago
parent 4d5d875521
commit 3858e3a7cd
  1. 26
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java
  2. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/AlInsuranceListMapper.java
  3. 3
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlInsuranceListRes.java
  4. 5
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlInsuranceListServiceImpl.java
  5. 11
      dq-financial-guarantee/src/main/resources/mapper/guarantee/AlInsuranceListMapper.xml
  6. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CrmsCompanyPersonal.java
  7. 7
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlInsuranceList.java

@ -17,12 +17,10 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.*;
/**
* <p>
@ -61,15 +59,16 @@ public class CrmsCompanyPersonalController {
@PostMapping("/insertCompanyPersonal")
@ApiOperation(value = "新增个人/企业关联人")
public ResponseResult insertCompanyPersonal(@RequestBody @Valid CrmsCompanyPersonal crmsCompanyPersonal) {
String dateStr = crmsCompanyPersonal.getRegisteredTime().toString();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date d = null;
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
String format = sdf.format(crmsCompanyPersonal.getRegisteredTime());
Date parse = null;
try {
d = sdf.parse(dateStr);
parse = sdf.parse(format);
} catch (ParseException e) {
e.printStackTrace();
}
crmsCompanyPersonal.setRegisteredTime(d);
crmsCompanyPersonal.setRegisteredTime(parse);
boolean result = crmsCompanyPersonalService.save(crmsCompanyPersonal);
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
crmsCustomerRelated.setRelatedId(crmsCompanyPersonal.getId().intValue());//关联人Id
@ -95,6 +94,15 @@ public class CrmsCompanyPersonalController {
@PostMapping("/updateCompanyPersonal")
@ApiOperation(value = "编辑个人/企业关联人")
public ResponseResult updateCompanyPersonal(@RequestBody CrmsCompanyPersonal crmsCompanyPersonal){
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
String format = sdf.format(crmsCompanyPersonal.getRegisteredTime());
Date parse = null;
try {
parse = sdf.parse(format);
} catch (ParseException e) {
e.printStackTrace();
}
crmsCompanyPersonal.setRegisteredTime(parse);
boolean result = crmsCompanyPersonalService.updateById(crmsCompanyPersonal);
return result ? ResponseResult.SUCCESS(crmsCompanyPersonal) : ResponseResult.FAIL();
}

@ -7,6 +7,8 @@ import com.daqing.financial.guarantee.model.response.AlInsuranceListRes;
import com.daqing.framework.domain.guarantee.AlInsuranceList;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* <p>
* 保后管理列表 Mapper 接口
@ -19,4 +21,6 @@ import org.apache.ibatis.annotations.Mapper;
public interface AlInsuranceListMapper extends BaseMapper<AlInsuranceList> {
IPage<AlInsuranceListRes> pageByCondition(Page page, String customerNumberOrName);
List<AlInsuranceListRes> selectListByIds(List<String> ids);
}

@ -1,5 +1,6 @@
package com.daqing.financial.guarantee.model.response;
import com.alibaba.excel.metadata.BaseRowModel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
@ -21,7 +22,7 @@ import java.util.Date;
*/
@Data
@ToString
public class AlInsuranceListRes implements Serializable {
public class AlInsuranceListRes extends BaseRowModel implements Serializable {
private static final long serialVersionUID = 1L;

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.guarantee.mapper.AlInsuranceListMapper;
import com.daqing.financial.guarantee.model.response.AlInsuranceListRes;
import com.daqing.financial.guarantee.model.response.AlRepaymentRes;
import com.daqing.financial.guarantee.service.IAlInsuranceListService;
import com.daqing.framework.domain.crms.response.CrmsCode;
import com.daqing.framework.domain.guarantee.AlInsuranceList;
@ -54,9 +55,9 @@ public class AlInsuranceListServiceImpl extends ServiceImpl<AlInsuranceListMappe
@Override
public Boolean excelExport(List<String> ids, HttpServletResponse response) {
List<AlInsuranceList>alInsuranceList = this.baseMapper.selectBatchIds(ids);
List<AlInsuranceListRes>alInsuranceList = this.baseMapper.selectListByIds(ids);
try {
ExcelUtil.writeExcelWithSheets(response, alInsuranceList, "还款记录一览表", "repaymentEntry", new AlInsuranceList())
ExcelUtil.writeExcelWithSheets(response, alInsuranceList, "还款记录一览表", "repaymentEntry", new AlInsuranceListRes())
.finish();
return true;
} catch (Exception e) {

@ -34,4 +34,15 @@
order by create_time desc
</select>
<select id="selectListByIds" resultType="com.daqing.financial.guarantee.model.response.AlInsuranceListRes">
select * from al_insurance_list
<where>
id IN
<foreach collection="ids" open="(" separator="," close=")" item="id">
#{id}
</foreach>
</where>
order by create_time desc
</select>
</mapper>

@ -59,7 +59,7 @@ public class CrmsCompanyPersonal implements Serializable {
* 注册时间
*/
@ApiModelProperty(value = "注册时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
//@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date registeredTime;
/**

@ -18,7 +18,7 @@ import java.util.Date;
*/
@Data
@TableName("al_insurance_list")
public class AlInsuranceList extends BaseRowModel implements Serializable {
public class AlInsuranceList implements Serializable {
private static final long serialVersionUID = 1L;
@ -98,6 +98,11 @@ public class AlInsuranceList extends BaseRowModel implements Serializable {
*/
private Integer paymentStatus;
/**
* 是否逾期过0->1->
*/
private Integer isOverdue;
/**
* 创建时间
*/

Loading…
Cancel
Save