|
|
@@ -458,6 +458,30 @@ public class FsCompanyCustomerController extends BaseController {
|
|
|
return toAjax( result);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 修改商城处方表的制单状态
|
|
|
+ * */
|
|
|
+ @PostMapping("/updateScrmPrescriptionDocumentSuccess")
|
|
|
+ public AjaxResult updateScrmPrescriptionDocumentSuccess(@RequestBody FsCompanyCustomer fsCompanyCustomer){
|
|
|
+ LoginUser loginUser = SecurityUtils.getLoginUser();
|
|
|
+ Long companyUserId = loginUser.getUser().getUserId();
|
|
|
+ if (companyUserId == null){
|
|
|
+ throw new CustomException("登录信息已过期,请重新登录");
|
|
|
+ }
|
|
|
+ FsCompanyCustomer companyCustomer = fsCompanyCustomerService.selectFsCompanyCustomerById(fsCompanyCustomer.getId());
|
|
|
+ if (companyCustomer == null){
|
|
|
+ return AjaxResult.error("未找到客户信息");
|
|
|
+ }
|
|
|
+ //重置客户信息表的流程状态为"待完善"
|
|
|
+ companyCustomer.setProcessStatus(0);
|
|
|
+ fsCompanyCustomerService.updateFsCompanyCustomer(companyCustomer);
|
|
|
+ FsPrescribeDataScrm fsPrescribeDataScrm=new FsPrescribeDataScrm();
|
|
|
+ fsPrescribeDataScrm.setPrescribeId(companyCustomer.getPrescribeId());
|
|
|
+ fsPrescribeDataScrm.setIsDocument(1);//1-销售已制单
|
|
|
+ int result=prescribeDataScrmService.updateFsPrescribeDataScrm(fsPrescribeDataScrm);
|
|
|
+ return toAjax( result);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 生成客户信息表制单二维码
|
|
|
* */
|