Commit 98e03437 by jianan

生成合同

parent 585da2ed
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;
...@@ -17,6 +18,8 @@ public class PractitionerHiringController { ...@@ -17,6 +18,8 @@ public class PractitionerHiringController {
@Autowired @Autowired
private PractitionerHiringService practitionerHiringService; private PractitionerHiringService practitionerHiringService;
@Autowired
private PractitionerHiringContractService hiringContractService;
/** /**
* 保存报聘经纪人组织关系 * 保存报聘经纪人组织关系
...@@ -233,17 +236,19 @@ public class PractitionerHiringController { ...@@ -233,17 +236,19 @@ public class PractitionerHiringController {
* @param requestVO 请求数据 * @param requestVO 请求数据
* @return 响应数据 * @return 响应数据
*/ */
@RequestMapping("/hiringApprove") @RequestMapping("/hiringPDF")
public Object hiringApprove(@RequestBody HiringApproveRequestVO requestVO){ public Object hiringApprove(@RequestBody HiringPDFRequestVO requestVO){
JsonResult result = new JsonResult(); JsonResult result = new JsonResult();
try { try {
PractitionerPDFTest.main(null); // PractitionerPDFTest.main(null);
Long hiringBasicInfoId = requestVO.getHiringBasicInfoId();
hiringContractService.generatePractitionerContract(hiringBasicInfoId);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
HiringApproveResponseVO responseVO = practitionerHiringService.hiringApprove(requestVO);
result.addResult(responseVO);
result.setData(responseVO);
return result; return result;
} }
} }
\ No newline at end of file
package com.yd.api.practitioner.vo.hiring;
import lombok.Data;
@Data
public class HiringPDFRequestVO {
/**
* 经纪人id
*/
private Long practitionerId;
/**
* 审批经纪人基本资料id
*/
private Long hiringBasicInfoId;
}
...@@ -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
...@@ -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) {
......
...@@ -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">
......
...@@ -966,4 +966,11 @@ ...@@ -966,4 +966,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
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