diff --git a/service/src/main/java/com/hzya/frame/sys/dataSource/entity/SysDataSourceEntity.xml b/service/src/main/java/com/hzya/frame/sys/dataSource/entity/SysDataSourceEntity.xml index a8c4dc90..54bbc98d 100644 --- a/service/src/main/java/com/hzya/frame/sys/dataSource/entity/SysDataSourceEntity.xml +++ b/service/src/main/java/com/hzya/frame/sys/dataSource/entity/SysDataSourceEntity.xml @@ -189,7 +189,7 @@ login_name as loginName, password as password, service_name as serviceName, - use_state as useState + use_state as useState, data_state as dataState from sys_data_source @@ -235,7 +235,7 @@ login_name as loginName, password as password, service_name as serviceName, - use_state as useState + use_state as useState, data_state as dataState from sys_data_source diff --git a/service/src/main/java/com/hzya/frame/sys/dataSource/service/ISysDataSourceService.java b/service/src/main/java/com/hzya/frame/sys/dataSource/service/ISysDataSourceService.java index 7ed1bc6d..841841a5 100644 --- a/service/src/main/java/com/hzya/frame/sys/dataSource/service/ISysDataSourceService.java +++ b/service/src/main/java/com/hzya/frame/sys/dataSource/service/ISysDataSourceService.java @@ -63,5 +63,12 @@ public interface ISysDataSourceService extends IBaseService { + + SysArchivesContrastEntity getEntity(SysArchivesContrastEntity entity); +} + diff --git a/service/src/main/java/com/hzya/frame/sysnew/archivesContrast/dao/impl/SysArchivesContrastDaoImpl.java b/service/src/main/java/com/hzya/frame/sysnew/archivesContrast/dao/impl/SysArchivesContrastDaoImpl.java new file mode 100644 index 00000000..3321e62f --- /dev/null +++ b/service/src/main/java/com/hzya/frame/sysnew/archivesContrast/dao/impl/SysArchivesContrastDaoImpl.java @@ -0,0 +1,22 @@ +package com.hzya.frame.sysnew.archivesContrast.dao.impl; + +import com.hzya.frame.sysnew.archivesContrast.entity.SysArchivesContrastEntity; +import com.hzya.frame.sysnew.archivesContrast.dao.ISysArchivesContrastDao; +import org.springframework.stereotype.Repository; +import com.hzya.frame.basedao.dao.MybatisGenericDao; +/** + * 档案对照表数据库访问层 + * + * @author makejava + * @since 2024-05-27 16:21:36 + */ +@Repository(value = "SysArchivesContrastDaoImpl") +public class SysArchivesContrastDaoImpl extends MybatisGenericDao implements ISysArchivesContrastDao{ + + @Override + public SysArchivesContrastEntity getEntity(SysArchivesContrastEntity entity) { + SysArchivesContrastEntity o = (SysArchivesContrastEntity) super.selectOne(getSqlIdPrifx() + "getEntity", entity); + return o; + } +} + diff --git a/service/src/main/java/com/hzya/frame/sysnew/archivesContrast/entity/SysArchivesContrastEntity.java b/service/src/main/java/com/hzya/frame/sysnew/archivesContrast/entity/SysArchivesContrastEntity.java new file mode 100644 index 00000000..e46c9c16 --- /dev/null +++ b/service/src/main/java/com/hzya/frame/sysnew/archivesContrast/entity/SysArchivesContrastEntity.java @@ -0,0 +1,245 @@ +package com.hzya.frame.sysnew.archivesContrast.entity; + +import java.util.Date; +import com.hzya.frame.web.entity.BaseEntity; +/** + * 档案对照实体类 + * + * @author makejava + * @since 2024-05-27 16:21:36 + */ +public class SysArchivesContrastEntity extends BaseEntity { + + /** 左应用id */ + private String leftAppId; + /** 左应用编码 */ + private String leftAppCode; + /** 左应用名称 */ + private String leftAppName; + /** 左接口ID */ + private String leftApiId; + /** 左id */ + private String leftId; + /** 左编码 */ + private String leftCode; + /** 左名称 */ + private String leftName; + /** 左手机号 */ + private String leftTel; + /** 左身份证号 */ + private String leftIc; + /** 右应用id */ + private String rightAppId; + /** 右应用编码 */ + private String rightAppCode; + /** 右应用名称 */ + private String rightAppName; + /** 右接口ID */ + private String rightApiId; + /** 右id */ + private String rightId; + /** 右编码 */ + private String rightCode; + /** 右名称 */ + private String rightName; + /** 右手机号 */ + private String rightTel; + /** 右身份证号 */ + private String rightIc; + /** 公司id */ + private String companyId; + /** 左公司 */ + private String leftOrg; + /** 右公司 */ + private String rightOrg; + /* 类型 + 1、sys_personnel_control 人员对照 + 2、sys_org_control 部门档案 + 3、sys_stock_control 存货对照 + 4、sys_merchant_control 客商辅助核算 + 5、sys_taxrate_control 税率 + 6、sys_project_control 项目辅助核算 + 7、sys_bank_control 银行类别 + 8、sys_bankaccount_control 银行账户 + 9、sys_assets_control 资产类别 + */ + private String type; + + + public String getLeftAppId() { + return leftAppId; + } + + public void setLeftAppId(String leftAppId) { + this.leftAppId = leftAppId; + } + + public String getLeftAppCode() { + return leftAppCode; + } + + public void setLeftAppCode(String leftAppCode) { + this.leftAppCode = leftAppCode; + } + + public String getLeftAppName() { + return leftAppName; + } + + public void setLeftAppName(String leftAppName) { + this.leftAppName = leftAppName; + } + + public String getLeftApiId() { + return leftApiId; + } + + public void setLeftApiId(String leftApiId) { + this.leftApiId = leftApiId; + } + + public String getLeftId() { + return leftId; + } + + public void setLeftId(String leftId) { + this.leftId = leftId; + } + + public String getLeftCode() { + return leftCode; + } + + public void setLeftCode(String leftCode) { + this.leftCode = leftCode; + } + + public String getLeftName() { + return leftName; + } + + public void setLeftName(String leftName) { + this.leftName = leftName; + } + + public String getLeftTel() { + return leftTel; + } + + public void setLeftTel(String leftTel) { + this.leftTel = leftTel; + } + + public String getLeftIc() { + return leftIc; + } + + public void setLeftIc(String leftIc) { + this.leftIc = leftIc; + } + + public String getRightAppId() { + return rightAppId; + } + + public void setRightAppId(String rightAppId) { + this.rightAppId = rightAppId; + } + + public String getRightAppCode() { + return rightAppCode; + } + + public void setRightAppCode(String rightAppCode) { + this.rightAppCode = rightAppCode; + } + + public String getRightAppName() { + return rightAppName; + } + + public void setRightAppName(String rightAppName) { + this.rightAppName = rightAppName; + } + + public String getRightApiId() { + return rightApiId; + } + + public void setRightApiId(String rightApiId) { + this.rightApiId = rightApiId; + } + + public String getRightId() { + return rightId; + } + + public void setRightId(String rightId) { + this.rightId = rightId; + } + + public String getRightCode() { + return rightCode; + } + + public void setRightCode(String rightCode) { + this.rightCode = rightCode; + } + + public String getRightName() { + return rightName; + } + + public void setRightName(String rightName) { + this.rightName = rightName; + } + + public String getRightTel() { + return rightTel; + } + + public void setRightTel(String rightTel) { + this.rightTel = rightTel; + } + + public String getRightIc() { + return rightIc; + } + + public void setRightIc(String rightIc) { + this.rightIc = rightIc; + } + + public String getCompanyId() { + return companyId; + } + + public void setCompanyId(String companyId) { + this.companyId = companyId; + } + + public String getLeftOrg() { + return leftOrg; + } + + public void setLeftOrg(String leftOrg) { + this.leftOrg = leftOrg; + } + + public String getRightOrg() { + return rightOrg; + } + + public void setRightOrg(String rightOrg) { + this.rightOrg = rightOrg; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } +} + diff --git a/service/src/main/java/com/hzya/frame/sysnew/archivesContrast/entity/SysArchivesContrastEntity.xml b/service/src/main/java/com/hzya/frame/sysnew/archivesContrast/entity/SysArchivesContrastEntity.xml new file mode 100644 index 00000000..3269e957 --- /dev/null +++ b/service/src/main/java/com/hzya/frame/sysnew/archivesContrast/entity/SysArchivesContrastEntity.xml @@ -0,0 +1,634 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + ,left_app_id + ,left_app_code + ,left_app_name + ,left_api_id + ,left_id + ,left_code + ,left_name + ,left_tel + ,left_ic + ,right_app_id + ,right_app_code + ,right_app_name + ,right_api_id + ,right_id + ,right_code + ,right_name + ,right_tel + ,right_ic + ,sorts + ,create_user_id + ,create_time + ,modify_user_id + ,modify_time + ,sts + ,org_id + ,company_id + ,left_org + ,right_org + + + + id + ,left_app_id + ,left_app_code + ,left_app_name + ,left_api_id + ,left_id + ,left_code + ,left_name + ,right_app_id + ,right_app_code + ,right_app_name + ,right_api_id + ,right_id + ,right_code + ,right_name + ,sorts + ,create_user_id + ,create_time + ,modify_user_id + ,modify_time + ,sts + ,org_id + ,company_id + ,left_org + ,right_org + + + + + + + + + + + + + + + + + + + + + insert into + sys_personnel_control + sys_org_control + sys_stock_control + sys_merchant_control + sys_taxrate_control + sys_project_control + sys_bank_control + sys_bankaccount_control + sys_assets_control + +( + + id , + left_app_id , + left_app_code , + left_app_name , + left_api_id , + left_id , + left_code , + left_name , + left_tel , + left_ic , + right_app_id , + right_app_code , + right_app_name , + right_api_id , + right_id , + right_code , + right_name , + right_tel , + right_ic , + sorts , + create_user_id , + create_time , + modify_user_id , + modify_time , + sts , + org_id , + company_id , + left_org , + right_org , + sts, + + )values( + + #{id} , + #{leftAppId} , + #{leftAppCode} , + #{leftAppName} , + #{leftApiId} , + #{leftId} , + #{leftCode} , + #{leftName} , + #{leftTel} , + #{leftIc} , + #{rightAppId} , + #{rightAppCode} , + #{rightAppName} , + #{rightApiId} , + #{rightId} , + #{rightCode} , + #{rightName} , + #{rightTel} , + #{rightIc} , + #{sorts} , + #{create_user_id} , + #{create_time} , + #{modify_user_id} , + #{modify_time} , + #{sts} , + #{org_id} , + #{companyId} , + #{leftOrg} , + #{rightOrg} , + 'Y', + + ) + + + + insert into + sys_personnel_control + sys_org_control + sys_stock_control + sys_merchant_control + sys_taxrate_control + sys_project_control + sys_bank_control + sys_bankaccount_control + sys_assets_control + (left_app_id, left_app_code, left_app_name, left_api_id, left_id, left_code, left_name, left_tel, left_ic, right_app_id, right_app_code, right_app_name, right_api_id, right_id, right_code, right_name, right_tel, right_ic, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, left_org, right_org, sts) + values + + (#{entity.leftAppId},#{entity.leftAppCode},#{entity.leftAppName},#{entity.leftApiId},#{entity.leftId},#{entity.leftCode},#{entity.leftName},#{entity.leftTel},#{entity.leftIc},#{entity.rightAppId},#{entity.rightAppCode},#{entity.rightAppName},#{entity.rightApiId},#{entity.rightId},#{entity.rightCode},#{entity.rightName},#{entity.rightTel},#{entity.rightIc},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.leftOrg},#{entity.rightOrg}, 'Y') + + + + + insert into + sys_personnel_control + sys_org_control + sys_stock_control + sys_merchant_control + sys_taxrate_control + sys_project_control + sys_bank_control + sys_bankaccount_control + sys_assets_control + (left_app_id, left_app_code, left_app_name, left_api_id, left_id, left_code, left_name, left_tel, left_ic, right_app_id, right_app_code, right_app_name, right_api_id, right_id, right_code, right_name, right_tel, right_ic, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, left_org, right_org) + values + + (#{entity.leftAppId},#{entity.leftAppCode},#{entity.leftAppName},#{entity.leftApiId},#{entity.leftId},#{entity.leftCode},#{entity.leftName},#{entity.leftTel},#{entity.leftIc},#{entity.rightAppId},#{entity.rightAppCode},#{entity.rightAppName},#{entity.rightApiId},#{entity.rightId},#{entity.rightCode},#{entity.rightName},#{entity.rightTel},#{entity.rightIc},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.leftOrg},#{entity.rightOrg}) + + on duplicate key update + left_app_id = values(left_app_id), + left_app_code = values(left_app_code), + left_app_name = values(left_app_name), + left_api_id = values(left_api_id), + left_id = values(left_id), + left_code = values(left_code), + left_name = values(left_name), + left_tel = values(left_tel), + left_ic = values(left_ic), + right_app_id = values(right_app_id), + right_app_code = values(right_app_code), + right_app_name = values(right_app_name), + right_api_id = values(right_api_id), + right_id = values(right_id), + right_code = values(right_code), + right_name = values(right_name), + right_tel = values(right_tel), + right_ic = values(right_ic), + create_user_id = values(create_user_id), + create_time = values(create_time), + modify_user_id = values(modify_user_id), + modify_time = values(modify_time), + sts = values(sts), + org_id = values(org_id), + company_id = values(company_id), + left_org = values(left_org), + right_org = values(right_org) + + +update + sys_personnel_control + sys_org_control + sys_stock_control + sys_merchant_control + sys_taxrate_control + sys_project_control + sys_bank_control + sys_bankaccount_control + sys_assets_control + set + + left_app_id = #{leftAppId}, + left_app_code = #{leftAppCode}, + left_app_name = #{leftAppName}, + left_api_id = #{leftApiId}, + left_id = #{leftId}, + left_code = #{leftCode}, + left_name = #{leftName}, + left_tel = #{leftTel}, + left_ic = #{leftIc}, + right_app_id = #{rightAppId}, + right_app_code = #{rightAppCode}, + right_app_name = #{rightAppName}, + right_api_id = #{rightApiId}, + right_id = #{rightId}, + right_code = #{rightCode}, + right_name = #{rightName}, + right_tel = #{rightTel}, + right_ic = #{rightIc}, + create_user_id = #{create_user_id}, + create_time = #{create_time}, + modify_user_id = #{modify_user_id}, + modify_time = #{modify_time}, + sts = #{sts}, + org_id = #{org_id}, + company_id = #{companyId}, + left_org = #{leftOrg}, + right_org = #{rightOrg}, + +where id = #{id} + + + +update + sys_personnel_control + sys_org_control + sys_stock_control + sys_merchant_control + sys_taxrate_control + sys_project_control + sys_bank_control + sys_bankaccount_control + sys_assets_control + set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} +where id = #{id} + + + +update + sys_personnel_control + sys_org_control + sys_stock_control + sys_merchant_control + sys_taxrate_control + sys_project_control + sys_bank_control + sys_bankaccount_control + sys_assets_control + set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} + + and id = #{id} + and left_app_id = #{leftAppId} + and left_app_code = #{leftAppCode} + and left_app_name = #{leftAppName} + and left_api_id = #{leftApiId} + and left_id = #{leftId} + and left_code = #{leftCode} + and left_name = #{leftName} + and left_tel = #{leftTel} + and left_ic = #{leftIc} + and right_app_id = #{rightAppId} + and right_app_code = #{rightAppCode} + and right_app_name = #{rightAppName} + and right_api_id = #{rightApiId} + and right_id = #{rightId} + and right_code = #{rightCode} + and right_name = #{rightName} + and right_tel = #{rightTel} + and right_ic = #{rightIc} + and sorts = #{sorts} + and sts = #{sts} + and company_id = #{companyId} + and left_org = #{leftOrg} + and right_org = #{rightOrg} + and sts='Y' + + + + + delete from + sys_personnel_control + sys_org_control + sys_stock_control + sys_merchant_control + sys_taxrate_control + sys_project_control + sys_bank_control + sys_bankaccount_control + sys_assets_control + where id = #{id} + + + + diff --git a/service/src/main/java/com/hzya/frame/sysnew/archivesContrast/service/ISysArchivesContrastService.java b/service/src/main/java/com/hzya/frame/sysnew/archivesContrast/service/ISysArchivesContrastService.java new file mode 100644 index 00000000..2838b954 --- /dev/null +++ b/service/src/main/java/com/hzya/frame/sysnew/archivesContrast/service/ISysArchivesContrastService.java @@ -0,0 +1,70 @@ +package com.hzya.frame.sysnew.archivesContrast.service; + +import com.alibaba.fastjson.JSONObject; +import com.hzya.frame.sysnew.archivesContrast.entity.SysArchivesContrastEntity; +import com.hzya.frame.basedao.service.IBaseService; +import com.hzya.frame.web.entity.JsonResultEntity; + +/** + * 档案对照服务接口 + * + * @author makejava + * @since 2024-05-27 16:21:36 + */ +public interface ISysArchivesContrastService extends IBaseService{ + + + /** + * @Author lvleigang + * @Description 查询档案列表分页 + * @Date 4:25 下午 2024/5/27 + * @param jsonObject + * @return com.hzya.frame.web.entity.JsonResultEntity + **/ + JsonResultEntity queryEntityPage(JSONObject jsonObject); + + /** + * @Author lvleigang + * @Description 查询档案列表 + * @Date 4:25 下午 2024/5/27 + * @param jsonObject + * @return com.hzya.frame.web.entity.JsonResultEntity + **/ + JsonResultEntity queryEntity(JSONObject jsonObject); + + /** + * @Author lvleigang + * @Description 保存档案 + * @Date 4:25 下午 2024/5/27 + * @param jsonObject + * @return com.hzya.frame.web.entity.JsonResultEntity + **/ + JsonResultEntity saveEntity(JSONObject jsonObject); + + /** + * @Author lvleigang + * @Description 获取档案 + * @Date 4:25 下午 2024/5/27 + * @param jsonObject + * @return com.hzya.frame.web.entity.JsonResultEntity + **/ + JsonResultEntity getEntity(JSONObject jsonObject); + + /** + * @Author lvleigang + * @Description 修改档案 + * @Date 4:25 下午 2024/5/27 + * @param jsonObject + * @return com.hzya.frame.web.entity.JsonResultEntity + **/ + JsonResultEntity updateEntity(JSONObject jsonObject); + + /** + * @Author lvleigang + * @Description 删除档案 + * @Date 4:25 下午 2024/5/27 + * @param jsonObject + * @return com.hzya.frame.web.entity.JsonResultEntity + **/ + JsonResultEntity deleteEntity(JSONObject jsonObject); +} diff --git a/service/src/main/java/com/hzya/frame/sysnew/archivesContrast/service/impl/SysArchivesContrastServiceImpl.java b/service/src/main/java/com/hzya/frame/sysnew/archivesContrast/service/impl/SysArchivesContrastServiceImpl.java new file mode 100644 index 00000000..94687263 --- /dev/null +++ b/service/src/main/java/com/hzya/frame/sysnew/archivesContrast/service/impl/SysArchivesContrastServiceImpl.java @@ -0,0 +1,189 @@ +package com.hzya.frame.sysnew.archivesContrast.service.impl; + +import com.alibaba.fastjson.JSONObject; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.hzya.frame.sysnew.archivesContrast.entity.SysArchivesContrastEntity; +import com.hzya.frame.sysnew.archivesContrast.dao.ISysArchivesContrastDao; +import com.hzya.frame.sysnew.archivesContrast.service.ISysArchivesContrastService; +import com.hzya.frame.sysnew.user.entity.SysUserEntity; +import com.hzya.frame.sysnew.userCompany.entity.SysUserCompanyEntity; +import com.hzya.frame.sysnew.userRoles.entity.SysUserRolesEntity; +import com.hzya.frame.util.AESUtil; +import com.hzya.frame.web.entity.BaseResult; +import com.hzya.frame.web.entity.JsonResultEntity; +import org.springframework.stereotype.Service; +import org.springframework.beans.factory.annotation.Autowired; +import javax.annotation.Resource; +import com.hzya.frame.basedao.service.impl.BaseService; + +import java.util.List; + +/** + * 档案对照表服务实现类 + * + * @author makejava + * @since 2024-05-27 16:21:36 + */ +@Service(value = "sysArchivesContrastService") +public class SysArchivesContrastServiceImpl extends BaseService implements ISysArchivesContrastService { + + private ISysArchivesContrastDao sysArchivesContrastDao; + + @Autowired + public void setSysArchivesContrastDao(ISysArchivesContrastDao dao) { + this.sysArchivesContrastDao = dao; + this.dao = dao; + } + + /** + * @param jsonObject + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 查询档案列表分页 + * @Date 4:25 下午 2024/5/27 + **/ + @Override + public JsonResultEntity queryEntityPage(JSONObject jsonObject) { + SysArchivesContrastEntity entity = getData("jsonStr", jsonObject, SysArchivesContrastEntity.class); + //判断分页 + if (entity == null || entity.getPageNum() == null || entity.getPageSize() == null) { + return BaseResult.getFailureMessageEntity("分页查询参数不存在"); + } + if(entity.getType() == null || "".equals(entity.getType()) ){ + return BaseResult.getFailureMessageEntity("系统错误"); + } + PageHelper.startPage(entity.getPageNum(), entity.getPageSize()); + List list = sysArchivesContrastDao.queryByLike(entity); + PageInfo pageInfo = new PageInfo(list); + return BaseResult.getSuccessMessageEntity("查询数据成功", pageInfo); + } + + /** + * @param jsonObject + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 查询档案列表 + * @Date 4:25 下午 2024/5/27 + **/ + @Override + public JsonResultEntity queryEntity(JSONObject jsonObject) { + SysArchivesContrastEntity entity = getData("jsonStr", jsonObject, SysArchivesContrastEntity.class); + if (entity == null || entity.getType() == null || "".equals(entity.getType())) { + return BaseResult.getFailureMessageEntity("系统错误"); + } + List list = sysArchivesContrastDao.queryByLike(entity); + return BaseResult.getSuccessMessageEntity("查询数据成功", list); + } + + /** + * @param jsonObject + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 保存档案 + * @Date 4:25 下午 2024/5/27 + **/ + @Override + public JsonResultEntity saveEntity(JSONObject jsonObject) { + SysArchivesContrastEntity entity = getData("jsonStr", jsonObject, SysArchivesContrastEntity.class); + if (entity == null) { + return BaseResult.getFailureMessageEntity("参数不允许为空"); + } + if (entity.getType() == null || "".equals(entity.getType())) { + return BaseResult.getFailureMessageEntity("系统错误"); + } + if (entity.getLeftCode() == null || "".equals(entity.getLeftCode())) { + return BaseResult.getFailureMessageEntity("请先输入左编码"); + } + if (entity.getRightCode() == null || "".equals(entity.getRightCode())) { + return BaseResult.getFailureMessageEntity("请先输入右编码"); + } + entity.setCreate(); + entity.setSts("Y"); + //保存 + sysArchivesContrastDao.save(entity); + return BaseResult.getSuccessMessageEntity("保存档案成功", entity); + } + + /** + * @param jsonObject + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 获取档案 + * @Date 4:25 下午 2024/5/27 + **/ + @Override + public JsonResultEntity getEntity(JSONObject jsonObject) { + SysArchivesContrastEntity entity = getData("jsonStr", jsonObject, SysArchivesContrastEntity.class); + if (entity == null) { + return BaseResult.getFailureMessageEntity("参数不允许为空"); + } + if (entity.getType() == null || "".equals(entity.getType())) { + return BaseResult.getFailureMessageEntity("系统错误"); + } + if (entity.getId() == null || "".equals(entity.getId())) { + return BaseResult.getFailureMessageEntity("系统错误"); + } + entity = sysArchivesContrastDao.getEntity(entity); + if (entity == null) { + return BaseResult.getFailureMessageEntity("获取档案失败"); + } + return BaseResult.getSuccessMessageEntity("获取档案成功", entity); + } + + /** + * @param jsonObject + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 修改档案 + * @Date 4:25 下午 2024/5/27 + **/ + @Override + public JsonResultEntity updateEntity(JSONObject jsonObject) { + SysArchivesContrastEntity entity = getData("jsonStr", jsonObject, SysArchivesContrastEntity.class); + if (entity == null) { + return BaseResult.getFailureMessageEntity("参数不允许为空"); + } + if (entity.getId() == null || "".equals(entity.getId())) { + return BaseResult.getFailureMessageEntity("系统错误"); + } + if (entity.getType() == null || "".equals(entity.getType())) { + return BaseResult.getFailureMessageEntity("系统错误"); + } + if (entity.getLeftCode() == null || "".equals(entity.getLeftCode())) { + return BaseResult.getFailureMessageEntity("请先输入左编码"); + } + if (entity.getRightCode() == null || "".equals(entity.getRightCode())) { + return BaseResult.getFailureMessageEntity("请先输入右编码"); + } + entity.setUpdate(); + //保存 + sysArchivesContrastDao.update(entity); + return BaseResult.getSuccessMessageEntity("修改档案成功", entity); + } + + /** + * @param jsonObject + * @return com.hzya.frame.web.entity.JsonResultEntity + * @Author lvleigang + * @Description 删除档案 + * @Date 4:25 下午 2024/5/27 + **/ + @Override + public JsonResultEntity deleteEntity(JSONObject jsonObject) { + SysArchivesContrastEntity entity = getData("jsonStr", jsonObject, SysArchivesContrastEntity.class); + if (entity == null) { + return BaseResult.getFailureMessageEntity("参数不允许为空"); + } + if (entity.getId() == null || "".equals(entity.getId())) { + return BaseResult.getFailureMessageEntity("系统错误"); + } + if (entity.getType() == null || "".equals(entity.getType())) { + return BaseResult.getFailureMessageEntity("系统错误"); + } + entity.setUpdate(); + //删除 + sysArchivesContrastDao.logicRemove(entity); + return BaseResult.getSuccessMessageEntity(" 删除档案成功", entity); + } +} diff --git a/service/src/main/java/com/hzya/frame/web/quartz/QuartzJobFactory.java b/service/src/main/java/com/hzya/frame/web/quartz/QuartzJobFactory.java index 5f5f6bcd..e9b38f40 100644 --- a/service/src/main/java/com/hzya/frame/web/quartz/QuartzJobFactory.java +++ b/service/src/main/java/com/hzya/frame/web/quartz/QuartzJobFactory.java @@ -63,10 +63,11 @@ public class QuartzJobFactory implements Job { if(integrationTaskLivingEntity.getOldStartTime() != null ){ oldStartTime = integrationTaskLivingEntity.getOldStartTime(); } + //判断任务是否启用,存在不启用情况,需要手动把任务关闭 if(integrationTaskEntity.getTaskStatus() != null && !"1".equals(integrationTaskEntity.getTaskStatus())){ saveLivingAndDetail(integrationTaskLivingEntity,null, - "4","4","当前任务已停止,不执行任务",integrationTaskLivingEntity.getOldStartTime(),integrationTaskLivingEntity.getStartTime(),integrationTaskLivingEntity.getEndTime()); + "4","4","当前任务已停止,不执行任务",startTime,startTime,new Date()); JSONObject stopJson = new JSONObject(); stopJson.put("jobName",integrationTaskEntity.getTaskName()); stopJson.put("jobCode",integrationTaskEntity.getTaskCode()); @@ -99,14 +100,14 @@ public class QuartzJobFactory implements Job { SysApplicationPluginEntity sysApplicationPluginEntity = iIntegrationTaskCacheableService.getSysApplicationPluginEntity(integrationTaskEntity.getTaskPlugin()); if(sysApplicationPluginEntity == null || sysApplicationPluginEntity.getPluginCode() == null || !"1".equals(sysApplicationPluginEntity.getPluginStatus())){ saveLivingAndDetail(integrationTaskLivingEntity, integrationTaskLogEntity, - "2","3","插件未启用,不执行任务",integrationTaskLivingEntity.getOldStartTime(),startTime,new Date()); + "2","3","插件未启用,不执行任务",startTime,startTime,new Date()); return; } //查找插件 PluginBaseEntity pluginBaseEntity = PluginUtils.getPluginsById(sysApplicationPluginEntity.getPluginCode()); if(pluginBaseEntity == null ){ saveLivingAndDetail(integrationTaskLivingEntity, integrationTaskLogEntity, - "2","3","插件未找到,不执行任务",integrationTaskLivingEntity.getOldStartTime(),startTime,new Date()); + "2","3","插件未找到,不执行任务",startTime,startTime,new Date()); return; } //调用插件 diff --git a/webapp/src/main/java/com/hzya/frame/webapp/web/aop/AopDynamicRoutingDataSourceInit.java b/webapp/src/main/java/com/hzya/frame/webapp/web/aop/AopDynamicRoutingDataSourceInit.java index 17a238dd..390c1f15 100644 --- a/webapp/src/main/java/com/hzya/frame/webapp/web/aop/AopDynamicRoutingDataSourceInit.java +++ b/webapp/src/main/java/com/hzya/frame/webapp/web/aop/AopDynamicRoutingDataSourceInit.java @@ -67,6 +67,7 @@ public class AopDynamicRoutingDataSourceInit { SysDataSourceEntity entity = new SysDataSourceEntity(); entity.setSts("Y"); entity.setUseState(1); + entity.setDataState("1"); entity.setSourceCode(dsValue); List sysDataSourceEntities = sysDataSourceDao.queryDSBase(entity); //logger.info("beforeDynamicRoutingDataSourceInitMethod:根据dsValue获取数据源信息查询结果 sysDataSourceEntities.size:" + sysDataSourceEntities.size());