Merge branches '1007-认证人和组织权限需要匹配,只显示启用了该组织进项功能的人' and 'release' of http://192.168.12.182/invoice/pt into 1007-认证人和组织权限需要匹配,只显示启用了该组织进项功能的人

release
yefei 2 years ago
commit acee656c64
  1. 6
      dxhy-admin/src/main/java/com/dxhy/admin/sys/service/impl/SysUserServiceImpl.java
  2. 25
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
  3. 4
      dxhy-base/src/main/java/com/dxhy/base/model/BaseSggxCxRespVO.java
  4. 14
      dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
  5. 24
      dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml
  6. 5
      dxhy-customs/src/main/java/com/dxhy/customs/service/impl/CustomsCustomsJkszhcxServiceImpl.java
  7. 38
      dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java
  8. 5
      dxhy-export-domestic/src/main/java/com/dxhy/domestic/service/count/impl/DomesticCustomsExportCountServiceImpl.java
  9. 5
      dxhy-export-domestic/src/main/java/com/dxhy/domestic/service/count/impl/DomesticInvoiceExportCountServiceImpl.java
  10. 7
      dxhy-extend/src/main/java/com/dxhy/extend/service/bb/impl/ExtFpzhcxServiceImpl.java

@ -160,8 +160,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
// 保存客户信息,更新企业税号
user.getUserOrgEntities().stream().forEach(userOrg -> {
if(StringUtils.isEmpty(userOrg.getTaxno())){
if(StringUtils.isNotEmpty(taxnos.get(userOrg.getDeptId()))) {
userOrg.setTaxno(taxnos.get(userOrg.getDeptId()));
String taxno = taxnos.get(String.valueOf(userOrg.getDeptId()));
log.info("销项同步税号为:taxno={}",taxno);
if(StringUtils.isNotEmpty(taxno)){
userOrg.setTaxno(taxno);
}
}
});

@ -51,7 +51,6 @@ import java.util.stream.Collectors;
public class BaseInvoiceController extends AbstractController {
/**
* 认证发票查询service
*
*/
@Resource
private BaseRzFpxxService baseRzFpxxService;
@ -289,6 +288,7 @@ public class BaseInvoiceController extends AbstractController {
// 已认证传 认证起止日期和税款所属期做判断
if (!"99".equals(rzzt)) {
pramsMap.put("rzzt", rzzt);
}
if (!"0".equals(rzzt)) {
if (!StringHelper.isBlank(rzksrq)) {
rzksrq = DateUtils.getMorning(DateUtils.strToDate(rzksrq));
@ -306,7 +306,6 @@ public class BaseInvoiceController extends AbstractController {
pramsMap.put("skssq", skssq);
}
}
}
} else {
return ResponseEntity.ok(R.error("认证状态不能为空!"));
}
@ -384,8 +383,7 @@ public class BaseInvoiceController extends AbstractController {
/**
* 撤销认证
*
* @param map
* 请求参数 id逗号分隔
* @param map 请求参数 id逗号分隔
* @return 返回结果
*/
@PostMapping("/rzzhcx/cxrz")
@ -412,7 +410,6 @@ public class BaseInvoiceController extends AbstractController {
}
/**
*
* 扫码勾选录入查询
*/
@PostMapping("/smgx/smgxcx")
@ -499,6 +496,7 @@ public class BaseInvoiceController extends AbstractController {
String kpksrq = (String) map.get("kpksrq");
String kpjsrq = (String) map.get("kpjsrq");
String qszt = (String) map.get("qszt");
String rzzt = (String) map.get("rzzt");
String qsfs = (String) map.get("qsfs");
String businessCode = (String) map.get("businessCode");
String invoiceNo = (String) map.get("invoiceNo");
@ -527,8 +525,6 @@ public class BaseInvoiceController extends AbstractController {
}
Map<String, Object> pramsMap = new HashMap<>(32);
pramsMap.put("companyCode", companyCode);
@ -594,6 +590,9 @@ public class BaseInvoiceController extends AbstractController {
pramsMap.put("taxRate", taxRate);
}
if (StringUtils.isNotBlank(rzzt) && !"99".equals(rzzt)) {
pramsMap.put("rzzt", rzzt);
}
if (!StringUtils.isBlank(invoiceType)) {
if (!"99".equals(invoiceType)) {
@ -986,7 +985,6 @@ public class BaseInvoiceController extends AbstractController {
}
try {
return ResponseEntity
.ok(R.ok().put("data", baseInvoiceManualCheckService.inTellingCheck(pramsMap)));
@ -1173,7 +1171,7 @@ public class BaseInvoiceController extends AbstractController {
/**
* 扫码手工导入勾选操做入口
*
* <p>
* 0-手工勾选 1-扫码勾选 2-导入勾选 3- 智能勾选 4-手工认证 5-扫码认证 6-导入认证
*
* @return 返回结果
@ -1217,8 +1215,7 @@ public class BaseInvoiceController extends AbstractController {
/**
* 已勾选发票待确认列表
*
* @param map
* 请求参数
* @param map 请求参数
* @return 返回结果
*/
@PostMapping("/ygxfp/jgxfpcx")
@ -1310,8 +1307,7 @@ public class BaseInvoiceController extends AbstractController {
/**
* 撤销已经勾选的发票
*
* @param map
* 请求参数
* @param map 请求参数
* @return 返回结果
*/
@PostMapping("/gxfp/cxgx")
@ -1340,8 +1336,7 @@ public class BaseInvoiceController extends AbstractController {
/**
* 一键提交
*
* @param map
* 请求参数
* @param map 请求参数
* @return 返回结果
*/
@PostMapping("/gxfp/tjrz")

@ -74,6 +74,10 @@ public class BaseSggxCxRespVO {
* 签收方式
*/
private String qsfs;
/**
* 认证状态
*/
private String rzzt;
/**
* 签收人
*/

@ -77,7 +77,7 @@
and t.invoice_type in('01','03','08','14','31','283','161','183','185')
and t.bdk_status in ('1','2')
and t.export_mark = '0'
and t.auth_status in ('2','3','4')
and t.auth_status in ('0','2','3','4','5','6')
and t.company = #{company}
and t.gf_tax_no = #{gfsh}
and t.comp_code = #{companyCode}
@ -124,9 +124,12 @@
<if test="imageId != null and imageId != '' and imageId != 'null' ">
and t.image_id = #{imageId}
</if>
<if test="rzclzt !=null and rzclzt != ''">
<if test="rzclzt == '0'.toString() or rzclzt == '4'.toString() or rzclzt == '5'.toString() or rzclzt == '6'.toString()">
and t.auth_status = #{rzclzt}
</if>
<if test="rzclzt == '1'.toString() ">
and (t.auth_status = '2' or t.auth_status = '3')
</if>
<if test="rzlx!=null and rzlx!=''">
and t.bdk_status = #{rzlx}
</if>
@ -354,7 +357,7 @@
and t.gf_tax_no = #{gfsh}
and t.comp_code = #{companyCode}
and t.invoice_type in('01','03','08','14','31','283','161','183','185')
and t.auth_status in ('2','3','4')
and t.auth_status in ('0','2','3','4','5','6')
and t.bdk_status in ('1','2')
and t.export_mark = '0'
and t.company =#{company}
@ -402,9 +405,12 @@
<if test="rzzt != null and rzzt != '' and rzzt != 'null' ">
and t.rzh_yesorno = #{rzzt}
</if>
<if test="rzclzt != null and rzclzt != '' and rzclzt != 'null' ">
<if test="rzclzt == '0'.toString() or rzclzt == '4'.toString() or rzclzt == '5'.toString() or rzclzt == '6'.toString()">
and t.auth_status = #{rzclzt}
</if>
<if test="rzclzt == '1'.toString() ">
and (t.auth_status = '2' or t.auth_status = '3')
</if>
<if test="rzlx!=null and rzlx!=''">
and t.bdk_status = #{rzlx}
</if>

@ -86,7 +86,7 @@
WHERE t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.invoice_type in('01','03','08','14','31','283','161','183','185')
and t.rzh_yesorno = '0'
and t.auth_status in('0','5','6')
and t.auth_status in('0','2','3','5','6')
and t.export_mark = '0'
and t.inaccount_status = '1'
and t.company = #{company}
@ -129,6 +129,15 @@
<if test="qszt != null and qszt != '' and qszt != 'null' ">
and t.qs_status = #{qszt}
</if>
<if test="rzzt == '0'.toString()">
and t.auth_status = #{rzzt}
</if>
<if test="rzzt == '1'.toString()">
and (t.auth_status = '2' or t.auth_status = '3')
</if>
<if test="rzzt == '2'.toString()">
and t.auth_status = '5'
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99' and inAccountStatus == '1'.toString()">
and t.inaccount_status = #{inAccountStatus}
@ -417,7 +426,7 @@
WHERE t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.invoice_type in('01','03','08','14','31','283','161','183','185')
and t.rzh_yesorno = '0'
and t.auth_status in('0','5','6')
and t.auth_status in('0','2','3','5','6')
and t.inaccount_status = '1'
and t.export_mark = '0'
and t.company = #{company}
@ -442,6 +451,16 @@
<if test="qszt != null and qszt != '' and qszt != 'null' ">
and t.qs_status = #{qszt}
</if>
<if test="rzzt == '0'.toString()">
and t.auth_status = #{rzzt}
</if>
<if test="rzzt == '1'.toString()">
and (t.auth_status = '2' or t.auth_status = '3')
</if>
<if test="rzzt == '2'.toString()">
and t.auth_status = '5'
</if>
<if test="suspendStatus != null and suspendStatus != '' and suspendStatus != 'null' and suspendStatus != '99' and suspendStatus == '1'.toString()">
and t.suspend_status = '1'
</if>
@ -1255,6 +1274,7 @@
and t.rzh_yesorno = '0'
and t.invoice_status in ('0','7')
and t.auth_status in('0','5','6')
and t.inaccount_status = '1'
and t.export_mark = '0'
and t.invoice_amount>0
and t.tax_amount>=0

@ -148,6 +148,11 @@ public class CustomsCustomsJkszhcxServiceImpl extends MpBaseServiceImpl<CustomsJ
pageList.get(i).setQsType(dictdetaServcice.queryDictName(DictConstant.QS_TYPE, qsType));
String rzhYesorno = pageList.get(i).getRzhYesorno();
pageList.get(i).setRzhYesorno(dictdetaServcice.queryDictName(DictConstant.DEDU_STATUS, rzhYesorno));
String confirmUser = pageList.get(i).getConfirmUser();
if(StringUtils.isEmpty(confirmUser) && "4".equals(auditStatus)){
pageList.get(i).setConfirmUser("admin");
}
}
}
// 设置记录总数

@ -263,6 +263,42 @@ public class SDNYMainProcessController extends AbstractController {
if (checkInvoiceByUuid != null) {
log.info("进项票池已存在发票.直接返回票池信息");
R data = new R(1000, "default success");
//如果购方名称为空,则查验之后补充购销方相关信息
String gfName = checkInvoiceByUuid.getGfName();
String gfAddressAndPhone = checkInvoiceByUuid.getGfAddressAndPhone();
if(StringUtils.isEmpty(gfName) || StringUtils.isEmpty(gfAddressAndPhone)){
log.info("购方名称为空,查验补充信息");
checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap, null);
if (!checkInvoiceResult.containsKey("code")) {
if (!checkInvoiceResult.containsKey("cyjg")) {
//先删除原有主数据,再查验更新主数据和明细数据
int delete = baseTDxRecordInvoiceDao.delete(recordWrapper);
if (delete > 0) {
checkInvoiceResult.put("invoiceNo", checkInvoiceResult.getString("invoiceNumber"));
signSaveInvoiceInfoService.saveQueryInvoiceResult(checkInvoiceResult, userid, "1", dbName);
}
} else if (checkInvoiceResult.containsKey("cyjg") && !"0001".equals(checkInvoiceResult.getString("cyjg"))) {
data = errorInfo(checkInvoiceResult, data);
try {
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE);
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0, JSONObject.toJSONString(data),
(String) checkInvoiceResult.get("cyjgxx"));
} catch (Exception e) {
log.error("发票查验接口记录保存失败,errormsg:{}", e);
}
return ResponseEntity.ok(JSONObject.toJSONString(data));
}
}
DynamicContextHolder.push("business" + DbConstant.BUSINESS_READ);
checkInvoiceByUuid = baseTDxRecordInvoiceDao.selectOne(recordWrapper);
}
String invoiceNo = checkInvoiceByUuid.getInvoiceNo();
QueryWrapper<BaseTDxRecordInvoiceDetail> detailWrapper = new QueryWrapper<>();
detailWrapper.eq("uuid", uuid);
@ -807,7 +843,7 @@ public class SDNYMainProcessController extends AbstractController {
checkInvoice.put("taxAuthorityNo", vehicleList.getString("taxBureauCode"));
checkInvoice.put("taxAuthorityName", vehicleList.getString("taxBureauName"));
checkInvoice.put("idcardNo", vehicleList.getString("buyerIdNum"));
checkInvoice.put("amountTax", vehicleList.getString("carPrice"));
// checkInvoice.put("amountTax", vehicleList.getString("carPrice"));
}
//二手车
if ("15".equals(invoiceType)) {

@ -92,6 +92,11 @@ public class DomesticCustomsExportCountServiceImpl extends MpBaseServiceImpl<Dom
AmountFormatUtil.fmtMicrometer(MathUtil.round((String)map.get("yxExportTaxAmount"))));
map.put("select", true);
String confirmUser = (String)map.get("confirmUser");
if(StringUtils.isEmpty(confirmUser) && "4".equals(authStatus)){
map.put("confirmUser","admin");
}
if ("1".equals(map.get("inAccountStatus"))){
map.put("inAccountStatus","已入账");
}else {

@ -89,7 +89,10 @@ public class DomesticInvoiceExportCountServiceImpl extends MpBaseServiceImpl<Dom
map.put("bdkStatus", dictdetaServcice.queryDictName(DictConstant.BDK_STATUS, bdkStatus));
String cxbdkStatus = (String)map.get("cxbdkStatus");
map.put("cxbdkStatus", dictdetaServcice.queryDictName(DictConstant.CXRZ_STATUS, cxbdkStatus));
String confirmUser = (String)map.get("confirmUser");
if(StringUtils.isEmpty(confirmUser) && "4".equals(authStatus)){
map.put("confirmUser","admin");
}
// if (cxrzModels!=null){
// for (DictdetaModel model:cxrzModels){
// if (model.getDictcode().equals(map.get("cxbdkStatus"))){

@ -101,6 +101,11 @@ public class ExtFpzhcxServiceImpl extends MpBaseServiceImpl<ExtBbfpzhDao, ExtBbf
AmountFormatUtil.fmtMicrometer(MathUtil.round(resultList.get(i).getTaxAmount())));
}
}
String rzhr = resultList.get(i).getRzhr();
String rzclzt = resultList.get(i).getRzclzt();
if(StringUtils.isEmpty(rzhr) && "4".equals(rzclzt)){
resultList.get(i).setRzhr("admin");
}
resultList.get(i)
.setTaxAmount(AmountFormatUtil.fmtMicrometer(MathUtil.round(resultList.get(i).getTaxAmount())));
@ -117,7 +122,7 @@ public class ExtFpzhcxServiceImpl extends MpBaseServiceImpl<ExtBbfpzhDao, ExtBbf
.setInvoiceStatus(dictdetaServcice.queryDictName(DictConstant.INVOICE_STATUS, invoiceStatus));
String rzzt = resultList.get(i).getRzzt();
resultList.get(i).setRzzt(dictdetaServcice.queryDictName(DictConstant.DEDU_STATUS, rzzt));
String rzclzt = resultList.get(i).getRzclzt();
resultList.get(i).setRzclzt(dictdetaServcice.queryDictName(DictConstant.AUTH_STATUS_ALL, rzclzt));
String qszt = resultList.get(i).getQszt();
resultList.get(i).setQszt(dictdetaServcice.queryDictName(DictConstant.QS_STATUS, qszt));

Loading…
Cancel
Save