Commit 36e343d0 authored by EDY's avatar EDY

优化

parent e6d9e20f
...@@ -3,6 +3,7 @@ package com.ruoyi.web.controller.business; ...@@ -3,6 +3,7 @@ package com.ruoyi.web.controller.business;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.system.domain.business.BaseContractInfo;
import com.ruoyi.system.domain.business.BaseInvoiceInfo; import com.ruoyi.system.domain.business.BaseInvoiceInfo;
import com.ruoyi.system.service.business.IBaseInvoiceInfoService; import com.ruoyi.system.service.business.IBaseInvoiceInfoService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
...@@ -81,6 +82,14 @@ public class BaseInvoiceInfoController extends BaseController ...@@ -81,6 +82,14 @@ public class BaseInvoiceInfoController extends BaseController
return toAjax(baseInvoiceInfoService.insertBaseInvoiceInfo(baseInvoiceInfo)); return toAjax(baseInvoiceInfoService.insertBaseInvoiceInfo(baseInvoiceInfo));
} }
@GetMapping(value = "/audit/list")
public TableDataInfo getInfo(BaseInvoiceInfo baseInvoiceInfo) {
startPage();
List<BaseInvoiceInfo> baseInvoiceInfos = baseInvoiceInfoService.selectBaseInvoiceAuditList(baseInvoiceInfo, getLoginUser());
return getDataTable(baseInvoiceInfos);
}
/** /**
* 修改开票信息 * 修改开票信息
*/ */
......
...@@ -83,6 +83,14 @@ public class BaseInvoiceInfo extends BaseEntity ...@@ -83,6 +83,14 @@ public class BaseInvoiceInfo extends BaseEntity
@Excel(name = "纳税人识别号") @Excel(name = "纳税人识别号")
private String nsrsbh; private String nsrsbh;
/** 发票代码 */
@Excel(name = "发票代码")
private String fpdm;
/** 发票号码 */
@Excel(name = "发票号码")
private String fphm;
/** 地址 */ /** 地址 */
@Excel(name = "地址") @Excel(name = "地址")
private String dz; private String dz;
...@@ -123,6 +131,12 @@ public class BaseInvoiceInfo extends BaseEntity ...@@ -123,6 +131,12 @@ public class BaseInvoiceInfo extends BaseEntity
@Excel(name = "申请人") @Excel(name = "申请人")
private String sqr; private String sqr;
/** 审核人id */
private Long shrId;
/** 审核人 */
private String shrName;
/** 开票时间 */ /** 开票时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "开票时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "开票时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
...@@ -460,4 +474,37 @@ public class BaseInvoiceInfo extends BaseEntity ...@@ -460,4 +474,37 @@ public class BaseInvoiceInfo extends BaseEntity
public void setBaseInvoiceAuditRecords(List<BaseInvoiceAuditRecord> baseInvoiceAuditRecords) { public void setBaseInvoiceAuditRecords(List<BaseInvoiceAuditRecord> baseInvoiceAuditRecords) {
this.baseInvoiceAuditRecords = baseInvoiceAuditRecords; this.baseInvoiceAuditRecords = baseInvoiceAuditRecords;
} }
public Long getShrId() {
return shrId;
}
public void setShrId(Long shrId) {
this.shrId = shrId;
}
public String getShrName() {
return shrName;
}
public void setShrName(String shrName) {
this.shrName = shrName;
}
public String getFpdm() {
return fpdm;
}
public void setFpdm(String fpdm) {
this.fpdm = fpdm;
}
public String getFphm() {
return fphm;
}
public void setFphm(String fphm) {
this.fphm = fphm;
}
} }
package com.ruoyi.system.service.business; package com.ruoyi.system.service.business;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.system.domain.business.BaseInvoiceInfo; import com.ruoyi.system.domain.business.BaseInvoiceInfo;
import java.util.List; import java.util.List;
...@@ -61,4 +62,6 @@ public interface IBaseInvoiceInfoService ...@@ -61,4 +62,6 @@ public interface IBaseInvoiceInfoService
* @return 结果 * @return 结果
*/ */
public int deleteBaseInvoiceInfoById(Long id); public int deleteBaseInvoiceInfoById(Long id);
List<BaseInvoiceInfo> selectBaseInvoiceAuditList(BaseInvoiceInfo baseInvoiceInfo, LoginUser loginUser);
} }
package com.ruoyi.system.service.business.impl; package com.ruoyi.system.service.business.impl;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.business.BaseContractInfo;
import com.ruoyi.system.domain.business.BaseInvoiceAuditRecord; import com.ruoyi.system.domain.business.BaseInvoiceAuditRecord;
import com.ruoyi.system.domain.business.BaseInvoiceInfo; import com.ruoyi.system.domain.business.BaseInvoiceInfo;
import com.ruoyi.system.mapper.SysRoleMapper;
import com.ruoyi.system.mapper.business.BaseInvoiceAuditRecordMapper; import com.ruoyi.system.mapper.business.BaseInvoiceAuditRecordMapper;
import com.ruoyi.system.mapper.business.BaseInvoiceInfoMapper; import com.ruoyi.system.mapper.business.BaseInvoiceInfoMapper;
import com.ruoyi.system.service.business.IBaseInvoiceInfoService; import com.ruoyi.system.service.business.IBaseInvoiceInfoService;
...@@ -28,6 +33,9 @@ public class BaseInvoiceInfoServiceImpl implements IBaseInvoiceInfoService ...@@ -28,6 +33,9 @@ public class BaseInvoiceInfoServiceImpl implements IBaseInvoiceInfoService
@Autowired @Autowired
private BaseInvoiceAuditRecordMapper baseInvoiceAuditRecordMapper; private BaseInvoiceAuditRecordMapper baseInvoiceAuditRecordMapper;
@Autowired
private SysRoleMapper sysRoleMapper;
/** /**
* 查询开票信息 * 查询开票信息
* *
...@@ -142,4 +150,21 @@ public class BaseInvoiceInfoServiceImpl implements IBaseInvoiceInfoService ...@@ -142,4 +150,21 @@ public class BaseInvoiceInfoServiceImpl implements IBaseInvoiceInfoService
{ {
return baseInvoiceInfoMapper.deleteBaseInvoiceInfoById(id); return baseInvoiceInfoMapper.deleteBaseInvoiceInfoById(id);
} }
@Override
public List<BaseInvoiceInfo> selectBaseInvoiceAuditList(BaseInvoiceInfo baseInvoiceInfo, LoginUser loginUser) {
List<BaseInvoiceInfo> baseInvoiceInfos = new ArrayList<>();
if (baseInvoiceInfo.getShrId() != null) {
baseInvoiceInfos = baseInvoiceInfoMapper.selectBaseInvoiceInfoList(baseInvoiceInfo);
} else {
List<Long> longs = sysRoleMapper.selectRoleListByUserId(loginUser.getUserId());
for (Long aLong : longs) {
SysRole sysRole = sysRoleMapper.selectRoleById(aLong);
if (sysRole.getRoleKey().equals("audit")) {
baseInvoiceInfos = baseInvoiceInfoMapper.selectBaseInvoiceInfoList(baseInvoiceInfo);
}
}
}
return baseInvoiceInfos;
}
} }
...@@ -123,7 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -123,7 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sum(hkje) toTheAmount sum(hkje) toTheAmount
from base_contract_info where htzt != 5 from base_contract_info where htzt != 5
<if test="contractId != null"> <if test="contractId != null">
and contract_id = #{contractId} and id = #{contractId}
</if> </if>
</select> </select>
...@@ -210,7 +210,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -210,7 +210,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ztdw != null">#{ztdw},</if> <if test="ztdw != null">#{ztdw},</if>
<if test="htfj != null">#{htfj},</if> <if test="htfj != null">#{htfj},</if>
<if test="shrId != null">#{shrId},</if> <if test="shrId != null">#{shrId},</if>
<if test="shrName != null">#{shr},</if> <if test="shrName != null">#{shrName},</if>
<if test="shzt != null">#{shzt},</if> <if test="shzt != null">#{shzt},</if>
<if test="bz != null">#{bz},</if> <if test="bz != null">#{bz},</if>
<if test="deleteFlag != null">#{deleteFlag},</if> <if test="deleteFlag != null">#{deleteFlag},</if>
......
...@@ -21,6 +21,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -21,6 +21,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="kpje" column="kpje" /> <result property="kpje" column="kpje" />
<result property="fpse" column="fpse" /> <result property="fpse" column="fpse" />
<result property="nsrsbh" column="nsrsbh" /> <result property="nsrsbh" column="nsrsbh" />
<result property="fpdm" column="fpdm" />
<result property="fphm" column="fphm" />
<result property="dz" column="dz" /> <result property="dz" column="dz" />
<result property="sjh" column="sjh" /> <result property="sjh" column="sjh" />
<result property="khh" column="khh" /> <result property="khh" column="khh" />
...@@ -31,6 +33,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -31,6 +33,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="bz" column="bz" /> <result property="bz" column="bz" />
<result property="fpzt" column="fpzt" /> <result property="fpzt" column="fpzt" />
<result property="sqr" column="sqr" /> <result property="sqr" column="sqr" />
<result property="shrId" column="shr_id" />
<result property="shrName" column="shr" />
<result property="kpsj" column="kpsj" /> <result property="kpsj" column="kpsj" />
<result property="dfkxy" column="dfkxy" /> <result property="dfkxy" column="dfkxy" />
<result property="dzhd" column="dzhd" /> <result property="dzhd" column="dzhd" />
...@@ -42,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -42,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectBaseInvoiceInfoVo"> <sql id="selectBaseInvoiceInfoVo">
select id, contract_id, htbh, bm_id, bm, kh_id, khmc, htmc, hkje, hkqs, fpnr, fplx, fpsl, kpje, fpse, nsrsbh, dz, sjh, khh, yhzh, sprxm, sprdh, spryx, bz, fpzt, sqr, kpsj, dfkxy, dzhd, fpfj, create_time, create_by, update_time, update_by from base_invoice_info select id, contract_id, htbh, bm_id, bm, kh_id, khmc, htmc, hkje, hkqs, fpnr, fplx, fpsl, kpje, fpse, nsrsbh,fpdm,fphm, dz, sjh, khh, yhzh, sprxm, sprdh, spryx, bz, fpzt, sqr,shr_id,shr, kpsj, dfkxy, dzhd, fpfj, create_time, create_by, update_time, update_by from base_invoice_info
</sql> </sql>
<select id="selectBaseInvoiceInfoList" parameterType="BaseInvoiceInfo" resultMap="BaseInvoiceInfoResult"> <select id="selectBaseInvoiceInfoList" parameterType="BaseInvoiceInfo" resultMap="BaseInvoiceInfoResult">
...@@ -63,6 +67,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -63,6 +67,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="kpje != null "> and kpje = #{kpje}</if> <if test="kpje != null "> and kpje = #{kpje}</if>
<if test="fpse != null "> and fpse = #{fpse}</if> <if test="fpse != null "> and fpse = #{fpse}</if>
<if test="nsrsbh != null and nsrsbh != ''"> and nsrsbh = #{nsrsbh}</if> <if test="nsrsbh != null and nsrsbh != ''"> and nsrsbh = #{nsrsbh}</if>
<if test="fpdm != null and fpdm != ''"> and fpdm = #{fpdm}</if>
<if test="fphm != null and fphm != ''"> and fphm = #{fphm}</if>
<if test="dz != null and dz != ''"> and dz = #{dz}</if> <if test="dz != null and dz != ''"> and dz = #{dz}</if>
<if test="sjh != null and sjh != ''"> and sjh = #{sjh}</if> <if test="sjh != null and sjh != ''"> and sjh = #{sjh}</if>
<if test="khh != null and khh != ''"> and khh = #{khh}</if> <if test="khh != null and khh != ''"> and khh = #{khh}</if>
...@@ -73,6 +79,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -73,6 +79,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="bz != null and bz != ''"> and bz = #{bz}</if> <if test="bz != null and bz != ''"> and bz = #{bz}</if>
<if test="fpzt != null "> and fpzt = #{fpzt}</if> <if test="fpzt != null "> and fpzt = #{fpzt}</if>
<if test="sqr != null and sqr != ''"> and sqr = #{sqr}</if> <if test="sqr != null and sqr != ''"> and sqr = #{sqr}</if>
<if test="shrId != null"> and shr_id = #{shrId}</if>
<if test="shrName != null and shrName != ''"> and shr = #{shrName}</if>
<if test="kpsj != null "> and kpsj = #{kpsj}</if> <if test="kpsj != null "> and kpsj = #{kpsj}</if>
<if test="dfkxy != null and dfkxy != ''"> and dfkxy = #{dfkxy}</if> <if test="dfkxy != null and dfkxy != ''"> and dfkxy = #{dfkxy}</if>
<if test="dzhd != null and dzhd != ''"> and dzhd = #{dzhd}</if> <if test="dzhd != null and dzhd != ''"> and dzhd = #{dzhd}</if>
...@@ -115,6 +123,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -115,6 +123,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="kpje != null">kpje,</if> <if test="kpje != null">kpje,</if>
<if test="fpse != null">fpse,</if> <if test="fpse != null">fpse,</if>
<if test="nsrsbh != null">nsrsbh,</if> <if test="nsrsbh != null">nsrsbh,</if>
<if test="fpdm != null">fpdm,</if>
<if test="fphm != null">fphm,</if>
<if test="dz != null">dz,</if> <if test="dz != null">dz,</if>
<if test="sjh != null">sjh,</if> <if test="sjh != null">sjh,</if>
<if test="khh != null">khh,</if> <if test="khh != null">khh,</if>
...@@ -125,6 +135,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -125,6 +135,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="bz != null">bz,</if> <if test="bz != null">bz,</if>
<if test="fpzt != null">fpzt,</if> <if test="fpzt != null">fpzt,</if>
<if test="sqr != null">sqr,</if> <if test="sqr != null">sqr,</if>
<if test="shrId != null">shr_id,</if>
<if test="shrName != null">shr,</if>
<if test="kpsj != null">kpsj,</if> <if test="kpsj != null">kpsj,</if>
<if test="dfkxy != null">dfkxy,</if> <if test="dfkxy != null">dfkxy,</if>
<if test="dzhd != null">dzhd,</if> <if test="dzhd != null">dzhd,</if>
...@@ -151,6 +163,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -151,6 +163,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="kpje != null">#{kpje},</if> <if test="kpje != null">#{kpje},</if>
<if test="fpse != null">#{fpse},</if> <if test="fpse != null">#{fpse},</if>
<if test="nsrsbh != null">#{nsrsbh},</if> <if test="nsrsbh != null">#{nsrsbh},</if>
<if test="fpdm != null">#{fpdm},</if>
<if test="fphm != null">#{fphm},</if>
<if test="dz != null">#{dz},</if> <if test="dz != null">#{dz},</if>
<if test="sjh != null">#{sjh},</if> <if test="sjh != null">#{sjh},</if>
<if test="khh != null">#{khh},</if> <if test="khh != null">#{khh},</if>
...@@ -161,6 +175,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -161,6 +175,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="bz != null">#{bz},</if> <if test="bz != null">#{bz},</if>
<if test="fpzt != null">#{fpzt},</if> <if test="fpzt != null">#{fpzt},</if>
<if test="sqr != null">#{sqr},</if> <if test="sqr != null">#{sqr},</if>
<if test="shrId != null">#{shrId},</if>
<if test="shrName != null">#{shrName},</if>
<if test="kpsj != null">#{kpsj},</if> <if test="kpsj != null">#{kpsj},</if>
<if test="dfkxy != null">#{dfkxy},</if> <if test="dfkxy != null">#{dfkxy},</if>
<if test="dzhd != null">#{dzhd},</if> <if test="dzhd != null">#{dzhd},</if>
...@@ -190,6 +206,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -190,6 +206,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="kpje != null">kpje = #{kpje},</if> <if test="kpje != null">kpje = #{kpje},</if>
<if test="fpse != null">fpse = #{fpse},</if> <if test="fpse != null">fpse = #{fpse},</if>
<if test="nsrsbh != null">nsrsbh = #{nsrsbh},</if> <if test="nsrsbh != null">nsrsbh = #{nsrsbh},</if>
<if test="fpdm != null">fpdm = #{fpdm},</if>
<if test="fphm != null">fphm = #{fphm},</if>
<if test="dz != null">dz = #{dz},</if> <if test="dz != null">dz = #{dz},</if>
<if test="sjh != null">sjh = #{sjh},</if> <if test="sjh != null">sjh = #{sjh},</if>
<if test="khh != null">khh = #{khh},</if> <if test="khh != null">khh = #{khh},</if>
...@@ -200,6 +218,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -200,6 +218,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="bz != null">bz = #{bz},</if> <if test="bz != null">bz = #{bz},</if>
<if test="fpzt != null">fpzt = #{fpzt},</if> <if test="fpzt != null">fpzt = #{fpzt},</if>
<if test="sqr != null">sqr = #{sqr},</if> <if test="sqr != null">sqr = #{sqr},</if>
<if test="shrId != null">shr_id = #{shrId},</if>
<if test="shrName != null">shr = #{shrName},</if>
<if test="kpsj != null">kpsj = #{kpsj},</if> <if test="kpsj != null">kpsj = #{kpsj},</if>
<if test="dfkxy != null">dfkxy = #{dfkxy},</if> <if test="dfkxy != null">dfkxy = #{dfkxy},</if>
<if test="dzhd != null">dzhd = #{dzhd},</if> <if test="dzhd != null">dzhd = #{dzhd},</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment