|
@@ -60,7 +60,26 @@ public class DrugConfigService {
|
|
public int save(final PageData pd) throws Exception {
|
|
public int save(final PageData pd) throws Exception {
|
|
pd.put("createdBy", getSysUser().getUserId());
|
|
pd.put("createdBy", getSysUser().getUserId());
|
|
pd.put("createdTime", DateUtils.getTime());
|
|
pd.put("createdTime", DateUtils.getTime());
|
|
-
|
|
|
|
|
|
+ //添加管理品时候同步总药库库信息
|
|
|
|
+ PageData pd12=new PageData();
|
|
|
|
+ pd12.put("drug_delivery_way", pd.get("administrationMethod"));//给药方式
|
|
|
|
+ pd12.put("registered_item", pd.get("isRegisteredManaged"));//登记品
|
|
|
|
+ pd12.put("follow_up_item", pd.get("isFollowUpManaged"));//随访品
|
|
|
|
+ pd12.put("cold_chain_item", pd.get("isColdChainManaged"));//冷链品
|
|
|
|
+ //pd12.put("flow_item", pd.get("enterpriseFlowManagement"));//流向品 待确认是否修改
|
|
|
|
+ pd12.put("charity_aid_item", pd.get("isCharityAidManaged"));//慈善援助品
|
|
|
|
+ pd12.put("product_code", pd.get("mdmCode"));//药品编码
|
|
|
|
+ int res12=daoSupport.update("SPProductinfoMapper.productUpdate12", pd12);
|
|
|
|
+ System.out.println("res12:s_gxhpz_product_dtpinfo表更改条数"+res12);
|
|
|
|
+ //添加管理品时候同步总药库库信息
|
|
|
|
+ PageData pd13=new PageData();
|
|
|
|
+ pd13.put("product_code", pd.get("mdmCode"));//药品编码
|
|
|
|
+ pd13.put("product_name", pd.get("productName"));//通用名
|
|
|
|
+ pd13.put("generic_name", pd.get("genericName"));//通用名
|
|
|
|
+ pd13.put("manufacturer_abbreviation", pd.get("manufacturerShortName"));//厂家简称
|
|
|
|
+ int res13=daoSupport.update("SPProductinfoMapper.productUpdate", pd13);
|
|
|
|
+ System.out.println("res13:s_gxhpz_product_info表更改条数"+res13);
|
|
|
|
+ //添加管理品
|
|
return daoSupport.save("drugConfigMapper.addDrugConfig", pd);
|
|
return daoSupport.save("drugConfigMapper.addDrugConfig", pd);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -82,6 +101,8 @@ public class DrugConfigService {
|
|
*/
|
|
*/
|
|
public Integer update(PageData pd) throws Exception {
|
|
public Integer update(PageData pd) throws Exception {
|
|
String type = (String) pd.get("type");
|
|
String type = (String) pd.get("type");
|
|
|
|
+ //type=1的时候在配置D值品,需要把新增的D制品名称和编码存入管理品表 条件是根据mdmCode修改
|
|
|
|
+ //type=0的时候修改所有字段 条件是根据id修改
|
|
if(type.equals("1")){
|
|
if(type.equals("1")){
|
|
int result1=0;
|
|
int result1=0;
|
|
String dValueId = (String) pd.get("dValueId");
|
|
String dValueId = (String) pd.get("dValueId");
|
|
@@ -125,6 +146,26 @@ public class DrugConfigService {
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
|
|
+ //更新管理品时候同步总药库库信息s_gxhpz_product_dtpinfo表
|
|
|
|
+ PageData pd12=new PageData();
|
|
|
|
+ pd12.put("drug_delivery_way", pd.get("administrationMethod"));//给药方式
|
|
|
|
+ pd12.put("registered_item", pd.get("isRegisteredManaged"));//登记品
|
|
|
|
+ pd12.put("follow_up_item", pd.get("isFollowUpManaged"));//随访品
|
|
|
|
+ pd12.put("cold_chain_item", pd.get("isColdChainManaged"));//冷链品
|
|
|
|
+ //pd12.put("flow_item", pd.get("enterpriseFlowManagement"));//流向品 待确认是否修改
|
|
|
|
+ pd12.put("charity_aid_item", pd.get("isCharityAidManaged"));//慈善援助品
|
|
|
|
+ pd12.put("product_code", pd.get("mdmCode"));//药品编码
|
|
|
|
+ int res12=daoSupport.update("SPProductinfoMapper.productUpdate12", pd12);
|
|
|
|
+ System.out.println("res12:s_gxhpz_product_dtpinfo表更改条数"+res12);
|
|
|
|
+ //更新管理品时候同步总药库库信息s_gxhpz_product_info表
|
|
|
|
+ PageData pd13=new PageData();
|
|
|
|
+ pd13.put("product_code", pd.get("mdmCode"));//药品编码
|
|
|
|
+ pd13.put("product_name", pd.get("productName"));//通用名
|
|
|
|
+ pd13.put("generic_name", pd.get("genericName"));//通用名
|
|
|
|
+ pd13.put("manufacturer_abbreviation", pd.get("manufacturerShortName"));//厂家简称
|
|
|
|
+ int res13=daoSupport.update("SPProductinfoMapper.productUpdate", pd13);
|
|
|
|
+ System.out.println("res13:s_gxhpz_product_info表更改条数"+res13);
|
|
|
|
+ //更新患者管理品
|
|
pd.put("updatedBy", getSysUser().getUserId());
|
|
pd.put("updatedBy", getSysUser().getUserId());
|
|
pd.put("updatedTime", DateUtils.getTime());
|
|
pd.put("updatedTime", DateUtils.getTime());
|
|
return daoSupport.update("drugConfigMapper.updateDrugConfig", pd);
|
|
return daoSupport.update("drugConfigMapper.updateDrugConfig", pd);
|