Merge branch 'dev' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dev
This commit is contained in:
commit
442f0f452c
|
@ -17,7 +17,7 @@ public class AttachmentFileDaoImpl extends MybatisGenericDao<AttachmentFileEntit
|
||||||
@DS("#entity.dataSourceCode")
|
@DS("#entity.dataSourceCode")
|
||||||
@Override
|
@Override
|
||||||
public Integer saveData(AttachmentFileEntity entity) {
|
public Integer saveData(AttachmentFileEntity entity) {
|
||||||
Integer o = super.insert(getSqlIdPrifx() + "AttachmentFileEntity_insert", entity);
|
Integer o = super.insert("com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity.AttachmentFileEntity_insert", entity);
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,21 +20,21 @@ public class OerAnnexDaoImpl extends MybatisGenericDao<OerAnnexEntity, String> i
|
||||||
@DS("#entity.dataSourceCode")
|
@DS("#entity.dataSourceCode")
|
||||||
@Override
|
@Override
|
||||||
public Integer deleteAnnex(OerAnnexEntity entity) {
|
public Integer deleteAnnex(OerAnnexEntity entity) {
|
||||||
Integer o = super.delete(getSqlIdPrifx() + "OerAnnexEntity_delete", entity);
|
Integer o = super.delete( "com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity.OerAnnexEntity_delete", entity);
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
@DS("#entity.dataSourceCode")
|
@DS("#entity.dataSourceCode")
|
||||||
@Override
|
@Override
|
||||||
public OerAnnexEntity queryMaxId(OerAnnexEntity entity) {
|
public OerAnnexEntity queryMaxId(OerAnnexEntity entity) {
|
||||||
OerAnnexEntity o = super.query(entity,getSqlIdPrifx() + "OerAnnexEntity_max_id");
|
OerAnnexEntity o = super.query(entity,"com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity.OerAnnexEntity_max_id");
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
@DS("#entity.dataSourceCode")
|
@DS("#entity.dataSourceCode")
|
||||||
@Override
|
@Override
|
||||||
public Integer saveData(OerAnnexEntity entity) {
|
public Integer saveData(OerAnnexEntity entity) {
|
||||||
Integer o = super.insert(getSqlIdPrifx() + "entity_insert",entity);
|
Integer o = super.insert("com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity.OerAnnexEntity_insert",entity);
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,6 +77,10 @@ public class OerDjmlEntity extends BaseEntity {
|
||||||
private String ssrid;
|
private String ssrid;
|
||||||
//送审人
|
//送审人
|
||||||
private String ssr;
|
private String ssr;
|
||||||
|
//经费类型代码
|
||||||
|
private String jflxdm;
|
||||||
|
//经费类型名称
|
||||||
|
private String jflxmc;
|
||||||
//附件对象
|
//附件对象
|
||||||
@JSONField(ordinal = 9995)
|
@JSONField(ordinal = 9995)
|
||||||
private List<FileInfoDTO> fileInfoList;
|
private List<FileInfoDTO> fileInfoList;
|
||||||
|
@ -487,4 +491,20 @@ public class OerDjmlEntity extends BaseEntity {
|
||||||
public void setClf_cclb(String clf_cclb) {
|
public void setClf_cclb(String clf_cclb) {
|
||||||
this.clf_cclb = clf_cclb;
|
this.clf_cclb = clf_cclb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getJflxdm() {
|
||||||
|
return jflxdm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJflxdm(String jflxdm) {
|
||||||
|
this.jflxdm = jflxdm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJflxmc() {
|
||||||
|
return jflxmc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJflxmc(String jflxmc) {
|
||||||
|
this.jflxmc = jflxmc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,6 +132,9 @@ GSDM,KJND,mlId
|
||||||
<if test="yhzh != null and yhzh !='' "> yhzh, </if>
|
<if test="yhzh != null and yhzh !='' "> yhzh, </if>
|
||||||
<if test="ssr != null and ssr !='' "> ssr, </if>
|
<if test="ssr != null and ssr !='' "> ssr, </if>
|
||||||
<if test="ssrid != null and ssrid !='' "> ssrid, </if>
|
<if test="ssrid != null and ssrid !='' "> ssrid, </if>
|
||||||
|
<if test="ssrq != null and ssrq !='' "> ssrq, </if>
|
||||||
|
<if test="jflxdm != null and jflxdm !='' "> jflxdm, </if>
|
||||||
|
<if test="jflxmc != null and jflxmc !='' "> jflxmc, </if>
|
||||||
<if test="xmdm != null and xmdm !='' "> xmdm, </if>
|
<if test="xmdm != null and xmdm !='' "> xmdm, </if>
|
||||||
<if test="xmmc != null and xmmc !='' "> xmmc, </if>
|
<if test="xmmc != null and xmmc !='' "> xmmc, </if>
|
||||||
</trim>
|
</trim>
|
||||||
|
@ -176,6 +179,9 @@ GSDM,KJND,mlId
|
||||||
<if test="yhzh != null and yhzh !='' "> #{yhzh}, </if>
|
<if test="yhzh != null and yhzh !='' "> #{yhzh}, </if>
|
||||||
<if test="ssr != null and ssr !='' "> #{ssr}, </if>
|
<if test="ssr != null and ssr !='' "> #{ssr}, </if>
|
||||||
<if test="ssrid != null and ssrid !='' "> #{ssrid}, </if>
|
<if test="ssrid != null and ssrid !='' "> #{ssrid}, </if>
|
||||||
|
<if test="ssrq != null and ssrq !='' "> #{ssrq}, </if>
|
||||||
|
<if test="jflxdm != null and jflxdm !='' "> #{jflxdm}, </if>
|
||||||
|
<if test="jflxmc != null and jflxmc !='' "> #{jflxmc}, </if>
|
||||||
<if test="xmdm != null and xmdm !='' "> #{xmdm}, </if>
|
<if test="xmdm != null and xmdm !='' "> #{xmdm}, </if>
|
||||||
<if test="xmmc != null and xmmc !='' "> #{xmmc}, </if>
|
<if test="xmmc != null and xmmc !='' "> #{xmmc}, </if>
|
||||||
</trim>
|
</trim>
|
||||||
|
@ -270,7 +276,10 @@ GSDM,KJND,mlId
|
||||||
<select id="queryOerDjml" resultType="com.hzya.frame.grpU8.nxproof.oerdjml.entity.OerDjmlEntity" parameterType = "com.hzya.frame.grpU8.nxproof.oerdjml.entity.OerDjmlEntity">
|
<select id="queryOerDjml" resultType="com.hzya.frame.grpU8.nxproof.oerdjml.entity.OerDjmlEntity" parameterType = "com.hzya.frame.grpU8.nxproof.oerdjml.entity.OerDjmlEntity">
|
||||||
select
|
select
|
||||||
mlId,
|
mlId,
|
||||||
DJBH
|
kjnd,
|
||||||
|
gsdm,
|
||||||
|
DJBH,
|
||||||
|
djlxid
|
||||||
from OER_DJML
|
from OER_DJML
|
||||||
<trim prefix="where" prefixOverrides="and">
|
<trim prefix="where" prefixOverrides="and">
|
||||||
<if test="djbh != null and djbh != ''"> and DJBH = #{djbh} </if>
|
<if test="djbh != null and djbh != ''"> and DJBH = #{djbh} </if>
|
||||||
|
@ -521,6 +530,11 @@ GSDM,KJND,mlId
|
||||||
<if test="zt != null and zt != ''"> ZT = #{zt},</if>
|
<if test="zt != null and zt != ''"> ZT = #{zt},</if>
|
||||||
<if test="curshjd != null and curshjd != ''"> curshjd = #{curshjd},</if>
|
<if test="curshjd != null and curshjd != ''"> curshjd = #{curshjd},</if>
|
||||||
<if test="nextshjd != null and nextshjd != ''"> nextshjd = #{nextshjd},</if>
|
<if test="nextshjd != null and nextshjd != ''"> nextshjd = #{nextshjd},</if>
|
||||||
|
ssrid = #{ssrid},
|
||||||
|
ssr = #{ssr},
|
||||||
|
ssrq = #{ssrq},
|
||||||
|
shrid = #{ssrid},
|
||||||
|
shrq = #{shrq}
|
||||||
</trim>
|
</trim>
|
||||||
where MLID = #{mlId} and DJBH = #{djbh}
|
where MLID = #{mlId} and DJBH = #{djbh}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.date.DateTime;
|
import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.io.FileUtil;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
@ -73,14 +74,14 @@ public class OerDjmlExtServiceImpl implements IOerDjmlExtService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Map<String, String> headers = entity.getHeaders();
|
Map<String, String> headers = entity.getHeaders();
|
||||||
String eventType = headers.get("eventType");
|
|
||||||
String formmainTableName = headers.get("formmainTableName");
|
String formmainTableName = headers.get("formmainTableName");
|
||||||
String forsonTableName = headers.get("forsonTableName");
|
String forsonTableName = headers.get("forsonTableName");
|
||||||
String djlxid = headers.get("djlxid");
|
|
||||||
String djlx = headers.get("djlx");
|
String djlx = headers.get("djlx");
|
||||||
String flowcode = headers.get("flowcode");
|
|
||||||
String fileApiCode = headers.get("file_api_code");
|
|
||||||
JSONObject bodyObj = JSONObject.parseObject(bodys);
|
JSONObject bodyObj = JSONObject.parseObject(bodys);
|
||||||
|
//事件类型
|
||||||
|
String eventType = bodyObj.getString("eventType");
|
||||||
|
//summaryId
|
||||||
|
String summaryId = bodyObj.getString("summaryId");
|
||||||
JSONObject seeyonData = bodyObj.getJSONObject("businessDataStr");
|
JSONObject seeyonData = bodyObj.getJSONObject("businessDataStr");
|
||||||
if (null != seeyonData){
|
if (null != seeyonData){
|
||||||
/**
|
/**
|
||||||
|
@ -94,16 +95,16 @@ public class OerDjmlExtServiceImpl implements IOerDjmlExtService {
|
||||||
String res = "";
|
String res = "";
|
||||||
if (DjlxEnum.TRAVEL.type.equals(djlx)) {
|
if (DjlxEnum.TRAVEL.type.equals(djlx)) {
|
||||||
//差旅报销 travel
|
//差旅报销 travel
|
||||||
res = travel(headers, eventType, djlxid, flowcode, fileApiCode, seeyonData, formmainData, forsonData);
|
res = travel(headers,eventType,summaryId,grpDataSourceCode,formmainData,forsonData);
|
||||||
}else if(DjlxEnum.EXPENSE.type.equals(djlx)){
|
}else if(DjlxEnum.EXPENSE.type.equals(djlx)){
|
||||||
//费用报销 expense
|
//费用报销 expense
|
||||||
res = expense(headers, eventType, djlxid, flowcode, fileApiCode, seeyonData, formmainData, forsonData);
|
res = expense(headers,eventType,summaryId,grpDataSourceCode, formmainData, forsonData);
|
||||||
}else if (DjlxEnum.LABOR.type.equals(djlx)){
|
}else if (DjlxEnum.LABOR.type.equals(djlx)){
|
||||||
//劳务费 labor
|
//劳务费 labor
|
||||||
}
|
}
|
||||||
if (StrUtil.isNotEmpty(res)){
|
if (StrUtil.isNotEmpty(res)){
|
||||||
entity.setBodys(res);
|
entity.setBodys(res);
|
||||||
//return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}catch (Exception ex ){
|
}catch (Exception ex ){
|
||||||
|
@ -116,18 +117,20 @@ public class OerDjmlExtServiceImpl implements IOerDjmlExtService {
|
||||||
* 费用报销单
|
* 费用报销单
|
||||||
* @param headers 请求头
|
* @param headers 请求头
|
||||||
* @param eventType 事件类型
|
* @param eventType 事件类型
|
||||||
* @param djlxid 单据类型id
|
* @param summaryId 流程id
|
||||||
* @param flowcode 流程编码
|
* @param dataSourceCode
|
||||||
* @param fileApiCode 附件下载apicode
|
|
||||||
* @param seeyonData 表单对象
|
|
||||||
* @param formmainData 主表数据
|
* @param formmainData 主表数据
|
||||||
* @param forsonData 子表数据
|
* @param forsonData 子表数据
|
||||||
*/
|
*/
|
||||||
private String expense(Map<String, String> headers, String eventType, String djlxid, String flowcode, String fileApiCode, JSONObject seeyonData, JSONObject formmainData, JSONArray forsonData) {
|
private String expense(Map<String, String> headers, String eventType,String summaryId, String dataSourceCode,JSONObject formmainData, JSONArray forsonData) {
|
||||||
|
String djlxid = headers.get("djlxid");
|
||||||
|
String flowcode = headers.get("flowcode");
|
||||||
|
String fileApiCode = headers.get("file_api_code");
|
||||||
OerDjmlEntity djml = new OerDjmlEntity();
|
OerDjmlEntity djml = new OerDjmlEntity();
|
||||||
djml.setLclb(eventType);
|
djml.setLclb(eventType);
|
||||||
djml.setDjbh(formmainData.getString("field0001"));
|
djml.setDjbh(formmainData.getString("field0001"));
|
||||||
djml.setDjlxId(djlxid);
|
djml.setDjlxId(djlxid);
|
||||||
|
djml.setDataSourceCode(dataSourceCode);
|
||||||
JSONObject forsonData0 = forsonData.getJSONObject(0);
|
JSONObject forsonData0 = forsonData.getJSONObject(0);
|
||||||
//流程发起
|
//流程发起
|
||||||
if (ColEventTypeEnum.ONSTART.getType().equals(eventType)){
|
if (ColEventTypeEnum.ONSTART.getType().equals(eventType)){
|
||||||
|
@ -136,8 +139,8 @@ public class OerDjmlExtServiceImpl implements IOerDjmlExtService {
|
||||||
djml.setZt("2");
|
djml.setZt("2");
|
||||||
djml.setCrerdm("");
|
djml.setCrerdm("");
|
||||||
djml.setCrermc("");
|
djml.setCrermc("");
|
||||||
djml.setCrerdate(timestampConvert(formmainData.getString("start_date")));
|
djml.setCrerdate(timestampConvert(formmainData.getString("start_date"),"yyyyMMdd"));
|
||||||
djml.setDjdate(timestampConvert(formmainData.getString("field0016")));
|
djml.setDjdate(timestampConvert(formmainData.getString("field0016"),"yyyyMMdd"));
|
||||||
djml.setJe(formmainData.getString("field0052"));
|
djml.setJe(formmainData.getString("field0052"));
|
||||||
djml.setJedx(formmainData.getString("field0071"));
|
djml.setJedx(formmainData.getString("field0071"));
|
||||||
djml.setYjje("0.00");
|
djml.setYjje("0.00");
|
||||||
|
@ -239,17 +242,19 @@ public class OerDjmlExtServiceImpl implements IOerDjmlExtService {
|
||||||
* 差旅报销单
|
* 差旅报销单
|
||||||
* @param headers 请求头
|
* @param headers 请求头
|
||||||
* @param eventType 事件类型
|
* @param eventType 事件类型
|
||||||
* @param djlxid 单据类型id
|
* @param summaryId 流程id
|
||||||
* @param flowcode 流程编码
|
* @param dataSourceCode
|
||||||
* @param fileApiCode 附件下载apicode
|
|
||||||
* @param seeyonData 表单对象
|
|
||||||
* @param formmainData 主表数据
|
* @param formmainData 主表数据
|
||||||
* @param forsonData 子表数据
|
* @param forsonData 子表数据
|
||||||
*/
|
*/
|
||||||
private String travel(Map<String, String> headers, String eventType, String djlxid, String flowcode, String fileApiCode, JSONObject seeyonData, JSONObject formmainData, JSONArray forsonData) {
|
private String travel(Map<String, String> headers, String eventType,String summaryId, String dataSourceCode,JSONObject formmainData, JSONArray forsonData) {
|
||||||
|
String djlxid = headers.get("djlxid");
|
||||||
|
String flowcode = headers.get("flowcode");
|
||||||
|
String fileApiCode = headers.get("file_api_code");
|
||||||
OerDjmlEntity djml = new OerDjmlEntity();
|
OerDjmlEntity djml = new OerDjmlEntity();
|
||||||
djml.setLclb(eventType);
|
djml.setLclb(eventType);
|
||||||
djml.setDjbh(formmainData.getString("field0001"));
|
djml.setDjbh(formmainData.getString("field0001"));
|
||||||
|
djml.setDataSourceCode(dataSourceCode);
|
||||||
//流程发起
|
//流程发起
|
||||||
if (ColEventTypeEnum.ONSTART.getType().equals(eventType)){
|
if (ColEventTypeEnum.ONSTART.getType().equals(eventType)){
|
||||||
JSONObject forjsonData0 = forsonData.getJSONObject(0);
|
JSONObject forjsonData0 = forsonData.getJSONObject(0);
|
||||||
|
@ -259,8 +264,8 @@ public class OerDjmlExtServiceImpl implements IOerDjmlExtService {
|
||||||
djml.setZt("2");
|
djml.setZt("2");
|
||||||
djml.setCrerdm(formmainData.getString("field0107"));
|
djml.setCrerdm(formmainData.getString("field0107"));
|
||||||
djml.setCrermc(formmainData.getString("field0114"));
|
djml.setCrermc(formmainData.getString("field0114"));
|
||||||
djml.setCrerdate(timestampConvert(formmainData.getString("start_date")));
|
djml.setCrerdate(timestampConvert(formmainData.getString("start_date"),"yyyyMMdd"));
|
||||||
djml.setDjdate((timestampConvert(formmainData.getString("field0002"))));
|
djml.setDjdate((timestampConvert(formmainData.getString("field0002"),"yyyyMMdd")));
|
||||||
djml.setJe(formmainData.getString("field0033"));
|
djml.setJe(formmainData.getString("field0033"));
|
||||||
djml.setJedx(formmainData.getString("field0034"));
|
djml.setJedx(formmainData.getString("field0034"));
|
||||||
djml.setYjje("0.00");
|
djml.setYjje("0.00");
|
||||||
|
@ -269,8 +274,8 @@ public class OerDjmlExtServiceImpl implements IOerDjmlExtService {
|
||||||
djml.setFjs( formmainData.getString("field0004"));
|
djml.setFjs( formmainData.getString("field0004"));
|
||||||
djml.setZy( formmainData.getString("field0009"));
|
djml.setZy( formmainData.getString("field0009"));
|
||||||
//部门代码
|
//部门代码
|
||||||
djml.setBmdm( formmainData.getString("field0109"));
|
djml.setBmdm(formmainData.getString("field0109"));
|
||||||
djml.setBmmc( "");
|
djml.setBmmc(formmainData.getString("field0120"));
|
||||||
//项目代码
|
//项目代码
|
||||||
djml.setXmdm(forjsonData0.getString("field0074"));
|
djml.setXmdm(forjsonData0.getString("field0074"));
|
||||||
djml.setXmmc(forjsonData0.getString("field0075"));
|
djml.setXmmc(forjsonData0.getString("field0075"));
|
||||||
|
@ -295,7 +300,7 @@ public class OerDjmlExtServiceImpl implements IOerDjmlExtService {
|
||||||
djml.setSsrq( DateUtil.format(formmainData.getDate("startDate"),"yyyyMMddHHmmssSSS"));
|
djml.setSsrq( DateUtil.format(formmainData.getDate("startDate"),"yyyyMMddHHmmssSSS"));
|
||||||
djml.setSsrid(formmainData.getString("field0108"));
|
djml.setSsrid(formmainData.getString("field0108"));
|
||||||
djml.setSsr(formmainData.getString("field0115"));
|
djml.setSsr(formmainData.getString("field0115"));
|
||||||
|
djml.setClf_cclb(forjsonData0.getString("field0098"));
|
||||||
//报销明细
|
//报销明细
|
||||||
List<OerDjnrEntity> djnrList = new ArrayList<>();
|
List<OerDjnrEntity> djnrList = new ArrayList<>();
|
||||||
//结算方式
|
//结算方式
|
||||||
|
@ -330,24 +335,30 @@ public class OerDjmlExtServiceImpl implements IOerDjmlExtService {
|
||||||
djnr.setJflxdm("");
|
djnr.setJflxdm("");
|
||||||
djnr.setJflxmc("");
|
djnr.setJflxmc("");
|
||||||
djnr.setZy(forson.getString("field0030"));
|
djnr.setZy(forson.getString("field0030"));
|
||||||
djnr.setClf_startdate(forson.getString("field0016"));
|
djnr.setClf_startdate(timestampConvert(forson.getString("field0016"),"yyyy-MM-dd"));
|
||||||
djnr.setClf_enddate(forson.getString("field0017"));
|
djnr.setClf_enddate(timestampConvert(forson.getString("field0017"),"yyyy-MM-dd"));
|
||||||
djnr.setClf_ccdd(forson.getString("field0019"));
|
djnr.setClf_ccdd(forson.getString("field0019"));
|
||||||
djnr.setClf_ccksd(forson.getString("field0018"));
|
djnr.setClf_ccksd(forson.getString("field0018"));
|
||||||
djnr.setClf_djzs(djml.getFjs());
|
djnr.setClf_djzs(djml.getFjs());
|
||||||
djnr.setClf_ccts(forson.getString("field0023"));
|
djnr.setClf_ccts(forson.getString("field0023"));
|
||||||
|
djnr.setClf_cctsbz(forson.getString("field0023"));
|
||||||
djnr.setClf_ccrs(forson.getString("field0021"));
|
djnr.setClf_ccrs(forson.getString("field0021"));
|
||||||
djnr.setClf_zw(forson.getString("field0092"));
|
djnr.setClf_zw(forson.getString("field0092"));
|
||||||
djnr.setClf_jtgj(forson.getString("field0020"));
|
djnr.setClf_jtgj(forson.getString("field0119"));
|
||||||
djnr.setClf_jtf(forson.getString("field0024"));
|
//住宿费
|
||||||
djnr.setClf_zsbz(forson.getString("field0077"));
|
djnr.setClf_zsbz(forson.getString("field0070"));
|
||||||
djnr.setClf_zsf(forson.getString("field0025"));
|
djnr.setClf_zsf(forson.getString("field0025"));
|
||||||
//伙食补助是 标准金额
|
//伙食补助
|
||||||
djnr.setClf_hsbz(forson.getString("field0026"));
|
djnr.setClf_hsbz(forson.getString("field0026"));
|
||||||
//伙食费是 实际报销的金额
|
djnr.setClf_hsf(forson.getString("field0116"));
|
||||||
djnr.setClf_hsf(forson.getString("field0026"));
|
//交通补助
|
||||||
djnr.setClf_jtbz(forson.getString("field0024"));
|
djnr.setClf_jtbz(forson.getString("field0024"));
|
||||||
|
djnr.setClf_jtbzf(forson.getString("field0117"));
|
||||||
|
djnr.setClf_jtf(forson.getString("field0117"));
|
||||||
|
//其他
|
||||||
djnr.setClf_qtf(forson.getString("field0028"));
|
djnr.setClf_qtf(forson.getString("field0028"));
|
||||||
|
//公杂
|
||||||
|
|
||||||
djnr.setFjs(djml.getFjs());
|
djnr.setFjs(djml.getFjs());
|
||||||
djnrList.add(djnr);
|
djnrList.add(djnr);
|
||||||
//结算方式
|
//结算方式
|
||||||
|
@ -396,16 +407,30 @@ public class OerDjmlExtServiceImpl implements IOerDjmlExtService {
|
||||||
}else if (ColEventTypeEnum.ONSTOP.getType().equals(eventType)){
|
}else if (ColEventTypeEnum.ONSTOP.getType().equals(eventType)){
|
||||||
//流程终止 修改状态,释放指标
|
//流程终止 修改状态,释放指标
|
||||||
djml.setZt("0");
|
djml.setZt("0");
|
||||||
|
djml.setCurshjd("0");
|
||||||
|
djml.setNextshjd("-9");
|
||||||
|
djml.setSsrid(null);
|
||||||
|
djml.setSsr(null);
|
||||||
|
djml.setSsrq(null);
|
||||||
|
djml.setShrId(null);
|
||||||
|
djml.setShrq(null);
|
||||||
}else if (ColEventTypeEnum.ONCANCEL.getType().equals(eventType)){
|
}else if (ColEventTypeEnum.ONCANCEL.getType().equals(eventType)){
|
||||||
//流程撤销 修改状态,释放指标
|
//流程撤销 修改状态,释放指标
|
||||||
djml.setZt("1");
|
djml.setZt("1");
|
||||||
|
djml.setCurshjd("0");
|
||||||
|
djml.setNextshjd("-9");
|
||||||
|
djml.setSsrid(null);
|
||||||
|
djml.setSsr(null);
|
||||||
|
djml.setSsrq(null);
|
||||||
|
djml.setShrId(null);
|
||||||
|
djml.setShrq(null);
|
||||||
}else if (ColEventTypeEnum.ONPROCESSFINISHED.getType().equals(eventType)){
|
}else if (ColEventTypeEnum.ONPROCESSFINISHED.getType().equals(eventType)){
|
||||||
//流程结束事件
|
//流程结束事件
|
||||||
djml.setZt("3");
|
djml.setZt("3");
|
||||||
djml.setCurshjd("999");
|
djml.setCurshjd("999");
|
||||||
djml.setNextshjd("-1");
|
djml.setNextshjd("-1");
|
||||||
//查询协同附件
|
//查询协同附件
|
||||||
List<FileInfoDTO> fileInfoList = fileDownload(seeyonData.getString("summaryId"), fileApiCode);
|
List<FileInfoDTO> fileInfoList = fileDownload(summaryId, fileApiCode);
|
||||||
djml.setFileInfoList(fileInfoList);
|
djml.setFileInfoList(fileInfoList);
|
||||||
}
|
}
|
||||||
String djmlStr = JSONObject.toJSONString(djml);
|
String djmlStr = JSONObject.toJSONString(djml);
|
||||||
|
@ -414,11 +439,12 @@ public class OerDjmlExtServiceImpl implements IOerDjmlExtService {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 时间戳转成 yyyyMMdd
|
* 时间戳转成 指定格式
|
||||||
* @param timestamp
|
* @param timestamp 时间戳
|
||||||
|
* @param format 格式
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private String timestampConvert(String timestamp){
|
private String timestampConvert(String timestamp,String format){
|
||||||
if (StrUtil.isNotEmpty(timestamp) && NumberUtil.isNumber(timestamp)){
|
if (StrUtil.isNotEmpty(timestamp) && NumberUtil.isNumber(timestamp)){
|
||||||
try {
|
try {
|
||||||
DateTime date = DateUtil.date(Long.valueOf(timestamp));
|
DateTime date = DateUtil.date(Long.valueOf(timestamp));
|
||||||
|
@ -439,15 +465,19 @@ public class OerDjmlExtServiceImpl implements IOerDjmlExtService {
|
||||||
*/
|
*/
|
||||||
private List<FileInfoDTO> fileDownload(String summaryId,String apiCode){
|
private List<FileInfoDTO> fileDownload(String summaryId,String apiCode){
|
||||||
try {
|
try {
|
||||||
List<CollAttachmentResDTO> colAttachmentList = restUtil.getColAttachments(summaryId, "0", apiCode, "hzya");
|
List<CollAttachmentResDTO> colAttachmentList = restUtil.getColAttachments(summaryId, "0", apiCode, null);
|
||||||
//下载协同附件
|
//下载协同附件
|
||||||
if (CollectionUtils.isNotEmpty(colAttachmentList)){
|
if (CollectionUtils.isNotEmpty(colAttachmentList)){
|
||||||
|
String token = restUtil.getToken(null, apiCode);
|
||||||
List<FileInfoDTO> fileList = new ArrayList<>();
|
List<FileInfoDTO> fileList = new ArrayList<>();
|
||||||
for (CollAttachmentResDTO att : colAttachmentList) {
|
for (CollAttachmentResDTO att : colAttachmentList) {
|
||||||
FileInfoDTO fileInfoDTO = new FileInfoDTO();
|
FileInfoDTO fileInfoDTO = new FileInfoDTO();
|
||||||
|
|
||||||
String fileName = URLDecoder.decode(att.getFilename(), "UTF-8");
|
String fileName = URLDecoder.decode(att.getFilename(), "UTF-8");
|
||||||
byte[] bytes = restUtil.downloadFileBytes("hzya", apiCode, att.getFileUrl(), fileName);
|
byte[] bytes = restUtil.downloadFileBytes(null, apiCode, att.getFileUrl(), fileName,token);
|
||||||
|
if (!FileUtil.isDirectory(DSK+ File.separator+DateUtil.today())){
|
||||||
|
FileUtil.mkdir(DSK+ File.separator+DateUtil.today());
|
||||||
|
}
|
||||||
String filePath = DSK+ File.separator+DateUtil.today()+File.separator+att.getFileUrl()+"."+att.getExtension();
|
String filePath = DSK+ File.separator+DateUtil.today()+File.separator+att.getFileUrl()+"."+att.getExtension();
|
||||||
File file = new File(filePath);
|
File file = new File(filePath);
|
||||||
// 使用 FileOutputStream 写入字节数组到文件
|
// 使用 FileOutputStream 写入字节数组到文件
|
||||||
|
@ -455,7 +485,7 @@ public class OerDjmlExtServiceImpl implements IOerDjmlExtService {
|
||||||
fos.write(bytes);
|
fos.write(bytes);
|
||||||
}
|
}
|
||||||
if (null != file){
|
if (null != file){
|
||||||
String zipPath = DSK+File.separator+DateUtil.today()+File.separator+att.getSubReference()+".zip";
|
String zipPath = DSK+File.separator+DateUtil.today()+File.separator+att.getFileUrl()+".zip";
|
||||||
ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipPath), Charset.forName("GBK"));
|
ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipPath), Charset.forName("GBK"));
|
||||||
writeZipFile(file, zos, fileName);
|
writeZipFile(file, zos, fileName);
|
||||||
zos.close();
|
zos.close();
|
||||||
|
@ -476,6 +506,7 @@ public class OerDjmlExtServiceImpl implements IOerDjmlExtService {
|
||||||
fileList.add(fileInfoDTO);
|
fileList.add(fileInfoDTO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return fileList;
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
logger.error("下载附件出错:{}",e);
|
logger.error("下载附件出错:{}",e);
|
||||||
|
|
|
@ -765,6 +765,13 @@ public class OerDjmlServiceImpl implements IOerDjmlService {
|
||||||
//修改状态
|
//修改状态
|
||||||
oerDjmlAllEntity.setMlId(oerDjmlAllEntities.get(0).getMlId());
|
oerDjmlAllEntity.setMlId(oerDjmlAllEntities.get(0).getMlId());
|
||||||
oerDjmlAllEntity.setZt(entity.getZt());
|
oerDjmlAllEntity.setZt(entity.getZt());
|
||||||
|
oerDjmlAllEntity.setCurshjd(entity.getCurshjd());
|
||||||
|
oerDjmlAllEntity.setNextshjd(entity.getNextshjd());
|
||||||
|
oerDjmlAllEntity.setSsrid(entity.getSsrid());
|
||||||
|
oerDjmlAllEntity.setSsr(entity.getSsr());
|
||||||
|
oerDjmlAllEntity.setSsrq(entity.getSsrq());
|
||||||
|
oerDjmlAllEntity.setShrId(entity.getShrId());
|
||||||
|
oerDjmlAllEntity.setShrq(entity.getShrq());
|
||||||
iOerDjmlDao.updateOerDjml(oerDjmlAllEntity);
|
iOerDjmlDao.updateOerDjml(oerDjmlAllEntity);
|
||||||
//释放指标
|
//释放指标
|
||||||
GbiZbsyrecAllEntity gbiZbsyrecAllEntity = new GbiZbsyrecAllEntity();
|
GbiZbsyrecAllEntity gbiZbsyrecAllEntity = new GbiZbsyrecAllEntity();
|
||||||
|
@ -844,6 +851,7 @@ public class OerDjmlServiceImpl implements IOerDjmlService {
|
||||||
annexEntity.setDataSourceCode(entity.getDataSourceCode());
|
annexEntity.setDataSourceCode(entity.getDataSourceCode());
|
||||||
annexEntity.setMlid(oerDjmlAllEntities.get(0).getMlId());
|
annexEntity.setMlid(oerDjmlAllEntities.get(0).getMlId());
|
||||||
annexEntity.setKjnd(oerDjmlAllEntities.get(0).getKjnd());
|
annexEntity.setKjnd(oerDjmlAllEntities.get(0).getKjnd());
|
||||||
|
annexEntity.setGsdm(oerDjmlAllEntities.get(0).getGsdm());
|
||||||
annexEntity.setAnnexName(fileName);
|
annexEntity.setAnnexName(fileName);
|
||||||
annexEntity.setAnnexSize(Convert.toLong(fileInfo.getFile_size()));
|
annexEntity.setAnnexSize(Convert.toLong(fileInfo.getFile_size()));
|
||||||
annexEntity.setOnlyid(fileEntity.getaTGuid());
|
annexEntity.setOnlyid(fileEntity.getaTGuid());
|
||||||
|
|
|
@ -57,6 +57,8 @@ public class OerDjnrEntity extends BaseEntity {
|
||||||
private String clf_djzs;
|
private String clf_djzs;
|
||||||
//差旅费-出差天数
|
//差旅费-出差天数
|
||||||
private String clf_ccts;
|
private String clf_ccts;
|
||||||
|
//差旅费-出差补助天数
|
||||||
|
private String clf_cctsbz;
|
||||||
//差旅费-出差人数
|
//差旅费-出差人数
|
||||||
private String clf_ccrs;
|
private String clf_ccrs;
|
||||||
//差旅费-职务
|
//差旅费-职务
|
||||||
|
@ -462,4 +464,12 @@ public class OerDjnrEntity extends BaseEntity {
|
||||||
public void setClf_qtf(String clf_qtf) {
|
public void setClf_qtf(String clf_qtf) {
|
||||||
this.clf_qtf = clf_qtf;
|
this.clf_qtf = clf_qtf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getClf_cctsbz() {
|
||||||
|
return clf_cctsbz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClf_cctsbz(String clf_cctsbz) {
|
||||||
|
this.clf_cctsbz = clf_cctsbz;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,6 +93,7 @@
|
||||||
<if test="clf_ccdd != null and clf_ccdd !='' "> clf_ccdd, </if>
|
<if test="clf_ccdd != null and clf_ccdd !='' "> clf_ccdd, </if>
|
||||||
<if test="clf_ccksd != null and clf_ccksd !='' "> clf_ccksd, </if>
|
<if test="clf_ccksd != null and clf_ccksd !='' "> clf_ccksd, </if>
|
||||||
<if test="clf_djzs != null and clf_djzs !='' "> clf_djzs, </if>
|
<if test="clf_djzs != null and clf_djzs !='' "> clf_djzs, </if>
|
||||||
|
<if test="clf_cctsbz != null and clf_cctsbz !='' "> clf_cctsbz, </if>
|
||||||
<if test="clf_ccts != null and clf_ccts !='' "> clf_ccts, </if>
|
<if test="clf_ccts != null and clf_ccts !='' "> clf_ccts, </if>
|
||||||
<if test="clf_ccrs != null and clf_ccrs !='' "> clf_ccrs, </if>
|
<if test="clf_ccrs != null and clf_ccrs !='' "> clf_ccrs, </if>
|
||||||
<if test="clf_zw != null and clf_zw !='' "> clf_zw, </if>
|
<if test="clf_zw != null and clf_zw !='' "> clf_zw, </if>
|
||||||
|
@ -100,6 +101,7 @@
|
||||||
<if test="clf_jtf != null and clf_jtf !='' "> clf_jtf, </if>
|
<if test="clf_jtf != null and clf_jtf !='' "> clf_jtf, </if>
|
||||||
<if test="clf_zsbz != null and clf_zsbz !='' "> clf_zsbz, </if>
|
<if test="clf_zsbz != null and clf_zsbz !='' "> clf_zsbz, </if>
|
||||||
<if test="clf_zsf != null and clf_zsf !='' "> clf_zsf, </if>
|
<if test="clf_zsf != null and clf_zsf !='' "> clf_zsf, </if>
|
||||||
|
<if test="clf_hsf != null and clf_hsf !='' "> clf_hsf, </if>
|
||||||
<if test="clf_hsbz != null and clf_hsbz !='' "> clf_hsbz, </if>
|
<if test="clf_hsbz != null and clf_hsbz !='' "> clf_hsbz, </if>
|
||||||
<if test="clf_jtbz != null and clf_jtbz !='' "> clf_jtbz, </if>
|
<if test="clf_jtbz != null and clf_jtbz !='' "> clf_jtbz, </if>
|
||||||
<if test="clf_jtbzf != null and clf_jtbzf !='' "> clf_jtbzf, </if>
|
<if test="clf_jtbzf != null and clf_jtbzf !='' "> clf_jtbzf, </if>
|
||||||
|
@ -141,6 +143,7 @@
|
||||||
<if test="clf_ccdd != null and clf_ccdd !='' "> #{clf_ccdd}, </if>
|
<if test="clf_ccdd != null and clf_ccdd !='' "> #{clf_ccdd}, </if>
|
||||||
<if test="clf_ccksd != null and clf_ccksd !='' "> #{clf_ccksd}, </if>
|
<if test="clf_ccksd != null and clf_ccksd !='' "> #{clf_ccksd}, </if>
|
||||||
<if test="clf_djzs != null and clf_djzs !='' "> #{clf_djzs}, </if>
|
<if test="clf_djzs != null and clf_djzs !='' "> #{clf_djzs}, </if>
|
||||||
|
<if test="clf_cctsbz != null and clf_cctsbz !='' "> #{clf_cctsbz}, </if>
|
||||||
<if test="clf_ccts != null and clf_ccts !='' "> #{clf_ccts}, </if>
|
<if test="clf_ccts != null and clf_ccts !='' "> #{clf_ccts}, </if>
|
||||||
<if test="clf_ccrs != null and clf_ccrs !='' "> #{clf_ccrs}, </if>
|
<if test="clf_ccrs != null and clf_ccrs !='' "> #{clf_ccrs}, </if>
|
||||||
<if test="clf_zw != null and clf_zw !='' "> #{clf_zw}, </if>
|
<if test="clf_zw != null and clf_zw !='' "> #{clf_zw}, </if>
|
||||||
|
@ -148,6 +151,7 @@
|
||||||
<if test="clf_jtf != null and clf_jtf !='' "> #{clf_jtf}, </if>
|
<if test="clf_jtf != null and clf_jtf !='' "> #{clf_jtf}, </if>
|
||||||
<if test="clf_zsbz != null and clf_zsbz !='' "> #{clf_zsbz}, </if>
|
<if test="clf_zsbz != null and clf_zsbz !='' "> #{clf_zsbz}, </if>
|
||||||
<if test="clf_zsf != null and clf_zsf !='' "> #{clf_zsf}, </if>
|
<if test="clf_zsf != null and clf_zsf !='' "> #{clf_zsf}, </if>
|
||||||
|
<if test="clf_hsf != null and clf_hsf !='' "> #{clf_hsf}, </if>
|
||||||
<if test="clf_hsbz != null and clf_hsbz !='' "> #{clf_hsbz}, </if>
|
<if test="clf_hsbz != null and clf_hsbz !='' "> #{clf_hsbz}, </if>
|
||||||
<if test="clf_jtbz != null and clf_jtbz !='' "> #{clf_jtbz}, </if>
|
<if test="clf_jtbz != null and clf_jtbz !='' "> #{clf_jtbz}, </if>
|
||||||
<if test="clf_jtbzf != null and clf_jtbzf !='' "> #{clf_jtbzf}, </if>
|
<if test="clf_jtbzf != null and clf_jtbzf !='' "> #{clf_jtbzf}, </if>
|
||||||
|
|
|
@ -390,7 +390,7 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
||||||
object.put("eventType",eventType);
|
object.put("eventType",eventType);
|
||||||
object.put("businessDataStr",seeYonBean.toJSONString());
|
object.put("businessDataStr",seeYonBean.toJSONString());
|
||||||
object.put("affairId","");
|
object.put("affairId","");
|
||||||
object.put("summaryId",interFaceEntity.getSummaryId());
|
object.put("summaryId",requestData.getString("summaryId"));
|
||||||
object.put("currentActivityId","");
|
object.put("currentActivityId","");
|
||||||
object.put("id",forMainId);
|
object.put("id",forMainId);
|
||||||
object.put("hzyaExtData",requestData.getJSONObject("hzyaExtData"));
|
object.put("hzyaExtData",requestData.getJSONObject("hzyaExtData"));
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class RestUtil {
|
||||||
if (StrUtil.isNotEmpty(summaryId) && StrUtil.isNotEmpty(apiCode)){
|
if (StrUtil.isNotEmpty(summaryId) && StrUtil.isNotEmpty(apiCode)){
|
||||||
SysApplicationApiEntity sysApp = getByCode(apiCode);
|
SysApplicationApiEntity sysApp = getByCode(apiCode);
|
||||||
String token = getToken(loginName,sysApp);
|
String token = getToken(loginName,sysApp);
|
||||||
String appUrl = sysApp.getAppUrl();
|
String appUrl = StrUtil.removeSuffix(sysApp.getAppUrl(),"/");
|
||||||
if (StrUtil.isEmpty(attType)){
|
if (StrUtil.isEmpty(attType)){
|
||||||
attType = "0";
|
attType = "0";
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,7 @@ public class RestUtil {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 附件下载
|
* 附件下载
|
||||||
* @param loginName oa登录名
|
* @param loginName oa登录名
|
||||||
|
@ -107,7 +108,32 @@ public class RestUtil {
|
||||||
if (StrUtil.isNotEmpty(apiCode)){
|
if (StrUtil.isNotEmpty(apiCode)){
|
||||||
SysApplicationApiEntity sysApp = getByCode(apiCode);
|
SysApplicationApiEntity sysApp = getByCode(apiCode);
|
||||||
String token = getToken(loginName,sysApp);
|
String token = getToken(loginName,sysApp);
|
||||||
String appUrl = sysApp.getAppUrl();
|
String appUrl = StrUtil.removeSuffix(sysApp.getAppUrl(),"/");
|
||||||
|
String url = "/seeyon/rest/attachment/file/@ctp_file_ID@?fileName=@文件名@&token=@token@";
|
||||||
|
url = url.replaceAll("@ctp_file_ID@",fileId).replaceAll("@文件名@",fileName).replaceAll("@token@",token);
|
||||||
|
byte[] bytes = HttpUtil.downloadBytes(appUrl + url);
|
||||||
|
return bytes;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件下载
|
||||||
|
* @param loginName oa登录名
|
||||||
|
* @param apiCode 接口编码
|
||||||
|
* @param fileId 附件id
|
||||||
|
* @param fileName 附件名
|
||||||
|
* @param token
|
||||||
|
* @return 附件字节数组
|
||||||
|
*/
|
||||||
|
public byte[] downloadFileBytes(String loginName,String apiCode,String fileId,String fileName,String token){
|
||||||
|
if (StrUtil.isNotEmpty(apiCode)){
|
||||||
|
SysApplicationApiEntity sysApp = getByCode(apiCode);
|
||||||
|
if (StrUtil.isEmpty(token)){
|
||||||
|
token = getToken(loginName,sysApp);
|
||||||
|
}
|
||||||
|
String appUrl = StrUtil.removeSuffix(sysApp.getAppUrl(),"/");
|
||||||
String url = "/seeyon/rest/attachment/file/@ctp_file_ID@?fileName=@文件名@&token=@token@";
|
String url = "/seeyon/rest/attachment/file/@ctp_file_ID@?fileName=@文件名@&token=@token@";
|
||||||
url = url.replaceAll("@ctp_file_ID@",fileId).replaceAll("@文件名@",fileName).replaceAll("@token@",token);
|
url = url.replaceAll("@ctp_file_ID@",fileId).replaceAll("@文件名@",fileName).replaceAll("@token@",token);
|
||||||
byte[] bytes = HttpUtil.downloadBytes(appUrl + url);
|
byte[] bytes = HttpUtil.downloadBytes(appUrl + url);
|
||||||
|
@ -139,7 +165,7 @@ public class RestUtil {
|
||||||
public String getToken(String login_name,SysApplicationApiEntity sysApp){
|
public String getToken(String login_name,SysApplicationApiEntity sysApp){
|
||||||
if (null != sysApp){
|
if (null != sysApp){
|
||||||
HashMap<String, String> hashMap = new HashMap<>();
|
HashMap<String, String> hashMap = new HashMap<>();
|
||||||
String app_url = sysApp.getAppUrl();
|
String app_url = StrUtil.removeSuffix(sysApp.getAppUrl(), "/");
|
||||||
String url = app_url+"/seeyon/rest/token";
|
String url = app_url+"/seeyon/rest/token";
|
||||||
String headerIn = sysApp.getHeaderIn();
|
String headerIn = sysApp.getHeaderIn();
|
||||||
JSONArray headers = JSON.parseArray(headerIn);
|
JSONArray headers = JSON.parseArray(headerIn);
|
||||||
|
@ -151,8 +177,9 @@ public class RestUtil {
|
||||||
hashMap.put(parameterName,example);
|
hashMap.put(parameterName,example);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StrUtil.isNotEmpty(login_name)){
|
login_name = hashMap.get("loginName");
|
||||||
hashMap.put("loginName",login_name);
|
if (StrUtil.isEmpty(login_name)){
|
||||||
|
hashMap.put("loginName","hzya");
|
||||||
}
|
}
|
||||||
String result = HttpRequest.post(url).body(JSON.toJSONString(hashMap)).execute().body();
|
String result = HttpRequest.post(url).body(JSON.toJSONString(hashMap)).execute().body();
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
|
|
Loading…
Reference in New Issue