Index: ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/action/GodownEntryAction.java =================================================================== diff -u -r27510 -r27528 --- ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/action/GodownEntryAction.java (.../GodownEntryAction.java) (revision 27510) +++ ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/action/GodownEntryAction.java (.../GodownEntryAction.java) (revision 27528) @@ -2,7 +2,8 @@ import java.io.IOException; import java.io.PrintWriter; -import java.text.SimpleDateFormat; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.HashMap; @@ -16,6 +17,7 @@ import net.sf.json.JSONObject; import net.sf.json.JsonConfig; +import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.StringUtils; import org.apache.struts2.convention.annotation.Action; @@ -41,6 +43,8 @@ import com.forgon.disinfectsystem.entity.assestmanagement.GodownEntryItem; import com.forgon.disinfectsystem.entity.basedatamanager.barcodeinformation.BarcodeInformation; import com.forgon.disinfectsystem.entity.tousseitem.TousseItem; +import com.forgon.disinfectsystem.vo.GodownEntryItemVO; +import com.forgon.disinfectsystem.vo.GodownEntryVO; import com.forgon.security.model.User; import com.forgon.tools.MapTools; import com.forgon.tools.StrutsParamUtils; @@ -545,19 +549,40 @@ if (StringUtils.isNotBlank(id) && StringUtils.isNumeric(id)) { godownEntry = godownEntryManager.getGodownEntryById(id); } - StrutsParamUtils.getResponse().setCharacterEncoding("UTF-8"); - Map map = new HashMap(); - map.put("success", true); - map.put("data", godownEntry); List items = godownEntry.getItemsList(); + GodownEntryVO godownEntryVO = new GodownEntryVO(); + try { + BeanUtils.copyProperties(godownEntryVO, godownEntry); + } catch (IllegalAccessException e1) { + e1.printStackTrace(); + } catch (InvocationTargetException e1) { + e1.printStackTrace(); + } + if (CollectionUtils.isNotEmpty(items)) { + List godownEntryItemVOs = new ArrayList(); + godownEntryVO.setItemsList(godownEntryItemVOs); for (GodownEntryItem godownEntryItem : items) { DisposableGoodsStock disposableGoodsStock = godownEntryItem.getDiposableGoods(); if(disposableGoodsStock != null){ disposableGoodsStock.setGoodsBatchs(null); } + GodownEntryItemVO itemVO = new GodownEntryItemVO(); + godownEntryItemVOs.add(itemVO); + try { + BeanUtils.copyProperties(itemVO, godownEntryItem); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } } } + + StrutsParamUtils.getResponse().setCharacterEncoding("UTF-8"); + Map map = new HashMap(); + map.put("success", true); + map.put("data", godownEntryVO); JsonConfig config = new JsonConfig(); config.setJsonPropertyFilter(new JsonPropertyFilter(new String[] { "godownEntry", "goodsBatchs" })); @@ -802,15 +827,25 @@ } List itemList = godownEntry.getItemsList(); if(itemList!=null){ - StrutsParamUtils.getResponse().setCharacterEncoding("UTF-8"); - Map map = new HashMap(); - map.put("data", itemList); + List itemVOList = new ArrayList(); for (GodownEntryItem godownEntryItem : itemList) { DisposableGoodsStock disposableGoodsStock = godownEntryItem.getDiposableGoods(); if(disposableGoodsStock != null){ disposableGoodsStock.setGoodsBatchs(null); } + GodownEntryItemVO godownEntryItemVO = new GodownEntryItemVO(); + itemVOList.add(godownEntryItemVO); + try { + BeanUtils.copyProperties(godownEntryItemVO, godownEntryItem); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } } + StrutsParamUtils.getResponse().setCharacterEncoding("UTF-8"); + Map map = new HashMap(); + map.put("data", itemVOList); JsonConfig config = new JsonConfig(); config.setJsonPropertyFilter(new JsonPropertyFilter(new String[] { "godownEntry", "goodsBatchs" })); Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/vo/GodownEntryItemVO.java =================================================================== diff -u --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/vo/GodownEntryItemVO.java (revision 0) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/vo/GodownEntryItemVO.java (revision 27528) @@ -0,0 +1,450 @@ +package com.forgon.disinfectsystem.vo; + +import java.util.Date; + +import com.forgon.disinfectsystem.entity.assestmanagement.DisposableGoodsStock; + +/** + * 一次性物品入(出)库单的明细项VO类 + */ +public class GodownEntryItemVO { + + private Long id; + + /** + * 关联一次性物品库存对象 + */ + private DisposableGoodsStock diposableGoods; + + /** + * 数量 + */ + private Long amount; + + /** + * 入库价格 + */ + private Float cost; + + /** + * 批次号 + */ + private String batchNumber; + + /** + * 一次性物品库存id // TODO 名字待重构 + */ + private Long disposableGoodsStockID ; + /** + * 批次库存id + */ + private Long disposableGoodsBatchStockID ; + + /** + * 标识对象的ID,以后不要使用identification来关联了。 + */ + private Long identificationID; + + /** + * 高值耗材实例id + */ + private Long expensiveDisposableGoodsId; + + /** + * 一次性物品id + */ + private Long disposableGoodsID ; + /** + * 批次id + */ + private Long disposableGoodsBatchID ; + + /** + * 生产日期 + */ + private Date produceDate; + + /** + * 失效期 + */ + private Date expDate; + + /** + * 该入库物品是否新批次 + */ + private Boolean newBatch; + + /** + *入库前该批次库存是否为0(newBatch为true则为true) + */ + private Boolean batchStockZeroBeforeEntry; + + /** + * 注册证号 + */ + private String certification ; + + /** + * 分类级别(分一类、二类、三类.按药监局标准分别表示不与人体皮肤接触、用于皮肤表面及用于人体类) + */ + private String grade; + + /** + * 供应商 + */ + private String supplierName; + + /** + * 供应商id + */ + private Long supplierId; + + /** + * 灭菌批次(是否应该称灭菌日期更合适?) + * 看到健讯旧系统的单据有叫灭菌日期,接口文档里叫生产日期,没有看到灭菌批次 + */ + private String sterileBatchNumber ; + + /** + * 生产厂家 + */ + private String manufacturer ; + + /** + * 生产厂家id + */ + private Long manufacturerId; + + /** + * 验收结果(用于高值耗材) + */ + private String conclusion; + + /** + * 产地 + */ + private String producingArea; + + /** + * 仓库ID + */ + private Long warehouseID; + + /** + * 仓库名称 + */ + private String warehouseName; + /** + * 有无生物检测报告 + */ + private String hasBiologicalTestReport; + /** + * 有无发票 + */ + private String hasInvoice; + + /** + * 条码(一般用于一次性物品高值耗材,后期可支持普通一次性物品的批次条码) + */ + private String barcode; + + /** + * 物资id(his系统材料或一次性物品id) + * 省医物资入库时传递的物品id(目前仅省医使用) + */ + private Long sourceIdFromHisSync; + + /** + * his接口的批次id + * 省医物资入库时传递的batchId(目前仅省医使用),相同batchNumber的多个入库数据推送过来,每次的batchId是变化的,所以需要对每一笔的batchId单独记录 + */ + private Long batchIdFromHisSync; + + /** + * his接口的批次id + * 深圳南山同步入库时传递的批次batchId + */ + private String identification; + + /** + * 是否合格标签(目前仅复大肿瘤使用) + */ + private String qualifiedLabel; + + /** + * 是否合格验收(目前仅复大肿瘤使用) + */ + private String qualifiedCheck; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public DisposableGoodsStock getDiposableGoods() { + return diposableGoods; + } + + public void setDiposableGoods(DisposableGoodsStock diposableGoods) { + this.diposableGoods = diposableGoods; + } + + public Long getAmount() { + return amount; + } + + public void setAmount(Long amount) { + this.amount = amount; + } + + public Float getCost() { + return cost; + } + + public void setCost(Float cost) { + this.cost = cost; + } + + public String getBatchNumber() { + return batchNumber; + } + + public void setBatchNumber(String batchNumber) { + this.batchNumber = batchNumber; + } + + public Date getProduceDate() { + return produceDate; + } + + public void setProduceDate(Date produceDate) { + this.produceDate = produceDate; + } + + public Date getExpDate() { + return expDate; + } + + public void setExpDate(Date expDate) { + this.expDate = expDate; + } + + public Boolean getNewBatch() { + return newBatch; + } + + public void setNewBatch(Boolean newBatch) { + this.newBatch = newBatch; + } + + public String getCertification() { + return certification; + } + + public void setCertification(String certification) { + this.certification = certification; + } + + public String getGrade() { + return grade; + } + + public void setGrade(String grade) { + this.grade = grade; + } + + public String getSupplierName() { + return supplierName; + } + + public void setSupplierName(String supplierName) { + this.supplierName = supplierName; + } + + public Long getSupplierId() { + return supplierId; + } + + public void setSupplierId(Long supplierId) { + this.supplierId = supplierId; + } + + public String getManufacturer() { + return manufacturer; + } + + public void setManufacturer(String manufacturer) { + this.manufacturer = manufacturer; + } + + public Long getManufacturerId() { + return manufacturerId; + } + + public void setManufacturerId(Long manufacturerId) { + this.manufacturerId = manufacturerId; + } + + public String getConclusion() { + return conclusion; + } + + public void setConclusion(String conclusion) { + this.conclusion = conclusion; + } + + public String getProducingArea() { + return producingArea; + } + + public void setProducingArea(String producingArea) { + this.producingArea = producingArea; + } + + public Long getWarehouseID() { + return warehouseID; + } + + public void setWarehouseID(Long warehouseID) { + this.warehouseID = warehouseID; + } + + public String getWarehouseName() { + return warehouseName; + } + + public void setWarehouseName(String warehouseName) { + this.warehouseName = warehouseName; + } + + public String getHasBiologicalTestReport() { + return hasBiologicalTestReport; + } + + public void setHasBiologicalTestReport(String hasBiologicalTestReport) { + this.hasBiologicalTestReport = hasBiologicalTestReport; + } + + public String getHasInvoice() { + return hasInvoice; + } + + public void setHasInvoice(String hasInvoice) { + this.hasInvoice = hasInvoice; + } + + public String getBarcode() { + return barcode; + } + + public void setBarcode(String barcode) { + this.barcode = barcode; + } + + public Long getDisposableGoodsStockID() { + return disposableGoodsStockID; + } + + public void setDisposableGoodsStockID(Long disposableGoodsStockID) { + this.disposableGoodsStockID = disposableGoodsStockID; + } + + public Long getDisposableGoodsBatchStockID() { + return disposableGoodsBatchStockID; + } + + public void setDisposableGoodsBatchStockID(Long disposableGoodsBatchStockID) { + this.disposableGoodsBatchStockID = disposableGoodsBatchStockID; + } + + public Long getIdentificationID() { + return identificationID; + } + + public void setIdentificationID(Long identificationID) { + this.identificationID = identificationID; + } + + public Long getExpensiveDisposableGoodsId() { + return expensiveDisposableGoodsId; + } + + public void setExpensiveDisposableGoodsId(Long expensiveDisposableGoodsId) { + this.expensiveDisposableGoodsId = expensiveDisposableGoodsId; + } + + public Long getDisposableGoodsID() { + return disposableGoodsID; + } + + public void setDisposableGoodsID(Long disposableGoodsID) { + this.disposableGoodsID = disposableGoodsID; + } + + public Long getDisposableGoodsBatchID() { + return disposableGoodsBatchID; + } + + public void setDisposableGoodsBatchID(Long disposableGoodsBatchID) { + this.disposableGoodsBatchID = disposableGoodsBatchID; + } + + public Boolean getBatchStockZeroBeforeEntry() { + return batchStockZeroBeforeEntry; + } + + public void setBatchStockZeroBeforeEntry(Boolean batchStockZeroBeforeEntry) { + this.batchStockZeroBeforeEntry = batchStockZeroBeforeEntry; + } + + public String getSterileBatchNumber() { + return sterileBatchNumber; + } + + public void setSterileBatchNumber(String sterileBatchNumber) { + this.sterileBatchNumber = sterileBatchNumber; + } + + public Long getSourceIdFromHisSync() { + return sourceIdFromHisSync; + } + + public void setSourceIdFromHisSync(Long sourceIdFromHisSync) { + this.sourceIdFromHisSync = sourceIdFromHisSync; + } + + public Long getBatchIdFromHisSync() { + return batchIdFromHisSync; + } + + public void setBatchIdFromHisSync(Long batchIdFromHisSync) { + this.batchIdFromHisSync = batchIdFromHisSync; + } + + public String getIdentification() { + return identification; + } + + public void setIdentification(String identification) { + this.identification = identification; + } + + public String getQualifiedLabel() { + return qualifiedLabel; + } + + public void setQualifiedLabel(String qualifiedLabel) { + this.qualifiedLabel = qualifiedLabel; + } + + public String getQualifiedCheck() { + return qualifiedCheck; + } + + public void setQualifiedCheck(String qualifiedCheck) { + this.qualifiedCheck = qualifiedCheck; + } +} Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.js =================================================================== diff -u -r27510 -r27528 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.js (.../godownEntryView.js) (revision 27510) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.js (.../godownEntryView.js) (revision 27528) @@ -3,6 +3,7 @@ var batchNumStore; var g_localID = 1;// 为了区分每一个item,增加的ID。 var commonEntry = new commonEntry(); +var mouseoverLock = false; //表单提交的结果状态(分别表示初始、提交成功、失败等) var formSubmitResultInit = "0"; @@ -1418,6 +1419,8 @@ var record = this.getStore().getAt(index);//获得当前列的数据 var tableContent = record.data['htmlContent'];//预览内容 if(!tableContent){//若为unfinished + if(mouseoverLock) return; + mouseoverLock = true; var content = ""; var id=record.data['id']; Ext.Ajax.request({ @@ -1472,8 +1475,10 @@ record.set("htmlContent",tableContent); } } + mouseoverLock = false; }, failure : function(response, options) {//请求失败的回调函数 + mouseoverLock = false; } }); } Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/vo/GodownEntryVO.java =================================================================== diff -u --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/vo/GodownEntryVO.java (revision 0) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/vo/GodownEntryVO.java (revision 27528) @@ -0,0 +1,307 @@ +package com.forgon.disinfectsystem.vo; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * 入库单VO类 + */ +public class GodownEntryVO { + + private Long id; + + /** + * 单号 + */ + private String serialNumber; + /** + * 操作员 + */ + private String operator; + /** + * 入库/退库时间 + */ + private Date time; + /** + * hrp那边入库单的入库时间 + */ + private Date hrpTime; + /** + * 备注 + */ + private String remark; + /** + * 类型:如入库单、退库单、调拨单 + */ + private String type; + /** + * 子类型:如同步入库、同步退库、导入入库、调拨入库、调拨出库 + */ + private String subType; + /** + * 总价 + */ + private Double totalPrice; + /** + * 供应商 + */ + private String supplierName; + + private Long inventoryWriteBackEntryId; + + /** + * 仓库ID + */ + private Long warehouseID; + private String orgUnitCode; + + /** + * 仓库名称 + */ + private String warehouseName; + private String orgUnitName; + + /** + * 目标仓库ID(只有当类型为调拨单时才有值) + */ + private Long targetWareHouseId; + private String targetOrgUnitCode; + + /** + * 目标仓库名称(只有当类型为调拨单时才有值) + */ + private String targetWareHouseName; + private String targetOrgUnitName; + + /** + * 源单Id.比如调拨单生成调拨入库单与调拨出库单后,在调拨入库单与调拨出库单需记录源调拨单的id;盘盈入库、盘亏出库需关联的盘点记录ID; + */ + private Long sourceId; + + /** + * 数据状态(有物品的失效期为空或小于当前时间时,状态为异常) + */ + private Integer dataStatus; + + /** + * 设备科审核人(广东省医院这边无菌物品入库需要双人核对) + */ + private String equipmentVerifier ; + + /** + * 供应室审核人(广东省医院这边无菌物品入库需要双人核对) + */ + private String supplyRoomVerifier; + + /** + * 是否已有双人核对(广东省医院这边无菌物品入库需要双人核对)默认为否 + */ + private String isHasVerifier; + + @JsonIgnore + private List itemsList = new ArrayList(); + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getSerialNumber() { + return serialNumber; + } + + public void setSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + } + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public Date getTime() { + return time; + } + + public void setTime(Date time) { + this.time = time; + } + + public Date getHrpTime() { + return hrpTime; + } + + public void setHrpTime(Date hrpTime) { + this.hrpTime = hrpTime; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getSubType() { + return subType; + } + + public void setSubType(String subType) { + this.subType = subType; + } + + public Double getTotalPrice() { + return totalPrice; + } + + public void setTotalPrice(Double totalPrice) { + this.totalPrice = totalPrice; + } + + public String getSupplierName() { + return supplierName; + } + + public void setSupplierName(String supplierName) { + this.supplierName = supplierName; + } + + public Long getInventoryWriteBackEntryId() { + return inventoryWriteBackEntryId; + } + + public void setInventoryWriteBackEntryId(Long inventoryWriteBackEntryId) { + this.inventoryWriteBackEntryId = inventoryWriteBackEntryId; + } + + public Long getWarehouseID() { + return warehouseID; + } + + public void setWarehouseID(Long warehouseID) { + this.warehouseID = warehouseID; + } + + public String getOrgUnitCode() { + return orgUnitCode; + } + + public void setOrgUnitCode(String orgUnitCode) { + this.orgUnitCode = orgUnitCode; + } + + public String getWarehouseName() { + return warehouseName; + } + + public void setWarehouseName(String warehouseName) { + this.warehouseName = warehouseName; + } + + public String getOrgUnitName() { + return orgUnitName; + } + + public void setOrgUnitName(String orgUnitName) { + this.orgUnitName = orgUnitName; + } + + public Long getTargetWareHouseId() { + return targetWareHouseId; + } + + public void setTargetWareHouseId(Long targetWareHouseId) { + this.targetWareHouseId = targetWareHouseId; + } + + public String getTargetOrgUnitCode() { + return targetOrgUnitCode; + } + + public void setTargetOrgUnitCode(String targetOrgUnitCode) { + this.targetOrgUnitCode = targetOrgUnitCode; + } + + public String getTargetWareHouseName() { + return targetWareHouseName; + } + + public void setTargetWareHouseName(String targetWareHouseName) { + this.targetWareHouseName = targetWareHouseName; + } + + public String getTargetOrgUnitName() { + return targetOrgUnitName; + } + + public void setTargetOrgUnitName(String targetOrgUnitName) { + this.targetOrgUnitName = targetOrgUnitName; + } + + public Long getSourceId() { + return sourceId; + } + + public void setSourceId(Long sourceId) { + this.sourceId = sourceId; + } + + public Integer getDataStatus() { + return dataStatus; + } + + public void setDataStatus(Integer dataStatus) { + this.dataStatus = dataStatus; + } + + public String getEquipmentVerifier() { + return equipmentVerifier; + } + + public void setEquipmentVerifier(String equipmentVerifier) { + this.equipmentVerifier = equipmentVerifier; + } + + public String getSupplyRoomVerifier() { + return supplyRoomVerifier; + } + + public void setSupplyRoomVerifier(String supplyRoomVerifier) { + this.supplyRoomVerifier = supplyRoomVerifier; + } + + public String getIsHasVerifier() { + return isHasVerifier; + } + + public void setIsHasVerifier(String isHasVerifier) { + this.isHasVerifier = isHasVerifier; + } + + public List getItemsList() { + return itemsList; + } + + public void setItemsList(List itemsList) { + this.itemsList = itemsList; + } + +}