|
|
@@ -103,7 +103,9 @@ public class LingYongProvider extends GenericProvider implements ILingYongServic
|
|
|
APIResult<Void> result = new APIResult<Void>();
|
|
|
try {
|
|
|
logger.info(" com.lc.ibps.components.provider.LingYongProvider.save()--->lingYongPo: {}", lingYongPo.toString());
|
|
|
+ String sids = "";
|
|
|
if(!lingYongPo.getLingYongDetailPoList().isEmpty()){
|
|
|
+ sids = lingYongPo.getWeiZhiLingYong();
|
|
|
/** 把流水id转换为库存id */
|
|
|
ReagentConsumabConvertAndPadId(lingYongPo);
|
|
|
|
|
|
@@ -127,7 +129,7 @@ public class LingYongProvider extends GenericProvider implements ILingYongServic
|
|
|
domain.saveCascade();
|
|
|
|
|
|
/** 新增 恒生医院试剂耗材出库hrp接入逻辑 */
|
|
|
- ReagentConsumabOutputForHSYY(lingYongPo);
|
|
|
+ ReagentConsumabOutputForHSYY(sids);
|
|
|
|
|
|
result.setMessage("保存试剂耗材领用主表成功");
|
|
|
} catch (Exception e) {
|
|
|
@@ -139,7 +141,7 @@ public class LingYongProvider extends GenericProvider implements ILingYongServic
|
|
|
/**
|
|
|
* 恒生医院 试剂耗材 出库流水hrp接入逻辑
|
|
|
*/
|
|
|
- private void ReagentConsumabOutputForHSYY(LingYongPo lingYongPo){
|
|
|
+ private void ReagentConsumabOutputForHSYY(String sids){
|
|
|
/**
|
|
|
* 出库流水保存成功后,要从 试剂耗材出库流水表(t_sjhccklsb)里删除对应数据
|
|
|
*/
|
|
|
@@ -162,11 +164,9 @@ public class LingYongProvider extends GenericProvider implements ILingYongServic
|
|
|
if(flag1){
|
|
|
/** 3. 则删除 试剂耗材入库流水表(t_sjhccklsb)里对应数据 */
|
|
|
|
|
|
- /** 3-1.从 weiZhiLingYong 字段 中获取数据id */
|
|
|
- String ids = lingYongPo.getWeiZhiLingYong();
|
|
|
- if(StringUtils.isNotEmpty(ids)){
|
|
|
- /** 3-2. 数据库操作,删除已保存确认的入库流水记录 */
|
|
|
- List<String> idsList = Arrays.asList(ids.split(","));
|
|
|
+ if(StringUtils.isNotEmpty(sids)){
|
|
|
+ /** 3-1. 数据库操作,删除已保存确认的入库流水记录 */
|
|
|
+ List<String> idsList = Arrays.asList(sids.split(","));
|
|
|
reagentConsumableDao.deleteByIdsForOutput(idsList);
|
|
|
}
|
|
|
}
|