| | |
| | | <dependencies> |
| | | |
| | | <dependency> |
| | | <groupId>org.joda</groupId> |
| | | <artifactId>joda-money</artifactId> |
| | | <version>1.0.2</version> <!-- 最新版本可在 Maven Central 查询 --> |
| | | </dependency> |
| | | |
| | | |
| | | <dependency> |
| | | <groupId>com.oracle.database.jdbc</groupId> |
| | | <artifactId>ojdbc8</artifactId> |
| | | <version>19.8.0.0</version> |
| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.extra.pinyin.PinyinUtil; |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.hutool.json.JSONUtil; |
| | |
| | | List<TjRules> rulesList = tjRulesService.getTjRulesListByTjNumAndProId(tjNumber, tjOrderDetail.getProId()); |
| | | tjOrderDetail.setRulesList(rulesList); |
| | | tjOrderDetail.setProject(project); |
| | | tjOrderDetail.setResultType(project.getResultType()); |
| | | if (null != remark.getDoctorName()) { |
| | | SysUser byId = userService.getById(remark.getDoctorName()); |
| | | if (byId != null) { |
| | |
| | | return success(depts); |
| | | } |
| | | |
| | | @GetMapping("/getxmjgz") |
| | | @ApiOperation(value = "医生检查处获取项目规则值") |
| | | public AjaxResult getxmjgz(@RequestParam String proId) { |
| | | LambdaQueryWrapper<TjRules> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjRules::getProId, proId); |
| | | List<TjRules> list = tjRulesService.list(wq); |
| | | if(null !=list && !list.isEmpty()){ |
| | | for (TjRules tjRules : list) { |
| | | if(null !=tjRules){ |
| | | tjRules.setJm(PinyinUtil.getFirstLetter(tjRules.getRuleStr(),"")); |
| | | } |
| | | } |
| | | } |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.ltkj.hosp.domain.TjProject; |
| | | import com.ltkj.hosp.service.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.joda.money.CurrencyUnit; |
| | | import org.joda.money.Money; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.openqa.selenium.By; |
| | |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.URL; |
| | | import java.time.LocalTime; |
| | |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | ZonedDateTime now = ZonedDateTime.now(); |
| | | LocalTime time = now.toLocalTime(); |
| | | boolean isInRange = time.isAfter(LocalTime.of(14, 0)) && time.isBefore(LocalTime.of(10, 0)); |
| | | BigDecimal proPrice =new BigDecimal("22.5"); |
| | | CurrencyUnit cny = CurrencyUnit.of("CNY"); |
| | | Money money = Money.of(cny, proPrice).dividedBy(BigDecimal.valueOf(0.95), RoundingMode.HALF_UP); |
| | | BigDecimal amount = money.getAmount(); |
| | | System.out.println(amount); |
| | | |
| | | System.out.println("当前时间是否在早上8点到10点之间: " + isInRange); |
| | | System.out.println(Money.of(cny,proPrice).multipliedBy((long) 0.3)); |
| | | |
| | | System.out.println(proPrice.multiply(BigDecimal.valueOf(0.3))); |
| | | |
| | | } |
| | | |
| | |
| | | @ApiModelProperty(value = "原价") |
| | | private BigDecimal ordPrice; |
| | | |
| | | @ApiModelProperty(value = "折扣") |
| | | private BigDecimal discount; |
| | | |
| | | @ApiModelProperty(value = "现价") |
| | | private BigDecimal nowPrice; |
| | | |
| | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "折扣") |
| | | @TableField(exist = false) |
| | | private String discount; |
| | | |
| | | @ApiModelProperty(value = "套餐价格") |
| | | @TableField(exist = false) |
| | |
| | | //建议标题 |
| | | private String adviceBt; |
| | | |
| | | @TableField(exist = false) |
| | | private String jm; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | private List<TjRuleAdvice> ruleAdvices; |
| | |
| | | " parent_pro_id,\n" + |
| | | " parent_pro_name,\n" + |
| | | " ord_price,\n" + |
| | | " discount,\n" + |
| | | " now_price,\n" + |
| | | " create_time,\n" + |
| | | " pro_check_method,\n" + |
| | |
| | | "c.pro_name,\n" + |
| | | "b.pro_id,\n" + |
| | | "b.pro_name,\n" + |
| | | "c.pro_price * (a.limits/10),\n" + |
| | | "c.pro_price,\n" + |
| | | "a.limits,\n" + |
| | | "c.pro_price * (a.limits/10),\n" + |
| | | "SYSDATE(),\n" + |
| | | "c.pro_check_method,\n" + |
| | |
| | | " parent_pro_id,\n" + |
| | | " parent_pro_name,\n" + |
| | | " ord_price,\n" + |
| | | " discount,\n" + |
| | | " now_price,\n" + |
| | | " create_time,\n" + |
| | | " pro_check_method,\n" + |
| | |
| | | "c.pro_name,\n" + |
| | | "b.pro_id,\n" + |
| | | "b.pro_name,\n" + |
| | | "c.pro_price * (a.limits/10),\n" + |
| | | "c.pro_price * (a.limits/10),\n" + |
| | | "c.pro_price,\n" + |
| | | "a.limits,\n" + |
| | | "(c.pro_price * (a.limits/10)),\n" + |
| | | "SYSDATE(),\n" + |
| | | "c.pro_check_method,\n" + |
| | | "c.pro_type,\n" + |
| | |
| | | @Select("SELECT DISTINCT a.pac_id FROM tb_transition a WHERE a.tj_num=#{tjNum}AND a.card_id=#{cardId} AND !ISNULL(a.pac_id)") |
| | | String selectPacIdByTbTransitionTjNumAndProId(@Param("tjNum")String tjNum,@Param("cardId")String cardId); |
| | | |
| | | @Select("SELECT SUM(a.now_price) FROM tb_transition a WHERE a.cus_id=#{cusId} AND a.parent_pro_id=#{proId} and a.card_id=#{cardId} and a.pac_id=#{pacId}") |
| | | @Select("SELECT SUM(a.now_price) FROM tb_transition a WHERE a.cus_id=#{cusId} AND a.parent_pro_id=#{proId} and a.card_id=#{cardId} and a.pac_id=#{pacId} GROUP BY a.parent_pro_id") |
| | | BigDecimal getTbTransitionDxPriceByPac(@Param("cusId")String cusId,@Param("proId")Long proId,@Param("cardId")String cardId,@Param("pacId")Long pacId); |
| | | |
| | | |
| | |
| | | "WHERE b.pro_id IN(SELECT DISTINCT a.parent_pro_id FROM tb_transition a WHERE a.cus_id=#{idCard} AND ISNULL(a.tj_num))" + |
| | | "AND b.grouping_id=#{pacId}") |
| | | String ttpanduantaocanshifouchongfu(@Param("idCard") String idCard,@Param("pacId") Long pacId); |
| | | |
| | | |
| | | @Select("SELECT a.parent_pro_name pro_name,b.pro_type,SUM(a.now_price) now_price,SUM(a.ord_price) ord_price,b.pro_check_method,a.discount FROM tb_transition a " + |
| | | "LEFT JOIN tj_project b ON b.pro_id=a.parent_pro_id WHERE ISNULL(a.tj_num) AND a.cus_id=#{idCard} GROUP BY a.parent_pro_id") |
| | | List<TbTransition> newgetTransitionList(String cusId); |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | @Select("SELECT a.id pac_id,grouping_name pac_name,a.price price , GROUP_CONCAT(b.pro_name ORDER BY b.pro_name) allProName FROM tj_dw_grouping a JOIN tj_grouping_pro b ON b.grouping_id=a.id \n" + |
| | | @Select("SELECT a.id pac_id,grouping_name pac_name,a.ys_price price , GROUP_CONCAT(b.pro_name ORDER BY b.pro_name) allProName FROM tj_dw_grouping a JOIN tj_grouping_pro b ON b.grouping_id=a.id \n" + |
| | | "WHERE a.dw_id=#{dwId} AND a.sex=#{sex} GROUP BY b.grouping_id") |
| | | List<TjPackage> huoqutuantitaocanxiangmu(@Param("dwId") String dwId,@Param("sex") Long sex); |
| | | } |
| | |
| | | String panduantaocanshifouchongfu(String idCard,Long pacId); |
| | | |
| | | String ttpanduantaocanshifouchongfu(String idCard,Long pacId); |
| | | |
| | | List<TbTransition> newgetTransitionList(String cusId); |
| | | } |
| | |
| | | public String ttpanduantaocanshifouchongfu(String idCard,Long pacId) { |
| | | return tbTransitionMapper.ttpanduantaocanshifouchongfu(idCard,pacId); |
| | | } |
| | | |
| | | @Override |
| | | public List<TbTransition> newgetTransitionList(String cusId) { |
| | | return tbTransitionMapper.newgetTransitionList(cusId); |
| | | } |
| | | } |