单据类型相关修改

master
anthonywj 2 years ago
parent ffdb7e5970
commit f90eb22ee3

@ -188,16 +188,22 @@ public class BasicBussinessTypeController extends BaseController {
pageSimpleResponse.setList(bussinessTypeEntities); pageSimpleResponse.setList(bussinessTypeEntities);
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} else { } else {
List<BasicBussinessTypeResponse> bussinessTypeEntities;
//判断是否是医院用户 //判断是否是医院用户
if (isHosUser()) { if (isHosUser()) {
bussinessTypeFilterRequest.setUserId(getUserId()); bussinessTypeFilterRequest.setUserId(getUserId());
bussinessTypeEntities = basicBussinessTypeService.filterJoinByUser(
bussinessTypeFilterRequest);
} else { } else {
//当前用户为供应商,查询单据类型添加允许供应商使用参数 //当前用户为供应商,查询单据类型添加允许供应商使用参数
bussinessTypeFilterRequest.setSpUse(3); if (bussinessTypeFilterRequest.getSpUse() == null)
bussinessTypeFilterRequest.setSpUse(3);
bussinessTypeEntities = basicBussinessTypeService.filterJoinByInv(
bussinessTypeFilterRequest);
} }
List<BasicBussinessTypeResponse> bussinessTypeEntities;
bussinessTypeEntities = basicBussinessTypeService.filterJoinByUser(
bussinessTypeFilterRequest);
PageInfo<BasicBussinessTypeResponse> pageInfo; PageInfo<BasicBussinessTypeResponse> pageInfo;
pageInfo = new PageInfo<>(bussinessTypeEntities); pageInfo = new PageInfo<>(bussinessTypeEntities);
PageSimpleResponse<BasicBussinessTypeResponse> pageSimpleResponse = new PageSimpleResponse<>(); PageSimpleResponse<BasicBussinessTypeResponse> pageSimpleResponse = new PageSimpleResponse<>();

@ -188,6 +188,7 @@ public class UdiRelevanceController extends BaseController {
} }
//资质证书选入产品列表 产品名称,生产企业过滤 //资质证书选入产品列表 产品名称,生产企业过滤
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("/udi/cert/filterUdi") @GetMapping("/udi/cert/filterUdi")

@ -24,6 +24,7 @@ public interface BasicBussinessTypeDao extends BaseMapperPlus<BasicBussinessType
List<BasicBussinessTypeResponse> filterJoinByUser(FilterBussinessTypeRequest filterBussinessTypeRequest); List<BasicBussinessTypeResponse> filterJoinByUser(FilterBussinessTypeRequest filterBussinessTypeRequest);
List<BasicBussinessTypeResponse> filterJoinByInv(FilterBussinessTypeRequest filterBussinessTypeRequest);
/** /**
* *

@ -34,7 +34,7 @@ public class AsyncFetchTask implements SchedulingConfigurer {
scheduledRequest.setCronName("syncFetch"); scheduledRequest.setCronName("syncFetch");
logger.info("syncFetch----------------"); logger.info("syncFetch----------------");
ScheduledEntity scheduledEntity = scheduledDao.findScheduled(scheduledRequest); ScheduledEntity scheduledEntity = scheduledDao.findScheduled(scheduledRequest);
String cron = scheduledEntity != null ? scheduledEntity.getCron() : "15 * * * * ?"; String cron = scheduledEntity != null ? scheduledEntity.getCron() : "* 0/30 * * * ?";
if (cron.isEmpty()) { if (cron.isEmpty()) {
logger.error("cron is null"); logger.error("cron is null");

@ -21,6 +21,9 @@ public interface IBasicBussinessTypeService {
List<BasicBussinessTypeResponse> filterJoinByUser(FilterBussinessTypeRequest filterBussinessTypeRequest); List<BasicBussinessTypeResponse> filterJoinByUser(FilterBussinessTypeRequest filterBussinessTypeRequest);
List<BasicBussinessTypeResponse> filterJoinByInv(FilterBussinessTypeRequest filterBussinessTypeRequest);
/** /**
* *
* *

@ -56,6 +56,11 @@ public class BasicBussinessTypeServiceImpl implements IBasicBussinessTypeService
return basicBussinessTypeDao.filterJoinByUser(filterBussinessTypeRequest); return basicBussinessTypeDao.filterJoinByUser(filterBussinessTypeRequest);
} }
@Override
public List<BasicBussinessTypeResponse> filterJoinByInv(FilterBussinessTypeRequest filterBussinessTypeRequest) {
return basicBussinessTypeDao.filterJoinByInv(filterBussinessTypeRequest);
}
@Override @Override
public boolean insertBussinessType(BasicBussinessTypeEntity bussinessTypeEntity) { public boolean insertBussinessType(BasicBussinessTypeEntity bussinessTypeEntity) {
//设置创建时间和更新时间数据 //设置创建时间和更新时间数据
@ -217,11 +222,11 @@ public class BasicBussinessTypeServiceImpl implements IBasicBussinessTypeService
if (StrUtil.isNotEmpty(deliveryInstock) && deliveryInstock.equals("1")) { if (StrUtil.isNotEmpty(deliveryInstock) && deliveryInstock.equals("1")) {
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>() bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
.eq("mainAction", ConstantType.TYPE_PUT).eq("corpType", ConstantStatus.CORP_TYPE_OUT) .eq("mainAction", ConstantType.TYPE_PUT).eq("corpType", ConstantStatus.CORP_TYPE_OUT)
.eq("spUse", ConstantStatus.ORDER_SPUSE_EDIT).eq("enable", true)); .gt("spUse", 0).eq("enable", true));
} else { } else {
bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>() bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper<BasicBussinessTypeEntity>()
.eq("mainAction", ConstantType.TYPE_PUT).eq("corpType", ConstantStatus.CORP_TYPE_OUT) .eq("mainAction", ConstantType.TYPE_PUT).eq("corpType", ConstantStatus.CORP_TYPE_OUT)
.eq("spUse", ConstantStatus.ORDER_SPUSE_EDIT).eq("inStock", false).eq("enable", true)); .gt("spUse", 0).eq("inStock", false).eq("enable", true));
} }
break; break;

@ -245,23 +245,55 @@
<if test="enable != null"> <if test="enable != null">
AND basic_bussiness_type.enable = #{enable} AND basic_bussiness_type.enable = #{enable}
</if> </if>
<if test="spUse != null and spUse == '3'.toString()"> <if test="spUse == 3">
AND basic_bussiness_type.spUse > 0 AND basic_bussiness_type.spUse > 0
</if> </if>
<if test="spUse != null and spUse != '3'.toString()"> <if test="spUse != null and spUse != 3">
AND basic_bussiness_type.spUse = #{spUse} AND basic_bussiness_type.spUse = #{spUse}
</if> </if>
<if test="code != ''and code != null"> <if test="code != ''and code != null">
AND subInvCode = #{code} AND subInvCode = #{code}
</if> </if>
<if test="invCode != ''and invCode != null">
AND subInvCode = #{code}
</if>
<if test="userId != ''and userId != null"> <if test="userId != ''and userId != null">
AND auth_user_bustype.`userId` = #{userId} AND auth_user_bustype.`userId` = #{userId}
</if> </if>
<if test="spUse != null"> </where>
group by basic_bussiness_type.action
</select>
<select id="filterJoinByInv" parameterType="com.glxp.api.req.basic.FilterBussinessTypeRequest"
resultType="com.glxp.api.res.basic.BasicBussinessTypeResponse">
SELECT basic_bussiness_type.*
FROM basic_bussiness_type
left JOIN auth_warehouse_bustype ON basic_bussiness_type.action = auth_warehouse_bustype.action
<where>
<if test="name != ''and name != null">
AND basic_bussiness_type.name LIKE concat('%', #{name}, '%')
</if>
<if test="inStock != null">
AND basic_bussiness_type.inStock = #{inStock}
</if>
<if test="action != ''and action != null">
AND basic_bussiness_type.action = #{action}
</if>
<if test="enable != null">
AND basic_bussiness_type.enable = #{enable}
</if>
<if test="spUse == 3">
AND basic_bussiness_type.spUse > 0
</if>
<if test="spUse != null and spUse != 3">
AND basic_bussiness_type.spUse = #{spUse} AND basic_bussiness_type.spUse = #{spUse}
</if> </if>
<if test="busType != null"> <if test="code != ''and code != null">
AND busType = #{busType} AND auth_warehouse_bustype.code = #{code}
</if>
<if test="invCode != ''and invCode != null">
AND auth_warehouse_bustype.code = #{code}
</if> </if>
</where> </where>
group by basic_bussiness_type.action group by basic_bussiness_type.action

@ -469,6 +469,7 @@
inner JOIN basic_udirel inner JOIN basic_udirel
ON basic_products.uuid = basic_udirel.uuid ON basic_products.uuid = basic_udirel.uuid
left join basic_hosp_type bht on basic_udirel.relCode = bht.code left join basic_hosp_type bht on basic_udirel.relCode = bht.code
inner join company_product_relevance on company_product_relevance.udiRlIdFk = basic_udirel.id
<where> <where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null"> <if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc LIKE concat('%', #{ylqxzcrbarmc}, '%') AND ylqxzcrbarmc LIKE concat('%', #{ylqxzcrbarmc}, '%')
@ -566,6 +567,11 @@
<if test="id != '' and id != null"> <if test="id != '' and id != null">
AND basic_udirel.id = #{id} AND basic_udirel.id = #{id}
</if> </if>
<if test="customerId != '' and customerId != null">
AND company_product_relevance.unitFk = #{customerId}
</if>
</where> </where>
GROUP BY cpmctymc, manufactory GROUP BY cpmctymc, manufactory
</select> </select>
@ -815,7 +821,7 @@
#{modifyTime}, #{modifyTime},
#{createUser}, #{createUser},
#{updateUser}, #{updateUser},
#{remark}, #{useExpireTime}, #{dispatch}, #{groupBuy} ,#{needCert}) #{remark}, #{useExpireTime}, #{dispatch}, #{groupBuy}, #{needCert})
</insert> </insert>
<delete id="deleteById" parameterType="Map"> <delete id="deleteById" parameterType="Map">

Loading…
Cancel
Save