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

zhairh
x_z 2 years ago
commit 05e6d46164

@ -299,7 +299,7 @@ public class UdiRelevanceController {
}
//判断父id不为空就吧值给到id里面防止id变成详情id
if (udiRelevanceResponse.getPid() != null) {
if (udiRelevanceResponse.getPid() != null && udiRelevanceResponse.getPid()!=0) {
udiRelevanceResponse.setId(udiRelevanceResponse.getPid());
}
//更新关联表相关信息
@ -688,7 +688,7 @@ public class UdiRelevanceController {
@GetMapping("/udiwms/udirl/di/remove")
public BaseResponse removeDI(RemoveRelRequest removeRelRequest) {
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectById(removeRelRequest.getRelId());
if (StrUtil.isEmpty(udiRelevanceEntity.getMainId())) {
if (udiRelevanceEntity==null || StrUtil.isEmpty(udiRelevanceEntity.getMainId())) {
return ResultVOUtils.error(500, "未关联第三方产品ID无法解除绑定");
}
List<UdiRelevanceResponse> temps = udiRelevanceService.selectByMainId(udiRelevanceEntity.getMainId());

@ -30,6 +30,7 @@ import com.glxp.api.admin.req.basic.CompanyProductRelevanceRequest;
import com.glxp.api.admin.req.inout.*;
import com.glxp.api.admin.req.inventory.FilterInvBusUserRequest;
import com.glxp.api.admin.req.inventory.FilterInvLinkDataRequest;
import com.glxp.api.admin.req.inventory.FilterInvUserRequest;
import com.glxp.api.admin.res.PageSimpleResponse;
import com.glxp.api.admin.res.basic.BussinessTypResponse;
import com.glxp.api.admin.res.basic.UdiRelevanceResponse;
@ -1280,28 +1281,25 @@ public class WareHouseController {
if (StrUtil.isBlank(code) || StrUtil.isBlank(userListJson))
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
List<AuthAdmin> userList = JSONUtil.toList(userListJson, AuthAdmin.class);
//获取用户关联单据类型信息
FilterInvBusUserRequest filterInvBusUserRequest = new FilterInvBusUserRequest();
filterInvBusUserRequest.setSubInvCode(code);
List<InvBusUserResponse> invBusUserEntities = invBusUserService.filterJoinInvBusUser(filterInvBusUserRequest);
Map<String, InvBusUserResponse> filteBusTypes = new HashMap<>();
for (InvBusUserResponse invBusUserEntity : invBusUserEntities) {
boolean isExit = false;
for (AuthAdmin authAdmin : userList) {
if (authAdmin.getId() == Long.parseLong(invBusUserEntity.getUserId())) {
isExit = true;
continue;
}
}
if (isExit) {
filteBusTypes.put(invBusUserEntity.getUserId(), invBusUserEntity);
//取出选中的userId
List<Long> list = userList .stream().map(AuthAdmin::getId).distinct().collect(Collectors.toList());
//查询该仓库下面绑定的用户
FilterInvUserRequest filterInvUserRequest=new FilterInvUserRequest();
filterInvUserRequest.setCode(code);
filterInvUserRequest.setUserList(list);
List<WarehouseUserEntity> filterList=warehouseUserService.filterWarehouseUsers(filterInvUserRequest);
list = filterList .stream().map(WarehouseUserEntity::getUserid).distinct().collect(Collectors.toList());
if(list.size()>0){
//获取用户关联单据类型信息
FilterInvBusUserRequest filterInvBusUserRequest = new FilterInvBusUserRequest();
filterInvBusUserRequest.setSubInvCode(code);
filterInvBusUserRequest.setUserList(list);
List<InvBusUserResponse> invBusUserEntities = invBusUserService.filterJoinInvBusUser(filterInvBusUserRequest);
if (invBusUserEntities.size() > 0) {
return ResultVOUtils.error(500, "请先移除用户已关联单据类型!");
}
}
if (filteBusTypes.size() > 0) {
return ResultVOUtils.error(500, "请先移除用户已关联单据类型!");
}
warehouseUserService.saveWarehouseUser(code, userList);
InvSubWarehouseEntity invSubWarehouseEntity =

@ -57,6 +57,9 @@ public class UdiInfoEntity {
private String relId;//关联ID主键
private Integer status;
private String supId;
private boolean isAdavence;
private boolean isDisable;
private boolean useMuti;
private Boolean isCheck;
private boolean allowNoBatch;

@ -3,6 +3,8 @@ package com.glxp.api.admin.req.inventory;
import com.glxp.api.admin.req.ListPageRequest;
import lombok.Data;
import java.util.List;
@Data
public class FilterInvBusUserRequest extends ListPageRequest {
@ -10,4 +12,5 @@ public class FilterInvBusUserRequest extends ListPageRequest {
private String userId;
private String subInvCode;
private String scAction;
private List<Long> userList;
}

@ -3,6 +3,8 @@ package com.glxp.api.admin.req.inventory;
import com.glxp.api.admin.req.ListPageRequest;
import lombok.Data;
import java.util.List;
@Data
public class FilterInvUserRequest extends ListPageRequest {
@ -16,4 +18,6 @@ public class FilterInvUserRequest extends ListPageRequest {
private Boolean isDirector;
private String lastUpdateTime;
private List<Long> userList;
}

@ -77,11 +77,11 @@ public class SyncUdiService {
if (productInfoFilterRequest.getZczbhhzbapzbh() != null && !productInfoFilterRequest.getZczbhhzbapzbh().equals("")) {
return ResultVOUtils.error(500, "请输入医疗器械注册备案人名称");
}
if (productInfoFilterRequest.getCpmctymc() != null && !productInfoFilterRequest.getCpmctymc().equals("") && productInfoFilterRequest.getCpmctymc().length() < 4) {
return ResultVOUtils.error(500, "请输入完整的产品通用名称!");
}
}
if (productInfoFilterRequest.getCpmctymc() != null && !productInfoFilterRequest.getCpmctymc().equals("") && productInfoFilterRequest.getCpmctymc().length() < 4) {
return ResultVOUtils.error(500, "请输入完整的产品通用名称!");
}
productInfoFilterRequest.setIsNewest(1);
// productInfoFilterRequest.setDiType("1");

@ -67,4 +67,6 @@ public interface WarehouseUserService {
* @return
*/
Integer countUserBySubInvCode(String subInvCode);
}

@ -27,6 +27,7 @@ import com.glxp.api.admin.entity.inout.WarehouseEntity;
import com.glxp.api.admin.entity.inventory.InvProductDetailEntity;
import com.glxp.api.admin.entity.inventory.InvProductEntity;
import com.glxp.api.admin.entity.inventory.InvSubWarehouseEntity;
import com.glxp.api.admin.entity.inventory.InvWarehouseEntity;
import com.glxp.api.admin.req.business.StockOrderFilterRequest;
import com.glxp.api.admin.req.inout.OrderFilterRequest;
import com.glxp.api.admin.req.inout.OrderQueryRequest;
@ -314,11 +315,14 @@ public class OrderServiceImpl implements OrderService {
supplementOrder.setReceiveStatus(0); //设置验收状态为未验收
supplementOrder.setCorpOrderId(CustomUtil.getId() + "x");
//修改往来单位及当前库存号
supplementOrder.setFromCorpId(order.getLocStorageCode());
supplementOrder.setFromCorpId(order.getInvWarehouseCode());
supplementOrder.setSubInvCode(order.getInvStorageCode());
supplementOrder.setFromSubInvCode(order.getInvWarehouseCode());
supplementOrder.setLocStorageCode(order.getFromCorpId());
supplementOrder.setInvWarehouseCode(null);
String name = invWarehouseDao.getNameByCode(supplementOrder.getFromCorpId());
//根据分库code查询总库coder
InvSubWarehouseEntity invSubWarehouseEntity=invSubWarehouseDao.filterGroupInvSubAndcode(order.getFromCorpId());
supplementOrder.setLocStorageCode(invSubWarehouseEntity.getParentId());
supplementOrder.setInvStorageCode(invSubWarehouseEntity.getParentId());
String name = invWarehouseDao.getNameByCode(order.getInvStorageCode());
if (StrUtil.isNotEmpty(order.getFromSubInvCode())) {
supplementOrder.setInvWarehouseCode(order.getFromSubInvCode());
} else {

@ -5,25 +5,100 @@
<select id="filterUdiInfo" parameterType="com.glxp.api.admin.req.basic.FilterUdiInfoRequest"
resultType="com.glxp.api.admin.entity.basic.UdiInfoEntity">
SELECT * FROM basic_products
SELECT
basic_products.id,
basic_products.nameCode,
basic_products.packRatio,
basic_products.packLevel,
basic_products.bhxjsl,
basic_products.bhzxxsbzsl,
basic_products.zxxsbzbhsydysl,
basic_products.bhxjcpbm,
basic_products.bzcj,
basic_products.addType,
basic_products.deviceRecordKey,
basic_products.cpmctymc,
basic_products.cplb,
basic_products.flbm,
basic_products.ggxh,
basic_products.qxlb,
basic_products.tyshxydm,
basic_products.ylqxzcrbarmc,
basic_products.zczbhhzbapzbh,
basic_products.ylqxzcrbarywmc,
basic_products.sydycpbs,
basic_products.uuid,
basic_products.sjcpbm,
basic_products.versionNumber,
basic_products.diType,
basic_products.manufactory,
basic_products.productType,
basic_products.scbssfbhph,
basic_products.scbssfbhxlh,
basic_products.scbssfbhscrq,
basic_products.scbssfbhsxrq,
basic_products.cpms,
basic_products.originUuid,
basic_products.allowNoBatch,
basic_products.allowNoExpire,
basic_products.allowNoProduct,
basic_products.spmc,
basic_products.cplx,
basic_products.hchzsb,
basic_products.cpdls,
basic_products.basicPrductRemak1,
basic_products.basicPrductRemak2,
basic_products.basicPrductRemak3,
basic_products.basicPrductRemak4,
basic_products.basicPrductRemak5,
basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8,
basic_udirel.thirdId,
basic_udirel.thirdName,
basic_udirel.isUseDy,
basic_udirel.updateTime,
basic_udirel.thirdId1,
basic_udirel.thirdId2,
basic_udirel.thirdId3,
basic_udirel.thirdId4,
basic_udirel.thirdName1,
basic_udirel.thirdName2,
basic_udirel.thirdName3,
basic_udirel.thirdName4,
basic_udirel.ybbm,
basic_udirel.sptm,
basic_udirel.isDisable,
basic_udirel.isLock,
basic_udirel.mainId,
basic_udirel.lockStatus,
basic_udirel.udplatCode,
basic_udirel.isAdavence,
basic_udirel.supName,
basic_udirel.price,
basic_udirel.modifyTime,
basic_udirel.useMuti,
basic_udirel.useNum,
basic_udirel.measname FROM basic_products
LEFT JOIN basic_udirel on basic_products.uuid=basic_udirel.uuid
<where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc},'%')
AND basic_products.ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc},'%')
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc},'%')
AND basic_products.cpmctymc LIKE concat(#{cpmctymc},'%')
</if>
<if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode},'%')
AND basic_products.nameCode LIKE concat(#{nameCode},'%')
</if>
<if test="uuid != '' and uuid != null">
AND uuid = #{uuid}
AND basic_products.uuid = #{uuid}
</if>
<if test="originUuid != '' and originUuid != null">
AND originUuid = #{originUuid}
AND basic_products.originUuid = #{originUuid}
</if>
<if test="sptm != '' and sptm != null">
AND sptm = #{sptm}
AND basic_products.sptm = #{sptm}
</if>
</where>
@ -279,7 +354,7 @@
<if test="basicPrductRemak7 != null">basicPrductRemak7=#{basicPrductRemak7},</if>
<if test="basicPrductRemak8 != null">basicPrductRemak8=#{basicPrductRemak8},</if>
</trim>
WHERE nameCode = #{nameCode}
WHERE nameCode = #{nameCode} and uuid = #{uuid}
</update>
<update id="updateUdiInfoByUuid" parameterType="com.glxp.api.admin.entity.basic.UdiInfoEntity">

@ -335,6 +335,9 @@
<if test="exportStatus != '' and exportStatus!=null">
and exportStatus = #{exportStatus}
</if>
<if test="erpFk != '' and erpFk!=null">
and erpFk = #{erpFk}
</if>
<if test="signStatus != '' and signStatus!=null">
and signStatus = #{signStatus}
</if>

@ -269,6 +269,12 @@
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
</if>
<if test="userList != null and userList.size()>0">
AND userId not in
<foreach collection="userList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>

@ -36,7 +36,12 @@
<if test="scAction != '' and scAction != null">
AND scAction = #{scAction}
</if>
<if test="userList != null and userList.size()>0">
AND userId in
<foreach collection="userList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
group by inv_bustype_user.id

Loading…
Cancel
Save