购方税号和组织编码修改

release
yishiqihuasheng 2 years ago
parent 3ffcecd254
commit 7df8de574a
  1. 62
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtReportController.java
  2. 2
      dxhy-extend/src/main/java/com/dxhy/extend/model/ExtRzjgqdRespVO.java
  3. 2
      dxhy-extend/src/main/java/com/dxhy/extend/service/tjbb/impl/ExtRzjgqdServiceImpl.java
  4. 15
      dxhy-extend/src/main/resources/mapper/ExtQssbMapper.xml
  5. 17
      dxhy-extend/src/main/resources/mapper/ExtQstjbMapper.xml
  6. 14
      dxhy-extend/src/main/resources/mapper/ExtRzjgqdMapper.xml

@ -170,21 +170,17 @@ public class ExtReportController extends AbstractController {
Map<String, Object> data = new HashMap<>(16);
data.put("dbName", getUserInfo().getDbName());
String gfmc = "";
if (!"99".equals(pramsMap.get("gfsh")) && pramsMap.get("gfsh") != null && !"".equals(pramsMap.get("gfsh"))) {
data.put("gfsh", pramsMap.get("gfsh"));
List<Tax> org = getUserInfo().getOrg();
if (org != null && org.size() > 0) {
for (Tax tax : org) {
if (tax.getTaxno().equals(pramsMap.get("gfsh"))) {
gfmc = tax.getTaxname();
}
}
}
data.put("gfmc", gfmc);
} else {
return ResponseEntity.ok(R.error("请选择对应的购方税号!"));
if(pramsMap.get("gfsh") == null || "".equals(pramsMap.get("gfsh"))){
return ResponseEntity.ok(R.error("购方税号不能为空"));
}
String gfsh = (String) pramsMap.get("gfsh");
data.put("gfsh", gfsh);
if (pramsMap.get("companyCode") == null || "".equals(pramsMap.get("companyCode"))){
return ResponseEntity.ok(R.error("组织编码不能为空"));
}
String companyCode = (String) pramsMap.get("companyCode");
data.put("companyCode",companyCode);
if (pramsMap.get("skssq") != null && !"".equals(pramsMap.get("skssq"))) {
data.put("skssq", pramsMap.get("skssq"));
@ -223,16 +219,17 @@ public class ExtReportController extends AbstractController {
data.put("business", getUserInfo().getBusiness());
data.put("dbName", getUserInfo().getDbName());
data.put("businessCode", pramsMap.get("businessCode"));
List<String> gfshList = new ArrayList<>();
if (!"99".equals(pramsMap.get("gfsh")) && pramsMap.get("gfsh") != null && !"".equals(pramsMap.get("gfsh"))) {
gfshList.add(pramsMap.get("gfsh").toString());
} else {
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if (gfshList.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", ""));
}
if(pramsMap.get("gfsh") == null || "".equals(pramsMap.get("gfsh"))){
return ResponseEntity.ok(R.error("购方税号不能为空"));
}
data.put("gfsh", gfshList);
String gfsh = (String) pramsMap.get("gfsh");
data.put("gfsh", gfsh);
if (pramsMap.get("companyCode") == null || "".equals(pramsMap.get("companyCode"))){
return ResponseEntity.ok(R.error("组织编码不能为空"));
}
String companyCode = (String) pramsMap.get("companyCode");
data.put("companyCode",companyCode);
if (pramsMap.get("qszt") != null && !"".equals(pramsMap.get("qszt")) && !"99".equals(pramsMap.get("qszt"))) {
data.put("qszt", pramsMap.get("qszt"));
@ -317,16 +314,17 @@ public class ExtReportController extends AbstractController {
data.put("dbName", getUserInfo().getDbName());
data.put("business", getUserInfo().getBusiness());
data.put("businessCode", pramsMap.get("businessCode"));
List<String> gfshList = new ArrayList<>();
if (!"99".equals(pramsMap.get("gfsh")) && pramsMap.get("gfsh") != null && !"".equals(pramsMap.get("gfsh"))) {
gfshList.add(pramsMap.get("gfsh").toString());
} else {
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if (gfshList.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", ""));
}
if(pramsMap.get("gfsh") == null || "".equals(pramsMap.get("gfsh"))){
return ResponseEntity.ok(R.error("购方税号不能为空"));
}
data.put("gfsh", gfshList);
String gfsh = (String) pramsMap.get("gfsh");
data.put("gfsh", gfsh);
if (pramsMap.get("companyCode") == null || "".equals(pramsMap.get("companyCode"))){
return ResponseEntity.ok(R.error("组织编码不能为空"));
}
String companyCode = (String) pramsMap.get("companyCode");
data.put("companyCode",companyCode);
if (pramsMap.get("qsrqq") != null && !"".equals(pramsMap.get("qsrqq"))) {
data.put("qsrqq", DateUtils.getMorning(DateUtils.strToDate(pramsMap.get("qsrqq").toString())));

@ -108,4 +108,6 @@ public class ExtRzjgqdRespVO implements Serializable {
private String inAccountStatus;
private String gfmc;
}

@ -146,7 +146,7 @@ public class ExtRzjgqdServiceImpl extends MpBaseServiceImpl<ExtRzjgqdDao, ExtRzj
year = skssq.substring(0, 4);
month = skssq.substring(4, 6);
}
json.put("gfmc", pramsMap.get("gfmc"));
json.put("gfmc", resultList.get(1).getGfmc());
json.put("gfsh", pramsMap.get("gfsh"));
json.put("skssq", year + "年" + month + "月");
json.put("datalist", resultList);

@ -39,13 +39,11 @@
<select id="qssbHjxxByCxtj" parameterType="java.util.Map"
resultMap="HjxxMap" databaseId="mysql">
select COUNT(1)hjsl, SUM(t.invoice_amount)hjje, SUM(t.tax_amount)hjse
from t_dx_invoice t
from t_dx_invoice t left join t_dx_record_invoice t1 on t.uuid = t1.uuid
where t.qs_status = '0'
and t.qs_date between #{qsrqq} and #{qsrqz}
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
and t1.gf_tax_no = #{gfsh}
and (t1.comp_code = #{companyCode} or t1.comp_code = '' or t1.comp_code is null)
<if test="xfmc != null and xfmc != '' and xfmc != 'null' ">
and t.xf_name like CONCAT(#{xfmc},'%')
@ -129,11 +127,8 @@
from t_dx_invoice t left join t_dx_record_invoice t1 on t.uuid = t1.uuid
where t.qs_status = '0'
and t.qs_date between #{qsrqq} and #{qsrqz}
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
and t1.gf_tax_no = #{gfsh}
and (t1.comp_code = #{companyCode} or t1.comp_code = '' or t1.comp_code is null)
<if test="xfmc != null and xfmc != '' and xfmc != 'null' ">
and t.xf_name like CONCAT(#{xfmc},'%')
</if>

@ -40,16 +40,14 @@
<select id="qstjbHjxxByCxtj" parameterType="java.util.Map"
resultMap="HjxxMap" databaseId="mysql">
select COUNT(1)hjsl, SUM(t.invoice_amount)hjje, SUM(t.tax_amount)hjse
from t_dx_invoice t
from t_dx_invoice t left join t_dx_record_invoice i
on t.uuid = i.uuid
where
t.qs_date between #{qsrqq} and #{qsrqz}
and t.valid = '1'
and t.company = #{company}
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
and i.gf_tax_no = #{gfsh}
and (i.comp_code = #{companyCode} or i.comp_code = '' or i.comp_code is null)
<if test="qszt != null and qszt != '' and qszt != 'null' ">
and t.qs_status = #{qszt}
</if>
@ -151,11 +149,8 @@
t.qs_date between #{qsrqq} and #{qsrqz}
and t.valid = '1'
and t.company = #{company}
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
and i.gf_tax_no = #{gfsh}
and (i.comp_code = #{companyCode} or i.comp_code = '' or i.comp_code is null)
<if test="qszt != null and qszt != '' and qszt != 'null' ">
and t.qs_status = #{qszt}
</if>

@ -24,6 +24,7 @@
<result column="bzr" property="bzr"/>
<result column="inaccount_status" property="inAccountStatus"/>
<result column="comp_code" property="compCode"/>
<result column="gf_name" property="gfmc"/>
</resultMap>
<resultMap id="HjxxMap" type="com.dxhy.extend.model.ExtTjbbHjxxVO">
@ -40,14 +41,13 @@
dkse,date_format(t.rzh_date,'%Y-%m-%d') rzrq,
t.invoice_type,
t.rzh_yesorno dklx
,t.sn_voucher_number,t.posting_time,t.image_id,t.account_period,t.bzdh,t.bzr,t.inaccount_status,t.comp_code
,t.sn_voucher_number,t.posting_time,t.image_id,t.account_period,t.bzdh,t.bzr,t.inaccount_status,t.comp_code,t.gf_name
from t_dx_record_invoice t
where t.invoice_type in ('01','03','08','14','31') and t.auth_status = '4' <!--and rzh_yesorno='1'-->
where t.invoice_type in ('01','03','08','14','31')
and t.auth_status = '4' <!--and rzh_yesorno='1'-->
and t.company = #{company}
and t.gf_tax_no = #{gfsh}
<if test="skssq != null and skssq != '' and skssq != 'null' ">
and t.rzh_belong_date = #{skssq}
</if>
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
<if test="dklx!=null and dklx!=''">
<choose>
<when test='dklx=="99"'>
@ -94,9 +94,7 @@
where t.invoice_type in ('01','03','08','14','31') and t.auth_status = '4' <!-- and rzh_yesorno='1'-->
and t.company = #{company}
and t.gf_tax_no = #{gfsh}
<if test="skssq != null and skssq != '' and skssq != 'null' ">
and t.rzh_belong_date = #{skssq}
</if>
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
<if test="dklx!=null and dklx!=''">
<choose>
<when test='dklx=="99"'>

Loading…
Cancel
Save