Merge remote-tracking branch 'origin/dev_drug_dmyh250207' into dev_drug_dmyh250207

dev_drug_dmyh250207
yewj 2 weeks ago
commit 181ff4f408

@ -1,21 +1,30 @@
package com.glxp.api.controller.test;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.glxp.api.annotation.Log;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BusinessType;
import com.glxp.api.controller.inout.IoOrderReviewController;
import com.glxp.api.dao.AliCodeTestMapper;
import com.glxp.api.dao.inout.IoOrderDao;
import com.glxp.api.entity.alihealth.*;
import com.glxp.api.entity.inout.IoOrderEntity;
import com.glxp.api.entity.thrsys.ThirdAliDrug;
import com.glxp.api.req.alihealth.AlihealthKytDrugrescodeReqeust;
import com.glxp.api.req.alihealth.AlihealthKytSearchbillReqeust;
import com.glxp.api.req.alihealth.AlihealthYljgListupoutDetailReqeust;
import com.glxp.api.req.alihealth.AlihealthYljgListupoutReqeust;
import com.glxp.api.req.alihealth.local.AliBillsDisposeReqeust;
import com.glxp.api.req.alihealth.local.AlihealthKytThirdAliSearchbillInsertReqeust;
import com.glxp.api.req.alihealth.local.AlihealthThirdAliDrugInsertReqeust;
import com.glxp.api.res.inout.OrderNoResult;
import com.glxp.api.util.DateUtil;
import com.glxp.api.util.alihealth.AlihealthUtils;
import com.glxp.api.util.alihealth.AlihealthYljgUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@ -112,6 +121,24 @@ public class TestCodeController {
return ResultVOUtils.success();
}
@Resource
private IoOrderDao ioOrderDao;
@Resource
private IoOrderReviewController ioOrderReviewController;
@PostMapping("/aliBillsDispose")
@Log(title = "手动调用阿里单据上传和关联关系拉取", businessType = BusinessType.OTHER)
public BaseResponse aliBillsDispose(@RequestBody AliBillsDisposeReqeust aliBillsDisposeReqeust) {
IoOrderEntity ioOrderEntity = ioOrderDao.selectOne(
new QueryWrapper<IoOrderEntity>()
.eq("billNo","ZS202503190006")
.last("limit 1"));
ioOrderReviewController.aliBillsDispose(ioOrderEntity);
return ResultVOUtils.success("成功");
}
}

@ -19,54 +19,53 @@
<select id="getCompany" parameterType="com.glxp.api.req.purchase.FilterSupManufacturerRequest"
resultType="com.glxp.api.entity.purchase.SupManufacturerEntity">
SELECT
sm.*,
sc.companyName AS supName,
<if test="productStatus != null">
COALESCE(SUM(CASE WHEN sp.auditStatus NOT IN (0, 1, 4) THEN 1 END), 0) AS failCout,
COALESCE(SUM(CASE WHEN sp.auditStatus IN (1, 4) THEN 1 END), 0) AS passCout
</if>
FROM sup_manufacturer sm
INNER JOIN sup_company sc ON sm.customerId = sc.customerId
<if test="productStatus != null">
LEFT JOIN sup_product sp ON sm.customerId = sp.customerId AND sm.manufacturerId = sp.manufacturerIdFk
SELECT sup_manufacturer.* ,sup_company.companyName as supName
<if test="productStatus!=null">
,(SELECT count(*) FROM sup_product WHERE sup_manufacturer.customerId=sup_product.customerId AND sup_product.auditStatus!=0 AND sup_product.auditStatus!=1 AND sup_product.auditStatus!=4 AND sup_manufacturer.manufacturerId=sup_product.manufacturerIdFk ) as failCout,
(SELECT count(*) FROM sup_product WHERE sup_manufacturer.customerId=sup_product.customerId AND (sup_product.auditStatus=1 OR sup_product.auditStatus=4) AND sup_manufacturer.manufacturerId=sup_product.manufacturerIdFk ) as passCout
</if>
FROM sup_manufacturer
inner join sup_company on sup_manufacturer.customerId = sup_company.customerId
<where>
<if test="id != null and id != '' and type==null">
and sm.id = #{id}
and id = #{id}
</if>
<if test="manufacturerId != null and manufacturerId != ''">
and sm.manufacturerId = #{manufacturerId}
and manufacturerId = #{manufacturerId}
</if>
<if test="companyName != null and companyName != ''">
and sm.companyName like concat('%',#{companyName},'%')
and sup_manufacturer.companyName like concat('%',#{companyName},'%')
</if>
<if test="creditCode != null and creditCode != ''">
and sm.creditCode like concat('%',#{creditCode},'%')
and creditCode like concat('%',#{creditCode},'%')
</if>
<if test="placeArea != null and placeArea != ''">
and sm.placeArea like concat('%',#{placeArea},'%')
and placeArea like concat('%',#{placeArea},'%')
</if>
<if test="customerId != null and customerId != ''">
and sm.customerId = #{customerId}
and sup_manufacturer.customerId = #{customerId}
</if>
<if test="auditStatus != null and auditStatus !=20 and auditStatus !=21 and auditStatus !=22">
and sm.auditStatus = #{auditStatus}
and sup_manufacturer.auditStatus = #{auditStatus}
</if>
<if test="auditStatus ==20">
and (sm.auditStatus = 0 or sm.auditStatus=5 or sm.auditStatus=2)
and (sup_manufacturer.auditStatus = 0 or sup_manufacturer.auditStatus=5 or
sup_manufacturer.auditStatus=2)
</if>
<if test="auditStatus ==21">
and <![CDATA[ sm.auditStatus <> 0 ]]>
and <![CDATA[ sup_manufacturer.auditStatus <> 0 ]]>
</if>
<if test="auditStatus ==22">
and (sm.auditStatus = 1 or sm.auditStatus=4 )
and (sup_manufacturer.auditStatus = 1 or sup_manufacturer.auditStatus=4 )
</if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
<![CDATA[ and DATE_FORMAT(sm.updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
<![CDATA[ and DATE_FORMAT(sup_manufacturer.updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
</if>
<if test="type != null">
and sm.id != #{id}
and id != #{id}
</if>
</where>
</select>
@ -160,4 +159,4 @@
</where>
</select>
</mapper>
</mapper>

Loading…
Cancel
Save