ariesy 修改controller直接调用dao的代码

release
yefei 2 years ago
parent 64302406f6
commit 9c6c71d127
  1. 9
      dxhy-erp/src/main/java/com/dxhy/erp/controller/ElectronController.java
  2. 4
      dxhy-erp/src/main/java/com/dxhy/erp/controller/ReimbursementController.java
  3. 12
      dxhy-erp/src/main/java/com/dxhy/erp/service/ElectronService.java
  4. 2
      dxhy-erp/src/main/java/com/dxhy/erp/service/TDxInvoiceReimburseService.java
  5. 5
      dxhy-erp/src/main/java/com/dxhy/erp/service/impl/TDxInvoiceReimburseServiceImpl.java
  6. 5
      dxhy-extend/src/main/java/com/dxhy/extend/controller/VouncherSyncController.java
  7. 6
      dxhy-extend/src/main/java/com/dxhy/extend/service/bb/VouncherSyncService.java
  8. 12
      dxhy-extend/src/main/java/com/dxhy/extend/service/bb/impl/VouncherSyncServiceImpl.java

@ -44,11 +44,6 @@ public class ElectronController {
@Value("${pro.yl.gfTaxNo}") @Value("${pro.yl.gfTaxNo}")
private String yLgfTaxNo; private String yLgfTaxNo;
@Resource
private InvoiceImgDao imgDao;
@Resource
private SysDeptDao sysDeptDao;
@Resource @Resource
private FileService fileService; private FileService fileService;
@ -126,12 +121,12 @@ public class ElectronController {
InvoiceImgQueryVo img; InvoiceImgQueryVo img;
String downLondFile = ""; String downLondFile = "";
try { try {
SysDeptEntity deptEntity = sysDeptDao.getOrg(yLgfTaxNo); SysDeptEntity deptEntity = electronService.getOrg(yLgfTaxNo);
String dbName = null; String dbName = null;
if (deptEntity != null && deptEntity.getDbName() != null) { if (deptEntity != null && deptEntity.getDbName() != null) {
dbName = deptEntity.getDbName(); dbName = deptEntity.getDbName();
} }
img = this.imgDao.getImg(scanId); img = electronService.getImg(scanId);
if (null != img) { if (null != img) {
String[] fileAccount = null; String[] fileAccount = null;

@ -32,8 +32,6 @@ import java.util.List;
@Slf4j @Slf4j
public class ReimbursementController { public class ReimbursementController {
@Resource
SysDeptDao sysDeptDao;
@Resource @Resource
TDxInvoiceReimburseService tDxInvoiceReimburseService; TDxInvoiceReimburseService tDxInvoiceReimburseService;
@ -48,7 +46,7 @@ public class ReimbursementController {
if (StringUtils.isNotBlank(msg)){ if (StringUtils.isNotBlank(msg)){
return ResponseEntity.ok(R.error(msg)); return ResponseEntity.ok(R.error(msg));
}*/ }*/
SysDeptEntity deptEntity = sysDeptDao.getOrgType(reimburseReq.getGfTaxNo()); SysDeptEntity deptEntity = tDxInvoiceReimburseService.getOrgType(reimburseReq.getGfTaxNo());
if (deptEntity == null) { if (deptEntity == null) {
return ResponseEntity.ok(R.error("购方税号未配置")); return ResponseEntity.ok(R.error("购方税号未配置"));
} }

@ -5,6 +5,9 @@ import java.util.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import com.dxhy.erp.dao.InvoiceImgDao;
import com.dxhy.erp.entity.InvoiceImgQueryVo;
import com.dxhy.erp.entity.SysDeptEntity;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -43,6 +46,8 @@ public class ElectronService {
@Resource @Resource
private SysDeptDao sysDeptDao; private SysDeptDao sysDeptDao;
@Resource @Resource
private InvoiceImgDao imgDao;
@Resource
private FileService fileService; private FileService fileService;
public Map<String, String> electronEvent(String content) { public Map<String, String> electronEvent(String content) {
@ -104,4 +109,11 @@ public class ElectronService {
} }
return returnList; return returnList;
} }
public SysDeptEntity getOrg(String yLgfTaxNo) {
return sysDeptDao.getOrg(yLgfTaxNo);
}
public InvoiceImgQueryVo getImg(String scanId) {
return imgDao.getImg(scanId);
}
} }

@ -21,4 +21,6 @@ public interface TDxInvoiceReimburseService extends IService<TDxInvoiceReimburse
String signCanceled(GlobalInfo globalInfo, Map<String, String> map, HttpServletRequest request, String signCanceled(GlobalInfo globalInfo, Map<String, String> map, HttpServletRequest request,
HttpServletResponse response, Authorize authorize); HttpServletResponse response, Authorize authorize);
SysDeptEntity getOrgType(String gfTaxNo);
} }

@ -322,6 +322,11 @@ public class TDxInvoiceReimburseServiceImpl extends ServiceImpl<TDxInvoiceReimbu
} }
} }
@Override
public SysDeptEntity getOrgType(String gfTaxNo) {
return sysDeptDao.getOrgType(gfTaxNo);
}
public ReturnStateInfo getCheck(ReimburseReq data) { public ReturnStateInfo getCheck(ReimburseReq data) {
ReturnStateInfo run = new ReturnStateInfo(); ReturnStateInfo run = new ReturnStateInfo();

@ -36,8 +36,7 @@ public class VouncherSyncController {
private VouncherSyncService vouncherSyncService; private VouncherSyncService vouncherSyncService;
@Value("${sdny.record.environment}") @Value("${sdny.record.environment}")
private String environment; private String environment;
@Resource
private GsClientMapper gsClientMapper;
@PostMapping("getSapData") @PostMapping("getSapData")
public Object getSapData(@RequestBody Map<String,String> map){ public Object getSapData(@RequestBody Map<String,String> map){
//是否全量 X为全量推送,空为增量推送。 //是否全量 X为全量推送,空为增量推送。
@ -79,7 +78,7 @@ public class VouncherSyncController {
// object.setZFILED2(""); // object.setZFILED2("");
// object.setZFILED3(""); // object.setZFILED3("");
// object.setZFILED4(""); // object.setZFILED4("");
List<GsClient> gsClients = gsClientMapper.selectByGsdm(str); List<GsClient> gsClients = vouncherSyncService.selectByGsdm(str);
if(gsClients!=null && gsClients.size()>0){ if(gsClients!=null && gsClients.size()>0){
object.setZFILED5(gsClients.get(0).getClient()); object.setZFILED5(gsClients.get(0).getClient());
}else { }else {

@ -1,9 +1,15 @@
package com.dxhy.extend.service.bb; package com.dxhy.extend.service.bb;
import com.dxhy.extend.entity.GsClient;
import java.util.List;
/** /**
* @Author wangzhikun * @Author wangzhikun
* @Date 2023/3/30 2023/3/30 * @Date 2023/3/30 2023/3/30
*/ */
public interface VouncherSyncService { public interface VouncherSyncService {
String sendPo(String toJSONString); String sendPo(String toJSONString);
List<GsClient> selectByGsdm(String gsdm);
} }

@ -1,11 +1,16 @@
package com.dxhy.extend.service.bb.impl; package com.dxhy.extend.service.bb.impl;
import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpRequest;
import com.dxhy.extend.dao.GsClientMapper;
import com.dxhy.extend.entity.GsClient;
import com.dxhy.extend.service.bb.VouncherSyncService; import com.dxhy.extend.service.bb.VouncherSyncService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/** /**
* @Author wangzhikun * @Author wangzhikun
* @Date 2023/3/30 2023/3/30 * @Date 2023/3/30 2023/3/30
@ -20,6 +25,8 @@ public class VouncherSyncServiceImpl implements VouncherSyncService {
@Value("${po.password}") @Value("${po.password}")
private String password; private String password;
@Resource
private GsClientMapper gsClientMapper;
@Override @Override
public String sendPo(String request) { public String sendPo(String request) {
@ -33,4 +40,9 @@ public class VouncherSyncServiceImpl implements VouncherSyncService {
return body; return body;
} }
@Override
public List<GsClient> selectByGsdm(String gsdm) {
return gsClientMapper.selectByGsdm(gsdm);
}
} }

Loading…
Cancel
Save