update
This commit is contained in:
+15
-8
@@ -13,9 +13,9 @@ import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.reagent.dto.ReagentConsumableInventoryDTO;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
|
||||
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
|
||||
import digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumableInventoryService;
|
||||
import digital.laboratory.platform.reagent.service.ReferenceMaterialService;
|
||||
import digital.laboratory.platform.reagent.utils.QRCodeUtils;
|
||||
import digital.laboratory.platform.reagent.vo.*;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -24,10 +24,8 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.oauth2.provider.OAuth2Authentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
import java.util.List;
|
||||
@@ -57,6 +55,8 @@ public class ReagentConsumableInventoryController {
|
||||
|
||||
private final OssFile ossFile;
|
||||
|
||||
private final ReagentConsumableInventoryMapper reagentConsumableInventoryMapper;
|
||||
|
||||
/**
|
||||
* 通过id查询试剂耗材库存
|
||||
*
|
||||
@@ -214,15 +214,13 @@ public class ReagentConsumableInventoryController {
|
||||
@ApiOperation(value = "试剂耗材/标准物质集合列表", notes = "试剂耗材/标准物质集合列表")
|
||||
@GetMapping("/full")
|
||||
// @PreAuthorize("@pms.hasPermission(' ')")
|
||||
public R<List<ReagentConsumableInventoryFullVO>> getReagentConsumableInventoryFull(String category, String name, HttpServletRequest theHttpServletRequest) {
|
||||
public R<IPage<ReagentConsumableInventoryFullVO>> getReagentConsumableInventoryFull(Page page,String category, String name, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
List<ReagentConsumableInventoryFullVO> reagentConsumableInventoryFull = reagentConsumableInventoryService.getReagentConsumableInventoryFull(Wrappers.<ReagentConsumableInventory>query()
|
||||
.eq((StrUtil.isNotBlank(category)), "category", category)
|
||||
.like((StrUtil.isNotBlank(name)), "reagent_consumable_name", name));
|
||||
IPage fullVOPage = reagentConsumableInventoryMapper.getFullVOPage(page,name,category);
|
||||
|
||||
return R.ok(reagentConsumableInventoryFull);
|
||||
return R.ok(fullVOPage);
|
||||
}
|
||||
|
||||
|
||||
@@ -376,5 +374,14 @@ public class ReagentConsumableInventoryController {
|
||||
|
||||
}
|
||||
|
||||
// @PostMapping("org")
|
||||
// public R<List<OrgFullVO>> getOrgList(HttpServletResponse httpServletResponse) {
|
||||
//
|
||||
// List<OrgFullVO> orgList = reagentConsumableInventoryService.getOrgList();
|
||||
//
|
||||
// return R.ok(orgList);
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
@@ -89,6 +90,7 @@ public class BatchDetails extends BaseEntity {
|
||||
private String roomNo;
|
||||
|
||||
@ApiModelProperty(value="试剂耗材名称")
|
||||
@TableField(exist = false)
|
||||
private String reagentConsumableName;
|
||||
|
||||
@ApiModelProperty(value="试剂耗材仓库ID")
|
||||
|
||||
+3
-4
@@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
|
||||
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO;
|
||||
import digital.laboratory.platform.reagent.vo.ReferenceMaterialFullVO;
|
||||
import digital.laboratory.platform.reagent.vo.UserVO;
|
||||
import digital.laboratory.platform.reagent.vo.*;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -26,8 +23,10 @@ public interface ReagentConsumableInventoryMapper extends BaseMapper<ReagentCons
|
||||
|
||||
IPage<ReagentConsumableInventoryVO> getReagentConsumableInventoryVOPage (IPage<ReagentConsumableInventory>page, @Param(Constants.WRAPPER) QueryWrapper<ReagentConsumableInventory> qw);
|
||||
IPage<ReagentConsumableInventoryFullVO> getReagentConsumableInventoryFullVOPage (IPage<ReagentConsumableInventory>page, @Param(Constants.WRAPPER) QueryWrapper<ReagentConsumableInventory> qw);
|
||||
IPage<ReagentConsumableInventoryFullVO> getFullVOPage (IPage<ReagentConsumableInventory>page, @Param("name") String name,@Param("category") String category);
|
||||
|
||||
List<UserVO> getUserList();
|
||||
List<OrgVO> getOrgList();
|
||||
|
||||
|
||||
IPage<ReferenceMaterialFullVO> getReferenceMaterialPage (IPage<ReagentConsumableInventory>page, @Param (Constants.WRAPPER) QueryWrapper<ReferenceMaterial> qw);
|
||||
|
||||
+2
@@ -59,4 +59,6 @@ public interface ReagentConsumableInventoryService extends IService<ReagentConsu
|
||||
|
||||
//更新柜子系统方法,柜子ID、物品ID、入库OR出库 (opCode 1 or -1)
|
||||
void updateCabinet(String latticeId, String itemId, int opCode);
|
||||
|
||||
// List<OrgFullVO> getOrgList();
|
||||
}
|
||||
|
||||
+25
-1
@@ -27,7 +27,6 @@ import digital.laboratory.platform.sys.entity.CabinetCell;
|
||||
import digital.laboratory.platform.sys.entity.CellAndStoreSupplyData;
|
||||
import digital.laboratory.platform.sys.feign.RemoteCabinetService;
|
||||
import feign.Response;
|
||||
import io.seata.spring.annotation.GlobalTransactional;
|
||||
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -283,6 +282,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(id);
|
||||
|
||||
if (referenceMaterial == null) {
|
||||
throw new RuntimeException(String.format("未能查询到该ID对应的标准物质"));
|
||||
}
|
||||
ReagentConsumableInventoryFullVO reagentConsumableInventoryFullVO = new ReagentConsumableInventoryFullVO();
|
||||
|
||||
ReagentConsumableInventory byId = this.getById(referenceMaterial.getReagentConsumableInventoryId());
|
||||
@@ -712,6 +714,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
batchDetailsService.save(batchDetails);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
//更新柜子系统方法,柜子ID、物品ID、入库OR出库 (opCode 1 or -1)
|
||||
public void updateCabinet(String latticeId, String itemId, int opCode) {
|
||||
@@ -726,4 +729,25 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
cellAndStoreSupplyDataArrayList.add(cellAndStoreSupplyData);
|
||||
remoteCabinetService.takeOrSaveGoodsFromCabinet(cellAndStoreSupplyDataArrayList, opCode);
|
||||
}
|
||||
|
||||
|
||||
// @Override
|
||||
// public List<OrgFullVO> getOrgList() {
|
||||
//
|
||||
// List<OrgVO> orgList = baseMapper.getOrgList();
|
||||
// ArrayList<OrgFullVO> orgFullVOS = new ArrayList<>();
|
||||
// for (OrgVO orgVO : orgList) {
|
||||
// if (orgVO.getOrgType() != null && orgVO.getOrgType().equals("county")) {
|
||||
// OrgFullVO orgFullVO = new OrgFullVO();
|
||||
// orgFullVO.setUsername("X" + orgVO.getAreaCode());
|
||||
// String[] roles = {"10015", "10020"};
|
||||
// orgFullVO.setRoleIds(roles);
|
||||
// orgFullVO.setPassword("123456");
|
||||
// orgFullVO.setOrgId(orgVO.getOrgId());
|
||||
// orgFullVOS.add(orgFullVO);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// return orgFullVOS;
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -58,8 +58,8 @@ spring:
|
||||
|
||||
# 文件上传相关 支持阿里云、华为云、腾讯、minio
|
||||
oss:
|
||||
endpoint: http://192.168.9.74:9000
|
||||
accessKey: admin
|
||||
endpoint: http://127.0.0.1:9000
|
||||
accessKey: dlp
|
||||
secretKey: 87990016
|
||||
bucket-name: dlpfiles
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
<result property="warningInformation" column="warning_information"/>
|
||||
<result property="warehousingBatchListId" column="warehousing_batch_list_id"/>
|
||||
<result property="roomNo" column="room_no"/>
|
||||
<result property="reagentConsumableName" column="reagent_consumable_name"/>
|
||||
<result property="reagentConsumableStashId" column="reagent_consumable_stash_id"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
|
||||
@@ -50,11 +50,36 @@
|
||||
from reagent_consumable_inventory ${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="getFullVOPage"
|
||||
resultType="digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryFullVO">
|
||||
SELECT bd.*,
|
||||
r1.*,
|
||||
(SELECT s1.supplier_name FROM supplier_information s1 WHERE s1.id = bd.supplier_id) as supplier_name
|
||||
FROM batch_details bd,
|
||||
reagent_consumable_inventory r1
|
||||
WHERE bd.reagent_consumable_inventory_id = r1.reagent_consumable_inventory_id
|
||||
<if test="name != null">
|
||||
AND r1.`reagent_consumable_name` = #{name}
|
||||
</if>
|
||||
<if test="category != null">
|
||||
AND r1.`category` = #{category}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getReagentConsumableInventoryVOPage" resultMap="reagentConsumableInventoryVO"
|
||||
resultType="digital.laboratory.platform.reagent.vo.ReagentConsumableInventoryVO">
|
||||
select *
|
||||
from reagent_consumable_inventory
|
||||
${ew.customSqlSegment}
|
||||
from reagent_consumable_inventory ${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="getUserList" resultType="digital.laboratory.platform.reagent.vo.UserVO">
|
||||
SELECT *
|
||||
FROM dlp_base.sys_user user
|
||||
</select>
|
||||
|
||||
<select id="getOrgList" resultType="digital.laboratory.platform.reagent.vo.OrgVO">
|
||||
SELECT *
|
||||
FROM dlp_base.sys_org org
|
||||
</select>
|
||||
|
||||
<select id="getUserList" resultType="digital.laboratory.platform.reagent.vo.UserVO">
|
||||
|
||||
Reference in New Issue
Block a user