对接吉客云代码
This commit is contained in:
parent
e91f79a6ec
commit
31f9aa0f3d
|
@ -143,16 +143,18 @@
|
||||||
<!-- 查询 采用==查询 -->
|
<!-- 查询 采用==查询 -->
|
||||||
<select id="entity_list_base_group" resultMap="get-entity-result" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInDetailEntity">
|
<select id="entity_list_base_group" resultMap="get-entity-result" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInDetailEntity">
|
||||||
select
|
select
|
||||||
goodsNo,goodsName,unitName,sum(quantity) as quantity,sum(transHasTaxAmount) as transHasTaxAmount,taxRate
|
goodsNo,goodsName,unitName,
|
||||||
|
SUM(CAST(quantity AS DECIMAL(10, 6))) AS quantity,
|
||||||
|
SUM(CAST(transHasTaxAmount AS DECIMAL(10, 6))) AS transHasTaxAmount
|
||||||
from jeck_goodsdocin_details
|
from jeck_goodsdocin_details
|
||||||
where recId in (
|
where mainId in (
|
||||||
<foreach collection="goodsdocInEntityList" separator=";" item="item">
|
<foreach collection="goodsdocInEntityList" separator="," item="item">
|
||||||
<trim suffix="" suffixOverrides=",">
|
<trim suffix="" suffixOverrides=",">
|
||||||
<if test="item.recId != null and item.recId !='' "> #{item.recId},</if>
|
<if test="item.recId != null and item.recId !='' "> #{item.recId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
group by goodsNo,goodsName,unitName,taxRate
|
group by goodsNo,goodsName,unitName
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查询 采用==查询 -->
|
<!-- 查询 采用==查询 -->
|
||||||
|
|
|
@ -171,7 +171,7 @@
|
||||||
where warehouseName = '退货仓'
|
where warehouseName = '退货仓'
|
||||||
and state is null
|
and state is null
|
||||||
and goodsdocNo in (
|
and goodsdocNo in (
|
||||||
<foreach collection="groupList" separator=";" item="item">
|
<foreach collection="groupList" separator="," item="item">
|
||||||
<trim suffix="" suffixOverrides=",">
|
<trim suffix="" suffixOverrides=",">
|
||||||
<if test="item.goodsdocNo != null and item.goodsdocNo !='' "> #{item.goodsdocNo},</if>
|
<if test="item.goodsdocNo != null and item.goodsdocNo !='' "> #{item.goodsdocNo},</if>
|
||||||
</trim>
|
</trim>
|
||||||
|
@ -446,13 +446,13 @@
|
||||||
<update id="entity_update" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity">
|
<update id="entity_update" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity">
|
||||||
update jeck_goodsdocin set
|
update jeck_goodsdocin set
|
||||||
<trim suffix="" suffixOverrides=",">
|
<trim suffix="" suffixOverrides=",">
|
||||||
<if test="state != null and state !='' "> #{state} ,</if>
|
<if test="state != null and state !='' ">state= #{state} ,</if>
|
||||||
<if test="u8BillCode != null and u8BillCode !='' "> #{u8BillCode}</if>
|
<if test="u8BillCode != null and u8BillCode !='' "> u8BillCode=#{u8BillCode}</if>
|
||||||
</trim>
|
</trim>
|
||||||
where recId in (
|
where goodsdocNo in (
|
||||||
<foreach collection="groupList" separator=";" item="item">
|
<foreach collection="groupList" separator="," item="item">
|
||||||
<trim suffix="" suffixOverrides=",">
|
<trim suffix="" suffixOverrides=",">
|
||||||
<if test="item.recId != null and item.recId !='' "> #{recId},</if>
|
<if test="item.goodsdocNo != null and item.goodsdocNo !='' "> #{item.goodsdocNo},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
|
|
|
@ -208,7 +208,10 @@ public class GoodsdocInServiceImpl extends BaseService<GoodsdocInEntity,String>
|
||||||
U8ResultEntity u8ResultOut =saleOutService.addSaleOutT(saleOut);
|
U8ResultEntity u8ResultOut =saleOutService.addSaleOutT(saleOut);
|
||||||
if(!u8ResultOut.issuccess()){
|
if(!u8ResultOut.issuccess()){
|
||||||
goodsdocInEntity.setState("N");
|
goodsdocInEntity.setState("N");
|
||||||
|
}else{
|
||||||
|
goodsdocInEntity.setState("Y");
|
||||||
}
|
}
|
||||||
|
goodsdocInEntity.setGroupList(goodsdocInEntityList);
|
||||||
goodsdocInDao.updateGoodsdocIn(goodsdocInEntity);
|
goodsdocInDao.updateGoodsdocIn(goodsdocInEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -229,17 +232,22 @@ public class GoodsdocInServiceImpl extends BaseService<GoodsdocInEntity,String>
|
||||||
jsonObject.put("billid", "123");
|
jsonObject.put("billid", "123");
|
||||||
JSONObject head = new JSONObject();
|
JSONObject head = new JSONObject();
|
||||||
head.put("cbuscode", goodsdocInEntity.getU8BillCode());//发货单号
|
head.put("cbuscode", goodsdocInEntity.getU8BillCode());//发货单号
|
||||||
head.put("cdepcode", "普通销售");//部门编码
|
head.put("cdepcode", "00702");//todo 部门编码
|
||||||
head.put("cmaker", "吉客云入库单自动生成");//创建人
|
head.put("cmaker", "吉客云入库单自动生成");//创建人
|
||||||
head.put("crdcode", "203");//入库类别编码
|
head.put("crdcode", "203");//入库类别编码
|
||||||
head.put("cdepcode", "01001");//仓库编码 todo 正式需要切换为04009
|
head.put("cwhcode", "01001");//仓库编码 todo 正式需要切换为04009
|
||||||
head.put("ddate", "2024-12-31");//销售类型
|
head.put("ddate", "2024-12-31");//销售类型
|
||||||
|
// head.put("ccuscode", "99999994");//todo 正式需要切换未这个客户
|
||||||
|
head.put("ccuscode", "01010918");//客户
|
||||||
jsonObject.put("head",head);
|
jsonObject.put("head",head);
|
||||||
JSONArray body = new JSONArray();
|
JSONArray body = new JSONArray();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
if(CollectionUtils.isNotEmpty(goodsdocInDetailEntityList)){
|
if(CollectionUtils.isNotEmpty(goodsdocInDetailEntityList)){
|
||||||
for(GoodsdocInDetailEntity item : goodsdocInDetailEntityList){
|
for(GoodsdocInDetailEntity item : goodsdocInDetailEntityList){
|
||||||
i++;
|
i++;
|
||||||
|
if("501010323".equals(item.getGoodsNo())){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
JSONObject details = new JSONObject();
|
JSONObject details = new JSONObject();
|
||||||
details.put("cbdlcode",goodsdocInEntity.getU8BillCode());//发货单号
|
details.put("cbdlcode",goodsdocInEntity.getU8BillCode());//发货单号
|
||||||
details.put("cdblrowno", i);//行号
|
details.put("cdblrowno", i);//行号
|
||||||
|
@ -258,9 +266,12 @@ public class GoodsdocInServiceImpl extends BaseService<GoodsdocInEntity,String>
|
||||||
jsonObject.put("billid", "123");
|
jsonObject.put("billid", "123");
|
||||||
JSONObject head = new JSONObject();
|
JSONObject head = new JSONObject();
|
||||||
head.put("brdflag", "1");//发货0,退货1
|
head.put("brdflag", "1");//发货0,退货1
|
||||||
|
head.put("breturnflag", "1");//发货0,退货1
|
||||||
head.put("cbustype", "普通销售");//
|
head.put("cbustype", "普通销售");//
|
||||||
head.put("cdepcode", "00702");//销售部门
|
head.put("cdepcode", "00702");//销售部门
|
||||||
head.put("cmaker", "吉客云入库单自动生成");//创建人
|
head.put("cmaker", "吉客云入库单自动生成");//创建人
|
||||||
|
// head.put("ccuscode", "99999994");//todo 正式需要切换未这个客户
|
||||||
|
head.put("ccuscode", "01010918");//客户
|
||||||
head.put("cstcode", "11");//销售类型
|
head.put("cstcode", "11");//销售类型
|
||||||
head.put("ddate", "2024-12-31");//销售类型
|
head.put("ddate", "2024-12-31");//销售类型
|
||||||
jsonObject.put("head",head);
|
jsonObject.put("head",head);
|
||||||
|
|
|
@ -872,7 +872,6 @@ public class DeliveryOrderServiceImpl extends BaseService<DeliveryOrderEntity,St
|
||||||
String updateMain = "update "+AccCode+".dbo.DispatchList set cCloser = '"+ccloser+"', bSettleAll = 1 where cDLCode = '"+cdlcode+"'";
|
String updateMain = "update "+AccCode+".dbo.DispatchList set cCloser = '"+ccloser+"', bSettleAll = 1 where cDLCode = '"+cdlcode+"'";
|
||||||
String updatebody = "update "+AccCode+".dbo.Dispatchlists set cSCloser = '"+ccloser+"',bSettleAll = 1 where DLID = '"+dt.getString("DLID")+"'";
|
String updatebody = "update "+AccCode+".dbo.Dispatchlists set cSCloser = '"+ccloser+"',bSettleAll = 1 where DLID = '"+dt.getString("DLID")+"'";
|
||||||
saleInvDao.execUpdateSql(updateMain,erdt);
|
saleInvDao.execUpdateSql(updateMain,erdt);
|
||||||
saleInvDao.execUpdateSql(updatebody,erdt);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.info("关闭失败:"+e.getMessage());
|
logger.info("关闭失败:"+e.getMessage());
|
||||||
return BaseU8Result.getFailureMessageEntity("关闭失败,请联系U8管理员");
|
return BaseU8Result.getFailureMessageEntity("关闭失败,请联系U8管理员");
|
||||||
|
|
Loading…
Reference in New Issue