zjh
2024-06-20 35d6ed3c85ab2fa5c36c8817989bf56801fb2de7
zjh 2024/06/20-1
5个文件已修改
62 ■■■■■ 已修改文件
ltkj-admin/src/test/java/zjhTest.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjCustomer.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjPackage.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/resources/mapper/TjCustomerMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/resources/mapper/TjPackageMapper.xml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/test/java/zjhTest.java
@@ -3,12 +3,15 @@
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.extra.pinyin.PinyinUtil;
import cn.hutool.extra.qrcode.QrCodeUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ltkj.LtkjApplication;
import com.ltkj.common.core.redis.RedisCache;
import com.ltkj.common.utils.SecurityUtils;
import com.ltkj.hosp.domain.DictHosp;
import com.ltkj.hosp.domain.TjCustomer;
import com.ltkj.hosp.domain.TjPackage;
import com.ltkj.hosp.domain.TjProject;
import com.ltkj.hosp.service.*;
import lombok.extern.slf4j.Slf4j;
@@ -46,6 +49,10 @@
//    private ITjGroupingProService groupingProService;
    @Autowired
    private ITjProjectService projectService;
    @Resource
    private ITjCustomerService tjCustomerService;
    @Resource
    private ITjPackageService tjPackageService;
//
//    @Resource
//    private ITjOrderService tjOrderService;
@@ -67,19 +74,43 @@
    private String secret;
    @Test
    public void test() {
/*
// 生成指定url对应的二维码到文件,宽和高都是300像素
         QrCodeUtil.generate("https://ltpeis.xaltjdkj.cn:5516/1000110001240327094056%E7%8E%89%E5%BF%A0_%E4%BD%93%E6%A3%80%E6%8A%A5%E5%91%8A.pdf", 300, 300, FileUtil.file("D:\\Users\\w\\Desktop\\qrcode.jpg"));
*/
        List<TjProject> list = projectService.list();
        for (TjProject tjProject : list) {
            tjProject.setProEngName(PinyinUtil.getFirstLetter(tjProject.getProName(),""));
            projectService.updateById(tjProject);
        }
        List<TjCustomer> list1 = tjCustomerService.list();
        for (TjCustomer customer : list1) {
            customer.setPym(PinyinUtil.getFirstLetter(customer.getCusName(),""));
            tjCustomerService.updateById(customer);
        }
        List<TjPackage> list2 = tjPackageService.list();
        for (TjPackage tjPackage : list2) {
            tjPackage.setPym(PinyinUtil.getFirstLetter(tjPackage.getPacName(),""));
            tjPackageService.updateById(tjPackage);
        }
//        PinyinUtil.getFirstLetter();
    }
//    public static void main(String[] args) {
//
//        String a ="1,2,3";
//        boolean contains = a.contains("1");
//        System.out.println(contains);
//
//        String a ="赵家豪";
//        String firstLetter = PinyinUtil.getFirstLetter(a, "");
//        System.out.println(firstLetter);
//
//    }
//
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjCustomer.java
@@ -49,6 +49,10 @@
    private String cusName;
    @ApiModelProperty(value = "拼音码")
    private String pym;
    @ApiModelProperty("就诊编号")
    private String cardId;
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjPackage.java
@@ -52,6 +52,12 @@
    @ApiModelProperty(value = "套餐名称")
    private String pacName;
    @ApiModelProperty(value = "拼音码")
    private String pym;
    /**
     * 图片(Base64编码)
     */
ltkj-hosp/src/main/resources/mapper/TjCustomerMapper.xml
@@ -32,6 +32,7 @@
        <result property="ageUnit" column="age_unit"/>
        <result property="career" column="career"/>
        <result property="dwPhone" column="dw_phone"/>
        <result property="pym" column="pym"/>
    </resultMap>
    <sql id="selectTjCustomerVo">
@@ -61,7 +62,8 @@
               id_type,
               age_unit,
               career,
               dw_phone
               dw_phone,
               pym
        from tj_customer
    </sql>
@@ -83,6 +85,7 @@
            <if test="cusIntroduce != null  and cusIntroduce != ''">and cus_introduce = #{cusIntroduce}</if>
            <if test="cusNumber != null ">and cus_number = #{cusNumber}</if>
            <if test="cusIsvip != null  and cusIsvip != ''">and cus_isvip = #{cusIsvip}</if>
            <if test="pym != null  and pym != ''">and pym = #{pym}</if>
        </where>
    </select>
@@ -120,6 +123,7 @@
            <if test="ageUnit != null">age_unit,</if>
            <if test="career != null">career,</if>
            <if test="dwPhone != null">dw_phone,</if>
            <if test="pym != null">pym,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="cusName != null and cusName != ''">#{cusName},</if>
@@ -148,6 +152,7 @@
            <if test="ageUnit != null">#{ageUnit},</if>
            <if test="career != null">#{career},</if>
            <if test="dw_phone != null">#{dwPhone},</if>
            <if test="pym != null">#{pym},</if>
        </trim>
    </insert>
@@ -180,6 +185,7 @@
            <if test="ageUnit != null">age_unit = #{ageUnit},</if>
            <if test="career != null">career = #{career},</if>
            <if test="dwPhone != null">dw_phone = #{dwPhone},</if>
            <if test="pym != null">pym = #{pym},</if>
        </trim>
        where cus_id = #{cusId}
    </update>
ltkj-hosp/src/main/resources/mapper/TjPackageMapper.xml
@@ -26,6 +26,7 @@
        <result property="saleNum" column="sale_num"/>
        <result property="categoryId" column="category_id"/>
        <result property="hisPacBm" column="his_pac_bm"/>
        <result property="pym" column="pym"/>
    </resultMap>
    <sql id="selectTjPackageVo">
@@ -49,7 +50,8 @@
               counter_price,
               sale_num,
               category_id,
               his_pac_bm
               his_pac_bm,
               pym
        from tj_package
    </sql>
@@ -88,6 +90,7 @@
            <if test="retailPrice != null">retail_price,</if>
            <if test="counterPrice != null">counter_price,</if>
            <if test="saleNum != null">sale_num,</if>
            <if test="pym != null">pym,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -108,6 +111,7 @@
            <if test="retailPrice != null">#{retail_price},</if>
            <if test="counterPrice != null">#{counter_price},</if>
            <if test="saleNum != null">#{sale_num},</if>
            <if test="pym != null">#{pym},</if>
        </trim>
    </insert>
@@ -131,6 +135,7 @@
            <if test="retailPrice != null">retail_price=#{retailPrice},</if>
            <if test="counterPrice != null">counter_price=#{counterPrice},</if>
            <if test="saleNum != null">sale_num=#{saleNum},</if>
            <if test="pym != null">pym=#{pym},</if>
        </trim>
        where pac_id = #{pacId}
    </update>