Przeglądaj źródła

领用无法正常保存

gaodd 4 lat temu
rodzic
commit
25d0831d67

+ 3 - 0
src/main/java/com/chinaitop/depot/device/controller/StorageDeviceGetController.java

@@ -135,6 +135,9 @@ public class StorageDeviceGetController {
135
         	//根据设备编号获取入库表的该设备信息
135
         	//根据设备编号获取入库表的该设备信息
136
         	modelMap.put("number", storageDeviceget.getNumber());
136
         	modelMap.put("number", storageDeviceget.getNumber());
137
         	modelMap.put("model", storageDeviceget.getModel());
137
         	modelMap.put("model", storageDeviceget.getModel());
138
+        	modelMap.put("deviceTypeId", storageDeviceget.getDeviceType());
139
+        	modelMap.put("deviceName", storageDeviceget.getDeviceName());
140
+        	modelMap.put("orgId", storageDeviceget.getOrgId());
138
         	List<StorageDeviceinput> inputList=deviceInputService.getUseCount(modelMap);
141
         	List<StorageDeviceinput> inputList=deviceInputService.getUseCount(modelMap);
139
         	inputList.get(0).setStatus(4);//领用状态
142
         	inputList.get(0).setStatus(4);//领用状态
140
         	inputList.get(0).setUseCount(inputList.get(0).getUseCount()-storageDeviceget.getGetCount());//数量减少
143
         	inputList.get(0).setUseCount(inputList.get(0).getUseCount()-storageDeviceget.getGetCount());//数量减少

+ 5 - 2
src/main/java/com/chinaitop/depot/device/mapper/StorageDeviceinputMapper.xml

@@ -613,8 +613,11 @@
613
 
613
 
614
    select <include refid="Base_Column_List" /> from storage_deviceinput where number=#{number} and model=#{model}
614
    select <include refid="Base_Column_List" /> from storage_deviceinput where number=#{number} and model=#{model}
615
     and device_type=#{deviceTypeId} and
615
     and device_type=#{deviceTypeId} and
616
-    device_name In (select enumId from basic_enum where  enumName=#{deviceName}) and 
617
-    storage_rack IN (select id  from basic_equipment_equipment_pool where shelf_id=#{shelfId}) and org_id=#{orgId};
616
+    device_name In (select enumId from basic_enum where  enumName=#{deviceName}) 
617
+    <if test="shelfId != null">
618
+    and storage_rack IN (select id  from basic_equipment_equipment_pool where shelf_id=#{shelfId})
619
+    </if> 
620
+     and org_id=#{orgId};
618
 
621
 
619
   </select>
622
   </select>
620
 
623