Merge remote-tracking branch 'origin/master-prod-new' into master-prod-new
| | |
| | | <!-- 整个实体类修改,表字段=实体类字段--> |
| | | <sql id="Update_Column_All"> |
| | | <trim prefixOverrides=","> |
| | | ,positionData = #{positionData},projectNo = #{projectNo},projectName = #{projectName},price = #{price},num = #{num},useDuration = #{useDuration},palsyDuration = #{palsyDuration},projectId = #{projectId},treatSingleId = #{treatSingleId},remarkInfo = #{remarkInfo},hisId = #{hisId},isDeduct = #{isDeduct},userProjectItemId = #{userProjectItemId},goodsId = #{goodsId},treatSingleNo = #{treatSingleNo},deductNum = #{deductNum},isUserPro = #{isUserPro},indicationId = #{indicationId},indication = #{indication},partType = #{partType},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime} |
| | | ,positionData = #{positionData},projectNo = #{projectNo},projectName = #{projectName},price = #{price},num = #{num},useDuration = #{useDuration},palsyDuration = #{palsyDuration},projectId = #{projectId},treatSingleId = #{treatSingleId},remarkInfo = #{remarkInfo},hisId = #{hisId},isDeduct = #{isDeduct},userProjectItemId = #{userProjectItemId},goodsId = #{goodsId},treatSingleNo = #{treatSingleNo},deductNum = #{deductNum},isUserPro = #{isUserPro},indicationId = #{indicationId},indication = #{indication},partType = #{partType},sdRemark = #{sdRemark},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime} |
| | | </trim> |
| | | </sql> |
| | | |
| | |
| | | <selectKey keyProperty="id" resultType="String" order="BEFORE"> |
| | | select replace(uuid(),'-','') from dual |
| | | </selectKey> |
| | | insert into treat_project (id,positionData,projectNo,projectName,price,num,useDuration,palsyDuration,projectId,treatSingleId,remarkInfo,hisId,isDeduct,userProjectItemId,goodsId,treatSingleNo,deductNum,isUserPro,indicationId,indication,partType,isDel,createTime,editTime) values (#{id},#{positionData},#{projectNo},#{projectName},#{price},#{num},#{useDuration},#{palsyDuration},#{projectId},#{treatSingleId},#{remarkInfo},#{hisId},#{isDeduct},#{userProjectItemId},#{goodsId},#{treatSingleNo},#{deductNum},#{isUserPro},#{indicationId},#{indication},#{partType},#{isDel},#{createTime},#{editTime}) |
| | | insert into treat_project (id,positionData,projectNo,projectName,price,num,useDuration,palsyDuration,projectId,treatSingleId,remarkInfo,hisId,isDeduct,userProjectItemId,goodsId,treatSingleNo,deductNum,isUserPro,indicationId,indication,partType,sdRemark,isDel,createTime,editTime) values (#{id},#{positionData},#{projectNo},#{projectName},#{price},#{num},#{useDuration},#{palsyDuration},#{projectId},#{treatSingleId},#{remarkInfo},#{hisId},#{isDeduct},#{userProjectItemId},#{goodsId},#{treatSingleNo},#{deductNum},#{isUserPro},#{indicationId},#{indication},#{partType},#{sdRemark},#{isDel},#{createTime},#{editTime}) |
| | | </insert> |
| | | |
| | | <insert id="insertById" parameterType="com.hx.phiappt.model.treat.TreatProject"> |
| | | insert into treat_project (id,positionData,projectNo,projectName,price,num,useDuration,palsyDuration,projectId,treatSingleId,remarkInfo,hisId,isDeduct,userProjectItemId,goodsId,treatSingleNo,deductNum,isUserPro,indicationId,indication,partType,isDel,createTime,editTime) values (#{id},#{positionData},#{projectNo},#{projectName},#{price},#{num},#{useDuration},#{palsyDuration},#{projectId},#{treatSingleId},#{remarkInfo},#{hisId},#{isDeduct},#{userProjectItemId},#{goodsId},#{treatSingleNo},#{deductNum},#{isUserPro},#{indicationId},#{indication},#{partType},#{isDel},#{createTime},#{editTime}) |
| | | insert into treat_project (id,positionData,projectNo,projectName,price,num,useDuration,palsyDuration,projectId,treatSingleId,remarkInfo,hisId,isDeduct,userProjectItemId,goodsId,treatSingleNo,deductNum,isUserPro,indicationId,indication,partType,sdRemark,isDel,createTime,editTime) values (#{id},#{positionData},#{projectNo},#{projectName},#{price},#{num},#{useDuration},#{palsyDuration},#{projectId},#{treatSingleId},#{remarkInfo},#{hisId},#{isDeduct},#{userProjectItemId},#{goodsId},#{treatSingleNo},#{deductNum},#{isUserPro},#{indicationId},#{indication},#{partType},#{sdRemark},#{isDel},#{createTime},#{editTime}) |
| | | </insert> |
| | | |
| | | <select id="selectList" resultType="com.hx.phiappt.model.treat.TreatProject" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | |
| | | |
| | | <select id="selectOneByKey" resultType="com.hx.phiappt.model.treat.TreatProject" parameterType="java.lang.Object" > |
| | | select |
| | | id,positionData,projectNo,projectName,price,num,useDuration,palsyDuration,projectId,treatSingleId,remarkInfo,hisId,isDeduct,userProjectItemId,goodsId,treatSingleNo,deductNum,isUserPro,indicationId,indication,partType,isDel,createTime,editTime |
| | | id,positionData,projectNo,projectName,price,num,useDuration,palsyDuration,projectId,treatSingleId,remarkInfo,hisId,isDeduct,userProjectItemId,goodsId,treatSingleNo,deductNum,isUserPro,indicationId,indication,partType,sdRemark,isDel,createTime,editTime |
| | | from treat_project |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.treat.TreatProject" parameterType="java.lang.Object" > |
| | | select |
| | | id,positionData,projectNo,projectName,price,num,useDuration,palsyDuration,projectId,treatSingleId,remarkInfo,hisId,isDeduct,userProjectItemId,goodsId,treatSingleNo,deductNum,isUserPro,indicationId,indication,partType,isDel,createTime,editTime |
| | | id,positionData,projectNo,projectName,price,num,useDuration,palsyDuration,projectId,treatSingleId,remarkInfo,hisId,isDeduct,userProjectItemId,goodsId,treatSingleNo,deductNum,isUserPro,indicationId,indication,partType,sdRemark,isDel,createTime,editTime |
| | | from treat_project |
| | | WHERE id = #{value} |
| | | </select> |
| | |
| | | <update id="updateEditInfo" parameterType="java.util.Map"> |
| | | update treat_project |
| | | set num = #{num}, indication = #{indication} , indicationId = #{indicationId} |
| | | , partType = #{partType}, editTime = now() |
| | | , partType = #{partType}, sdRemark = #{m.sdRemark}, editTime = now() |
| | | where id = #{id} |
| | | </update> |
| | | </mapper> |
| | |
| | | <!-- 整个实体类修改,表字段=实体类字段--> |
| | | <sql id="Update_Column_All"> |
| | | <trim prefixOverrides=","> |
| | | ,type = #{type},commonId = #{commonId},signData = #{signData},treatData = #{treatData},shopId = #{shopId},shopName = #{shopName},operatorId = #{operatorId},operatorName = #{operatorName},developerShopId = #{developerShopId},developerShopName = #{developerShopName},developerId = #{developerId},developerName = #{developerName},remarkInfo = #{remarkInfo},status = #{status},isLedProduct = #{isLedProduct},treatSingleNo = #{treatSingleNo},visitOrderId = #{visitOrderId},userConsultantId = #{userConsultantId},userConsultantName = #{userConsultantName},orderClassify = #{orderClassify},isKnow = #{isKnow},drugStatus = #{drugStatus},allergyInfo = #{allergyInfo},isWillPhoto = #{isWillPhoto},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime} |
| | | ,type = #{type},commonId = #{commonId},signData = #{signData},treatData = #{treatData},shopId = #{shopId},shopName = #{shopName},operatorId = #{operatorId},operatorName = #{operatorName},developerShopId = #{developerShopId},developerShopName = #{developerShopName},developerId = #{developerId},developerName = #{developerName},remarkInfo = #{remarkInfo},status = #{status},isLedProduct = #{isLedProduct},treatSingleNo = #{treatSingleNo},visitOrderId = #{visitOrderId},userConsultantId = #{userConsultantId},userConsultantName = #{userConsultantName},orderClassify = #{orderClassify},isKnow = #{isKnow},drugStatus = #{drugStatus},allergyInfo = #{allergyInfo},isWillPhoto = #{isWillPhoto},isFirstFm = #{isFirstFm},isRd = #{isRd},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime} |
| | | </trim> |
| | | </sql> |
| | | |
| | |
| | | <selectKey keyProperty="id" resultType="String" order="BEFORE"> |
| | | select replace(uuid(),'-','') from dual |
| | | </selectKey> |
| | | insert into treat_single (id,type,commonId,signData,treatData,shopId,shopName,operatorId,operatorName,developerShopId,developerShopName,developerId,developerName,remarkInfo,status,isLedProduct,treatSingleNo,visitOrderId,userConsultantId,userConsultantName,orderClassify,isKnow,drugStatus,allergyInfo,isWillPhoto,isDel,createTime,editTime) values (#{id},#{type},#{commonId},#{signData},#{treatData},#{shopId},#{shopName},#{operatorId},#{operatorName},#{developerShopId},#{developerShopName},#{developerId},#{developerName},#{remarkInfo},#{status},#{isLedProduct},#{treatSingleNo},#{visitOrderId},#{userConsultantId},#{userConsultantName},#{orderClassify},#{isKnow},#{drugStatus},#{allergyInfo},#{isWillPhoto},#{isDel},#{createTime},#{editTime}) |
| | | insert into treat_single (id,type,commonId,signData,treatData,shopId,shopName,operatorId,operatorName,developerShopId,developerShopName,developerId,developerName,remarkInfo,status,isLedProduct,treatSingleNo,visitOrderId,userConsultantId,userConsultantName,orderClassify,isKnow,drugStatus,allergyInfo,isWillPhoto,isFirstFm,isRd,isDel,createTime,editTime) values (#{id},#{type},#{commonId},#{signData},#{treatData},#{shopId},#{shopName},#{operatorId},#{operatorName},#{developerShopId},#{developerShopName},#{developerId},#{developerName},#{remarkInfo},#{status},#{isLedProduct},#{treatSingleNo},#{visitOrderId},#{userConsultantId},#{userConsultantName},#{orderClassify},#{isKnow},#{drugStatus},#{allergyInfo},#{isWillPhoto},#{isFirstFm},#{isRd},#{isDel},#{createTime},#{editTime}) |
| | | </insert> |
| | | |
| | | <insert id="insertById" parameterType="com.hx.phiappt.model.treat.TreatSingle"> |
| | | insert into treat_single (id,type,commonId,signData,treatData,shopId,shopName,operatorId,operatorName,developerShopId,developerShopName,developerId,developerName,remarkInfo,status,isLedProduct,treatSingleNo,visitOrderId,userConsultantId,userConsultantName,orderClassify,isKnow,drugStatus,allergyInfo,isWillPhoto,isDel,createTime,editTime) values (#{id},#{type},#{commonId},#{signData},#{treatData},#{shopId},#{shopName},#{operatorId},#{operatorName},#{developerShopId},#{developerShopName},#{developerId},#{developerName},#{remarkInfo},#{status},#{isLedProduct},#{treatSingleNo},#{visitOrderId},#{userConsultantId},#{userConsultantName},#{orderClassify},#{isKnow},#{drugStatus},#{allergyInfo},#{isWillPhoto},#{isDel},#{createTime},#{editTime}) |
| | | insert into treat_single (id,type,commonId,signData,treatData,shopId,shopName,operatorId,operatorName,developerShopId,developerShopName,developerId,developerName,remarkInfo,status,isLedProduct,treatSingleNo,visitOrderId,userConsultantId,userConsultantName,orderClassify,isKnow,drugStatus,allergyInfo,isWillPhoto,isFirstFm,isRd,isDel,createTime,editTime) values (#{id},#{type},#{commonId},#{signData},#{treatData},#{shopId},#{shopName},#{operatorId},#{operatorName},#{developerShopId},#{developerShopName},#{developerId},#{developerName},#{remarkInfo},#{status},#{isLedProduct},#{treatSingleNo},#{visitOrderId},#{userConsultantId},#{userConsultantName},#{orderClassify},#{isKnow},#{drugStatus},#{allergyInfo},#{isWillPhoto},#{isFirstFm},#{isRd},#{isDel},#{createTime},#{editTime}) |
| | | </insert> |
| | | |
| | | <select id="selectList" resultType="com.hx.phiappt.model.treat.TreatSingle" parameterType="com.hx.mybatisTool.SqlSentence" > |
| | |
| | | |
| | | <select id="selectOneByKey" resultType="com.hx.phiappt.model.treat.TreatSingle" parameterType="java.lang.Object" > |
| | | select |
| | | id,type,commonId,signData,treatData,shopId,shopName,operatorId,operatorName,developerShopId,developerShopName,developerId,developerName,remarkInfo,status,isLedProduct,treatSingleNo,visitOrderId,userConsultantId,userConsultantName,orderClassify,isKnow,drugStatus,allergyInfo,isWillPhoto,isDel,createTime,editTime |
| | | id,type,commonId,signData,treatData,shopId,shopName,operatorId,operatorName,developerShopId,developerShopName,developerId,developerName,remarkInfo,status,isLedProduct,treatSingleNo,visitOrderId,userConsultantId,userConsultantName,orderClassify,isKnow,drugStatus,allergyInfo,isWillPhoto,isFirstFm,isRd,isDel,createTime,editTime |
| | | from treat_single |
| | | WHERE id = #{value} |
| | | </select> |
| | | |
| | | <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.treat.TreatSingle" parameterType="java.lang.Object" > |
| | | select |
| | | id,type,commonId,signData,treatData,shopId,shopName,operatorId,operatorName,developerShopId,developerShopName,developerId,developerName,remarkInfo,status,isLedProduct,treatSingleNo,visitOrderId,userConsultantId,userConsultantName,orderClassify,isKnow,drugStatus,allergyInfo,isWillPhoto,isDel,createTime,editTime |
| | | id,type,commonId,signData,treatData,shopId,shopName,operatorId,operatorName,developerShopId,developerShopName,developerId,developerName,remarkInfo,status,isLedProduct,treatSingleNo,visitOrderId,userConsultantId,userConsultantName,orderClassify,isKnow,drugStatus,allergyInfo,isWillPhoto,isFirstFm,isRd,isDel,createTime,editTime |
| | | from treat_single |
| | | WHERE id = #{value} |
| | | </select> |
| | |
| | | import com.hx.phiappt.common.RoleType; |
| | | import com.hx.phiappt.dao.mapper.TreatSingleMapper; |
| | | import com.hx.phiappt.model.BaseEntity; |
| | | import com.hx.phiappt.model.intro.IntroData; |
| | | import com.hx.phiappt.model.intro.IntroExpert; |
| | | import com.hx.phiappt.model.intro.IntroProjectManual; |
| | | import com.hx.phiappt.model.treat.TreatCardNotice; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | //查询治疗通知单项目信息和介绍 |
| | | sql.setLength(0); |
| | | values.put("type", IntroProjectManual.TYPE_TREAT_CARD); |
| | | sql.append(" select tp.num, tp.projectId, ts.isKnow ") |
| | | .append(" , p.name, p.unit, p.specification as spec, p.projectGeneralId ") |
| | | .append(" , pi.doctorQualification, pi.bodyPartName as bodyPartsName ") |
| | | sql.append(" select tp.num, tp.projectId, ts.isKnow, tp.projectName, tp.projectName as name, p.projectGeneralId ") |
| | | // .append(" , p.unit, p.specification as spec ") |
| | | // .append(" , pi.doctorQualification, pi.bodyPartName as bodyPartsName ") |
| | | .append(" from treat_single ts ") |
| | | .append(" left join treat_project tp on tp.treatSingleId = ts.id and tp.isDel = 0 ") |
| | | .append(" left join project p on p.id = tp.projectId ") |
| | | .append(" left join project_info pi on pi.projectId = p.id ") |
| | | // .append(" left join project_info pi on pi.projectId = p.id ") |
| | | .append(" where ts.isDel = 0 "); |
| | | //判断是单独查某个治疗通知单还是全部 |
| | | if (StringUtils.noNull(treatSingleId)) { |
| | |
| | | sqlSentence.setSqlSentence(sql.toString()); |
| | | List<Map<String, Object>> projectList = commonService.selectListMap(TreatSingleMapper.class, sqlSentence); |
| | | |
| | | |
| | | StringBuffer pName = new StringBuffer(); |
| | | Integer isKnowNum = BaseEntity.NO; |
| | | //遍历查询项目对应介绍手册 |
| | | if (projectList != null) { |
| | |
| | | |
| | | Map<String, Object> map; |
| | | for (Map<String, Object> m : projectList) { |
| | | pName.append(m.get("name")).append("、"); |
| | | //判断累加是否用户已知悉数量 |
| | | if(m.containsKey("isKnow") && m.get("isKnow") != null |
| | | && Integer.parseInt(m.get("isKnow").toString()) == BaseEntity.NO){ |
| | |
| | | |
| | | //过滤获取content不为空的 |
| | | projectList = projectList.stream().filter(s -> s.containsKey("content")).collect(Collectors.toList()); |
| | | pName.delete(pName.length() - 1, pName.length()); |
| | | } |
| | | |
| | | //如果项目介绍都为空,则默认返回一个品牌介绍图去展示 |
| | | if(projectList == null || projectList.size() < 1){ |
| | | projectList = new ArrayList<>(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("projectName", pName.toString()); //执行项目名 |
| | | map.put("name", "品牌"); //展示介绍名 |
| | | map.put("showType", IntroData.SHOW_TYPE_FILE); |
| | | map.put("content", "https://phiskin-crm-1305571091.cos.ap-shanghai.myqcloud.com/template/image/zlkppjs.png"); |
| | | projectList.add(map); |
| | | } |
| | | |
| | | |
| | |
| | | throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL, "未找到"); |
| | | } |
| | | |
| | | |
| | | if(updateTreat.getStatus() == TreatSingleConstants.STATUS_CANCEL){ |
| | | throwParamException("作废治疗通知单不可修改!"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(reqVo.getRoleId())){ |
| | | throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_TYPE, "操作人角色标识为空"); |
| | | } |
| | |
| | | import com.hx.phiappt.dao.mapper.UserContactInformationMapper; |
| | | import com.hx.phiappt.dao.mapper.UserInfoMapper; |
| | | import com.hx.phiappt.model.*; |
| | | import com.hx.phip.dao.mapper.AppointmentMapper; |
| | | import com.hx.phip.dao.mapper.UserGeneralLabelMapper; |
| | | import com.hx.phip.dao.mapper.VisitRecordMapper; |
| | | import com.hx.phip.service.UserService; |
| | |
| | | } |
| | | // 2.判断用户所属渠道是否为空且渠道不等于艾芯荟自来,不为空,屏蔽选择渠道的模块,不让修改渠道 |
| | | //2.1 判断用户是否有预约记录 |
| | | sqlSentence.setSqlSentence(" isDel = 0 and userId = #{m.userId} and status = 1 "); |
| | | int appointmentNum = commonService.selectCount(AppointmentMapper.class, sqlSentence); |
| | | if(!StringUtils.isEmpty(user.getChannelType(),user.getChannelType2()) && !user.getChannelType2().equals("艾芯荟自来") && appointmentNum == 0){ |
| | | //sqlSentence.setSqlSentence(" isDel = 0 and userId = #{m.userId} and status = 1 "); |
| | | //int appointmentNum = commonService.selectCount(AppointmentMapper.class, sqlSentence); |
| | | if(!StringUtils.isEmpty(user.getChannelType(),user.getChannelType2()) && !user.getChannelType2().equals("艾芯荟自来")){ |
| | | userInfoMap.put("isExitsChannel", 1); |
| | | }else { |
| | | userInfoMap.put("isExitsChannel", 0); |
| | | } |
| | | //20231207 mot扫码判断用户是否有渠道,有渠道则不修改 |
| | | if(StringUtils.isEmpty(user.getChannelType(),user.getChannelType2()) ){ |
| | | userInfoMap.put("isShowChannel", 0); |
| | | }else { |
| | | userInfoMap.put("isShowChannel", 1); |
| | | } |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("userInfo", userInfoMap); |
| | |
| | | |
| | | BigDecimal surplusMonthPrice; |
| | | if(quotaConfig.getQuatoPrice()!= null){ |
| | | surplusMonthPrice = quotaConfig.getQuatoPrice().subtract(useQuotaTotal.getUseAmount()); |
| | | surplusMonthPrice = quotaConfig.getQuatoPrice().subtract(useQuotaMonth.getUseAmount()); |
| | | if (applyAmount.compareTo(surplusMonthPrice) == 1) { |
| | | throw new TipsException("月申请额度已超出,无法申请"); |
| | | } |
| | |
| | | |
| | | Integer surplusTotalNum; |
| | | if(quotaConfig.getQuatoTotalNum()!= null){ |
| | | surplusTotalNum = quotaConfig.getQuatoTotalNum() - useQuotaMonth.getUseNum(); |
| | | surplusTotalNum = quotaConfig.getQuatoTotalNum() - useQuotaTotal.getUseNum(); |
| | | if (applyNum > surplusTotalNum) { |
| | | throw new TipsException("总申请数量额度已超出,无法申请"); |
| | | } |
| | |
| | | |
| | | BigDecimal surplusMonthPrice; |
| | | if (quotaConfig.getQuatoPrice() != null) { |
| | | surplusMonthPrice = quotaConfig.getQuatoPrice().subtract(useQuotaTotal.getUseAmount()); |
| | | surplusMonthPrice = quotaConfig.getQuatoPrice().subtract(useQuotaMonth.getUseAmount()); |
| | | if (applyAmount.compareTo(surplusMonthPrice) == 1) { |
| | | throw new TipsException(asDeptName + "月额度已超出,无法申请"); |
| | | } |
| | |
| | | |
| | | Integer surplusTotalNum; |
| | | if (quotaConfig.getQuatoTotalNum() != null) { |
| | | surplusTotalNum = quotaConfig.getQuatoTotalNum() - useQuotaMonth.getUseNum(); |
| | | surplusTotalNum = quotaConfig.getQuatoTotalNum() - useQuotaTotal.getUseNum(); |
| | | if (applyNum > surplusTotalNum) { |
| | | throw new TipsException(asDeptName + "总数量额度已超出,无法申请"); |
| | | } |
| | |
| | | |
| | | BigDecimal surplusMonthPrice; |
| | | if (quotaConfig.getQuatoPrice() != null) { |
| | | surplusMonthPrice = quotaConfig.getQuatoPrice().subtract(useQuotaTotal.getUseAmount()); |
| | | surplusMonthPrice = quotaConfig.getQuatoPrice().subtract(useQuotaMonth.getUseAmount()); |
| | | if (applyAmount.compareTo(surplusMonthPrice) == 1) { |
| | | throw new TipsException("月申请额度已超出,无法申请"); |
| | | } |
| | |
| | | } |
| | | serviceConsultantId = employee.getApiId(); |
| | | }*/ |
| | | //处理用户资金 |
| | | |
| | | // 处理用户资金 |
| | | Map<String, Object> sqlMap = new HashMap<>(); |
| | | sqlMap.put("isDel", BaseEntity.NO); |
| | | sqlMap.put("userId", user.getId()); |
| | |
| | | values.put("orderClassify", treatSingle.getOrderClassify()); |
| | | values.put("isWillPhoto", treatSingle.getIsWillPhoto()); |
| | | values.put("allergyInfo", treatSingle.getAllergyInfo()); |
| | | values.put("isFirstFm", treatSingle.getIsFirstFm()); |
| | | values.put("isRd", treatSingle.getIsRd()); |
| | | sql.delete(0,sql.length()); |
| | | //operatorName = #{m.operatorName},operatorId = #{m.operatorId}, |
| | | sql.append(" developerName = #{m.developerName},developerId = #{m.developerId},remarkInfo = #{m.remarkInfo} "); |
| | | sql.append(" ,developerShopName = #{m.developerShopName},developerShopId = #{m.developerShopId} "); |
| | | sql.append(" ,shopName = #{m.shopName},shopId = #{m.shopId},status = #{m.status} "); |
| | | sql.append(" , orderClassify = #{m.orderClassify}, isWillPhoto = #{m.isWillPhoto}, allergyInfo = #{m.allergyInfo} "); |
| | | sql.append(" , isFirstFm = #{m.isFirstFm}, isRd = #{m.isRd} "); |
| | | sql.append(" where id = #{m.id} "); |
| | | sqlSentence.setSqlSentence(sql.toString()); |
| | | if (treatSingleMapper.updateWhere(sqlSentence) != 1) { |
| | |
| | | if(tpList != null && tpList.size() > 0){ |
| | | sqlSentence.setSqlSentence("SELECT e.id, e.cnName, e.userId, d.type from treat_project_doctor d left join employee e on e.id = d.commonId where d.isDel=0 and d.treatSingleId = #{m.treatSingleId} and d.treatProjectId = #{m.treatProjectId} "); |
| | | List<Map<String, Object>> treatProjectDoctors ; |
| | | for(Map<String, Object> m : tpList){ |
| | | for(Map<String, Object> m : tpList) { |
| | | sb.append(m.get("projectName")).append(";"); |
| | | //查询项目对应多个医生或护士 |
| | | values.put("treatProjectId", m.get("id")); |
| | |
| | | } |
| | | |
| | | //删除治疗单 |
| | | sqlSentence.setSqlSentence(" isDel = 1 where id = #{m.treatSingleId} and isDel = 0 "); |
| | | values.put("status", TreatSingleConstants.STATUS_CANCEL); |
| | | sqlSentence.setSqlSentence(" status = #{m.status}, isDel = 1, editTime = now() where id = #{m.treatSingleId} "); |
| | | if (treatSingleMapper.updateWhere(sqlSentence)!= 1) { |
| | | throw new PlatTipsException(PlatformCode.ERROR_TIPS, "删除治疗治疗通知单信息异常!"); |
| | | throw new PlatTipsException(PlatformCode.ERROR_TIPS, "作废治疗通知单失败!"); |
| | | } |
| | | |
| | | sqlSentence.setSqlSentence(" isDel = 1 where treatSingleId = #{m.treatSingleId} and isDel = 0 "); |
| | | //删除治疗单项目等信息 |
| | | treatProjectMapper.updateWhere(sqlSentence); |
| | | // sqlSentence.setSqlSentence(" isDel = 1 where treatSingleId = #{m.treatSingleId} and isDel = 0 "); |
| | | // //删除治疗单项目等信息 |
| | | // treatProjectMapper.updateWhere(sqlSentence); |
| | | // //删除治疗单医生信息 |
| | | // treatProjectDoctorMapper.updateWhere(sqlSentence); |
| | | // //删除治疗通知单项目部分信息 |
| | |
| | | values.put("indication", project.getIndication()); |
| | | values.put("indicationId", project.getIndicationId()); |
| | | values.put("partType", project.getPartType()); |
| | | values.put("sdRemark", project.getSdRemark()); |
| | | values.put("id", oldTp.getId()); |
| | | if (treatProjectMapper.updateEditInfo(values) != 1) { |
| | | throw new PlatTipsException(PlatformCode.ERROR_TIPS, "修改治疗项目数量失败!"); |