1.添加进口产品代理商字段

2.新增查询用户关联单据类型接口
purchase
x_z 3 years ago
parent f73f0d0556
commit 90c25c2720

@ -1,6 +1,7 @@
package com.glxp.api.admin.controller.inventory;
import cn.hutool.core.collection.CollUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.api.admin.annotation.AuthRuleAnnotation;
import com.glxp.api.admin.entity.inout.WarehouseBussinessTypeEntity;
import com.glxp.api.admin.entity.inventory.InvBusUserEntity;
@ -9,6 +10,7 @@ import com.glxp.api.admin.entity.inventory.InvWarehouseEntity;
import com.glxp.api.admin.req.inout.DeleteRequest;
import com.glxp.api.admin.req.inventory.FilterInvBusUserRequest;
import com.glxp.api.admin.req.inventory.UpdateRelBusRequset;
import com.glxp.api.admin.res.PageSimpleResponse;
import com.glxp.api.admin.service.inout.WarehouseBussinessTypeService;
import com.glxp.api.admin.service.inventory.InvBusUserService;
import com.glxp.api.admin.service.inventory.InvSubWarehouseService;
@ -26,6 +28,7 @@ import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@RestController
public class InvBusUserController {
@ -60,6 +63,25 @@ public class InvBusUserController {
return ResultVOUtils.success(warehouseBussinessTypeEntities);
}
/**
*
*
* @param filterInvBusUserRequest
* @return
*/
@AuthRuleAnnotation("")
@GetMapping("spms/bus/user/filterUserBusList")
public BaseResponse filterUserBusList(FilterInvBusUserRequest filterInvBusUserRequest) {
List<InvBusUserEntity> responses = invBusUserService.filterInvBusUser(filterInvBusUserRequest);
PageInfo<InvBusUserEntity> pageInfo = new PageInfo<>(responses);
List<String> actions = responses.stream().map(InvBusUserEntity::getScAction).collect(Collectors.toList());
List<WarehouseBussinessTypeEntity> warehouseBussinessTypeEntities = warehouseBussinessTypeService.selectByActions(filterInvBusUserRequest.getSubInvCode(), actions);
PageSimpleResponse<WarehouseBussinessTypeEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(warehouseBussinessTypeEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
@AuthRuleAnnotation("")
@PostMapping("/spms/bus/user/warehouse/update")
public BaseResponse updateRes(@RequestBody UpdateRelBusRequset relBusRequset) {

@ -36,4 +36,12 @@ public interface WarehouseBussinessTypeDao {
List<WarehouseBussinessTypeEntity> filterList(FilterInvBusTypeRequest filterInvBusTypeRequest);
void deleteByCode(@Param("code") String code);
/**
*
*
* @param actions
* @return
*/
List<WarehouseBussinessTypeEntity> selectByActions(@Param("subInvCode") String subInvCode, @Param("actions") List<String> actions);
}

@ -66,6 +66,9 @@ public class UdiInfoEntity {
private String price;
//产品代理商
private String cpdls;
public Integer getId() {
return id;
}

@ -72,6 +72,9 @@ public class UdiRelevanceResponse {
private String price;
private String spmc;
//产品代理商
private String cpdls;
public int getBhzxxsbzsl() {
if (bhzxxsbzsl == null || bhzxxsbzsl == 0) {
return 1;

@ -70,4 +70,8 @@ public class CompanyProductRelevanceResponse {
private String price;
private String spmc;
//产品代理商
private String cpdls;
}

@ -44,4 +44,12 @@ public interface WarehouseBussinessTypeService {
*/
List<WarehouseBussinessTypeEntity> getWarehouseBussniessTypeList(FilterInvLinkDataRequest filterInvLinkDataRequest);
/**
*
*
* @param actions
* @return
*/
List<WarehouseBussinessTypeEntity> selectByActions(String subInvCode, List<String> actions);
}

@ -86,4 +86,9 @@ public class WarehouseBussinessTypeServiceImpl implements WarehouseBussinessType
}
return warehouseBussinessTypeDao.selectListByCode(filterInvLinkDataRequest.getCode());
}
@Override
public List<WarehouseBussinessTypeEntity> selectByActions(String subInvCode, List<String> actions) {
return warehouseBussinessTypeDao.selectByActions(subInvCode, actions);
}
}

@ -1,6 +1,7 @@
package com.glxp.api.admin.service.inventory.impl;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageHelper;
import com.glxp.api.admin.dao.inventory.InvBusUserDao;
import com.glxp.api.admin.entity.inventory.InvBusUserEntity;
import com.glxp.api.admin.req.inventory.FilterInvBusUserRequest;
@ -23,6 +24,10 @@ public class InvBusUserServiceImpl implements InvBusUserService {
if (filterInvBusUserRequest == null) {
return Collections.emptyList();
}
if (filterInvBusUserRequest.getPage() != null) {
int offset = (filterInvBusUserRequest.getPage() - 1) * filterInvBusUserRequest.getLimit();
PageHelper.offsetPage(offset, filterInvBusUserRequest.getLimit());
}
return invBusUserDao.filterInvBusUser(filterInvBusUserRequest);
}

@ -52,7 +52,7 @@
basic_products.scbssfbhxlh,
basic_products.scbssfbhscrq,
basic_products.scbssfbhsxrq,basic_products.cpms,basic_products.originUuid,company_product_relevance.price
,basic_products.spmc
,basic_products.spmc, basic_products.cpdls
FROM company_product_relevance
inner JOIN basic_udirel
ON company_product_relevance.udiRlIdFk = basic_udirel.id

@ -264,6 +264,7 @@
<if test="allowNoBatch != null">allowNoBatch=#{allowNoBatch},</if>
<if test="allowNoExpire != null">allowNoExpire=#{allowNoExpire},</if>
<if test="allowNoProduct != null">allowNoProduct=#{allowNoProduct},</if>
<if test="cpdls != null">cpdls=#{cpdls},</if>
</trim>
WHERE nameCode = #{nameCode}
</update>

@ -27,6 +27,7 @@
basic_products.diType,basic_products.productType,basic_products.scbssfbhph,
basic_products.scbssfbhxlh,
basic_products.scbssfbhscrq,
basic_products.cpdls,
basic_products.scbssfbhsxrq,basic_products.cpms,basic_udirel.supName,basic_products.originUuid
FROM basic_udirel
inner JOIN basic_products
@ -112,6 +113,7 @@
basic_products.sydycpbs,basic_products.uuid,basic_products.sjcpbm,basic_products.versionNumber,
basic_products.diType,basic_products.productType,basic_products.scbssfbhph,
basic_products.scbssfbhxlh,
basic_products.cpdls,
basic_products.scbssfbhscrq,basic_corp.name companyName,
basic_products.scbssfbhsxrq,basic_products.cpms,basic_udirel.supName,company_product_relevance.unitFk,basic_products.originUuid
FROM basic_udirel
@ -202,6 +204,7 @@
basic_udirel.mainId,basic_udirel.mainName,basic_udirel.isAdavence,basic_products.scbssfbhph,
basic_products.scbssfbhxlh,
basic_products.scbssfbhscrq,
basic_products.cpdls,
basic_products.scbssfbhsxrq,basic_products.cpms,basic_udirel.supName,basic_products.originUuid,basic_products.spmc
FROM basic_products
right JOIN basic_udirel

@ -278,4 +278,11 @@
from inv_warehouse_bussiness_type
where code = #{code}
</delete>
<select id="selectByActions" resultType="com.glxp.api.admin.entity.inout.WarehouseBussinessTypeEntity">
select * from inv_warehouse_bussiness_type where code = #{subInvCode} and action in
<foreach collection="actions" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</select>
</mapper>
Loading…
Cancel
Save