|
|
@@ -32,8 +32,8 @@ import java.util.Map;
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/store/his/store")
|
|
|
-public class FsStoreScrmController extends BaseController
|
|
|
-{
|
|
|
+public class FsStoreScrmController extends BaseController {
|
|
|
+
|
|
|
@Autowired
|
|
|
private IFsStoreScrmService fsStoreService;
|
|
|
|
|
|
@@ -43,6 +43,47 @@ public class FsStoreScrmController extends BaseController
|
|
|
@Autowired
|
|
|
private IFsDoctorService fsDoctorService;
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取店铺管理详细信息
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('his:store:query')")
|
|
|
+ @GetMapping(value = "/{storeId}")
|
|
|
+ public AjaxResult getInfo(@PathVariable("storeId") Long storeId) {
|
|
|
+ FsStoreScrm fsStore = fsStoreService.selectFsStoreByStoreId(storeId);
|
|
|
+ //获取店铺下绑定的药师职业证书
|
|
|
+ FsDoctorParam param=new FsDoctorParam();
|
|
|
+ param.setStoreId(fsStore.getStoreId());
|
|
|
+ param.setDoctorType(2);
|
|
|
+ fsStore.setDoctorList(fsDoctorService.getDoctorInfoByStoreId(param));
|
|
|
+// fsStore.setPhone(ParseUtils.parsePhone(fsStore.getPhone()));
|
|
|
+ return AjaxResult.success(fsStore);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增店铺管理
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('his:store:add')")
|
|
|
+ @Log(title = "店铺管理", businessType = BusinessType.INSERT,logParam = {"店铺","新增店铺信息"},isStoreLog = true)
|
|
|
+ @PostMapping
|
|
|
+ public AjaxResult add(@RequestBody FsStoreScrm fsStore) {
|
|
|
+ storeAuditLogUtil.addOperLog(fsStoreService.insertFsStore(fsStore));
|
|
|
+ return AjaxResult.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改店铺管理
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('his:store:edit')")
|
|
|
+ @Log(title = "店铺管理", businessType = BusinessType.UPDATE,logParam = {"店铺","修改店铺信息"},isStoreLog = true)
|
|
|
+ @PutMapping
|
|
|
+ public AjaxResult edit(@RequestBody FsStoreScrm fsStore) {
|
|
|
+ if (fsStore.getPhone()!=null&&fsStore.getPhone().contains("*")) {
|
|
|
+ fsStore.setPhone(null);
|
|
|
+ }
|
|
|
+ return toAjax(fsStoreService.updateFsStore(fsStore));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 查询店铺管理列表
|
|
|
*/
|
|
|
@@ -92,23 +133,6 @@ public class FsStoreScrmController extends BaseController
|
|
|
return util.exportExcel(excelVOList, "商家申请登记表");
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 获取店铺管理详细信息
|
|
|
- */
|
|
|
- @PreAuthorize("@ss.hasPermi('his:store:query')")
|
|
|
- @GetMapping(value = "/{storeId}")
|
|
|
- public AjaxResult getInfo(@PathVariable("storeId") Long storeId)
|
|
|
- {
|
|
|
- FsStoreScrm fsStore = fsStoreService.selectFsStoreByStoreId(storeId);
|
|
|
- //获取店铺下绑定的药师职业证书
|
|
|
- FsDoctorParam param=new FsDoctorParam();
|
|
|
- param.setStoreId(fsStore.getStoreId());
|
|
|
- param.setDoctorType(2);
|
|
|
- fsStore.setDoctorList(fsDoctorService.getDoctorInfoByStoreId(param));
|
|
|
-// fsStore.setPhone(ParseUtils.parsePhone(fsStore.getPhone()));
|
|
|
- return AjaxResult.success(fsStore);
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 新增或修改时候校验上传的营业执照是否包含药品零售
|
|
|
*/
|
|
|
@@ -117,33 +141,6 @@ public class FsStoreScrmController extends BaseController
|
|
|
return R.ok().put("data", TxOcrClient.isContains(imageUrl, null));
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 新增店铺管理
|
|
|
- */
|
|
|
- @PreAuthorize("@ss.hasPermi('his:store:add')")
|
|
|
- @Log(title = "店铺管理", businessType = BusinessType.INSERT,logParam = {"店铺","新增店铺信息"},isStoreLog = true)
|
|
|
- @PostMapping
|
|
|
- public AjaxResult add(@RequestBody FsStoreScrm fsStore)
|
|
|
- {
|
|
|
- storeAuditLogUtil.addOperLog(fsStoreService.insertFsStore(fsStore));
|
|
|
- return AjaxResult.success();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 修改店铺管理
|
|
|
- */
|
|
|
- @PreAuthorize("@ss.hasPermi('his:store:edit')")
|
|
|
- @Log(title = "店铺管理", businessType = BusinessType.UPDATE,logParam = {"店铺","修改店铺信息"},isStoreLog = true)
|
|
|
- @PutMapping
|
|
|
- public AjaxResult edit(@RequestBody FsStoreScrm fsStore)
|
|
|
- {
|
|
|
-
|
|
|
- if (fsStore.getPhone()!=null&&fsStore.getPhone().contains("*")){
|
|
|
- fsStore.setPhone(null);
|
|
|
- }
|
|
|
- return toAjax(fsStoreService.updateFsStore(fsStore));
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 删除店铺管理
|
|
|
*/
|