diff --git a/dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java b/dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java index ee76a75d..ad94ed47 100644 --- a/dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java +++ b/dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java @@ -198,20 +198,7 @@ public class BaseInvoiceController extends AbstractController { if (!StringUtils.isNotBlank(gfsh)){ pramsMap.put("sign","88"); } - List gfshList = new ArrayList<>(); - if (!"99".equals(gfsh) && StringUtils.isNotBlank(gfsh)) { - gfshList.add(gfsh); - } else { - gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg()); - } - pramsMap.put("gfsh", gfshList); - boolean flag = checkList(gfshList); - - if (flag){ - pramsMap.put("sign","88"); - log.info("登陆账号无税号"); - } //所属组织 // List companyCodeList = new ArrayList<>(); // if (StringUtils.isNotBlank(companyCode)){ @@ -227,6 +214,24 @@ public class BaseInvoiceController extends AbstractController { pramsMap.put("companyCode",companyCode); } + //判断购方税号 + List gfshList = new ArrayList<>(); + if (!"99".equals(gfsh) && StringUtils.isNotBlank(gfsh)) { + gfshList.add(gfsh); + } else { +// gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg()); + gfshList = getGfshList(gfshList,getUserInfo().getCompanyCodes()); + } + pramsMap.put("gfsh", gfshList); + + boolean flag = checkList(gfshList); + + if (flag){ + pramsMap.put("sign","88"); + log.info("登陆账号无税号"); + } + + if (StringUtils.isNotBlank(taxRate) && !"99".equals(taxRate)){ // List rates = new ArrayList<>(); // rates = convertRates(taxRate,rates); @@ -512,6 +517,10 @@ public class BaseInvoiceController extends AbstractController { String suspendDate = (String) map.get("suspendDate"); String bzr = (String) map.get("bzr"); String taxRate = String.valueOf(map.get("taxRate")); + + String sortPzbh = String.valueOf(map.get("sortPzbh")); + String sortBzdh = String.valueOf(map.get("sortBzdh")); + String sortKprq = String.valueOf(map.get("sortKprq")); if (StringUtils.isNotEmpty(suspendDate) && suspendDate.length() >7){ suspendDate = suspendDate.substring(0,7); } @@ -553,6 +562,10 @@ public class BaseInvoiceController extends AbstractController { pramsMap.put("imageNumber", map.get("imageNumber")); pramsMap.put("suspendStatus",suspendStatus); pramsMap.put("suspendDate",suspendDate); + + pramsMap.put("sortPzbh",sortPzbh); + pramsMap.put("sortBzdh",sortBzdh); + pramsMap.put("sortKprq",sortKprq); pramsMap.put("bzr",bzr); if (map.get("accountPeriod") != null && !"".equals(map.get("accountPeriod"))) { String accountPeriod = map.get("accountPeriod").toString().substring(0,7); diff --git a/dxhy-base/src/main/java/com/dxhy/base/service/fpxxrz/BaseRzFpxxServiceImpl.java b/dxhy-base/src/main/java/com/dxhy/base/service/fpxxrz/BaseRzFpxxServiceImpl.java index ea23ac18..f959eee5 100644 --- a/dxhy-base/src/main/java/com/dxhy/base/service/fpxxrz/BaseRzFpxxServiceImpl.java +++ b/dxhy-base/src/main/java/com/dxhy/base/service/fpxxrz/BaseRzFpxxServiceImpl.java @@ -54,6 +54,7 @@ public class BaseRzFpxxServiceImpl extends MpBaseServiceImpl pramsMap, int curr, int size) { log.info("认证查询列表-传入的参数为:{}",pramsMap); + long enter = System.currentTimeMillis(); DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ); JSONObject json; @@ -99,6 +100,8 @@ public class BaseRzFpxxServiceImpl extends MpBaseServiceImpl gfshList1 = new ArrayList<>(); List curList = baseTDxRecordInvoiceDao.selectDksh(pramsMap); log.info("认证查询列表-返回的所属期列表为:{}",curList); @@ -116,7 +119,7 @@ public class BaseRzFpxxServiceImpl extends MpBaseServiceImpl pageList = super.baseMapper.selectByPramsMap(pramsMap); - log.info("认证查询列表-返回的发票列表为:{}",pageList); + log.info("认证查询-查询列表信息耗时:{}",System.currentTimeMillis()-enter); PageInfo pageInfo = new PageInfo<>(pageList); // 用于页面返回list对象 if (pageList.size() > 0) { @@ -213,6 +216,7 @@ public class BaseRzFpxxServiceImpl extends MpBaseServiceImpl resultList = pageInfo.getList(); log.info("resultList {}",resultList); json.put("datalist", resultList); + log.info("认证查询-合计耗时:{}",System.currentTimeMillis()-enter); } } catch (Exception e) { diff --git a/dxhy-base/src/main/java/com/dxhy/base/service/invoicecheck/BaseInvoiceManualCheckServiceImpl.java b/dxhy-base/src/main/java/com/dxhy/base/service/invoicecheck/BaseInvoiceManualCheckServiceImpl.java index 8a67fc55..9c678c36 100644 --- a/dxhy-base/src/main/java/com/dxhy/base/service/invoicecheck/BaseInvoiceManualCheckServiceImpl.java +++ b/dxhy-base/src/main/java/com/dxhy/base/service/invoicecheck/BaseInvoiceManualCheckServiceImpl.java @@ -64,6 +64,7 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl pramsMap, int curr, int size) { + long enter = System.currentTimeMillis(); log.info("入参是:{}",pramsMap); JSONObject json; DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ); @@ -105,7 +106,9 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl hjList = super.baseMapper.selectHj(pramsMap); + log.info("手工认证 查询统计信息耗时:{}",System.currentTimeMillis()-start); BaseTDxRecordInvoice hjxx = hjList.get(0); hjsl = hjxx.getSfygx(); if (!"0".equals(hjsl)) { @@ -122,12 +125,16 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl pageList = super.baseMapper.selectSggxcx(pramsMap); + log.info("手工认证 查询列表信息耗时:{}",System.currentTimeMillis()-start1); PageInfo pageInfo = new PageInfo<>(pageList); log.info("返回的列表为:{}",pageList); - + log.info("查询耗时:{}",System.currentTimeMillis()-enter); // 转化为页面展示对象 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); if (pageList.size() > 0) { @@ -262,6 +269,8 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl queryRecord = new QueryWrapper<>(); queryRecord.eq("uuid", uuid); BaseTDxRecordInvoice rdxRecordInvoice = baseTDxRecordInvoiceDao.selectOne(queryRecord); - if (StringHelper.isNotBlank(rdxRecordInvoice.getDkTaxAmount().toPlainString())){ + if (rdxRecordInvoice.getDkTaxAmount() != null && StringUtils.isNotBlank(rdxRecordInvoice.getDkTaxAmount().toPlainString())){ rzlb.setDkse(rdxRecordInvoice.getDkTaxAmount().toPlainString()); } if (rdxRecordInvoice != null) { diff --git a/dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml b/dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml index 6e4af301..83d927ad 100644 --- a/dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml +++ b/dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml @@ -242,6 +242,7 @@ and t.tax_rate like '%,%' + diff --git a/dxhy-common/src/main/java/com/dxhy/common/service/impl/DictdetaServciceImpl.java b/dxhy-common/src/main/java/com/dxhy/common/service/impl/DictdetaServciceImpl.java index 7cf18049..a57096ad 100644 --- a/dxhy-common/src/main/java/com/dxhy/common/service/impl/DictdetaServciceImpl.java +++ b/dxhy-common/src/main/java/com/dxhy/common/service/impl/DictdetaServciceImpl.java @@ -34,7 +34,6 @@ public class DictdetaServciceImpl implements DictdetaServcice { @Override public String queryDictName(String type,String code) { - log.info("type={},code={}",type,code); String dictJson = redisUtils.get(RedisConstant.KEY_DICT + type); List dictdetaModels = JSON.parseArray(dictJson, DictdetaModel.class); Map collect = dictdetaModels.stream().collect(Collectors.toMap(DictdetaModel::getDictcode, DictdetaModel::getDictname)); diff --git a/dxhy-core/src/main/java/com/dxhy/core/controller/FtpDownloadController.java b/dxhy-core/src/main/java/com/dxhy/core/controller/FtpDownloadController.java index e788137d..ec87e573 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/controller/FtpDownloadController.java +++ b/dxhy-core/src/main/java/com/dxhy/core/controller/FtpDownloadController.java @@ -98,6 +98,7 @@ public class FtpDownloadController extends AbstractController { response.setContentType(this.getContentType(fileName)); } else { response.setContentType("application/octet-stream"); + response.setContentType("application/vnd.ms-excel"); } response.setHeader("Content-disposition", "attachment; filename=" + new String(fileName.getBytes(StandardCharsets.UTF_8), "ISO8859-1")); diff --git a/dxhy-core/src/main/java/com/dxhy/core/thread/FpcjhzExportThread.java b/dxhy-core/src/main/java/com/dxhy/core/thread/FpcjhzExportThread.java index c2b775a8..9c0c6796 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/thread/FpcjhzExportThread.java +++ b/dxhy-core/src/main/java/com/dxhy/core/thread/FpcjhzExportThread.java @@ -169,14 +169,18 @@ public class FpcjhzExportThread extends BaseThread { excelFile.append(ftpFileName.toString()); // 递归导出数据到excel - this.cicleExport(pramsMap, default_curr, excelFile.toString(), jsonObject); - - // FTP文件存储路径 - String[] toDay = DateUtil.today().split("-"); - String ftpFilePath = fileService.getPathPrefix() + userName + "/" + "excelFile/" + toDay[0] + "/" - + toDay[1] + "/" + toDay[2] + "/" + ftpFileName.toString(); - // 文件上传ftp - fileService.uploadFile(ftpFilePath, excelFile.toString()); + String ftpFilePath = ""; + String rtnMsg = this.cicleExport(pramsMap, default_curr, excelFile.toString(), jsonObject); + if("ok".equals(rtnMsg)) { + // FTP文件存储路径 + String[] toDay = DateUtil.today().split("-"); + ftpFilePath = fileService.getPathPrefix() + userName + "/" + "excelFile/" + toDay[0] + "/" + + toDay[1] + "/" + toDay[2] + "/" + ftpFileName.toString(); + // 文件上传ftp + fileService.uploadFile(ftpFilePath, excelFile.toString()); + }else{ + ftpFilePath = rtnMsg; + } // 设置成功消息内容 msg.put("title", super.getSuccTitle(title)); @@ -222,12 +226,15 @@ public class FpcjhzExportThread extends BaseThread { * */ - private boolean cicleExport(Map pramsMap, int curr, String excelFile, JSONObject jsonObject) + private String cicleExport(Map pramsMap, int curr, String excelFile, JSONObject jsonObject) throws Exception { // 查询指定页数的数据 JSONObject pageData = fpcjService.selectByGfshAndCjrq(pramsMap, curr, default_size); boolean hasNext = pageData.getBooleanValue("hasNext"); List dataList = (List)pageData.get("datalist"); + if(dataList.size() > 5000){ + return "数据不能超过5000条"; + } boolean firstPage = false; if (curr == default_curr) { @@ -243,7 +250,7 @@ public class FpcjhzExportThread extends BaseThread { // 写入当前页数据 ExcelPoiUtil.exportListArrayToExcel1(excelFile, title, jsonObject, dataList, firstPage, false); // 更新页数 - return cicleExport(pramsMap, nextPage, excelFile, jsonObject); + cicleExport(pramsMap, nextPage, excelFile, jsonObject); } else { // 写入最后一页数据 FpcjCjhzRespVO vo = new FpcjCjhzRespVO(); @@ -253,7 +260,7 @@ public class FpcjhzExportThread extends BaseThread { vo.setSe(hjse); dataList.add(vo); ExcelPoiUtil.exportListArrayToExcel1(excelFile, title, jsonObject, dataList, firstPage, true); - return hasNext; } + return "ok"; } } diff --git a/dxhy-core/src/main/java/com/dxhy/core/thread/QyswxxExportThread.java b/dxhy-core/src/main/java/com/dxhy/core/thread/QyswxxExportThread.java index 70b9b413..21dab14c 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/thread/QyswxxExportThread.java +++ b/dxhy-core/src/main/java/com/dxhy/core/thread/QyswxxExportThread.java @@ -46,7 +46,7 @@ public class QyswxxExportThread extends BaseThread { /** * 文件名后缀 */ - private final String fileNameSurfix = ".xlsx"; + private final String fileNameSurfix = ".xls"; /** * 文件名中间分隔符 */ diff --git a/dxhy-core/src/main/java/com/dxhy/core/thread/RzFpxxExportThread.java b/dxhy-core/src/main/java/com/dxhy/core/thread/RzFpxxExportThread.java index 6c674297..1ffe40ec 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/thread/RzFpxxExportThread.java +++ b/dxhy-core/src/main/java/com/dxhy/core/thread/RzFpxxExportThread.java @@ -46,7 +46,7 @@ public class RzFpxxExportThread extends BaseThread { /** * 文件名后缀 */ - private final String fileNameSurfix = ".xlsx"; + private final String fileNameSurfix = ".xls"; /** * 文件名中间分隔符 */ diff --git a/dxhy-core/src/main/resources/mapper/FpZhMapper.xml b/dxhy-core/src/main/resources/mapper/FpZhMapper.xml index a3293a0d..89d67651 100644 --- a/dxhy-core/src/main/resources/mapper/FpZhMapper.xml +++ b/dxhy-core/src/main/resources/mapper/FpZhMapper.xml @@ -100,7 +100,6 @@ and t.bdk_status in ('1','2') and t.export_mark = '0' and t.auth_status != '0' - and t.rzh_yesorno != '0' and t.company = #{company} and t.gf_tax_no in @@ -259,12 +258,6 @@ and t.account_period = #{accountPeriod} - - and t.tax_rate = #{taxRate} - - - and t.tax_rate like '%,%' - order by t.rzh_date desc,t.invoice_date desc + + + + update t_dx_record_invoice + set tax_rate = #{pramsMap.taxRate} + where uuid = #{pramsMap.uuid} + + diff --git a/dxhy-extend/src/main/java/com/dxhy/extend/service/bb/impl/ExtFpmxcxServiceImpl.java b/dxhy-extend/src/main/java/com/dxhy/extend/service/bb/impl/ExtFpmxcxServiceImpl.java index 3133ba1f..7d579dbd 100644 --- a/dxhy-extend/src/main/java/com/dxhy/extend/service/bb/impl/ExtFpmxcxServiceImpl.java +++ b/dxhy-extend/src/main/java/com/dxhy/extend/service/bb/impl/ExtFpmxcxServiceImpl.java @@ -37,6 +37,7 @@ public class ExtFpmxcxServiceImpl extends MpBaseServiceImpl pramsMap, int curr, int size) { + long enter = System.currentTimeMillis(); JSONObject json; DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ); try { @@ -49,6 +50,7 @@ public class ExtFpmxcxServiceImpl extends MpBaseServiceImpl pageList = super.baseMapper.selectByPramsMap(pramsMap); + log.info("发票明细查询-查询列表信息耗时:{}",System.currentTimeMillis()-enter); PageInfo pageInfo = new PageInfo<>(pageList); List resultList = pageInfo.getList(); if (resultList.size() > 0) { @@ -103,6 +105,7 @@ public class ExtFpmxcxServiceImpl extends MpBaseServiceImpl pramsMap, int curr, int size) { + long enter = System.currentTimeMillis(); JSONObject json; DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ); log.info("发票综合查询-传入的参数为:{}",pramsMap); @@ -69,11 +70,13 @@ public class ExtFpzhcxServiceImpl extends MpBaseServiceImpl pageList = super.baseMapper.selectByPramsMap(pramsMap); log.info("返回的发票信息为:{}",pageList); + log.info("发票综合查询-查询列表信息耗时:{}",System.currentTimeMillis()-enter); PageInfo pageInfo = new PageInfo<>(pageList); List resultList = pageInfo.getList(); // 用于页面返回list对象 @@ -135,6 +138,7 @@ public class ExtFpzhcxServiceImpl extends MpBaseServiceImpl pramsMap, int curr, int size) { + long enter = System.currentTimeMillis(); JSONObject json; DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ); @@ -112,10 +113,12 @@ public class ExtRzrbcxServiceImpl extends MpBaseServiceImpl pageList = super.baseMapper.selectBbycfpbbHj(pramsMap); + log.info("发票认证日报-查询列表信息耗时:{}",System.currentTimeMillis()-enter); PageInfo pageInfo = new PageInfo<>(pageList); // 用于页面返回list对象 if (pageList.size() > 0) { @@ -145,6 +148,7 @@ public class ExtRzrbcxServiceImpl extends MpBaseServiceImpl pramsMap, int curr, int size) { + long enter = System.currentTimeMillis(); JSONObject json; DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ); @@ -74,11 +75,13 @@ public class ExtYcfpcxServiceImpl extends MpBaseServiceImpl pageList = super.baseMapper.selectByPramsMap(pramsMap); log.info("数据库查询结果pageList {}",pageList); + log.info("异常发票查询-查询列表信息耗时:{}",System.currentTimeMillis()-enter); PageInfo pageInfo = new PageInfo<>(pageList); // 用于页面返回list对象 if (pageList.size() > 0) { @@ -127,6 +130,7 @@ public class ExtYcfpcxServiceImpl extends MpBaseServiceImpl resultList = pageInfo.getList(); json.put("datalist", resultList); + log.info("异常发票查询-合计耗时:{}",System.currentTimeMillis()-enter); } catch (Exception e) { // 统一设置操作异常标识 diff --git a/dxhy-extend/src/main/java/com/dxhy/extend/service/companypool/TicketServiceImpl.java b/dxhy-extend/src/main/java/com/dxhy/extend/service/companypool/TicketServiceImpl.java index 295faef6..c1503405 100644 --- a/dxhy-extend/src/main/java/com/dxhy/extend/service/companypool/TicketServiceImpl.java +++ b/dxhy-extend/src/main/java/com/dxhy/extend/service/companypool/TicketServiceImpl.java @@ -40,6 +40,7 @@ public class TicketServiceImpl extends MpBaseServiceImpl paramsMap, int curr, int size) { + long enter = System.currentTimeMillis(); JSONObject json = new JSONObject(); DynamicContextHolder.push(paramsMap.get("dbName") + DbConstant.BUSINESS_READ); try { @@ -70,11 +71,13 @@ public class TicketServiceImpl extends MpBaseServiceImpl pageList = super.baseMapper.queryTickets(paramsMap); PageInfo pageInfo = new PageInfo<>(pageList); + log.info("实名客票-查询列表信息耗时:{}",System.currentTimeMillis()-enter); // 用于页面返回list对象 if (pageList.size() > 0) { @@ -158,6 +161,7 @@ public class TicketServiceImpl extends MpBaseServiceImpl resultList = pageInfo.getList(); json.put("datalist", resultList); + log.info("实名客票-合计耗时:{}",System.currentTimeMillis()-enter); } catch (Exception e) { // 统一设置操作异常标识 json = super.errorResult(e); diff --git a/dxhy-extend/src/main/java/com/dxhy/extend/service/pool/ExtInvoicePoolServiceImpl.java b/dxhy-extend/src/main/java/com/dxhy/extend/service/pool/ExtInvoicePoolServiceImpl.java index 3765480e..e2aab245 100644 --- a/dxhy-extend/src/main/java/com/dxhy/extend/service/pool/ExtInvoicePoolServiceImpl.java +++ b/dxhy-extend/src/main/java/com/dxhy/extend/service/pool/ExtInvoicePoolServiceImpl.java @@ -44,6 +44,7 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl pramsMap, int curr, int size) { + long enter = System.currentTimeMillis(); JSONObject json = new JSONObject(); DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ); try { @@ -77,10 +78,12 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl pageList = super.baseMapper.listAddTaxInvoice(pramsMap); PageInfo pageInfo = new PageInfo<>(pageList); + log.info("进项增值税票池-查询列表信息耗时:{}",System.currentTimeMillis()-enter); // 用于页面返回list对象 if (pageList != null && pageList.size() > 0) { @@ -203,6 +206,7 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl resultList = pageInfo.getList(); json.put("datalist", resultList); + log.info("进项增值税票池-合计耗时:{}",System.currentTimeMillis()-enter); } catch (Exception e) { // 统一设置操作异常标识 json = super.errorResult(e); @@ -212,6 +216,7 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl pramsMap, int curr, int size) { + long enter = System.currentTimeMillis(); JSONObject json = new JSONObject(); DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ); try { @@ -242,12 +247,14 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl pageList = super.baseMapper.listOtherInvoice(pramsMap); log.info("查询结果为 {}",pageList); PageInfo pageInfo = new PageInfo<>(pageList); + log.info("其他客票-查询列表信息耗时:{}",System.currentTimeMillis()-enter); // 用于页面返回list对象 if (pageList != null && pageList.size() > 0) { int start = (int)pageInfo.getStartRow(); @@ -295,6 +302,7 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl resultList = pageInfo.getList(); json.put("datalist", resultList); + log.info("其他客票-合计耗时:{}",System.currentTimeMillis()-enter); } catch (Exception e) { // 统一设置操作异常标识 json = super.errorResult(e); diff --git a/dxhy-sign/src/main/java/com/dxhy/sign/dao/SysDeptDao.java b/dxhy-sign/src/main/java/com/dxhy/sign/dao/SysDeptDao.java index 48ea682d..62ab0fb0 100644 --- a/dxhy-sign/src/main/java/com/dxhy/sign/dao/SysDeptDao.java +++ b/dxhy-sign/src/main/java/com/dxhy/sign/dao/SysDeptDao.java @@ -3,6 +3,9 @@ package com.dxhy.sign.dao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.dxhy.sign.entity.SysDeptEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 部门管理 @@ -11,5 +14,88 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface SysDeptDao extends BaseMapper { + /** + * 根据集团编码查询税号 + * + * @author 陈刚扬 + * @date 2020/12/4 + * @param company + * @param orgType + * @return java.util.List + */ + List selectDeptByCompany(@Param("company") String company, @Param("orgType") String orgType); + + /** + * 根据集团编码查询部门信息 + * + * @param company + * 集团编码 + * @return 部门信息 + */ + List queryList(@Param("company") String company); + + /** + * 根据集团编码查询用户关联部门信息 + * + * @param company + * 集团编码 + * @return 部门信息 + */ + List queryListUser(@Param("company") String company); + + /** + * 根据集团编码查询上级部门信息 + * + * @param company + * 集团编码 + * @return 部门信息 + */ + List queryListParent(@Param("company") String company); + + /** + * 查询子部门ID列表 + * + * @param parentId + * 上级部门ID + * @return 部门信息 + */ + List queryDetpIdList(@Param("parentId") Long parentId); + + /** + * 根据上级ID查询部门信息 + * + * @param parentId + * 集团编码 + * @return 部门信息 + */ + List queryDeptParentId(@Param("parentId") Long parentId); + + /** + * 获取部门信息 + * + * @return 部门信息 + */ + List queryDeptList(); + + /** + * 根据集团编码修改部分信息 + * + * @param company + * 集团编码 + * @param isCollext + * 是否采集 + * @param aceKey + * key + * @param aceId + * id + * @param dbName + * 数据库 + * @param qsStatus + * 签收状态 + */ + void updateDeptCompany(@Param("company") String company, @Param("isCollext") String isCollext, + @Param("aceKey") String aceKey, @Param("aceId") String aceId, @Param("dbName") String dbName, + @Param("qsStatus") String qsStatus); + List getOrgCodeList(Long userId); } diff --git a/dxhy-sign/src/main/java/com/dxhy/sign/entity/SysDeptEntity.java b/dxhy-sign/src/main/java/com/dxhy/sign/entity/SysDeptEntity.java index 30e357cb..9f318c0a 100644 --- a/dxhy-sign/src/main/java/com/dxhy/sign/entity/SysDeptEntity.java +++ b/dxhy-sign/src/main/java/com/dxhy/sign/entity/SysDeptEntity.java @@ -1,29 +1,42 @@ package com.dxhy.sign.entity; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; + import java.io.Serializable; import java.util.Date; +import java.util.List; /** + * 部门管理 + * * @author jiaohongyang - * @date 2019年3月26日 下午6:02:48 */ @Data @TableName("sys_dept") public class SysDeptEntity implements Serializable { + private static final long serialVersionUID = 1L; - private String password; - - private Long deptId; + /** + * 部门ID + */ + @TableId + private String deptId; /** * 上级部门ID,一级部门为0 */ - private Long parentId; + private String parentId; /** * 部门名称 */ private String name; + /** + * 上级部门名称 + */ + @TableField(exist = false) + private String parentName; private Integer orderNum; private String taxno; @@ -79,10 +92,18 @@ public class SysDeptEntity implements Serializable { * 是否需要确认密码 */ private String isPassword; + /** + * 确认密码 + */ + private String password; private Date updateTime; private Date createTime; + private String autoRz; + private String productType; + @TableField(exist = false) + private List children; } diff --git a/dxhy-sign/src/main/resources/mapper/SysDeptDao.xml b/dxhy-sign/src/main/resources/mapper/SysDeptDao.xml new file mode 100644 index 00000000..e532ed2b --- /dev/null +++ b/dxhy-sign/src/main/resources/mapper/SysDeptDao.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + update + sys_dept + set qs_status = #{qsStatus}, + db_name = #{dbName}, + ace_key = #{aceKey}, + ace_id = #{aceId}, + is_collext = #{isCollext} + where company = #{company} + and org_type != '1' + + + + + + + + + + + +