|
|
@ -32,11 +32,17 @@ import com.glxp.api.res.basic.BasicSkPrescribeResponse;
|
|
|
|
import com.glxp.api.res.basic.SysWorkplaceDocumentResponse;
|
|
|
|
import com.glxp.api.res.basic.SysWorkplaceDocumentResponse;
|
|
|
|
import com.glxp.api.service.basic.*;
|
|
|
|
import com.glxp.api.service.basic.*;
|
|
|
|
import com.glxp.api.util.BeanCopyUtils;
|
|
|
|
import com.glxp.api.util.BeanCopyUtils;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
|
|
|
|
import org.springframework.dao.CannotAcquireLockException;
|
|
|
|
|
|
|
|
import org.springframework.dao.DeadlockLoserDataAccessException;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
import java.sql.SQLException;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
@ -46,6 +52,7 @@ import java.util.List;
|
|
|
|
* 原始单据下载
|
|
|
|
* 原始单据下载
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Service
|
|
|
|
@Service
|
|
|
|
|
|
|
|
@Slf4j
|
|
|
|
public class IoCollectOriginService {
|
|
|
|
public class IoCollectOriginService {
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ErpBasicClient erpBasicClient;
|
|
|
|
private ErpBasicClient erpBasicClient;
|
|
|
@ -75,6 +82,7 @@ public class IoCollectOriginService {
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private BasicProductsDao basicProductsDao;
|
|
|
|
private BasicProductsDao basicProductsDao;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(isolation = Isolation.READ_COMMITTED)
|
|
|
|
public BaseResponse downloadOrderV2(CollectOrderRequest collectOrderRequest) {
|
|
|
|
public BaseResponse downloadOrderV2(CollectOrderRequest collectOrderRequest) {
|
|
|
|
//条件
|
|
|
|
//条件
|
|
|
|
String busType = collectOrderRequest.getBusType();
|
|
|
|
String busType = collectOrderRequest.getBusType();
|
|
|
@ -107,7 +115,8 @@ public class IoCollectOriginService {
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param collectOrderRequest
|
|
|
|
* @param collectOrderRequest
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
// @Transactional(rollbackFor = Exception.class)
|
|
|
|
@Transactional(isolation = Isolation.READ_COMMITTED)
|
|
|
|
|
|
|
|
@ExceptionHandler(CannotAcquireLockException.class)
|
|
|
|
public BaseResponse errorHandle(CollectOrderRequest collectOrderRequest) {
|
|
|
|
public BaseResponse errorHandle(CollectOrderRequest collectOrderRequest) {
|
|
|
|
if (StrUtil.isBlank(collectOrderRequest.getBillNo())) {
|
|
|
|
if (StrUtil.isBlank(collectOrderRequest.getBillNo())) {
|
|
|
|
throw new JsonException(500, "单据号不能为空");
|
|
|
|
throw new JsonException(500, "单据号不能为空");
|
|
|
|