|
@@ -36,6 +36,7 @@ import java.util.stream.Collectors;
|
|
|
|
|
|
import static com.dayou.constants.HouseGuarantyDoc.*;
|
|
import static com.dayou.constants.HouseGuarantyDoc.*;
|
|
import static com.dayou.enums.HouseTargetTableColumn.ID;
|
|
import static com.dayou.enums.HouseTargetTableColumn.ID;
|
|
|
|
+import static java.lang.Thread.sleep;
|
|
|
|
|
|
@Service
|
|
@Service
|
|
public class HouseGuarantyServiceImpl implements HouseGuarantyService {
|
|
public class HouseGuarantyServiceImpl implements HouseGuarantyService {
|
|
@@ -55,19 +56,29 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Long createTableWord(HouseGuarantyTableDTO houseGuarantyTableDTO) {
|
|
public Long createTableWord(HouseGuarantyTableDTO houseGuarantyTableDTO) {
|
|
|
|
+ try {
|
|
|
|
+ sleep(500);
|
|
|
|
+ } catch (InterruptedException e) {
|
|
|
|
+ throw new RuntimeException(e);
|
|
|
|
+ }
|
|
String html = houseGuarantyTableDTO.getHtml();
|
|
String html = houseGuarantyTableDTO.getHtml();
|
|
String homePath = houseGuarantyTableDTO.getHomePath();
|
|
String homePath = houseGuarantyTableDTO.getHomePath();
|
|
- html = wordTableHelper.htmlTableFormat(html);
|
|
|
|
|
|
+ String xHtml = wordTableHelper.htmlTableFormat(html);
|
|
HouseGuarantyProcess hgp = new HouseGuarantyProcess();
|
|
HouseGuarantyProcess hgp = new HouseGuarantyProcess();
|
|
hgp.setHome(homePath);
|
|
hgp.setHome(homePath);
|
|
hgp.setTargetsHtml(html);
|
|
hgp.setTargetsHtml(html);
|
|
houseGuarantyProcessService.save(hgp);
|
|
houseGuarantyProcessService.save(hgp);
|
|
- wordTableHelper.createTableWord(html, fileNetConfig.getBaseDir() + homePath);
|
|
|
|
|
|
+ wordTableHelper.createTableWord(xHtml, fileNetConfig.getBaseDir() + homePath);
|
|
return hgp.getId();
|
|
return hgp.getId();
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Boolean analysisCollect1(Long id) {
|
|
public Boolean analysisCollect1(Long id) {
|
|
|
|
+ try {
|
|
|
|
+ sleep(1000);
|
|
|
|
+ } catch (InterruptedException e) {
|
|
|
|
+ throw new RuntimeException(e);
|
|
|
|
+ }
|
|
HouseGuarantyProcess process = houseGuarantyProcessService.getById(id);
|
|
HouseGuarantyProcess process = houseGuarantyProcessService.getById(id);
|
|
String home = fileNetConfig.getBaseDir() + process.getHome();
|
|
String home = fileNetConfig.getBaseDir() + process.getHome();
|
|
try {
|
|
try {
|
|
@@ -87,6 +98,11 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public String genConsignorLetter(Long id) {
|
|
public String genConsignorLetter(Long id) {
|
|
|
|
+ try {
|
|
|
|
+ sleep(2000);
|
|
|
|
+ } catch (InterruptedException e) {
|
|
|
|
+ throw new RuntimeException(e);
|
|
|
|
+ }
|
|
HouseGuarantyProcess process = houseGuarantyProcessService.getById(id);
|
|
HouseGuarantyProcess process = houseGuarantyProcessService.getById(id);
|
|
String home = fileNetConfig.getBaseDir() + process.getHome();
|
|
String home = fileNetConfig.getBaseDir() + process.getHome();
|
|
try {
|
|
try {
|
|
@@ -193,8 +209,8 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
|
|
|
|
|
|
private DocumentProduction buildDocumentProduction(Long id,String docName,String docNo,String docUrl,String consignor){
|
|
private DocumentProduction buildDocumentProduction(Long id,String docName,String docNo,String docUrl,String consignor){
|
|
DocumentProduction dp = new DocumentProduction();
|
|
DocumentProduction dp = new DocumentProduction();
|
|
- dp.setBusinessType(MainBusiness.HOUSE.getCode());
|
|
|
|
- dp.setBusinessCate(MainBusiness.HouseSubBusiness.GUARANTY.getCode());
|
|
|
|
|
|
+ dp.setBusinessType(MainBusiness.HOUSE.getMsg());
|
|
|
|
+ dp.setBusinessCate(MainBusiness.HouseSubBusiness.GUARANTY.getMsg());
|
|
dp.setBusinessId(id);
|
|
dp.setBusinessId(id);
|
|
dp.setDocName(docName);
|
|
dp.setDocName(docName);
|
|
dp.setDocType(DocumentType.REPORT.getName());
|
|
dp.setDocType(DocumentType.REPORT.getName());
|