grpu8
This commit is contained in:
parent
e70a5e8cc4
commit
f56a4fe61b
|
@ -1,12 +1,11 @@
|
||||||
package com.hzya.frame.grpU8.acctVouchInfo.dao.impl;
|
package com.hzya.frame.grpU8.acctVouchInfo.dao.impl;
|
||||||
|
|
||||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
import com.hzya.frame.grpU8.acctVouchInfo.entity.AcctVouchInfoEntity;
|
|
||||||
import com.hzya.frame.grpU8.acctVouchInfo.dao.IAcctVouchInfoDao;
|
import com.hzya.frame.grpU8.acctVouchInfo.dao.IAcctVouchInfoDao;
|
||||||
|
import com.hzya.frame.grpU8.acctVouchInfo.entity.AcctVouchInfoEntity;
|
||||||
import com.hzya.frame.grpU8.acctVouchInfo.entity.AcctVouchInfoEntityVo;
|
import com.hzya.frame.grpU8.acctVouchInfo.entity.AcctVouchInfoEntityVo;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.hzya.frame.grpU8.acctVouchInfo.entity;
|
package com.hzya.frame.grpU8.acctVouchInfo.entity;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import com.hzya.frame.web.entity.BaseEntity;
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 子表(AcctVouchInfo)实体类
|
* 子表(AcctVouchInfo)实体类
|
||||||
|
@ -9,7 +8,7 @@ import com.hzya.frame.web.entity.BaseEntity;
|
||||||
* @since 2024-07-09 11:25:15
|
* @since 2024-07-09 11:25:15
|
||||||
*/
|
*/
|
||||||
public class AcctVouchInfoEntity extends BaseEntity {
|
public class AcctVouchInfoEntity extends BaseEntity {
|
||||||
|
|
||||||
/** 年度 */
|
/** 年度 */
|
||||||
private String acct_year;
|
private String acct_year;
|
||||||
/** 月份 */
|
/** 月份 */
|
|
@ -1,10 +1,9 @@
|
||||||
package com.hzya.frame.grpU8.acctVouchInfo.service;
|
package com.hzya.frame.grpU8.acctVouchInfo.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
|
||||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
|
||||||
import com.hzya.frame.grpU8.acctVouchInfo.entity.AcctVouchInfoEntity;
|
|
||||||
import com.hzya.frame.basedao.service.IBaseService;
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.grpU8.acctVouchInfo.entity.AcctVouchInfoEntity;
|
||||||
|
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||||
/**
|
/**
|
||||||
* 子表(AcctVouchInfo)表服务接口
|
* 子表(AcctVouchInfo)表服务接口
|
||||||
*
|
*
|
|
@ -1,13 +1,11 @@
|
||||||
package com.hzya.frame.grpU8.dictCheckType.dao.impl;
|
package com.hzya.frame.grpU8.dictCheckType.dao.impl;
|
||||||
|
|
||||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.hzya.frame.grpU8.dictAcctSubj.entity.DictAcctSubjEntity;
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
import com.hzya.frame.grpU8.dictAcctSubj.entity.DictAcctSubjEntityVo;
|
|
||||||
import com.hzya.frame.grpU8.dictCheckType.entity.DictCheckTypeEntity;
|
|
||||||
import com.hzya.frame.grpU8.dictCheckType.dao.IDictCheckTypeDao;
|
import com.hzya.frame.grpU8.dictCheckType.dao.IDictCheckTypeDao;
|
||||||
|
import com.hzya.frame.grpU8.dictCheckType.entity.DictCheckTypeEntity;
|
||||||
import com.hzya.frame.grpU8.dictCheckType.entity.DictCheckTypeEntityVo;
|
import com.hzya.frame.grpU8.dictCheckType.entity.DictCheckTypeEntityVo;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package com.hzya.frame.grpU8.nxproof.attachment.dao;/*
|
package com.hzya.frame.grpU8.nxproof.attachment.dao;/*
|
||||||
* @Description 附件
|
* @Description 附件
|
||||||
* @Author xiangerlin
|
* @Author xiangerlin
|
||||||
@Date 2022-10-26 11:17
|
@Date 2022-10-26 11:17
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
import com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity;
|
import com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity;
|
||||||
|
|
||||||
public interface IAttachmentFileDao extends IBaseDao<AttachmentFileEntity, String> {
|
public interface IAttachmentFileDao extends IBaseDao<AttachmentFileEntity, String> {
|
||||||
Integer saveData(AttachmentFileEntity entity);
|
Integer saveData(AttachmentFileEntity entity);
|
||||||
}
|
}
|
|
@ -1,23 +1,23 @@
|
||||||
package com.hzya.frame.grpU8.nxproof.attachment.dao.impl;/*
|
package com.hzya.frame.grpU8.nxproof.attachment.dao.impl;/*
|
||||||
* @Description 附件
|
* @Description 附件
|
||||||
* @Author xiangerlin
|
* @Author xiangerlin
|
||||||
@Date 2022-10-26 11:18
|
@Date 2022-10-26 11:18
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
import com.hzya.frame.grpU8.nxproof.attachment.dao.IAttachmentFileDao;
|
import com.hzya.frame.grpU8.nxproof.attachment.dao.IAttachmentFileDao;
|
||||||
import com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity;
|
import com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity;
|
||||||
import com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity;
|
import com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public class AttachmentFileDaoImpl extends MybatisGenericDao<AttachmentFileEntity, String> implements IAttachmentFileDao {
|
public class AttachmentFileDaoImpl extends MybatisGenericDao<AttachmentFileEntity, String> implements IAttachmentFileDao {
|
||||||
@DS("#entity.dataSourceCode")
|
@DS("#entity.dataSourceCode")
|
||||||
@Override
|
@Override
|
||||||
public Integer saveData(AttachmentFileEntity entity) {
|
public Integer saveData(AttachmentFileEntity entity) {
|
||||||
Integer o = super.insert("com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity.AttachmentFileEntity_insert", entity);
|
Integer o = super.insert("com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity.AttachmentFileEntity_insert", entity);
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,120 +1,120 @@
|
||||||
package com.hzya.frame.grpU8.nxproof.attachment.entity;/*
|
package com.hzya.frame.grpU8.nxproof.attachment.entity;/*
|
||||||
* @Description 附件表
|
* @Description 附件表
|
||||||
* @Author xiangerlin
|
* @Author xiangerlin
|
||||||
@Date 2022-10-26 10:40
|
@Date 2022-10-26 10:40
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
import com.hzya.frame.web.entity.BaseEntity;
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
public class AttachmentFileEntity extends BaseEntity {
|
public class AttachmentFileEntity extends BaseEntity {
|
||||||
|
|
||||||
private String aTGuid;//主键id
|
private String aTGuid;//主键id
|
||||||
private String createDate;//创建日期
|
private String createDate;//创建日期
|
||||||
private String createID;//创建人id
|
private String createID;//创建人id
|
||||||
private String updateDate;//更新日期
|
private String updateDate;//更新日期
|
||||||
private String updateID;//更新人id
|
private String updateID;//更新人id
|
||||||
private String deleteDate;//删除日期
|
private String deleteDate;//删除日期
|
||||||
private String deleteID;//删除人
|
private String deleteID;//删除人
|
||||||
private String aTFileName;//附件名
|
private String aTFileName;//附件名
|
||||||
private String aTExtName;//附件后缀名
|
private String aTExtName;//附件后缀名
|
||||||
private byte[] aTFile;//附件 二进制文件
|
private byte[] aTFile;//附件 二进制文件
|
||||||
private String relationApp;//固定传 OER
|
private String relationApp;//固定传 OER
|
||||||
private String isDELETE;//删除标记 0是未删除
|
private String isDELETE;//删除标记 0是未删除
|
||||||
|
|
||||||
public String getaTGuid() {
|
public String getaTGuid() {
|
||||||
return aTGuid;
|
return aTGuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setaTGuid(String aTGuid) {
|
public void setaTGuid(String aTGuid) {
|
||||||
this.aTGuid = aTGuid;
|
this.aTGuid = aTGuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCreateDate() {
|
public String getCreateDate() {
|
||||||
return createDate;
|
return createDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreateDate(String createDate) {
|
public void setCreateDate(String createDate) {
|
||||||
this.createDate = createDate;
|
this.createDate = createDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCreateID() {
|
public String getCreateID() {
|
||||||
return createID;
|
return createID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreateID(String createID) {
|
public void setCreateID(String createID) {
|
||||||
this.createID = createID;
|
this.createID = createID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUpdateDate() {
|
public String getUpdateDate() {
|
||||||
return updateDate;
|
return updateDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUpdateDate(String updateDate) {
|
public void setUpdateDate(String updateDate) {
|
||||||
this.updateDate = updateDate;
|
this.updateDate = updateDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUpdateID() {
|
public String getUpdateID() {
|
||||||
return updateID;
|
return updateID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUpdateID(String updateID) {
|
public void setUpdateID(String updateID) {
|
||||||
this.updateID = updateID;
|
this.updateID = updateID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDeleteDate() {
|
public String getDeleteDate() {
|
||||||
return deleteDate;
|
return deleteDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDeleteDate(String deleteDate) {
|
public void setDeleteDate(String deleteDate) {
|
||||||
this.deleteDate = deleteDate;
|
this.deleteDate = deleteDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDeleteID() {
|
public String getDeleteID() {
|
||||||
return deleteID;
|
return deleteID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDeleteID(String deleteID) {
|
public void setDeleteID(String deleteID) {
|
||||||
this.deleteID = deleteID;
|
this.deleteID = deleteID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getaTFileName() {
|
public String getaTFileName() {
|
||||||
return aTFileName;
|
return aTFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setaTFileName(String aTFileName) {
|
public void setaTFileName(String aTFileName) {
|
||||||
this.aTFileName = aTFileName;
|
this.aTFileName = aTFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getaTExtName() {
|
public String getaTExtName() {
|
||||||
return aTExtName;
|
return aTExtName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setaTExtName(String aTExtName) {
|
public void setaTExtName(String aTExtName) {
|
||||||
this.aTExtName = aTExtName;
|
this.aTExtName = aTExtName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] getaTFile() {
|
public byte[] getaTFile() {
|
||||||
return aTFile;
|
return aTFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setaTFile(byte[] aTFile) {
|
public void setaTFile(byte[] aTFile) {
|
||||||
this.aTFile = aTFile;
|
this.aTFile = aTFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRelationApp() {
|
public String getRelationApp() {
|
||||||
return relationApp;
|
return relationApp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRelationApp(String relationApp) {
|
public void setRelationApp(String relationApp) {
|
||||||
this.relationApp = relationApp;
|
this.relationApp = relationApp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getIsDELETE() {
|
public String getIsDELETE() {
|
||||||
return isDELETE;
|
return isDELETE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIsDELETE(String isDELETE) {
|
public void setIsDELETE(String isDELETE) {
|
||||||
this.isDELETE = isDELETE;
|
this.isDELETE = isDELETE;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,86 +1,86 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity">
|
<mapper namespace="com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity">
|
||||||
<resultMap id="get-AttachmentFileEntity-result" type="com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity">
|
<resultMap id="get-AttachmentFileEntity-result" type="com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity">
|
||||||
|
|
||||||
<result property="aTGuid" column="aTGuid" />
|
<result property="aTGuid" column="aTGuid" />
|
||||||
<result property="createDate" column="createDate" />
|
<result property="createDate" column="createDate" />
|
||||||
<result property="createID" column="createID" />
|
<result property="createID" column="createID" />
|
||||||
<result property="updateDate" column="updateDate" />
|
<result property="updateDate" column="updateDate" />
|
||||||
<result property="updateID" column="updateID" />
|
<result property="updateID" column="updateID" />
|
||||||
<result property="deleteDate" column="deleteDate" />
|
<result property="deleteDate" column="deleteDate" />
|
||||||
<result property="deleteID" column="deleteID" />
|
<result property="deleteID" column="deleteID" />
|
||||||
<result property="aTFileName" column="aTFileName" />
|
<result property="aTFileName" column="aTFileName" />
|
||||||
<result property="aTExtName" column="aTExtName" />
|
<result property="aTExtName" column="aTExtName" />
|
||||||
<result column="aTFile" property="aTFile" jdbcType="BLOB" typeHandler="org.apache.ibatis.type.BlobTypeHandler" />
|
<result column="aTFile" property="aTFile" jdbcType="BLOB" typeHandler="org.apache.ibatis.type.BlobTypeHandler" />
|
||||||
<result property="relationApp" column="relationApp" />
|
<result property="relationApp" column="relationApp" />
|
||||||
<result property="isDELETE" column="isDELETE" />
|
<result property="isDELETE" column="isDELETE" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<sql id="AttachmentFileEntity_Base_Column_List">
|
<sql id="AttachmentFileEntity_Base_Column_List">
|
||||||
ATGuid,
|
ATGuid,
|
||||||
CreateDate,
|
CreateDate,
|
||||||
CreateID,
|
CreateID,
|
||||||
UpdateDate,
|
UpdateDate,
|
||||||
UpdateID,
|
UpdateID,
|
||||||
DeleteDate,
|
DeleteDate,
|
||||||
DeleteID,
|
DeleteID,
|
||||||
ATFileName,
|
ATFileName,
|
||||||
ATExtName,
|
ATExtName,
|
||||||
ATFile,
|
ATFile,
|
||||||
RelationApp,
|
RelationApp,
|
||||||
ISDELETE
|
ISDELETE
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 查询 采用==查询 -->
|
<!-- 查询 采用==查询 -->
|
||||||
<select id="AttachmentFileEntity_list_base" resultMap="get-AttachmentFileEntity-result" parameterType="com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity">
|
<select id="AttachmentFileEntity_list_base" resultMap="get-AttachmentFileEntity-result" parameterType="com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity">
|
||||||
select
|
select
|
||||||
<include refid="AttachmentFileEntity_Base_Column_List" />
|
<include refid="AttachmentFileEntity_Base_Column_List" />
|
||||||
FROM
|
FROM
|
||||||
AT_AttachmentFile
|
AT_AttachmentFile
|
||||||
<trim prefix="where" prefixOverrides="and">
|
<trim prefix="where" prefixOverrides="and">
|
||||||
<if test="aTGuid != null and aTGuid !='' "> aTGuid = #{aTGuid} </if>
|
<if test="aTGuid != null and aTGuid !='' "> aTGuid = #{aTGuid} </if>
|
||||||
<if test="aTFileName != null and aTFileName !='' ">and aTFileName = #{aTFileName} </if>
|
<if test="aTFileName != null and aTFileName !='' ">and aTFileName = #{aTFileName} </if>
|
||||||
</trim>
|
</trim>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<insert id="AttachmentFileEntity_insert" parameterType="com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity">
|
<insert id="AttachmentFileEntity_insert" parameterType="com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity">
|
||||||
insert into AT_AttachmentFile(
|
insert into AT_AttachmentFile(
|
||||||
<trim suffix="" suffixOverrides=",">
|
<trim suffix="" suffixOverrides=",">
|
||||||
<if test="aTGuid != null and aTGuid !='' ">aTGuid,</if>
|
<if test="aTGuid != null and aTGuid !='' ">aTGuid,</if>
|
||||||
<if test="createDate != null and createDate !='' "> createDate, </if>
|
<if test="createDate != null and createDate !='' "> createDate, </if>
|
||||||
<if test="createID != null and createID !='' "> createID, </if>
|
<if test="createID != null and createID !='' "> createID, </if>
|
||||||
<if test="updateDate != null and updateDate !='' "> updateDate ,</if>
|
<if test="updateDate != null and updateDate !='' "> updateDate ,</if>
|
||||||
<if test="updateID != null and updateID !='' ">updateID,</if>
|
<if test="updateID != null and updateID !='' ">updateID,</if>
|
||||||
<if test="deleteDate != null and deleteDate !='' ">deleteDate,</if>
|
<if test="deleteDate != null and deleteDate !='' ">deleteDate,</if>
|
||||||
<if test="deleteID != null and deleteID !='' ">deleteID,</if>
|
<if test="deleteID != null and deleteID !='' ">deleteID,</if>
|
||||||
<if test="aTFileName != null and aTFileName !='' ">aTFileName,</if>
|
<if test="aTFileName != null and aTFileName !='' ">aTFileName,</if>
|
||||||
<if test="aTExtName != null and aTExtName !='' ">aTExtName,</if>
|
<if test="aTExtName != null and aTExtName !='' ">aTExtName,</if>
|
||||||
<if test="aTFile != null and aTFile !='' ">aTFile,</if>
|
<if test="aTFile != null and aTFile !='' ">aTFile,</if>
|
||||||
relationApp,
|
relationApp,
|
||||||
isDELETE
|
isDELETE
|
||||||
</trim>
|
</trim>
|
||||||
)values
|
)values
|
||||||
(
|
(
|
||||||
<trim suffix="" suffixOverrides=",">
|
<trim suffix="" suffixOverrides=",">
|
||||||
<if test="aTGuid != null and aTGuid !='' ">#{aTGuid},</if>
|
<if test="aTGuid != null and aTGuid !='' ">#{aTGuid},</if>
|
||||||
<if test="createDate != null and createDate !='' "> #{createDate}, </if>
|
<if test="createDate != null and createDate !='' "> #{createDate}, </if>
|
||||||
<if test="createID != null and createID !='' "> #{createID}, </if>
|
<if test="createID != null and createID !='' "> #{createID}, </if>
|
||||||
<if test="updateDate != null and updateDate !='' "> #{updateDate} ,</if>
|
<if test="updateDate != null and updateDate !='' "> #{updateDate} ,</if>
|
||||||
<if test="updateID != null and updateID !='' ">#{updateID},</if>
|
<if test="updateID != null and updateID !='' ">#{updateID},</if>
|
||||||
<if test="deleteDate != null and deleteDate !='' ">#{deleteDate},</if>
|
<if test="deleteDate != null and deleteDate !='' ">#{deleteDate},</if>
|
||||||
<if test="deleteID != null and deleteID !='' ">#{deleteID},</if>
|
<if test="deleteID != null and deleteID !='' ">#{deleteID},</if>
|
||||||
<if test="aTFileName != null and aTFileName !='' ">#{aTFileName},</if>
|
<if test="aTFileName != null and aTFileName !='' ">#{aTFileName},</if>
|
||||||
<if test="aTExtName != null and aTExtName !='' ">#{aTExtName},</if>
|
<if test="aTExtName != null and aTExtName !='' ">#{aTExtName},</if>
|
||||||
<if test="aTFile != null and aTFile !='' ">#{aTFile,typeHandler=org.apache.ibatis.type.BlobTypeHandler},</if>
|
<if test="aTFile != null and aTFile !='' ">#{aTFile,typeHandler=org.apache.ibatis.type.BlobTypeHandler},</if>
|
||||||
'OER',
|
'OER',
|
||||||
0
|
0
|
||||||
|
|
||||||
</trim>
|
</trim>
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
|
@ -1,37 +1,37 @@
|
||||||
package com.hzya.frame.grpU8.nxproof.attachment.service;/*
|
package com.hzya.frame.grpU8.nxproof.attachment.service;/*
|
||||||
* @Description
|
* @Description
|
||||||
* @Author xiangerlin
|
* @Author xiangerlin
|
||||||
@Date 2022-10-26 11:19
|
@Date 2022-10-26 11:19
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity;
|
import com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface IAttachmentFileService {
|
public interface IAttachmentFileService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存附件
|
* 保存附件
|
||||||
* @param entity
|
* @param entity
|
||||||
*/
|
*/
|
||||||
void saveAttachment(AttachmentFileEntity entity);
|
void saveAttachment(AttachmentFileEntity entity);
|
||||||
|
|
||||||
List<AttachmentFileEntity> queryFile(AttachmentFileEntity entity)throws Exception;
|
List<AttachmentFileEntity> queryFile(AttachmentFileEntity entity)throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调用http接口查询单据附件
|
* 调用http接口查询单据附件
|
||||||
* @param billCode
|
* @param billCode
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
List<JSONObject> queryFileByCode(String billCode)throws Exception;
|
List<JSONObject> queryFileByCode(String billCode)throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 附件上传
|
* 附件上传
|
||||||
* @param fileList
|
* @param fileList
|
||||||
* @param mlid
|
* @param mlid
|
||||||
* @param kjnd
|
* @param kjnd
|
||||||
*/
|
*/
|
||||||
void uploadAttachment(List<JSONObject> fileList,String mlid,String kjnd);
|
void uploadAttachment(List<JSONObject> fileList,String mlid,String kjnd);
|
||||||
}
|
}
|
|
@ -1,229 +1,229 @@
|
||||||
package com.hzya.frame.grpU8.nxproof.attachment.service.impl;/*
|
package com.hzya.frame.grpU8.nxproof.attachment.service.impl;/*
|
||||||
* @Description
|
* @Description
|
||||||
* @Author xiangerlin
|
* @Author xiangerlin
|
||||||
@Date 2022-10-26 11:20
|
@Date 2022-10-26 11:20
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
import com.hzya.frame.grpU8.nxproof.attachment.dao.IAttachmentFileDao;
|
import com.hzya.frame.grpU8.nxproof.attachment.dao.IAttachmentFileDao;
|
||||||
import com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity;
|
import com.hzya.frame.grpU8.nxproof.attachment.entity.AttachmentFileEntity;
|
||||||
import com.hzya.frame.grpU8.nxproof.attachment.service.IAttachmentFileService;
|
import com.hzya.frame.grpU8.nxproof.attachment.service.IAttachmentFileService;
|
||||||
import com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity;
|
import com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity;
|
||||||
import com.hzya.frame.grpU8.nxproof.oerannex.service.IOerAnnexService;
|
import com.hzya.frame.grpU8.nxproof.oerannex.service.IOerAnnexService;
|
||||||
import com.hzya.frame.grpU8.nxproof.oerdjml.dto.FileInfoDTO;
|
import com.hzya.frame.grpU8.nxproof.oerdjml.dto.FileInfoDTO;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class AttachmentFileServiceImpl extends BaseService<AttachmentFileEntity,String> implements IAttachmentFileService {
|
public class AttachmentFileServiceImpl extends BaseService<AttachmentFileEntity,String> implements IAttachmentFileService {
|
||||||
|
|
||||||
Logger logger = LogManager.getLogger(getClass());
|
Logger logger = LogManager.getLogger(getClass());
|
||||||
|
|
||||||
protected IAttachmentFileDao attachmentFileDao;
|
protected IAttachmentFileDao attachmentFileDao;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public void setBillLogDao(IAttachmentFileDao dao) {
|
public void setBillLogDao(IAttachmentFileDao dao) {
|
||||||
this.attachmentFileDao = dao;
|
this.attachmentFileDao = dao;
|
||||||
this.dao=dao;
|
this.dao=dao;
|
||||||
}
|
}
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOerAnnexService oerAnnexService;
|
private IOerAnnexService oerAnnexService;
|
||||||
/**
|
/**
|
||||||
* 保存附件
|
* 保存附件
|
||||||
* @param entity
|
* @param entity
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void saveAttachment(AttachmentFileEntity entity) {
|
public void saveAttachment(AttachmentFileEntity entity) {
|
||||||
entity.setaTGuid("A1:"+IdUtil.fastUUID());
|
entity.setaTGuid("A1:"+IdUtil.fastUUID());
|
||||||
String date = DateUtil.format(new Date(), "yyyyMMdd HH:mm:ss");
|
String date = DateUtil.format(new Date(), "yyyyMMdd HH:mm:ss");
|
||||||
entity.setCreateDate(date);
|
entity.setCreateDate(date);
|
||||||
entity.setUpdateDate(date);
|
entity.setUpdateDate(date);
|
||||||
String fileName = entity.getaTFileName();
|
String fileName = entity.getaTFileName();
|
||||||
if (StrUtil.isNotEmpty(fileName)){
|
if (StrUtil.isNotEmpty(fileName)){
|
||||||
int index = fileName.lastIndexOf(".");
|
int index = fileName.lastIndexOf(".");
|
||||||
if (index > 0){
|
if (index > 0){
|
||||||
String suffix = fileName.substring(index);
|
String suffix = fileName.substring(index);
|
||||||
entity.setaTExtName(suffix);
|
entity.setaTExtName(suffix);
|
||||||
String prefix = fileName.substring(0,index);
|
String prefix = fileName.substring(0,index);
|
||||||
entity.setaTFileName(prefix);
|
entity.setaTFileName(prefix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
attachmentFileDao.save("AttachmentFileEntity_insert",entity);
|
attachmentFileDao.save("AttachmentFileEntity_insert",entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AttachmentFileEntity> queryFile(AttachmentFileEntity entity) throws Exception {
|
public List<AttachmentFileEntity> queryFile(AttachmentFileEntity entity) throws Exception {
|
||||||
List<AttachmentFileEntity> list = attachmentFileDao.query(entity);
|
List<AttachmentFileEntity> list = attachmentFileDao.query(entity);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调用http接口查询单据附件
|
* 调用http接口查询单据附件
|
||||||
*
|
*
|
||||||
* @param billCode 单据号
|
* @param billCode 单据号
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<JSONObject> queryFileByCode(String billCode) throws Exception {
|
public List<JSONObject> queryFileByCode(String billCode) throws Exception {
|
||||||
List<JSONObject> list = new ArrayList<>();
|
List<JSONObject> list = new ArrayList<>();
|
||||||
if (StrUtil.isNotEmpty(billCode)){
|
if (StrUtil.isNotEmpty(billCode)){
|
||||||
JSONObject params = new JSONObject();
|
JSONObject params = new JSONObject();
|
||||||
params.put("billNo",billCode);
|
params.put("billNo",billCode);
|
||||||
String res = HttpRequest.post("/grp/af/findFilesBB").body(params.toString()).execute().body();
|
String res = HttpRequest.post("/grp/af/findFilesBB").body(params.toString()).execute().body();
|
||||||
logger.info("根据单号:{},查询到到附件列表为:{}",billCode,res);
|
logger.info("根据单号:{},查询到到附件列表为:{}",billCode,res);
|
||||||
if (StrUtil.isNotEmpty(res)){
|
if (StrUtil.isNotEmpty(res)){
|
||||||
JSONObject resJson = JSONObject.parseObject(res);
|
JSONObject resJson = JSONObject.parseObject(res);
|
||||||
int pageCount = resJson.getIntValue("pageCount");
|
int pageCount = resJson.getIntValue("pageCount");
|
||||||
boolean success = resJson.getBoolean("success");
|
boolean success = resJson.getBoolean("success");
|
||||||
if (success){
|
if (success){
|
||||||
String dataStr = resJson.getString("data");
|
String dataStr = resJson.getString("data");
|
||||||
list = JSONObject.parseArray(dataStr,JSONObject.class);
|
list = JSONObject.parseArray(dataStr,JSONObject.class);
|
||||||
if (null != list && list.size() >0){
|
if (null != list && list.size() >0){
|
||||||
for (JSONObject jsonObject : list) {
|
for (JSONObject jsonObject : list) {
|
||||||
String fileName = jsonObject.getString("fileName");
|
String fileName = jsonObject.getString("fileName");
|
||||||
if (StrUtil.isNotEmpty(fileName)){
|
if (StrUtil.isNotEmpty(fileName)){
|
||||||
// 使用indexOf找到"."的位置
|
// 使用indexOf找到"."的位置
|
||||||
int dotIndex = fileName.lastIndexOf('.');
|
int dotIndex = fileName.lastIndexOf('.');
|
||||||
// 确保找到了".",防止indexOf返回-1的情况
|
// 确保找到了".",防止indexOf返回-1的情况
|
||||||
if (dotIndex != -1){
|
if (dotIndex != -1){
|
||||||
String ext_name = fileName.substring(dotIndex);
|
String ext_name = fileName.substring(dotIndex);
|
||||||
jsonObject.put("Ext",ext_name);
|
jsonObject.put("Ext",ext_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 附件上传
|
* 附件上传
|
||||||
*
|
*
|
||||||
* @param fileList
|
* @param fileList
|
||||||
* @param mlid
|
* @param mlid
|
||||||
* @param kjnd
|
* @param kjnd
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void uploadAttachment(List<JSONObject> fileList, String mlid, String kjnd) {
|
public void uploadAttachment(List<JSONObject> fileList, String mlid, String kjnd) {
|
||||||
if (CollectionUtils.isNotEmpty(fileList) && StrUtil.isNotEmpty(mlid) && StrUtil.isNotEmpty(kjnd)){
|
if (CollectionUtils.isNotEmpty(fileList) && StrUtil.isNotEmpty(mlid) && StrUtil.isNotEmpty(kjnd)){
|
||||||
try {
|
try {
|
||||||
//附件下载
|
//附件下载
|
||||||
List<FileInfoDTO> fileInfoList = fileDownload(fileList);
|
List<FileInfoDTO> fileInfoList = fileDownload(fileList);
|
||||||
//附件保存到grp库里
|
//附件保存到grp库里
|
||||||
if (CollectionUtils.isNotEmpty(fileInfoList)){
|
if (CollectionUtils.isNotEmpty(fileInfoList)){
|
||||||
//保存前先删一下历史附件
|
//保存前先删一下历史附件
|
||||||
OerAnnexEntity delete = new OerAnnexEntity();
|
OerAnnexEntity delete = new OerAnnexEntity();
|
||||||
//delete.setGsdm(Constant.CONFIGMAP.get("gsdm"));
|
//delete.setGsdm(Constant.CONFIGMAP.get("gsdm"));
|
||||||
delete.setKjnd(kjnd);
|
delete.setKjnd(kjnd);
|
||||||
delete.setMlid(mlid);
|
delete.setMlid(mlid);
|
||||||
//oerAnnexService.deleteAnnex(delete);
|
//oerAnnexService.deleteAnnex(delete);
|
||||||
int no = 1;
|
int no = 1;
|
||||||
for (FileInfoDTO fileInfo : fileInfoList) {
|
for (FileInfoDTO fileInfo : fileInfoList) {
|
||||||
try {
|
try {
|
||||||
AttachmentFileEntity fileEntity = new AttachmentFileEntity();
|
AttachmentFileEntity fileEntity = new AttachmentFileEntity();
|
||||||
String fileName = URLDecoder.decode(fileInfo.getFile_name(), "UTF-8");
|
String fileName = URLDecoder.decode(fileInfo.getFile_name(), "UTF-8");
|
||||||
fileEntity.setaTFileName(fileName);
|
fileEntity.setaTFileName(fileName);
|
||||||
fileEntity.setaTFile(fileInfo.getData());
|
fileEntity.setaTFile(fileInfo.getData());
|
||||||
this.saveAttachment(fileEntity);
|
this.saveAttachment(fileEntity);
|
||||||
//保存附件关系
|
//保存附件关系
|
||||||
OerAnnexEntity annexEntity = new OerAnnexEntity();
|
OerAnnexEntity annexEntity = new OerAnnexEntity();
|
||||||
annexEntity.setMlid(mlid);
|
annexEntity.setMlid(mlid);
|
||||||
annexEntity.setKjnd(kjnd);
|
annexEntity.setKjnd(kjnd);
|
||||||
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());
|
||||||
annexEntity.setXh(String.valueOf(no));
|
annexEntity.setXh(String.valueOf(no));
|
||||||
oerAnnexService.saveAnnex(annexEntity);
|
oerAnnexService.saveAnnex(annexEntity);
|
||||||
no++;
|
no++;
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
logger.error("保存附件到grp出错:{}",e);
|
logger.error("保存附件到grp出错:{}",e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
logger.error("保存附件到grp出错:{}",e);
|
logger.error("保存附件到grp出错:{}",e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<FileInfoDTO> fileDownload(List<JSONObject> fileList){
|
private List<FileInfoDTO> fileDownload(List<JSONObject> fileList){
|
||||||
String dir = "1";
|
String dir = "1";
|
||||||
List<FileInfoDTO> files = new ArrayList<>();
|
List<FileInfoDTO> files = new ArrayList<>();
|
||||||
//1、下载附件
|
//1、下载附件
|
||||||
for (JSONObject fileObj : fileList) {
|
for (JSONObject fileObj : fileList) {
|
||||||
try {
|
try {
|
||||||
FileInfoDTO fileInfoDTO = new FileInfoDTO();
|
FileInfoDTO fileInfoDTO = new FileInfoDTO();
|
||||||
String url = fileObj.getString("url");
|
String url = fileObj.getString("url");
|
||||||
String fileName = URLDecoder.decode(fileObj.getString("fileName"));
|
String fileName = URLDecoder.decode(fileObj.getString("fileName"));
|
||||||
File file = HttpUtil.downloadFileFromUrl(url, dir);
|
File file = HttpUtil.downloadFileFromUrl(url, dir);
|
||||||
if (null != file){
|
if (null != file){
|
||||||
String zipPath = dir + File.separator + fileName.split("\\.")[0] + ".zip";
|
String zipPath = dir + File.separator + fileName.split("\\.")[0] + ".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();
|
||||||
// 获取压缩文件的字节数组
|
// 获取压缩文件的字节数组
|
||||||
File zipFile = new File(zipPath);
|
File zipFile = new File(zipPath);
|
||||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream((int) zipFile.length());
|
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream((int) zipFile.length());
|
||||||
BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream(zipFile));
|
BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream(zipFile));
|
||||||
int buf_size = 1024;
|
int buf_size = 1024;
|
||||||
byte[] buffer = new byte[buf_size];
|
byte[] buffer = new byte[buf_size];
|
||||||
int len = 0;
|
int len = 0;
|
||||||
while (-1 != (len = bufferedInputStream.read(buffer, 0, buf_size))) {
|
while (-1 != (len = bufferedInputStream.read(buffer, 0, buf_size))) {
|
||||||
byteArrayOutputStream.write(buffer, 0, len);
|
byteArrayOutputStream.write(buffer, 0, len);
|
||||||
}
|
}
|
||||||
byte[] fileByte = byteArrayOutputStream.toByteArray();
|
byte[] fileByte = byteArrayOutputStream.toByteArray();
|
||||||
fileInfoDTO.setData(fileByte);
|
fileInfoDTO.setData(fileByte);
|
||||||
fileInfoDTO.setFile_size(fileObj.getString("size"));
|
fileInfoDTO.setFile_size(fileObj.getString("size"));
|
||||||
fileInfoDTO.setFile_name(fileName);
|
fileInfoDTO.setFile_name(fileName);
|
||||||
files.add(fileInfoDTO);
|
files.add(fileInfoDTO);
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
logger.error("上传附件出错:{}",e);
|
logger.error("上传附件出错:{}",e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
private void writeZipFile(File file,ZipOutputStream zos,String fileName){
|
private void writeZipFile(File file,ZipOutputStream zos,String fileName){
|
||||||
if (null != file && null !=zos){
|
if (null != file && null !=zos){
|
||||||
try {
|
try {
|
||||||
logger.info("=====压缩文件=====");
|
logger.info("=====压缩文件=====");
|
||||||
zos.putNextEntry(new ZipEntry(fileName));
|
zos.putNextEntry(new ZipEntry(fileName));
|
||||||
FileInputStream fos = new FileInputStream(file);
|
FileInputStream fos = new FileInputStream(file);
|
||||||
BufferedInputStream bis = new BufferedInputStream(fos);
|
BufferedInputStream bis = new BufferedInputStream(fos);
|
||||||
int len;
|
int len;
|
||||||
byte[] buf = new byte[1024];
|
byte[] buf = new byte[1024];
|
||||||
while ((len = bis.read(buf, 0, 1024)) != -1) {
|
while ((len = bis.read(buf, 0, 1024)) != -1) {
|
||||||
zos.write(buf, 0, len);
|
zos.write(buf, 0, len);
|
||||||
}
|
}
|
||||||
bis.close();
|
bis.close();
|
||||||
fos.close();
|
fos.close();
|
||||||
logger.info("=====压缩完成=====");
|
logger.info("=====压缩完成=====");
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("=====压缩文件出错=====");
|
logger.error("=====压缩文件出错=====");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,17 +1,17 @@
|
||||||
package com.hzya.frame.grpU8.nxproof.oerannex.dao;/*
|
package com.hzya.frame.grpU8.nxproof.oerannex.dao;/*
|
||||||
* @Description 附件关系表
|
* @Description 附件关系表
|
||||||
* @Author xiangerlin
|
* @Author xiangerlin
|
||||||
@Date 2022-10-26 10:04
|
@Date 2022-10-26 10:04
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
import com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity;
|
import com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity;
|
||||||
|
|
||||||
public interface IOerAnnexDao extends IBaseDao<OerAnnexEntity, String> {
|
public interface IOerAnnexDao extends IBaseDao<OerAnnexEntity, String> {
|
||||||
Integer deleteAnnex(OerAnnexEntity delete);
|
Integer deleteAnnex(OerAnnexEntity delete);
|
||||||
|
|
||||||
OerAnnexEntity queryMaxId(OerAnnexEntity entity);
|
OerAnnexEntity queryMaxId(OerAnnexEntity entity);
|
||||||
|
|
||||||
Integer saveData(OerAnnexEntity annexEntity);
|
Integer saveData(OerAnnexEntity annexEntity);
|
||||||
}
|
}
|
|
@ -1,40 +1,40 @@
|
||||||
package com.hzya.frame.grpU8.nxproof.oerannex.dao.impl;/*
|
package com.hzya.frame.grpU8.nxproof.oerannex.dao.impl;/*
|
||||||
* @Description 附件关系表
|
* @Description 附件关系表
|
||||||
* @Author xiangerlin
|
* @Author xiangerlin
|
||||||
@Date 2022-10-26 10:05
|
@Date 2022-10-26 10:05
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
import com.hzya.frame.grpU8.nxproof.oerannex.dao.IOerAnnexDao;
|
import com.hzya.frame.grpU8.nxproof.oerannex.dao.IOerAnnexDao;
|
||||||
import com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity;
|
import com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity;
|
||||||
import com.hzya.frame.grpU8.nxproof.oerdjml.entity.OerDjmlEntity;
|
import com.hzya.frame.grpU8.nxproof.oerdjml.entity.OerDjmlEntity;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public class OerAnnexDaoImpl extends MybatisGenericDao<OerAnnexEntity, String> implements IOerAnnexDao {
|
public class OerAnnexDaoImpl extends MybatisGenericDao<OerAnnexEntity, String> implements IOerAnnexDao {
|
||||||
@DS("#entity.dataSourceCode")
|
@DS("#entity.dataSourceCode")
|
||||||
@Override
|
@Override
|
||||||
public Integer deleteAnnex(OerAnnexEntity entity) {
|
public Integer deleteAnnex(OerAnnexEntity entity) {
|
||||||
Integer o = super.delete( "com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity.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,"com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity.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("com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity.OerAnnexEntity_insert",entity);
|
Integer o = super.insert("com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity.OerAnnexEntity_insert",entity);
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,149 +1,149 @@
|
||||||
package com.hzya.frame.grpU8.nxproof.oerannex.entity;
|
package com.hzya.frame.grpU8.nxproof.oerannex.entity;
|
||||||
|
|
||||||
import com.hzya.frame.web.entity.BaseEntity;
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @Description 附件关系表
|
* @Description 附件关系表
|
||||||
* @Author xiangerlin
|
* @Author xiangerlin
|
||||||
@Date 2022-10-26 8:44
|
@Date 2022-10-26 8:44
|
||||||
*/
|
*/
|
||||||
public class OerAnnexEntity extends BaseEntity {
|
public class OerAnnexEntity extends BaseEntity {
|
||||||
|
|
||||||
private String annexid; //主键id
|
private String annexid; //主键id
|
||||||
private String mlid;//报销单id
|
private String mlid;//报销单id
|
||||||
private String gsdm;//公司代码 默认001
|
private String gsdm;//公司代码 默认001
|
||||||
private String kjnd;//会计年度
|
private String kjnd;//会计年度
|
||||||
private String bnxid;// 不知道是什么 填0
|
private String bnxid;// 不知道是什么 填0
|
||||||
private String xh;//序号
|
private String xh;//序号
|
||||||
private String onlyid;// AT_AttachmentFile 表的主键ATGuid
|
private String onlyid;// AT_AttachmentFile 表的主键ATGuid
|
||||||
private String annexName;//附件名
|
private String annexName;//附件名
|
||||||
private Long annexSize;//附件大小
|
private Long annexSize;//附件大小
|
||||||
private String showSize;//附件大小显示值
|
private String showSize;//附件大小显示值
|
||||||
private String ole;// 不知道是什么,填空
|
private String ole;// 不知道是什么,填空
|
||||||
private String fjType;//附件类型, 数据库中只有 其他、其他其他(&Z)、合同3种类型
|
private String fjType;//附件类型, 数据库中只有 其他、其他其他(&Z)、合同3种类型
|
||||||
private String fpid;//不知道是什么 填空
|
private String fpid;//不知道是什么 填空
|
||||||
|
|
||||||
private String maxAnnexid;//最大id
|
private String maxAnnexid;//最大id
|
||||||
|
|
||||||
private String aTextName;//后缀名
|
private String aTextName;//后缀名
|
||||||
|
|
||||||
public String getAnnexid() {
|
public String getAnnexid() {
|
||||||
return annexid;
|
return annexid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAnnexid(String annexid) {
|
public void setAnnexid(String annexid) {
|
||||||
this.annexid = annexid;
|
this.annexid = annexid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMlid() {
|
public String getMlid() {
|
||||||
return mlid;
|
return mlid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMlid(String mlid) {
|
public void setMlid(String mlid) {
|
||||||
this.mlid = mlid;
|
this.mlid = mlid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getGsdm() {
|
public String getGsdm() {
|
||||||
return gsdm;
|
return gsdm;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGsdm(String gsdm) {
|
public void setGsdm(String gsdm) {
|
||||||
this.gsdm = gsdm;
|
this.gsdm = gsdm;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getKjnd() {
|
public String getKjnd() {
|
||||||
return kjnd;
|
return kjnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setKjnd(String kjnd) {
|
public void setKjnd(String kjnd) {
|
||||||
this.kjnd = kjnd;
|
this.kjnd = kjnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getBnxid() {
|
public String getBnxid() {
|
||||||
return bnxid;
|
return bnxid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBnxid(String bnxid) {
|
public void setBnxid(String bnxid) {
|
||||||
this.bnxid = bnxid;
|
this.bnxid = bnxid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getXh() {
|
public String getXh() {
|
||||||
return xh;
|
return xh;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setXh(String xh) {
|
public void setXh(String xh) {
|
||||||
this.xh = xh;
|
this.xh = xh;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOnlyid() {
|
public String getOnlyid() {
|
||||||
return onlyid;
|
return onlyid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOnlyid(String onlyid) {
|
public void setOnlyid(String onlyid) {
|
||||||
this.onlyid = onlyid;
|
this.onlyid = onlyid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAnnexName() {
|
public String getAnnexName() {
|
||||||
return annexName;
|
return annexName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAnnexName(String annexName) {
|
public void setAnnexName(String annexName) {
|
||||||
this.annexName = annexName;
|
this.annexName = annexName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getAnnexSize() {
|
public Long getAnnexSize() {
|
||||||
return annexSize;
|
return annexSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAnnexSize(Long annexSize) {
|
public void setAnnexSize(Long annexSize) {
|
||||||
this.annexSize = annexSize;
|
this.annexSize = annexSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getShowSize() {
|
public String getShowSize() {
|
||||||
return showSize;
|
return showSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setShowSize(String showSize) {
|
public void setShowSize(String showSize) {
|
||||||
this.showSize = showSize;
|
this.showSize = showSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOle() {
|
public String getOle() {
|
||||||
return ole;
|
return ole;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOle(String ole) {
|
public void setOle(String ole) {
|
||||||
this.ole = ole;
|
this.ole = ole;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFjType() {
|
public String getFjType() {
|
||||||
return fjType;
|
return fjType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFjType(String fjType) {
|
public void setFjType(String fjType) {
|
||||||
this.fjType = fjType;
|
this.fjType = fjType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFpid() {
|
public String getFpid() {
|
||||||
return fpid;
|
return fpid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFpid(String fpid) {
|
public void setFpid(String fpid) {
|
||||||
this.fpid = fpid;
|
this.fpid = fpid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMaxAnnexid() {
|
public String getMaxAnnexid() {
|
||||||
return maxAnnexid;
|
return maxAnnexid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMaxAnnexid(String maxAnnexid) {
|
public void setMaxAnnexid(String maxAnnexid) {
|
||||||
this.maxAnnexid = maxAnnexid;
|
this.maxAnnexid = maxAnnexid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getaTextName() {
|
public String getaTextName() {
|
||||||
return aTextName;
|
return aTextName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setaTextName(String aTextName) {
|
public void setaTextName(String aTextName) {
|
||||||
this.aTextName = aTextName;
|
this.aTextName = aTextName;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,125 +1,125 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity">
|
<mapper namespace="com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity">
|
||||||
<resultMap id="get-OerAnnexEntity-result" type="com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity">
|
<resultMap id="get-OerAnnexEntity-result" type="com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity">
|
||||||
<result property="annexid" column="annexid" />
|
<result property="annexid" column="annexid" />
|
||||||
<result property="mlid" column="mlid" />
|
<result property="mlid" column="mlid" />
|
||||||
<result property="gsdm" column="gsdm" />
|
<result property="gsdm" column="gsdm" />
|
||||||
<result property="kjnd" column="kjnd" />
|
<result property="kjnd" column="kjnd" />
|
||||||
<result property="bnxid" column="bnxid" />
|
<result property="bnxid" column="bnxid" />
|
||||||
<result property="xh" column="xh" />
|
<result property="xh" column="xh" />
|
||||||
<result property="onlyid" column="onlyid" />
|
<result property="onlyid" column="onlyid" />
|
||||||
<result property="annexName" column="annexName" />
|
<result property="annexName" column="annexName" />
|
||||||
<result property="annexSize" column="annexSize" />
|
<result property="annexSize" column="annexSize" />
|
||||||
<result property="showSize" column="showSize" />
|
<result property="showSize" column="showSize" />
|
||||||
<result property="ole" column="ole" />
|
<result property="ole" column="ole" />
|
||||||
<result property="fjType" column="fjType" />
|
<result property="fjType" column="fjType" />
|
||||||
<result property="fpid" column="fpid" />
|
<result property="fpid" column="fpid" />
|
||||||
<result property="maxAnnexid" column="maxAnnexid" />
|
<result property="maxAnnexid" column="maxAnnexid" />
|
||||||
<result property="aTextName" column="aTextName" />
|
<result property="aTextName" column="aTextName" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="OerAnnexEntity_Base_Column_List">
|
<sql id="OerAnnexEntity_Base_Column_List">
|
||||||
AnnexID,
|
AnnexID,
|
||||||
MLID,
|
MLID,
|
||||||
GSDM,
|
GSDM,
|
||||||
KJND,
|
KJND,
|
||||||
BNXID,
|
BNXID,
|
||||||
XH,
|
XH,
|
||||||
OnlyID,
|
OnlyID,
|
||||||
AnnexName,
|
AnnexName,
|
||||||
AnnexSize,
|
AnnexSize,
|
||||||
ShowSize,
|
ShowSize,
|
||||||
OLE,
|
OLE,
|
||||||
FJType,
|
FJType,
|
||||||
FPID
|
FPID
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 查询 采用==查询 -->
|
<!-- 查询 采用==查询 -->
|
||||||
<select id="OerAnnexEntity_list_base" resultMap="get-OerAnnexEntity-result" parameterType="com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity">
|
<select id="OerAnnexEntity_list_base" resultMap="get-OerAnnexEntity-result" parameterType="com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity">
|
||||||
select
|
select
|
||||||
<include refid="OerAnnexEntity_Base_Column_List" />
|
<include refid="OerAnnexEntity_Base_Column_List" />
|
||||||
FROM
|
FROM
|
||||||
OER_ANNEX
|
OER_ANNEX
|
||||||
<trim prefix="where" prefixOverrides="and">
|
<trim prefix="where" prefixOverrides="and">
|
||||||
<if test="mlid != null and mlid !='' "> MLID = #{mlid} </if>
|
<if test="mlid != null and mlid !='' "> MLID = #{mlid} </if>
|
||||||
<if test="kjnd != null and kjnd !='' ">and KJND = #{kjnd} </if>
|
<if test="kjnd != null and kjnd !='' ">and KJND = #{kjnd} </if>
|
||||||
<if test="gsdm != null and gsdm !='' ">and gsdm = #{gsdm} </if>
|
<if test="gsdm != null and gsdm !='' ">and gsdm = #{gsdm} </if>
|
||||||
</trim>
|
</trim>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<!-- 查询 采用==查询 联查附件表 -->
|
<!-- 查询 采用==查询 联查附件表 -->
|
||||||
<select id="OerAnnexEntity_list_base_join_attachment" resultMap="get-OerAnnexEntity-result" parameterType="com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity">
|
<select id="OerAnnexEntity_list_base_join_attachment" resultMap="get-OerAnnexEntity-result" parameterType="com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity">
|
||||||
select
|
select
|
||||||
OER_ANNEX.AnnexID,
|
OER_ANNEX.AnnexID,
|
||||||
OER_ANNEX.mlid,
|
OER_ANNEX.mlid,
|
||||||
OER_ANNEX.OnlyID,
|
OER_ANNEX.OnlyID,
|
||||||
OER_ANNEX.AnnexName,
|
OER_ANNEX.AnnexName,
|
||||||
OER_ANNEX.AnnexSize,
|
OER_ANNEX.AnnexSize,
|
||||||
AT_AttachmentFile.AtextName
|
AT_AttachmentFile.AtextName
|
||||||
FROM
|
FROM
|
||||||
OER_ANNEX
|
OER_ANNEX
|
||||||
LEFT JOIN AT_AttachmentFile ON AT_AttachmentFile.ATGuid = OER_ANNEX.OnlyID
|
LEFT JOIN AT_AttachmentFile ON AT_AttachmentFile.ATGuid = OER_ANNEX.OnlyID
|
||||||
<trim prefix="where" prefixOverrides="and">
|
<trim prefix="where" prefixOverrides="and">
|
||||||
<if test="mlid != null and mlid !='' "> MLID = #{mlid} </if>
|
<if test="mlid != null and mlid !='' "> MLID = #{mlid} </if>
|
||||||
<if test="kjnd != null and kjnd !='' ">and KJND = #{kjnd} </if>
|
<if test="kjnd != null and kjnd !='' ">and KJND = #{kjnd} </if>
|
||||||
<if test="gsdm != null and gsdm !='' ">and gsdm = #{gsdm} </if>
|
<if test="gsdm != null and gsdm !='' ">and gsdm = #{gsdm} </if>
|
||||||
</trim>
|
</trim>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--查询最大id-->
|
<!--查询最大id-->
|
||||||
<select id="OerAnnexEntity_max_id" resultMap="get-OerAnnexEntity-result" parameterType="com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity">
|
<select id="OerAnnexEntity_max_id" resultMap="get-OerAnnexEntity-result" parameterType="com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity">
|
||||||
SELECT
|
SELECT
|
||||||
MAX(AnnexID) as maxAnnexid
|
MAX(AnnexID) as maxAnnexid
|
||||||
FROM
|
FROM
|
||||||
OER_ANNEX
|
OER_ANNEX
|
||||||
<trim prefix="where" prefixOverrides="and">
|
<trim prefix="where" prefixOverrides="and">
|
||||||
<if test="kjnd != null and kjnd !='' "> KJND = #{kjnd} </if>
|
<if test="kjnd != null and kjnd !='' "> KJND = #{kjnd} </if>
|
||||||
<if test="gsdm != null and gsdm !='' ">and GSDM = #{gsdm} </if>
|
<if test="gsdm != null and gsdm !='' ">and GSDM = #{gsdm} </if>
|
||||||
</trim>
|
</trim>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="OerAnnexEntity_insert" parameterType="com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity">
|
<insert id="OerAnnexEntity_insert" parameterType="com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity">
|
||||||
insert into OER_ANNEX(
|
insert into OER_ANNEX(
|
||||||
<trim suffix="" suffixOverrides=",">
|
<trim suffix="" suffixOverrides=",">
|
||||||
<if test="annexid != null and annexid !='' ">AnnexID,</if>
|
<if test="annexid != null and annexid !='' ">AnnexID,</if>
|
||||||
<if test="mlid != null and mlid !='' "> MLID, </if>
|
<if test="mlid != null and mlid !='' "> MLID, </if>
|
||||||
<if test="gsdm != null and gsdm !='' "> gsdm, </if>
|
<if test="gsdm != null and gsdm !='' "> gsdm, </if>
|
||||||
<if test="kjnd != null and kjnd !='' "> kjnd ,</if>
|
<if test="kjnd != null and kjnd !='' "> kjnd ,</if>
|
||||||
<if test="xh != null and xh !='' ">xh,</if>
|
<if test="xh != null and xh !='' ">xh,</if>
|
||||||
<if test="onlyid != null and onlyid !='' ">onlyid,</if>
|
<if test="onlyid != null and onlyid !='' ">onlyid,</if>
|
||||||
<if test="annexName != null and annexName !='' ">annexName,</if>
|
<if test="annexName != null and annexName !='' ">annexName,</if>
|
||||||
<if test="annexSize != null and annexSize !='' ">annexSize,</if>
|
<if test="annexSize != null and annexSize !='' ">annexSize,</if>
|
||||||
<if test="showSize != null and showSize !='' ">showSize,</if>
|
<if test="showSize != null and showSize !='' ">showSize,</if>
|
||||||
<if test="fjType != null and fjType !='' ">fjType,</if>
|
<if test="fjType != null and fjType !='' ">fjType,</if>
|
||||||
bnxid,
|
bnxid,
|
||||||
ole,
|
ole,
|
||||||
fpid
|
fpid
|
||||||
</trim>
|
</trim>
|
||||||
)values
|
)values
|
||||||
(
|
(
|
||||||
<trim suffix="" suffixOverrides=",">
|
<trim suffix="" suffixOverrides=",">
|
||||||
<if test="annexid != null and annexid !='' ">#{annexid},</if>
|
<if test="annexid != null and annexid !='' ">#{annexid},</if>
|
||||||
<if test="mlid != null and mlid !='' "> #{mlid}, </if>
|
<if test="mlid != null and mlid !='' "> #{mlid}, </if>
|
||||||
<if test="gsdm != null and gsdm !='' "> #{gsdm}, </if>
|
<if test="gsdm != null and gsdm !='' "> #{gsdm}, </if>
|
||||||
<if test="kjnd != null and kjnd !='' "> #{kjnd} ,</if>
|
<if test="kjnd != null and kjnd !='' "> #{kjnd} ,</if>
|
||||||
<if test="xh != null and xh !='' ">#{xh},</if>
|
<if test="xh != null and xh !='' ">#{xh},</if>
|
||||||
<if test="onlyid != null and onlyid !='' ">#{onlyid},</if>
|
<if test="onlyid != null and onlyid !='' ">#{onlyid},</if>
|
||||||
<if test="annexName != null and annexName !='' ">#{annexName},</if>
|
<if test="annexName != null and annexName !='' ">#{annexName},</if>
|
||||||
<if test="annexSize != null and annexSize !='' ">#{annexSize},</if>
|
<if test="annexSize != null and annexSize !='' ">#{annexSize},</if>
|
||||||
<if test="showSize != null and showSize !='' ">#{showSize},</if>
|
<if test="showSize != null and showSize !='' ">#{showSize},</if>
|
||||||
<if test="fjType != null and fjType !='' ">#{fjType},</if>
|
<if test="fjType != null and fjType !='' ">#{fjType},</if>
|
||||||
0,
|
0,
|
||||||
null,
|
null,
|
||||||
''
|
''
|
||||||
</trim>
|
</trim>
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<!-- 删除附件 -->
|
<!-- 删除附件 -->
|
||||||
<delete id="OerAnnexEntity_delete" parameterType="com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity">
|
<delete id="OerAnnexEntity_delete" parameterType="com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity">
|
||||||
delete from OER_ANNEX where mlid = #{mlid} and kjnd = #{kjnd} and gsdm = #{gsdm}
|
delete from OER_ANNEX where mlid = #{mlid} and kjnd = #{kjnd} and gsdm = #{gsdm}
|
||||||
</delete>
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
|
@ -1,132 +1,132 @@
|
||||||
package com.hzya.frame.grpU8.nxproof.oerannex.service.impl;/*
|
package com.hzya.frame.grpU8.nxproof.oerannex.service.impl;/*
|
||||||
* @Description 附件关系表
|
* @Description 附件关系表
|
||||||
* @Author xiangerlin
|
* @Author xiangerlin
|
||||||
@Date 2022-10-26 10:07
|
@Date 2022-10-26 10:07
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
import com.hzya.frame.grpU8.nxproof.oerannex.dao.IOerAnnexDao;
|
import com.hzya.frame.grpU8.nxproof.oerannex.dao.IOerAnnexDao;
|
||||||
import com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity;
|
import com.hzya.frame.grpU8.nxproof.oerannex.entity.OerAnnexEntity;
|
||||||
import com.hzya.frame.grpU8.nxproof.oerannex.service.IOerAnnexService;
|
import com.hzya.frame.grpU8.nxproof.oerannex.service.IOerAnnexService;
|
||||||
import com.hzya.frame.web.exception.BaseSystemException;
|
import com.hzya.frame.web.exception.BaseSystemException;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class OerAnnexServiceImpl extends BaseService<OerAnnexEntity,String> implements IOerAnnexService {
|
public class OerAnnexServiceImpl extends BaseService<OerAnnexEntity,String> implements IOerAnnexService {
|
||||||
|
|
||||||
Logger logger = LogManager.getLogger(getClass());
|
Logger logger = LogManager.getLogger(getClass());
|
||||||
|
|
||||||
protected IOerAnnexDao oerAnnexDao;
|
protected IOerAnnexDao oerAnnexDao;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public void setBillLogDao(IOerAnnexDao dao) {
|
public void setBillLogDao(IOerAnnexDao dao) {
|
||||||
this.oerAnnexDao = dao;
|
this.oerAnnexDao = dao;
|
||||||
this.dao=dao;
|
this.dao=dao;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询附件关系
|
* 查询附件关系
|
||||||
*
|
*
|
||||||
* @param entity
|
* @param entity
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<OerAnnexEntity> queryAnnex(OerAnnexEntity entity) throws Exception {
|
public List<OerAnnexEntity> queryAnnex(OerAnnexEntity entity) throws Exception {
|
||||||
List<OerAnnexEntity> annexList = oerAnnexDao.query(entity);
|
List<OerAnnexEntity> annexList = oerAnnexDao.query(entity);
|
||||||
return annexList;
|
return annexList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除附件关系
|
* 删除附件关系
|
||||||
*
|
*
|
||||||
* @param entity
|
* @param entity
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void deleteAnnex(OerAnnexEntity entity){
|
public void deleteAnnex(OerAnnexEntity entity){
|
||||||
if (null != entity && StrUtil.isNotEmpty(entity.getMlid()) && StrUtil.isNotEmpty(entity.getKjnd())){
|
if (null != entity && StrUtil.isNotEmpty(entity.getMlid()) && StrUtil.isNotEmpty(entity.getKjnd())){
|
||||||
oerAnnexDao.delete("OerAnnexEntity_delete",entity);
|
oerAnnexDao.delete("OerAnnexEntity_delete",entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询最大id
|
* 查询最大id
|
||||||
* @param entity
|
* @param entity
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String queryMaxId(OerAnnexEntity entity) throws Exception {
|
public String queryMaxId(OerAnnexEntity entity) throws Exception {
|
||||||
if (null == entity){
|
if (null == entity){
|
||||||
entity = new OerAnnexEntity();
|
entity = new OerAnnexEntity();
|
||||||
}
|
}
|
||||||
if (StrUtil.isEmpty(entity.getKjnd())){
|
if (StrUtil.isEmpty(entity.getKjnd())){
|
||||||
entity.setKjnd(String.valueOf(DateUtil.year(new Date())));
|
entity.setKjnd(String.valueOf(DateUtil.year(new Date())));
|
||||||
}
|
}
|
||||||
OerAnnexEntity max = oerAnnexDao.query(entity,"OerAnnexEntity_max_id");
|
OerAnnexEntity max = oerAnnexDao.query(entity,"OerAnnexEntity_max_id");
|
||||||
if (null != max){
|
if (null != max){
|
||||||
Long max_value = Long.valueOf(max.getMaxAnnexid());
|
Long max_value = Long.valueOf(max.getMaxAnnexid());
|
||||||
return String.valueOf(max_value+1);
|
return String.valueOf(max_value+1);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存附件关系
|
* 保存附件关系
|
||||||
* @param entity
|
* @param entity
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void saveAnnex(OerAnnexEntity entity) throws Exception {
|
public void saveAnnex(OerAnnexEntity entity) throws Exception {
|
||||||
if (null == entity){
|
if (null == entity){
|
||||||
throw new BaseSystemException("参数不能为空");
|
throw new BaseSystemException("参数不能为空");
|
||||||
}
|
}
|
||||||
//entity.setAcc_name(Constant.CONFIGMAP.get("file_acc_name"));
|
//entity.setAcc_name(Constant.CONFIGMAP.get("file_acc_name"));
|
||||||
entity.setAnnexid(queryMaxId(entity));
|
entity.setAnnexid(queryMaxId(entity));
|
||||||
if (null != entity.getAnnexSize()){
|
if (null != entity.getAnnexSize()){
|
||||||
int fileSize = entity.getAnnexSize().intValue();
|
int fileSize = entity.getAnnexSize().intValue();
|
||||||
String showSize = "";
|
String showSize = "";
|
||||||
if (fileSize < 1000) {
|
if (fileSize < 1000) {
|
||||||
showSize = fileSize + "b";
|
showSize = fileSize + "b";
|
||||||
} else if (1000 < fileSize && fileSize < 1000000) {
|
} else if (1000 < fileSize && fileSize < 1000000) {
|
||||||
showSize = (fileSize / 1000) + " KB";
|
showSize = (fileSize / 1000) + " KB";
|
||||||
} else {
|
} else {
|
||||||
showSize = (fileSize / 1000000) + " MB";
|
showSize = (fileSize / 1000000) + " MB";
|
||||||
}
|
}
|
||||||
entity.setShowSize(showSize);
|
entity.setShowSize(showSize);
|
||||||
}
|
}
|
||||||
/* if (!entity.getAnnexName().contains("合同")) {
|
/* if (!entity.getAnnexName().contains("合同")) {
|
||||||
entity.setFjType("其它");
|
entity.setFjType("其它");
|
||||||
}else {
|
}else {
|
||||||
entity.setFjType("合同");
|
entity.setFjType("合同");
|
||||||
}*/
|
}*/
|
||||||
entity.setFjType("其它");
|
entity.setFjType("其它");
|
||||||
oerAnnexDao.save(entity);
|
oerAnnexDao.save(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询附件关系,联查附件对象表
|
* 查询附件关系,联查附件对象表
|
||||||
*
|
*
|
||||||
* @param mlid
|
* @param mlid
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<OerAnnexEntity> queryAnnexAndFile(String mlid) throws Exception {
|
public List<OerAnnexEntity> queryAnnexAndFile(String mlid) throws Exception {
|
||||||
OerAnnexEntity entity = new OerAnnexEntity();
|
OerAnnexEntity entity = new OerAnnexEntity();
|
||||||
entity.setMlid(mlid);
|
entity.setMlid(mlid);
|
||||||
List<OerAnnexEntity> oerAnnexList = oerAnnexDao.queryList(entity, "OerAnnexEntity_list_base_join_attachment");
|
List<OerAnnexEntity> oerAnnexList = oerAnnexDao.queryList(entity, "OerAnnexEntity_list_base_join_attachment");
|
||||||
return oerAnnexList;
|
return oerAnnexList;
|
||||||
}
|
}
|
||||||
}
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue