Merge remote-tracking branch 'sdny/release' into release

release
zhenghaiyang@ele-cloud.com 2 years ago
commit d886f2f649
  1. 5
      dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java
  2. 14
      dxhy-erp/src/main/java/com/dxhy/erp/service/SNPushCheckRecordService.java

@ -263,6 +263,8 @@ public class SDNYMainProcessController extends AbstractController {
log.info("查验结果为:{}", checkInvoiceResult);
} catch (Exception e) {
e.printStackTrace();
log.error("查验失败,errormsg:{}",e.getMessage());
return ResponseEntity.ok(JSONObject.toJSONString(R.error("查验失败,"+e.getMessage())));
}
if (!checkInvoiceResult.containsKey("code")) {
@ -452,6 +454,9 @@ public class SDNYMainProcessController extends AbstractController {
for (int i = 0; i < detailList.size(); i++) {
String taxRateDetail = "";
JSONObject detail = (JSONObject) detailList.get(i);
if(StringUtils.isNotEmpty(detail.getString("goodsName")) && detail.getString("goodsName").contains("详见销货清单")){
continue;
}
Map<String, String> snDetailMap = new HashMap<String, String>();
snDetailMap.put("rowNo", i + 1 + "");
snDetailMap.put("commodityCode", detail.getString("goodsNum"));

@ -10,6 +10,7 @@ import com.dxhy.common.datasource.config.DynamicContextHolder;
import com.dxhy.common.enums.FplxEnum;
import com.dxhy.common.enums.SNFplxEnum;
import com.dxhy.common.util.InvoiceUtil;
import com.dxhy.common.util.StringHelper;
import com.dxhy.common.vo.UserInfo;
import com.dxhy.erp.dao.*;
import com.dxhy.erp.entity.*;
@ -450,7 +451,8 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter {
jsonObject.put("tonnage", invoiceData.get("dw"));
jsonObject.put("limitPeople", invoiceData.get("xcrs"));
String taxRate = "";
if ("免税".equals(invoiceData.get("sl"))) {
if (invoiceData.get("sl")==null||StringUtils.isBlank(invoiceData.get("sl").toString())||
"免税".equals(invoiceData.get("sl").toString())|| "不征税".equals(invoiceData.get("sl").toString()) || "***".equals(invoiceData.get("sl").toString())) {
taxRate = "0";
jsonObject.put("taxRate", taxRate);
} else {
@ -718,8 +720,14 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter {
log.info("uuid={}", uuid);
reimburse.setSelectId(uuid);
reimburse.setTaxRate(invoice.getTaxRate());
reimburse.setTaxCode(getTaxCode(invoice.getTaxRate()));
if (StringHelper.isNotBlank(invoice.getTaxRate())){
reimburse.setTaxRate(invoice.getTaxRate());
reimburse.setTaxCode(getTaxCode(invoice.getTaxRate()));
}else {
reimburse.setTaxRate("0%");
reimburse.setTaxCode(getTaxCode(reimburse.getTaxRate()));
}
reimburse.setIsDeduction(invoice.getIsDeductible());
if (StringUtils.isNoneBlank(reimburse.getInvoiceCode())) {

Loading…
Cancel
Save