Commit 64b09b2e by 宋祥

1.仅同步审批通过的合同

parent 00eb6d24
......@@ -82,25 +82,4 @@ public class FileDownloadController {
}
}
/**
* 下载本地文件
*
* @param docId
* @param response
* @throws IOException
*/
@RequestMapping({"docId/{docId}"})
public void downloadUrls(@PathVariable String docId, HttpServletResponse response)
throws IOException {
try {
Map dbDm02 = Iplat4jUtils.getDoc02ById(docId);
String url = MapUtils.getString(dbDm02, "url");
String fileName = MapUtils.getString(dbDm02, "docName");
FileUtils.downloadFile(new File(url), fileName, false, response);
} catch (Exception e) {
String msg = String.format("下载文件【%s】失败!原因:%s", docId, LogUtils.getMsg(e));
response.getWriter().write(msg);
}
}
}
......@@ -30,4 +30,10 @@ public class DcContract {
* 设计来源
*/
private String designSource;
/**
* 审批状态
*/
private String spStatus;
}
......@@ -123,6 +123,7 @@ public class DcApiUtils {
dcContract.setHtid(dataJson.getString("Htid"));
dcContract.setTitle(dataJson.getString("Title"));
dcContract.setDesignSource(dataJson.getString("!B__SysCusmf_0_11001_507_0"));
dcContract.setSpStatus(dataJson.getString("SpStatus"));
return dcContract;
}
......
......@@ -5,8 +5,6 @@ import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.extapp.decheng.api.DcOpenApi;
import com.baosight.hggp.core.extapp.decheng.model.DcContract;
import com.baosight.hggp.core.extapp.decheng.model.DcContractList;
import com.baosight.hggp.core.extapp.decheng.model.DcUser;
import com.baosight.hggp.core.extapp.decheng.model.DcUserList;
import com.baosight.hggp.core.model.Pager;
import com.baosight.hggp.core.utils.ThreadUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ009;
......@@ -16,17 +14,11 @@ import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.enums.ProjectSourceEnum;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.wd.constant.HgWdSqlConstant;
import com.baosight.hggp.hg.wd.tools.HGWDTools;
import com.baosight.hggp.hg.xs.constant.HgXsSqlConstant;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.StringUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
......@@ -175,9 +167,9 @@ public class ServiceHGSC101 extends ServiceEPBase {
* @param dcContractList
*/
private void syncDcContractSingle(HGPZ009 dbPz009, DcContractList dcContractList) throws IOException {
// 获取用户详情
// 获取合同详情
DcContract dcContract = DcOpenApi.contractDetail(dcContractList.getOrd());
if (dcContract == null) {
if (dcContract == null || !"审批通过".equals(dcContract.getSpStatus())) {
return;
}
dcContract.setOrd(dcContractList.getOrd());
......
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