feat(deletedata): 新增销售订单取消审核功能
- 添加 cancelSignatureSoSale 方法实现销售订单取消审核 - 新增 ApproveinfoCancelSignature、JsonRootBeanCancelSignature 和 QueryinfoCancelSignature 类用于处理取消审核请求 - 修改 DeleteSoSaleVo 中的 fstatus 类型从 String 改为 Long - 更新 querySoSaleByDelete SQL语句,使用参数化查询状态
This commit is contained in:
parent
124a9d78c9
commit
e00f63cd87
|
@ -32,6 +32,8 @@ public class DeleteU8cDataUtilTest {
|
||||||
// deleteU8cDataUtil.deleteIcGeneralH();
|
// deleteU8cDataUtil.deleteIcGeneralH();
|
||||||
//删除销售订单
|
//删除销售订单
|
||||||
// deleteU8cDataUtil.deleteSoSale();
|
// deleteU8cDataUtil.deleteSoSale();
|
||||||
|
//销售订单取消审核
|
||||||
|
deleteU8cDataUtil.cancelSignatureSoSale();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,9 @@ package com.hzya.frame.deletedata;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
//import com.alibaba.fastjson.JSONObject;
|
//import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.deletedata.cancelsignature.ApproveinfoCancelSignature;
|
||||||
|
import com.hzya.frame.deletedata.cancelsignature.JsonRootBeanCancelSignature;
|
||||||
|
import com.hzya.frame.deletedata.cancelsignature.QueryinfoCancelSignature;
|
||||||
import com.hzya.frame.deletedata.dao.DeleteU8cDataUtilDao;
|
import com.hzya.frame.deletedata.dao.DeleteU8cDataUtilDao;
|
||||||
import com.hzya.frame.deletedata.entity.DeleteU8cDataUtilEntity;
|
import com.hzya.frame.deletedata.entity.DeleteU8cDataUtilEntity;
|
||||||
//import com.hzya.frame.plugin.lets.dao.ISoSaleinvoiceDao;
|
//import com.hzya.frame.plugin.lets.dao.ISoSaleinvoiceDao;
|
||||||
|
@ -15,6 +18,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,6 +56,44 @@ public class DeleteU8cDataUtil {
|
||||||
thread.start();
|
thread.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售订单取消签字
|
||||||
|
*/
|
||||||
|
public void cancelSignatureSoSale() {
|
||||||
|
try {
|
||||||
|
DeleteSoSaleVo deleteSoSaleVo = new DeleteSoSaleVo();
|
||||||
|
deleteSoSaleVo.setDataSourceCode("lets_u8c");
|
||||||
|
deleteSoSaleVo.setFstatus(2L);
|
||||||
|
List<DeleteU8cDataUtilEntity> soSaleinvoiceEntities = deleteU8cDataUtilDao.querySoSaleByDelete(deleteSoSaleVo);
|
||||||
|
logger.info("条数:{}", soSaleinvoiceEntities.size());
|
||||||
|
if (soSaleinvoiceEntities != null && soSaleinvoiceEntities.size() > 0) {
|
||||||
|
for (int i = 0; i < soSaleinvoiceEntities.size(); i++) {
|
||||||
|
DeleteU8cDataUtilEntity deleteU8cDataUtilEntity = soSaleinvoiceEntities.get(i);
|
||||||
|
|
||||||
|
List<String> stringList = new ArrayList<>();
|
||||||
|
stringList.add(deleteU8cDataUtilEntity.getDbilldate());
|
||||||
|
|
||||||
|
JsonRootBeanCancelSignature jsonRootBeanCancelSignature = new JsonRootBeanCancelSignature();
|
||||||
|
|
||||||
|
QueryinfoCancelSignature queryinfoCancelSignature = new QueryinfoCancelSignature();
|
||||||
|
queryinfoCancelSignature.setDate_begin(deleteU8cDataUtilEntity.getDbilldate());
|
||||||
|
queryinfoCancelSignature.setDate_end(deleteU8cDataUtilEntity.getDbilldate());
|
||||||
|
queryinfoCancelSignature.setCorp(deleteU8cDataUtilEntity.getUnitcode());
|
||||||
|
queryinfoCancelSignature.setCode(stringList);
|
||||||
|
|
||||||
|
ApproveinfoCancelSignature approveinfoCancelSignature = new ApproveinfoCancelSignature();
|
||||||
|
approveinfoCancelSignature.setApprovid("tbadmin");
|
||||||
|
|
||||||
|
jsonRootBeanCancelSignature.setApproveinfo(approveinfoCancelSignature);
|
||||||
|
jsonRootBeanCancelSignature.setQueryinfo(queryinfoCancelSignature);
|
||||||
|
sendU8C("http://39.170.109.90:8088/u8cloud/api/so/saleorder/unapprove", JSON.toJSONString(jsonRootBeanCancelSignature));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除销售订单
|
* 删除销售订单
|
||||||
*/
|
*/
|
||||||
|
@ -59,6 +101,7 @@ public class DeleteU8cDataUtil {
|
||||||
try {
|
try {
|
||||||
DeleteSoSaleVo deleteSoSaleVo = new DeleteSoSaleVo();
|
DeleteSoSaleVo deleteSoSaleVo = new DeleteSoSaleVo();
|
||||||
deleteSoSaleVo.setDataSourceCode("lets_u8c");
|
deleteSoSaleVo.setDataSourceCode("lets_u8c");
|
||||||
|
deleteSoSaleVo.setFstatus(1L);
|
||||||
List<DeleteU8cDataUtilEntity> soSaleinvoiceEntities = deleteU8cDataUtilDao.querySoSaleByDelete(deleteSoSaleVo);
|
List<DeleteU8cDataUtilEntity> soSaleinvoiceEntities = deleteU8cDataUtilDao.querySoSaleByDelete(deleteSoSaleVo);
|
||||||
logger.info("条数:{}", soSaleinvoiceEntities.size());
|
logger.info("条数:{}", soSaleinvoiceEntities.size());
|
||||||
if (soSaleinvoiceEntities != null && soSaleinvoiceEntities.size() > 0) {
|
if (soSaleinvoiceEntities != null && soSaleinvoiceEntities.size() > 0) {
|
||||||
|
@ -141,8 +184,8 @@ public class DeleteU8cDataUtil {
|
||||||
queryinfo.setCode(deleteU8cDataUtilEntity.getVreceiptcode());
|
queryinfo.setCode(deleteU8cDataUtilEntity.getVreceiptcode());
|
||||||
|
|
||||||
JsonRootBean jsonRootBean = new JsonRootBean();
|
JsonRootBean jsonRootBean = new JsonRootBean();
|
||||||
jsonRootBean.setDeleteInfo(deleteinfo);
|
jsonRootBean.setDeleteinfo(deleteinfo);
|
||||||
jsonRootBean.setQueryInfo(queryinfo);
|
jsonRootBean.setQueryinfo(queryinfo);
|
||||||
sendU8C("http://39.170.109.90:8088/u8cloud/api/so/saleinvoice/delete", JSON.toJSONString(jsonRootBean));
|
sendU8C("http://39.170.109.90:8088/u8cloud/api/so/saleinvoice/delete", JSON.toJSONString(jsonRootBean));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,7 +194,6 @@ public class DeleteU8cDataUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 2024年8月8日 10:54:48
|
* 2024年8月8日 10:54:48
|
||||||
* 推送U8C销售订单方法
|
* 推送U8C销售订单方法
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.hzya.frame.deletedata.cancelsignature;
|
||||||
|
|
||||||
|
public class ApproveinfoCancelSignature {
|
||||||
|
|
||||||
|
private String approveDate;
|
||||||
|
private String approvid;
|
||||||
|
|
||||||
|
public String getApproveDate() {
|
||||||
|
return approveDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApproveDate(String approveDate) {
|
||||||
|
this.approveDate = approveDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getApprovid() {
|
||||||
|
return approvid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApprovid(String approvid) {
|
||||||
|
this.approvid = approvid;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.hzya.frame.deletedata.cancelsignature;
|
||||||
|
|
||||||
|
public class JsonRootBeanCancelSignature {
|
||||||
|
|
||||||
|
private QueryinfoCancelSignature queryinfo;
|
||||||
|
private ApproveinfoCancelSignature approveinfo;
|
||||||
|
|
||||||
|
public QueryinfoCancelSignature getQueryinfo() {
|
||||||
|
return queryinfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQueryinfo(QueryinfoCancelSignature queryinfo) {
|
||||||
|
this.queryinfo = queryinfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApproveinfoCancelSignature getApproveinfo() {
|
||||||
|
return approveinfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApproveinfo(ApproveinfoCancelSignature approveinfo) {
|
||||||
|
this.approveinfo = approveinfo;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.hzya.frame.deletedata.cancelsignature;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class QueryinfoCancelSignature {
|
||||||
|
private String date_end;
|
||||||
|
private String date_begin;
|
||||||
|
private List<String> code;
|
||||||
|
private String corp;
|
||||||
|
|
||||||
|
public String getDate_end() {
|
||||||
|
return date_end;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDate_end(String date_end) {
|
||||||
|
this.date_end = date_end;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDate_begin() {
|
||||||
|
return date_begin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDate_begin(String date_begin) {
|
||||||
|
this.date_begin = date_begin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(List<String> code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCorp() {
|
||||||
|
return corp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCorp(String corp) {
|
||||||
|
this.corp = corp;
|
||||||
|
}
|
||||||
|
}
|
|
@ -66,6 +66,7 @@
|
||||||
<result property="unitcode" column="unitcode" jdbcType="VARCHAR"/>
|
<result property="unitcode" column="unitcode" jdbcType="VARCHAR"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- AND a.fstatus = 1 自由 AND a.fstatus = 2 审核-->
|
||||||
<select id="querySoSaleByDelete" parameterType="com.hzya.frame.deletedata.vo.DeleteSoSaleVo" resultMap="get-SoSaleByDelete-result">
|
<select id="querySoSaleByDelete" parameterType="com.hzya.frame.deletedata.vo.DeleteSoSaleVo" resultMap="get-SoSaleByDelete-result">
|
||||||
SELECT
|
SELECT
|
||||||
a.csaleid,
|
a.csaleid,
|
||||||
|
@ -83,7 +84,7 @@
|
||||||
a.cbiztype IN ( '0001A110000000001TH5', '0001A110000000001TH6' )
|
a.cbiztype IN ( '0001A110000000001TH5', '0001A110000000001TH6' )
|
||||||
AND a.dbilldate >= '2024-11-01 00:00:00'
|
AND a.dbilldate >= '2024-11-01 00:00:00'
|
||||||
AND a.dbilldate <= '2024-11-30 23:59:59'
|
AND a.dbilldate <= '2024-11-30 23:59:59'
|
||||||
AND a.fstatus = 1
|
AND a.fstatus = #{fstatus}
|
||||||
AND a.dr = 0
|
AND a.dr = 0
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -15,7 +15,7 @@ public class DeleteSoSaleVo extends BaseEntity {
|
||||||
private String vreceiptcode;
|
private String vreceiptcode;
|
||||||
private String dbilldate;
|
private String dbilldate;
|
||||||
private String cbiztype;
|
private String cbiztype;
|
||||||
private String fstatus;
|
private Long fstatus;
|
||||||
private String pk_corp;
|
private String pk_corp;
|
||||||
private String unitname;
|
private String unitname;
|
||||||
private String unitcode;
|
private String unitcode;
|
||||||
|
@ -52,11 +52,11 @@ public class DeleteSoSaleVo extends BaseEntity {
|
||||||
this.cbiztype = cbiztype;
|
this.cbiztype = cbiztype;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFstatus() {
|
public Long getFstatus() {
|
||||||
return fstatus;
|
return fstatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFstatus(String fstatus) {
|
public void setFstatus(Long fstatus) {
|
||||||
this.fstatus = fstatus;
|
this.fstatus = fstatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue