|
|
@@ -17,6 +17,7 @@ import me.zhengjie.dao.mybatis.entity.*;
|
|
|
import me.zhengjie.dao.mybatis.mapper.*;
|
|
|
import me.zhengjie.domain.order.OrderBizCodeMessage;
|
|
|
import org.apache.commons.io.IOUtils;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -305,8 +306,12 @@ public class NotaryNoteServiceImpl extends ServiceImpl<INotaryNoteDao, NotaryNot
|
|
|
borrowerMap = new HashMap<>();
|
|
|
borrowerMap.put("title", "借款人");
|
|
|
borrowerMap.put("name", borrower.getSpouseName());
|
|
|
- borrowerMap.put("sex", Integer.parseInt(borrower.getSpouseIdCard().substring(15, 1)) % 2 == 1 ? "男" : "女");
|
|
|
- borrowerMap.put("birth", borrower.getSpouseIdCard().substring(6, 8));
|
|
|
+ String sex="男";
|
|
|
+ if(StringUtils.isNotEmpty(borrower.getSpouseSex())&& borrower.getSpouseSex().equals("2")) {
|
|
|
+ sex="女";
|
|
|
+ }
|
|
|
+ borrowerMap.put("sex", sex);
|
|
|
+ borrowerMap.put("birth", borrower.getSpouseIdCard().substring(6,14));
|
|
|
borrowerMap.put("idCard", borrower.getSpouseIdCard());
|
|
|
borrowerMap.put("phone", borrower.getSpousePhone());
|
|
|
userList.add(borrowerMap);
|
|
|
@@ -325,8 +330,12 @@ public class NotaryNoteServiceImpl extends ServiceImpl<INotaryNoteDao, NotaryNot
|
|
|
mortgageMap = new HashMap<>();
|
|
|
mortgageMap.put("title", "抵押人");
|
|
|
mortgageMap.put("name", mortgage.getSpouseName());
|
|
|
- mortgageMap.put("sex", Integer.parseInt(mortgage.getSpouseIdCard().substring(15, 1)) % 2 == 1 ? "男" : "女");
|
|
|
- mortgageMap.put("birth", mortgage.getSpouseIdCard().substring(6, 8));
|
|
|
+ String sex="男";
|
|
|
+ if(StringUtils.isNotEmpty(borrower.getSpouseSex())&& borrower.getSpouseSex().equals("2")) {
|
|
|
+ sex="女";
|
|
|
+ }
|
|
|
+ mortgageMap.put("sex", sex);
|
|
|
+ mortgageMap.put("birth", mortgage.getSpouseIdCard().substring(6,14));
|
|
|
mortgageMap.put("idCard", mortgage.getSpouseIdCard());
|
|
|
mortgageMap.put("phone", mortgage.getSpousePhone());
|
|
|
userList.add(mortgageMap);
|
|
|
@@ -429,4 +438,7 @@ public class NotaryNoteServiceImpl extends ServiceImpl<INotaryNoteDao, NotaryNot
|
|
|
}
|
|
|
return result.replace("${ModelContent}", replaceContent);
|
|
|
}
|
|
|
+ public static void main(String[] args) {
|
|
|
+ System.out.println("420503198207231844".substring( 6, 14)); ;
|
|
|
+ }
|
|
|
}
|