Commit 914627ab by jianan

Merge branch 'dev_20210120_hiringPDF' into dev

# Conflicts:
#	yd-api/src/main/java/com/yd/dal/entity/customer/AclPractitioner.java
parents c093005b 4a9209ab
package com.yd.api.practitioner; package com.yd.api.practitioner;
import com.yd.api.practitioner.service.PractitionerHiringContractService;
import com.yd.api.practitioner.service.PractitionerHiringService; import com.yd.api.practitioner.service.PractitionerHiringService;
import com.yd.api.practitioner.vo.hiring.*; import com.yd.api.practitioner.vo.hiring.*;
import com.yd.api.result.JsonResult; import com.yd.api.result.JsonResult;
...@@ -18,6 +19,7 @@ public class PractitionerHiringController { ...@@ -18,6 +19,7 @@ public class PractitionerHiringController {
@Autowired @Autowired
private PractitionerHiringService practitionerHiringService; private PractitionerHiringService practitionerHiringService;
/** /**
* 保存报聘经纪人组织关系 * 保存报聘经纪人组织关系
* *
...@@ -233,15 +235,24 @@ public class PractitionerHiringController { ...@@ -233,15 +235,24 @@ public class PractitionerHiringController {
* @param requestVO 请求数据 * @param requestVO 请求数据
* @return 响应数据 * @return 响应数据
*/ */
@RequestMapping("/hiringApprove") @RequestMapping("/generatePDF")
public Object hiringApprove(@RequestBody HiringApproveRequestVO requestVO){ public Object generatePDF(@RequestBody GeneratePDFRequestVO requestVO){
JsonResult result = new JsonResult();
GeneratePDFResponseVO responseVO = practitionerHiringService.generatePDF(requestVO);
result.addResult(responseVO);
result.setData(responseVO);
return result;
}
/**
* 报聘成功后查看经纪人信息
* @param requestVO 请求数据
* @return 响应数据
*/
@RequestMapping("/queryPractitionerInfo")
public Object queryPractitionerInfo(@RequestBody QueryPractitionerInfoRequestVO requestVO){
JsonResult result = new JsonResult(); JsonResult result = new JsonResult();
try { QueryPractitionerInfoResponseVO responseVO = practitionerHiringService.queryPractitionerInfo(requestVO);
PractitionerPDFTest.main(null);
} catch (Exception e) {
e.printStackTrace();
}
HiringApproveResponseVO responseVO = practitionerHiringService.hiringApprove(requestVO);
result.addResult(responseVO); result.addResult(responseVO);
result.setData(responseVO); result.setData(responseVO);
return result; return result;
......
package com.yd.api.practitioner.service; package com.yd.api.practitioner.service;
import com.yd.api.practitioner.vo.hiring.GeneratePDFRequestVO;
import java.util.Map; import java.util.Map;
public interface PractitionerHiringContractService { public interface PractitionerHiringContractService {
String generatePractitionerContract(Long hiringBasicInfoId); String generatePractitionerContract(String practitionerNO, String contractNo, Long hiringBasicInfoId) throws Exception;
Map<String, String> initHiringBasicInfoData(Long hiringBasicInfoId); Map<String, String> initHiringBasicInfoData(Long hiringBasicInfoId, String contractNo);
Map<String, String> initHiringImageInfoData(Long hiringBasicInfoId); Map<String, String> initHiringImageInfoData(Long hiringBasicInfoId);
String generatePractitionerPDF(String practitionerNO,Map<String, String> initDatas,Map<String, String> initImages); String generatePractitionerPDF(String practitionerNO,Map<String, String> initDatas,Map<String, String> initImages);
String getNextContractNo();
} }
\ No newline at end of file
...@@ -53,4 +53,7 @@ public interface PractitionerHiringService { ...@@ -53,4 +53,7 @@ public interface PractitionerHiringService {
SavePayrollPictureResponseVO savePayrollPicture(SavePayRollPictureRequestVO requestVO); SavePayrollPictureResponseVO savePayrollPicture(SavePayRollPictureRequestVO requestVO);
GeneratePDFResponseVO generatePDF(GeneratePDFRequestVO requestVO);
QueryPractitionerInfoResponseVO queryPractitionerInfo(QueryPractitionerInfoRequestVO requestVO);
} }
package com.yd.api.practitioner.vo.hiring;
import lombok.Data;
@Data
public class GeneratePDFRequestVO {
/**
* 经纪人id
*/
private Long practitionerId;
/**
* 审批经纪人基本资料id
*/
private Long hiringBasicInfoId;
}
package com.yd.api.practitioner.vo.hiring;
import com.yd.api.result.CommonResult;
import lombok.Data;
@Data
public class GeneratePDFResponseVO {
private CommonResult commonResult;
private String contractOssPath;
}
package com.yd.api.practitioner.vo.hiring;
import lombok.Data;
@Data
public class QueryPractitionerInfoRequestVO {
/**
* 经纪人id
*/
private Long practitionerId;
}
package com.yd.api.practitioner.vo.hiring;
import com.yd.api.result.CommonResult;
import com.yd.dal.entity.customer.AclPractitioner;
import lombok.Data;
@Data
public class QueryPractitionerInfoResponseVO {
private CommonResult commonResult;
private AclPractitioner practitioner;
}
...@@ -202,7 +202,20 @@ public class AclPractitioner implements Serializable { ...@@ -202,7 +202,20 @@ public class AclPractitioner implements Serializable {
*/ */
private Integer gender; private Integer gender;
private Long hiringBasicInfoId; /**
* 经纪人合同号
*/
private String contractNo;
/**
* 经纪人PDF合同地址
*/
private String contractOssPath;
/**
* 经纪人报聘信息表id
*/
private String hiringBasicInfoId;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -29,6 +29,11 @@ public class AclPractitionerHiringPersonalStatements { ...@@ -29,6 +29,11 @@ public class AclPractitionerHiringPersonalStatements {
private String mdDropOptionName; private String mdDropOptionName;
/** /**
* 选项代码
*/
private String dropOptionCode;
/**
* 个人申明条目,用户补充输入 * 个人申明条目,用户补充输入
*/ */
private String userInput; private String userInput;
......
...@@ -74,4 +74,6 @@ public interface AclPractitionerMapper { ...@@ -74,4 +74,6 @@ public interface AclPractitionerMapper {
List<Long> queryMentoredByPractitionerId(Long practitionerId); List<Long> queryMentoredByPractitionerId(Long practitionerId);
PractitionerInfo findPractitionerInfoByPractitionerId(Long practitionerId); PractitionerInfo findPractitionerInfoByPractitionerId(Long practitionerId);
AclPractitioner selectByMobileNo(String mobileNo);
} }
\ No newline at end of file
...@@ -66,4 +66,6 @@ public interface PractitionerHiringMapper { ...@@ -66,4 +66,6 @@ public interface PractitionerHiringMapper {
List<HiringListInfo> queryMentorUnhandledList(Long practitionerId); List<HiringListInfo> queryMentorUnhandledList(Long practitionerId);
List<HiringListInfo> querySystemOwnerUnhandledList(Long practitionerId); List<HiringListInfo> querySystemOwnerUnhandledList(Long practitionerId);
String getNextContractNo();
} }
...@@ -1515,6 +1515,7 @@ public class CommonUtil { ...@@ -1515,6 +1515,7 @@ public class CommonUtil {
while((line=bufr.readLine())!=null) while((line=bufr.readLine())!=null)
{ {
System.out.println(line); System.out.println(line);
break;
} }
bufr.close();//close()中已经包含了flush bufr.close();//close()中已经包含了flush
} catch (IOException e) { } catch (IOException e) {
......
...@@ -25,7 +25,7 @@ public class PDFConfiguration { ...@@ -25,7 +25,7 @@ public class PDFConfiguration {
{ {
in = PDFConfiguration.class.getClassLoader().getResourceAsStream("pdfconfiguration.properties"); in = PDFConfiguration.class.getClassLoader().getResourceAsStream("pdfconfiguration.properties");
props.load(in); props.load(new InputStreamReader(in, "UTF-8"));
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
logger.error("pdfconfiguration.properties文件未找到"); logger.error("pdfconfiguration.properties文件未找到");
} catch (IOException e) { } catch (IOException e) {
......
...@@ -297,11 +297,27 @@ ...@@ -297,11 +297,27 @@
</foreach> </foreach>
</insert> </insert>
<select id="selectByHiringBasicInfoId" resultMap="BaseResultMap"> <resultMap id="BaseResultMap2" type="com.yd.dal.entity.customer.AclPractitionerHiringPersonalStatements">
select <include refid="Base_Column_List" /> <id column="id" jdbcType="BIGINT" property="id" />
from ag_acl_practitioner_hiring_personal_statements <result column="hiring_basic_info_id" jdbcType="BIGINT" property="hiringBasicInfoId" />
<result column="md_drop_option_id" jdbcType="BIGINT" property="mdDropOptionId" />
<result column="md_drop_option_name" jdbcType="VARCHAR" property="mdDropOptionName" />
<result column="status" jdbcType="BIGINT" property="status" />
<result column="is_active" jdbcType="INTEGER" property="isActive" />
<result column="user_input" jdbcType="INTEGER" property="userInput" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
<result column="drop_option_code" jdbcType="VARCHAR" property="dropOptionCode" />
</resultMap>
<select id="selectByHiringBasicInfoId" resultMap="BaseResultMap2">
select s.* , o.drop_option_code
from ag_acl_practitioner_hiring_personal_statements s
left join ag_md_drop_options o on o.id = s.md_drop_option_id
where hiring_basic_info_id = #{hiringBasicInfoId,jdbcType=BIGINT} where hiring_basic_info_id = #{hiringBasicInfoId,jdbcType=BIGINT}
</select> </select>
<delete id="deleteBatchByIds"> <delete id="deleteBatchByIds">
delete from ag_acl_practitioner_hiring_personal_statements delete from ag_acl_practitioner_hiring_personal_statements
where id in where id in
......
...@@ -348,6 +348,7 @@ ...@@ -348,6 +348,7 @@
select <include refid="Base_Column_List" /> select <include refid="Base_Column_List" />
from ag_acl_practitioner_hiring_working_experience from ag_acl_practitioner_hiring_working_experience
where hiring_basic_info_id = #{hiringBasicInfoId,jdbcType=BIGINT} where hiring_basic_info_id = #{hiringBasicInfoId,jdbcType=BIGINT}
order by working_end desc
</select> </select>
<delete id="deleteBatchByIds"> <delete id="deleteBatchByIds">
......
...@@ -41,6 +41,9 @@ ...@@ -41,6 +41,9 @@
<result column="mentor_id" jdbcType="BIGINT" property="mentorId" /> <result column="mentor_id" jdbcType="BIGINT" property="mentorId" />
<result column="introducer_id" jdbcType="BIGINT" property="introducerId" /> <result column="introducer_id" jdbcType="BIGINT" property="introducerId" />
<result column="gender" jdbcType="INTEGER" property="gender" /> <result column="gender" jdbcType="INTEGER" property="gender" />
<result column="contract_no" jdbcType="VARCHAR" property="contractNo" />
<result column="contract_oss_path" jdbcType="VARCHAR" property="contractOssPath" />
<result column="hiring_basic_info_id" jdbcType="BIGINT" property="hiringBasicInfoId" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, insurer_id, insurer_branch_id, dept_id, subordinate_system_id, practitioner_code, id, insurer_id, insurer_branch_id, dept_id, subordinate_system_id, practitioner_code,
...@@ -48,7 +51,8 @@ ...@@ -48,7 +51,8 @@
practitioner_reg_company, effective_start_date, effective_end_date, remark, customer_id, practitioner_reg_company, effective_start_date, effective_end_date, remark, customer_id,
employee_no, is_active, created_at, created_by, updated_at, updated_by, province_id, employee_no, is_active, created_at, created_by, updated_at, updated_by, province_id,
province_name, city_id, city_name, cert_list, bio_intro, wechat_id, qq_id, is_profile_show, province_name, city_id, city_name, cert_list, bio_intro, wechat_id, qq_id, is_profile_show,
is_name_show, is_mobile_show, education_level, mentor_id, introducer_id, gender is_name_show, is_mobile_show, education_level, mentor_id, introducer_id, gender,
contract_no, contract_oss_path, hiring_basic_info_id
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select select
...@@ -443,6 +447,15 @@ ...@@ -443,6 +447,15 @@
<if test="gender != null"> <if test="gender != null">
gender = #{gender,jdbcType=INTEGER}, gender = #{gender,jdbcType=INTEGER},
</if> </if>
<if test="contractNo != null">
contract_no = #{contractNo,jdbcType=INTEGER},
</if>
<if test="contractOssPath != null">
contract_oss_path = #{contractOssPath,jdbcType=INTEGER},
</if>
<if test="hiringBasicInfoId != null">
hiring_basic_info_id = #{hiringBasicInfoId,jdbcType=INTEGER},
</if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
...@@ -967,4 +980,11 @@ ...@@ -967,4 +980,11 @@
where p.id = #{practitionerId} where p.id = #{practitionerId}
</select> </select>
<select id="selectByMobileNo" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_practitioner
where mobile_no = #{mobileNo,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -262,4 +262,8 @@ ...@@ -262,4 +262,8 @@
from ag_md_drop_master from ag_md_drop_master
where scenario_code = 'practitioner_level')) where scenario_code = 'practitioner_level'))
</select> </select>
<select id="getNextContractNo" resultType="java.lang.String" statementType="CALLABLE">
select f_getNextContractNo()
</select>
</mapper> </mapper>
\ No newline at end of file
pdf.template=/opt/tomcat8/conf/ydpdf/pdfres/templatePractitionerContract.pdf pdf.template=/opt/tomcat8/conf/ydpdf/pdfres/templatePractitionerContract.pdf
pdf.signImage=/opt/tomcat8/conf/ydpdf/pdfres/上海银盾保险经纪有限公司.png pdf.signImage=/opt/tomcat8/conf/ydpdf/pdfres/yindunsign.png
pdf.keyStorePath=/opt/tomcat8/conf/ydpdf/pdfres/4929078_m.zuihuibi.cn.pfx pdf.keyStorePath=/opt/tomcat8/conf/ydpdf/pdfres/4929078_m.zuihuibi.cn.pfx
pdf.keyPasswordFile=/opt/tomcat8/conf/ydpdf/pdfres/pfx-password.txt pdf.keyPassword=UC645YlB
pdf.check=/opt/tomcat8/conf/ydpdf/pdfres/check.png pdf.check=/opt/tomcat8/conf/ydpdf/pdfres/check.png
pdf.uncheck=/opt/tomcat8/conf/ydpdf/pdfres/uncheck.png pdf.uncheck=/opt/tomcat8/conf/ydpdf/pdfres/uncheck.png
pdf.temp.path=/opt/tomcat8/temp/ pdf.temp.path=/opt/tomcat8/temp/
pdf.firstParty=上海银盾保险经纪有限公司 pdf.firstParty=上海银盾保险经纪有限公司
pdf.firstPartyResponser=Sharon Wan pdf.firstPartyResponser=Wan Shuang Lian
pdf.firstPartyAddress=上海市浦东新区张杨路560号中融恒瑞国际西楼1706室 pdf.firstPartyAddress=上海市浦东新区张杨路560号中融恒瑞国际西楼1706室
pdf.position.x=450 pdf.position.x=450
pdf.position.y=150 pdf.position.y=150
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