ariesy 修改databaseId&修改sysAuthDao

release
yefei 2 years ago
parent bb47e682c9
commit a5670a552f
  1. 8
      dxhy-extend/src/main/java/com/dxhy/extend/service/pool/ExtInvoicePoolServiceImpl.java
  2. 15
      dxhy-extend/src/main/resources/mapper/SysAuthDao.xml

@ -47,7 +47,7 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
private DictdetaServcice dictdetaServcice;
@Resource
private SysAuthDao sysDeptAuthDao;
private SysAuthDao sysAuthDao;
@Override
public String listAddTax(Map<String, Object> pramsMap, int curr, int size) {
@ -518,8 +518,8 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
@Override
public List<String> getGfshList(List<String> gfshList, List<String> companyCodes) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<SysDeptEntity> taxnoList = sysDeptAuthDao.queryTaxnoList();
List<SysDeptEntity> parentIdList = sysDeptAuthDao.queryParentIdList();
List<SysDeptEntity> taxnoList = sysAuthDao.queryTaxnoList();
List<SysDeptEntity> parentIdList = sysAuthDao.queryParentIdList();
Map<String, String> taxnoMap = taxnoList.stream().collect(Collectors.toMap(SysDeptEntity::getDeptId, SysDeptEntity::getTaxno));
Map<String, String> parentIdMap = parentIdList.stream().collect(Collectors.toMap(SysDeptEntity::getDeptId, e -> e.getParentId() == null ? "" : e.getParentId()));
@ -530,7 +530,7 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
for (String companyCode : companyCodes) {
QueryWrapper<SysDeptEntity> wrapper = new QueryWrapper<>();
wrapper.eq("org_code", companyCode);
List<SysDeptEntity> sysDeptEntityList = sysDeptAuthDao.selectList(wrapper);
List<SysDeptEntity> sysDeptEntityList = sysAuthDao.selectList(wrapper);
SysDeptEntity sysDeptEntity = sysDeptEntityList.get(0);
if (sysDeptEntity != null) {
String dId = sysDeptEntity.getDeptId();

@ -58,7 +58,7 @@
and org_type != '1'
</update>
<select id="selectDeptByCompany" resultType="com.dxhy.extend.entity.SysDeptEntity" dataextendId="mysql">
<select id="selectDeptByCompany" resultType="com.dxhy.extend.entity.SysDeptEntity" databaseId="mysql">
select * from sys_dept
where company = #{company}
<if test="orgType!=null and orgType !=''">
@ -66,19 +66,6 @@
</if>
order by org_code
</select>
<!-- group by taxno-->
<select id="selectDeptByCompany" resultType="com.dxhy.extend.entity.SysDeptEntity" dataextendId="oracle">
select * from sys_dept a
where
a.company=#{company}
<if test="orgType!=null and orgType !=''">
and a.org_type = #{orgType}
</if>
<if test='orgType!="1"'>
and a.dept_id = (select max(dept_id) from sys_dept b where a.taxno=b.taxno )
</if>
order by a.org_code
</select>
<select id="getOrgCodeList" parameterType="long" resultType="string">
select d.org_code

Loading…
Cancel
Save