Parcourir la source

客户信息表完善客户购买次数,手写信息采集表增加导出功能

cgp il y a 2 jours
Parent
commit
bc795b90d9

+ 16 - 3
fs-company/src/main/java/com/fs/company/controller/qw/FsCompanyCustomerController.java

@@ -21,7 +21,6 @@ import com.fs.his.service.IFsDoctorPatientService;
 import com.fs.his.service.IFsPrescribeService;
 import com.fs.hisStore.param.FsCompanyCustomerOrderParam;
 import com.fs.hisStore.service.IFsUserInformationCollectionService;
-import com.fs.hisStore.service.impl.FsUserInformationCollectionServiceImpl;
 import com.fs.hisStore.vo.FsStoreOrderVO;
 import com.fs.hisStore.vo.FsUserInformationCollectionOverviewVo;
 import com.fs.qw.domain.FsCompanyCustomer;
@@ -305,11 +304,25 @@ public class FsCompanyCustomerController extends BaseController {
     }
 
     /**
-     * 生成制单二维码
+     * 增加客户购买次数
+     * */
+    @PostMapping("/addBuyTimes")
+    public AjaxResult addBuyTimes(@RequestBody FsCompanyCustomer fsCompanyCustomer){
+        LoginUser loginUser = SecurityUtils.getLoginUser();
+        Long companyUserId = loginUser.getUser().getUserId();
+        if (companyUserId == null){
+            throw new CustomException("登录信息已过期,请重新登录");
+        }
+        int result=fsCompanyCustomerService.addBuyTimes(fsCompanyCustomer.getId());
+        return toAjax( result);
+    }
+
+    /**
+     * 生成客户信息表制单二维码
      * */
     @GetMapping("/getQRCode/{orderId}")
     public R getQRCode(@PathVariable("orderId") Long orderId){
-        //TODO 后续从配置获取
+        //TODO appId后续从配置获取
         String appId="wx50bcb040b4963a7e";
         return informationCollectionService.getCustomerGenerateQRCode(orderId,appId);
     }

+ 6 - 6
fs-service/src/main/java/com/fs/handwrite/domain/HandwriteCollection.java

@@ -18,7 +18,7 @@ public class HandwriteCollection implements Serializable
     private static final long serialVersionUID = 1L;
 
     /** 主键ID */
-    @Excel(name = "主键ID")
+    //@Excel(name = "主键ID")
     private Long id;
 
     /** 患者姓名 */
@@ -40,7 +40,7 @@ public class HandwriteCollection implements Serializable
     private Date updateTime;
 
     /** 手写信息采集表url */
-    @Excel(name = "手写信息采集表url")
+    @Excel(name = "手写信息采集表图片链接")
     private String billImgUrl;
 
     /** 订单号 */
@@ -49,32 +49,32 @@ public class HandwriteCollection implements Serializable
 
 
     /** 创建人 */
-    @Excel(name = "创建人")
+    //@Excel(name = "创建人")
     private Long createBy;
 
     /** 更新人 */
-    @Excel(name = "更新人")
+    //@Excel(name = "更新人")
     private Long updateBy;
 
     /** 补充图片,支持多张","隔开*/
+    @Excel(name = "补充图片链接,支持多张','隔开")
     private String extraImgUrl;
 
     /** 销售id*/
     private Long companyUserId;
 
     /** 销售名称*/
+    @Excel(name = "销售名称")
     private String companyUserName;
 
     /**
      * 开始日期
      * */
     @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "开始日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date startDate;
     /**
      * 结束日期
      * */
     @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "结束日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date endDate;
 }

+ 3 - 0
fs-service/src/main/java/com/fs/qw/service/IFsCompanyCustomerService.java

@@ -39,4 +39,7 @@ public interface IFsCompanyCustomerService {
     List<FsStoreOrderVO> selectStoreOrderScrmByCompanyCustomerParam(FsCompanyCustomerOrderParam param);
 
     String getKdnAddress(String address);
+
+    //增加客户购买次数
+    int addBuyTimes(Long id);
 }

+ 10 - 1
fs-service/src/main/java/com/fs/qw/service/impl/FsCompanyCustomerServiceImpl.java

@@ -17,7 +17,6 @@ import com.fs.hisStore.vo.FsStoreOrderItemVO;
 import com.fs.hisStore.vo.FsStoreOrderVO;
 import com.fs.qw.domain.FsCompanyCustomer;
 import com.fs.qw.domain.FsCompanyCustomerLog;
-import com.fs.qw.domain.FsCompanyExternalPayReceipt;
 import com.fs.qw.mapper.FsCompanyCustomerLogMapper;
 import com.fs.qw.mapper.FsCompanyCustomerMapper;
 import com.fs.qw.mapper.FsCompanyExternalPayReceiptMapper;
@@ -248,4 +247,14 @@ public class FsCompanyCustomerServiceImpl implements IFsCompanyCustomerService {
     public String getKdnAddress(String address) {
         return fsUserAddressService.getKdnAddress(address);
     }
+
+    @Override
+    public int addBuyTimes(Long id) {
+        FsCompanyCustomer fsCompanyCustomer = fsCompanyCustomerMapper.selectFsCompanyCustomerById(id);
+        if (fsCompanyCustomer!=null&&fsCompanyCustomer.getBuyCount()!=null){
+            fsCompanyCustomer.setBuyCount(fsCompanyCustomer.getBuyCount()+1);
+            return fsCompanyCustomerMapper.updateFsCompanyCustomer(fsCompanyCustomer);
+        }
+        return 0;
+    }
 }