Prechádzať zdrojové kódy

[task-5915] 试剂耗材入库登记把入库表的状态带到库存一览表

huangws 3 týždňov pred
rodič
commit
f9ed734e85

+ 4 - 0
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/components/reagent/dto/InventoryDTO.java

@@ -53,6 +53,7 @@ public class InventoryDTO {
                 Object pi_hao_ = data.get("pi_hao_");
                 Object gui_ge_ = data.get("gui_ge_");
                 Object dao_huo_ri_qi_ = data.get("dao_huo_ri_qi_");
+                Object state = data.get("state");
 
 //                Object createTime = data.get("createTime");
                 if(expDate !=null){
@@ -105,6 +106,9 @@ public class InventoryDTO {
                 if (dao_huo_ri_qi_ != null){
                     iv.getInventory().setArrivalDate(dao_huo_ri_qi_.toString());
                 }
+                if (state != null){
+                    iv.getInventory().setStatus(state.toString());
+                }
                 iv.getTransaction().setType((Long)data.get("type_"));
                 list.add(iv);
             }

+ 3 - 2
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/components/reagent/service/InventoryService.java

@@ -58,9 +58,10 @@ public class InventoryService extends GenericProvider {
                 calcQuantity(inventory, Long.parseLong(inv.get(0).get("quantity").toString()),service.getPolicy());
             }else {
                 // 新库存
-                inventory.setStatus("入库");
+                //inventory.setStatus("入库");
                 inventory.setEnable("是");
-                inventory.setStatus("未验证");
+                //inventory.setStatus("未验证");
+
             }
 
             ReagentConsumablesInventory domain = reagentConsumablesInventoryRepository.newInstance(inventory);

+ 1 - 0
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/components/reagent/service/StoreService.java

@@ -29,6 +29,7 @@ public class StoreService implements OperationService {
         List<Map<String,Object>> query = (List<Map<String,Object>>)commonDao.query(
                 "SELECT c.xiao_qi_ expDate,c.bian_ma_ reagentCode,c.shu_liang_ quantity,c.id_ boId,1 as type_," +
                 " p.bian_zhi_ren_ createBy,p.bian_zhi_shi_jian createTime,p.di_dian_ diDian,p.bian_zhi_bu_men_,  " +
+                " c.zhuang_tai_ state, "+ //入库子表增加状态字段返回
                 " c.zui_di_ku_cun_,c.cang_ku_,c.pi_hao_,c.gui_ge_,c.dao_huo_ri_qi_ FROM t_sjhxhclrkysdjb p, t_sjhxhclrkysdjbzb c " +
                 " WHERE p.id_=c.parent_id_ AND c.yan_shou_jie_guo_='合格' and p.id_=#{p0}", new String[]{id});
         return InventoryDTO.build(query);