Compare commits
2 Commits
87eb50c282
...
e813321ea3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e813321ea3 | ||
|
|
3b5c87b032 |
@ -314,5 +314,4 @@ public class AppNewsController extends BaseController {
|
|||||||
IPage<InspectionNews> news = inspectionNewsService.msgList(page,partnerId);
|
IPage<InspectionNews> news = inspectionNewsService.msgList(page,partnerId);
|
||||||
return success(news);
|
return success(news);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,7 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/admin-api/partnerOwn/partner")
|
@RequestMapping("/admin-api/partnerOwn/partner")
|
||||||
public class PartnerOwnController extends BaseController {
|
public class PartnerOwnController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private AppInspectionPartnerService partnerList;
|
private AppInspectionPartnerService partnerList;
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -58,12 +58,12 @@ public class PartnerOwnController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/shopInfo")
|
@GetMapping("/shopInfo")
|
||||||
public CommonResult shopInfo() throws Exception {
|
public CommonResult shopInfo() throws Exception {
|
||||||
return success(partnerList.shopInfo());
|
return success(partnerList.shopInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/shopInfoByUserId")
|
@GetMapping("/shopInfoByUserId")
|
||||||
public CommonResult shopInfoByUserId() throws Exception {
|
public CommonResult shopInfoByUserId() throws Exception {
|
||||||
return success(partnerList.shopInfoByUserId());
|
return success(partnerList.shopInfoByUserId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -71,7 +71,7 @@ public class PartnerOwnController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/getAppointAndPickNum")
|
@GetMapping("/getAppointAndPickNum")
|
||||||
public CommonResult getAppointAndPickNum() throws Exception {
|
public CommonResult getAppointAndPickNum() throws Exception {
|
||||||
return success(partnerList.getAppointAndPickNum());
|
return success(partnerList.getAppointAndPickNum());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -79,127 +79,126 @@ public class PartnerOwnController extends BaseController {
|
|||||||
* 开始或者停止营业
|
* 开始或者停止营业
|
||||||
*/
|
*/
|
||||||
@PostMapping("/startOrEnd")
|
@PostMapping("/startOrEnd")
|
||||||
public CommonResult startOrEnd(Long partnerId)
|
public CommonResult startOrEnd(Long partnerId) {
|
||||||
{
|
|
||||||
partnerList.startOrEnd(partnerId);
|
partnerList.startOrEnd(partnerId);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页 顶部数据统计
|
* 首页 顶部数据统计
|
||||||
*/
|
*/
|
||||||
@GetMapping("/statisticsInfo")
|
@GetMapping("/statisticsInfo")
|
||||||
public CommonResult statisticsInfo()
|
public CommonResult statisticsInfo() {
|
||||||
{
|
return success(partnerList.statisticsInfo(null));
|
||||||
return success(partnerList.statisticsInfo(null));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测线图
|
* 检测线图
|
||||||
*/
|
*/
|
||||||
@GetMapping("/chartInfoAmount")
|
@GetMapping("/chartInfoAmount")
|
||||||
public CommonResult chartInfoAmount(Long partnerId,String unit)
|
public CommonResult chartInfoAmount(Long partnerId, String unit) {
|
||||||
{
|
return success(partnerList.chartInfoAmount(partnerId, unit));
|
||||||
return success(partnerList.chartInfoAmount(partnerId, unit));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新检测线图
|
* 新检测线图
|
||||||
*/
|
*/
|
||||||
@GetMapping("/newChartInfoAmount")
|
@GetMapping("/newChartInfoAmount")
|
||||||
public CommonResult newChartInfoAmount(String unit)
|
public CommonResult newChartInfoAmount(String unit) {
|
||||||
{
|
return success(partnerList.newChartInfoAmount(unit));
|
||||||
return success(partnerList.newChartInfoAmount(unit));
|
|
||||||
}
|
}
|
||||||
/**staticsTable1
|
|
||||||
|
/**
|
||||||
|
* staticsTable1
|
||||||
* 检测数量折线图
|
* 检测数量折线图
|
||||||
*/
|
*/
|
||||||
@GetMapping("/chartLineInspectionNum")
|
@GetMapping("/chartLineInspectionNum")
|
||||||
public CommonResult chartLineInspectionNum(Long partnerId,String unit)
|
public CommonResult chartLineInspectionNum(Long partnerId, String unit) {
|
||||||
{
|
return success(partnerList.chartLineInspectionNum(partnerId, unit));
|
||||||
return success(partnerList.chartLineInspectionNum(partnerId, unit));
|
|
||||||
}
|
}
|
||||||
/**staticsTable1
|
|
||||||
|
/**
|
||||||
|
* staticsTable1
|
||||||
* 新检测数量折线图
|
* 新检测数量折线图
|
||||||
*/
|
*/
|
||||||
@GetMapping("/newChartLineInspectionNum")
|
@GetMapping("/newChartLineInspectionNum")
|
||||||
public CommonResult newChartLineInspectionNum(String unit)
|
public CommonResult newChartLineInspectionNum(String unit) {
|
||||||
{
|
return success(partnerList.newChartLineInspectionNum(unit));
|
||||||
return success(partnerList.newChartLineInspectionNum(unit));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测金额折线图
|
* 检测金额折线图
|
||||||
*/
|
*/
|
||||||
@GetMapping("/chartLineInspectionAmount")
|
@GetMapping("/chartLineInspectionAmount")
|
||||||
public CommonResult chartLineInspectionAmount(Long partnerId,String unit)
|
public CommonResult chartLineInspectionAmount(Long partnerId, String unit) {
|
||||||
{
|
return success(partnerList.chartLineInspectionAmount(partnerId, unit));
|
||||||
return success(partnerList.chartLineInspectionAmount(partnerId, unit));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新检测金额折线图
|
* 新检测金额折线图
|
||||||
*/
|
*/
|
||||||
@GetMapping("/newChartLineInspectionAmount")
|
@GetMapping("/newChartLineInspectionAmount")
|
||||||
public CommonResult newChartLineInspectionAmount(String unit)
|
public CommonResult newChartLineInspectionAmount(String unit) {
|
||||||
{
|
return success(partnerList.newChartLineInspectionAmount(unit));
|
||||||
return success(partnerList.newChartLineInspectionAmount(unit));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测线图
|
* 检测线图
|
||||||
*/
|
*/
|
||||||
@GetMapping("/chartInfoNum")
|
@GetMapping("/chartInfoNum")
|
||||||
public CommonResult chartInfoNum(Long partnerId,String unit)
|
public CommonResult chartInfoNum(Long partnerId, String unit) {
|
||||||
{
|
return success(partnerList.chartInfoNum(partnerId, unit));
|
||||||
return success(partnerList.chartInfoNum(partnerId, unit));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新检测线图
|
* 新检测线图
|
||||||
*/
|
*/
|
||||||
@GetMapping("/newChartInfoNum")
|
@GetMapping("/newChartInfoNum")
|
||||||
public CommonResult newChartInfoNum(String unit)
|
public CommonResult newChartInfoNum(String unit) {
|
||||||
{
|
return success(partnerList.newChartInfoNum(unit));
|
||||||
return success(partnerList.newChartInfoNum( unit));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测线图
|
* 检测线图
|
||||||
*/
|
*/
|
||||||
@GetMapping("/chartInfoRatio")
|
@GetMapping("/chartInfoRatio")
|
||||||
public CommonResult chartInfoRatio(Long partnerId,String unit) throws Exception {
|
public CommonResult chartInfoRatio(Long partnerId, String unit) throws Exception {
|
||||||
if (ObjectUtil.isNull(partnerId)) {
|
if (ObjectUtil.isNull(partnerId)) {
|
||||||
partnerId = partnerList.shopInfoByUserId().getPartnerId();
|
partnerId = partnerList.shopInfoByUserId().getPartnerId();
|
||||||
}
|
}
|
||||||
return success(partnerList.chartInfoRatio(partnerId, unit));
|
return success(partnerList.chartInfoRatio(partnerId, unit));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新检测线图
|
* 新检测线图
|
||||||
*/
|
*/
|
||||||
@GetMapping("/newChartInfoRatio")
|
@GetMapping("/newChartInfoRatio")
|
||||||
public CommonResult newChartInfoRatio(String unit)
|
public CommonResult newChartInfoRatio(String unit) {
|
||||||
{
|
return success(partnerList.newChartInfoRatio(unit));
|
||||||
return success(partnerList.newChartInfoRatio(unit));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页 订单信息
|
* 首页 订单信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("/orderInfo")
|
@GetMapping("/orderInfo")
|
||||||
public CommonResult orderInfo(Long partnerId)
|
public CommonResult orderInfo(Long partnerId) {
|
||||||
{
|
return success(partnerList.orderInfo(partnerId));
|
||||||
return success(partnerList.orderInfo(partnerId));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 热销商品列表
|
* 热销商品列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/hotGoodsList")
|
@GetMapping("/hotGoodsList")
|
||||||
public CommonResult hotGoodsList(Long partnerId)
|
public CommonResult hotGoodsList(Long partnerId) {
|
||||||
{
|
return success(partnerList.hotGoodsList(partnerId));
|
||||||
return success(partnerList.hotGoodsList(partnerId));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 热销商品列表
|
* 热销商品列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/newHotGoodsList")
|
@GetMapping("/newHotGoodsList")
|
||||||
public CommonResult newHotGoodsList()
|
public CommonResult newHotGoodsList() {
|
||||||
{
|
return success(partnerList.newHotGoodsList());
|
||||||
return success(partnerList.newHotGoodsList());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -209,57 +208,56 @@ public class PartnerOwnController extends BaseController {
|
|||||||
* @return 所有数据
|
* @return 所有数据
|
||||||
*/
|
*/
|
||||||
@GetMapping("/categoryList")
|
@GetMapping("/categoryList")
|
||||||
public CommonResult categoryList(Long partnerId)
|
public CommonResult categoryList(Long partnerId) {
|
||||||
{
|
|
||||||
|
|
||||||
return success( partnerList.categoryList(partnerId));
|
return success(partnerList.categoryList(partnerId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发布商品
|
* 发布商品
|
||||||
*/
|
*/
|
||||||
@PostMapping("/addGoods")
|
@PostMapping("/addGoods")
|
||||||
public CommonResult addGoods(@RequestBody ShopInspectionGoods goods) throws Exception {
|
public CommonResult addGoods(@RequestBody ShopInspectionGoods goods) throws Exception {
|
||||||
partnerList.addGoods(goods);
|
partnerList.addGoods(goods);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品管理列表
|
* 商品管理列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/goodsList")
|
@GetMapping("/goodsList")
|
||||||
public CommonResult goodsList(Long partnerId,String isListing,String goodsTitle,
|
public CommonResult goodsList(Long partnerId, String isListing, String goodsTitle,
|
||||||
@RequestParam(value = "pageNum" ,required = false ,defaultValue = "1") Integer pageNum,
|
@RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum,
|
||||||
@RequestParam(value ="pageSize" ,required = false ,defaultValue = "10") Integer pageSize)
|
@RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) {
|
||||||
{
|
|
||||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||||
ShopMallPartners partners = partnerList.getById(partnerId);
|
ShopMallPartners partners = partnerList.getById(partnerId);
|
||||||
if (!partners.getUserId().equals(user.getId())){
|
if (!partners.getUserId().equals(user.getId())) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Page<GoodsVo> page = new Page<>(pageNum, pageSize);
|
Page<GoodsVo> page = new Page<>(pageNum, pageSize);
|
||||||
IPage<GoodsVo> list = partnerList.goodsList(page,partnerId, isListing, goodsTitle);
|
IPage<GoodsVo> list = partnerList.goodsList(page, partnerId, isListing, goodsTitle);
|
||||||
return success(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品管理列表
|
* 商品管理列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/canUsegoods")
|
@GetMapping("/canUsegoods")
|
||||||
public CommonResult canUseGoods(Long partnerId)
|
public CommonResult canUseGoods(Long partnerId) {
|
||||||
{
|
|
||||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||||
ShopMallPartners partners = partnerList.getById(partnerId);
|
ShopMallPartners partners = partnerList.getById(partnerId);
|
||||||
if (!partners.getUserId().equals(user.getId())){
|
if (!partners.getUserId().equals(user.getId())) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return success(partnerList.canUseGoods(partnerId));
|
return success(partnerList.canUseGoods(partnerId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品详细信息
|
* 商品详细信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("/goodsDetail")
|
@GetMapping("/goodsDetail")
|
||||||
public CommonResult goodsDetail(Long goodsId)
|
public CommonResult goodsDetail(Long goodsId) {
|
||||||
{
|
return success(partnerList.goodsDetail(goodsId));
|
||||||
return success(partnerList.goodsDetail(goodsId));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -268,55 +266,56 @@ public class PartnerOwnController extends BaseController {
|
|||||||
@PostMapping("/editGoods")
|
@PostMapping("/editGoods")
|
||||||
public CommonResult editGoods(@RequestBody ShopInspectionGoods goods) throws Exception {
|
public CommonResult editGoods(@RequestBody ShopInspectionGoods goods) throws Exception {
|
||||||
partnerList.editGoods(goods);
|
partnerList.editGoods(goods);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/editSkuPrice")
|
@PostMapping("/editSkuPrice")
|
||||||
public CommonResult editSkuPrice(@RequestBody ShopInspectionGoods goods) throws Exception {
|
public CommonResult editSkuPrice(@RequestBody ShopInspectionGoods goods) throws Exception {
|
||||||
partnerList.editSkuPrice(goods);
|
partnerList.editSkuPrice(goods);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上下架
|
* 上下架
|
||||||
*/
|
*/
|
||||||
@PostMapping("/changeListing")
|
@PostMapping("/changeListing")
|
||||||
public CommonResult changeListing(Long goodsId) throws Exception {
|
public CommonResult changeListing(Long goodsId) throws Exception {
|
||||||
partnerList.changeListing(goodsId);
|
partnerList.changeListing(goodsId);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除商品
|
* 删除商品
|
||||||
*/
|
*/
|
||||||
@PostMapping("/delGoods")
|
@PostMapping("/delGoods")
|
||||||
public CommonResult delGoods(Long goodsId) throws Exception {
|
public CommonResult delGoods(Long goodsId) throws Exception {
|
||||||
partnerList.delGoods(goodsId);
|
partnerList.delGoods(goodsId);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 管理店铺信息
|
* 管理店铺信息
|
||||||
*/
|
*/
|
||||||
@PostMapping("/getPartnerInfo")
|
@PostMapping("/getPartnerInfo")
|
||||||
public CommonResult getPartnerInfo(Long partnerId)
|
public CommonResult getPartnerInfo(Long partnerId) {
|
||||||
{
|
return success(partnerList.getPartnerInfo(partnerId));
|
||||||
return success(partnerList.getPartnerInfo(partnerId));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 管理店铺信息
|
* 管理店铺信息
|
||||||
*/
|
*/
|
||||||
@PostMapping("/editPartnerInfo")
|
@PostMapping("/editPartnerInfo")
|
||||||
public CommonResult editPartnerInfo(@RequestBody ShopMallPartners partners)
|
public CommonResult editPartnerInfo(@RequestBody ShopMallPartners partners) {
|
||||||
{
|
|
||||||
partnerList.editPartnerInfo(partners);
|
partnerList.editPartnerInfo(partners);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店铺账户信息
|
* 店铺账户信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("/accountInfo")
|
@GetMapping("/accountInfo")
|
||||||
public CommonResult accountInfo(Long partnerId)
|
public CommonResult accountInfo(Long partnerId) {
|
||||||
{
|
return success(partnerList.accountInfo(partnerId));
|
||||||
return success(partnerList.accountInfo(partnerId));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -324,69 +323,69 @@ public class PartnerOwnController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/accountDetail")
|
@GetMapping("/accountDetail")
|
||||||
public CommonResult accountDetail(Long partnerId,
|
public CommonResult accountDetail(Long partnerId,
|
||||||
@RequestParam(value = "pageNum" ,required = false ,defaultValue = "1") Integer pageNum,
|
@RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum,
|
||||||
@RequestParam(value ="pageSize" ,required = false ,defaultValue = "10") Integer pageSize)
|
@RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) {
|
||||||
{
|
|
||||||
Page<PartnerBalanceDetail> page = new Page<>(pageNum, pageSize);
|
Page<PartnerBalanceDetail> page = new Page<>(pageNum, pageSize);
|
||||||
IPage<PartnerBalanceDetail> details = partnerList.accountDetail(page,partnerId,pageNum,pageSize);
|
IPage<PartnerBalanceDetail> details = partnerList.accountDetail(page, partnerId, pageNum, pageSize);
|
||||||
return success(details);
|
return success(details);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前店铺的订单信息
|
* 当前店铺的订单信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("/orderList")
|
@GetMapping("/orderList")
|
||||||
public CommonResult orderList(Long partnerId,String phoneNum, String title,
|
public CommonResult orderList(Long partnerId, String phoneNum, String title,
|
||||||
@RequestParam(value = "pageNum" ,required = false ,defaultValue = "1") Integer pageNum,
|
@RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum,
|
||||||
@RequestParam(value ="pageSize" ,required = false ,defaultValue = "10") Integer pageSize)
|
@RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) {
|
||||||
{
|
|
||||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||||
ShopMallPartners partnersTmp = partnerList.getById(partnerId);
|
ShopMallPartners partnersTmp = partnerList.getById(partnerId);
|
||||||
if (!partnersTmp.getUserId().equals(user.getId())){
|
if (!partnersTmp.getUserId().equals(user.getId())) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Page<OrderAppDetail> page = new Page<>(pageNum, pageSize);
|
Page<OrderAppDetail> page = new Page<>(pageNum, pageSize);
|
||||||
IPage<OrderAppDetail> orderInfos = partnerList.orderList(page,partnerId,phoneNum, title);
|
IPage<OrderAppDetail> orderInfos = partnerList.orderList(page, partnerId, phoneNum, title);
|
||||||
return success(orderInfos);
|
return success(orderInfos);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过核销码获取订单信息
|
* 通过核销码获取订单信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("/orderDetailByCode")
|
@GetMapping("/orderDetailByCode")
|
||||||
public CommonResult orderDetailByCode(Long partnerId,String code) throws Exception {
|
public CommonResult orderDetailByCode(Long partnerId, String code) throws Exception {
|
||||||
Long orderId = partnerList.orderDetailByCode(partnerId,code);
|
Long orderId = partnerList.orderDetailByCode(partnerId, code);
|
||||||
return success(orderId);
|
return success(orderId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前的订单信息
|
* 当前的订单信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("/orderDetail")
|
@GetMapping("/orderDetail")
|
||||||
public CommonResult orderDetail(Long partnerId, Long orderId)
|
public CommonResult orderDetail(Long partnerId, Long orderId) {
|
||||||
{
|
OrderAppDetail orderInfos = partnerList.orderDetail(partnerId, orderId);
|
||||||
OrderAppDetail orderInfos = partnerList.orderDetail(partnerId,orderId);
|
return success(orderInfos);
|
||||||
return success(orderInfos);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店铺核销功能
|
* 店铺核销功能
|
||||||
*/
|
*/
|
||||||
@PostMapping("/takeOut")
|
@PostMapping("/takeOut")
|
||||||
public CommonResult takeOut(Long partnerId,Long orderId,Long workId,String carNum) throws Exception {
|
public CommonResult takeOut(Long partnerId, Long orderId, Long workId, String carNum) throws Exception {
|
||||||
partnerList.takeOut(partnerId,orderId,workId,carNum);
|
partnerList.takeOut(partnerId, orderId, workId, carNum);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
@PostMapping("/addWorker")
|
|
||||||
public CommonResult addWorker(Long partnerId,String realName,String phoneNum,Long postId) throws Exception {
|
|
||||||
|
|
||||||
partnerList.addWorker(partnerId,realName,phoneNum,postId);
|
@PostMapping("/addWorker")
|
||||||
return success();
|
public CommonResult addWorker(Long partnerId, String realName, String phoneNum, Long postId) throws Exception {
|
||||||
|
|
||||||
|
partnerList.addWorker(partnerId, realName, phoneNum, postId);
|
||||||
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取员工信息
|
* 获取员工信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getWorkList")
|
@GetMapping("/getWorkList")
|
||||||
public CommonResult<IPage<?>> getWorkList(Long partnerId, String workName, String phoneNum, Long postId, Integer pageNum, Integer pageSize)
|
public CommonResult<IPage<?>> getWorkList(Long partnerId, String workName, String phoneNum, Long postId, Integer pageNum, Integer pageSize) {
|
||||||
{
|
|
||||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||||
// ShopMallPartners partnersTmp = partnerList.getById(partnerId);
|
// ShopMallPartners partnersTmp = partnerList.getById(partnerId);
|
||||||
// if (!partnersTmp.getUserId().equals(user.getId())){
|
// if (!partnersTmp.getUserId().equals(user.getId())){
|
||||||
@ -404,23 +403,23 @@ public class PartnerOwnController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/delWorker")
|
@PostMapping("/delWorker")
|
||||||
public CommonResult delWorker(Long partnerId,String workIdStr) {
|
public CommonResult delWorker(Long partnerId, String workIdStr) {
|
||||||
String[] workIds = workIdStr.split(",");
|
String[] workIds = workIdStr.split(",");
|
||||||
for (String workId : workIds) {
|
for (String workId : workIds) {
|
||||||
partnerList.delWorker(partnerId,Long.parseLong(workId));
|
partnerList.delWorker(partnerId, Long.parseLong(workId));
|
||||||
}
|
}
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取检测的数据
|
//获取检测的数据
|
||||||
@GetMapping("/inspectionList")
|
@GetMapping("/inspectionList")
|
||||||
public CommonResult inspectionList(Long partnerId,String status,String carNum,Integer pageSize,Integer pageNum) throws Exception {
|
public CommonResult inspectionList(Long partnerId, String status, String carNum, Integer pageSize, Integer pageNum) throws Exception {
|
||||||
ShopMallPartners partners = partnerList.shopInfo();
|
ShopMallPartners partners = partnerList.shopInfo();
|
||||||
if (!partnerId.equals(partners.getPartnerId())){
|
if (!partnerId.equals(partners.getPartnerId())) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Page<InspectionInfo> page = new Page<>(pageNum,pageSize);
|
Page<InspectionInfo> page = new Page<>(pageNum, pageSize);
|
||||||
IPage<InspectionInfo> inspectionInfos = partnerList.inspectionList(page,partnerId, status, carNum);
|
IPage<InspectionInfo> inspectionInfos = partnerList.inspectionList(page, partnerId, status, carNum);
|
||||||
return success(inspectionInfos);
|
return success(inspectionInfos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -432,59 +431,63 @@ public class PartnerOwnController extends BaseController {
|
|||||||
|
|
||||||
//获取检测的数据
|
//获取检测的数据
|
||||||
@GetMapping("/workerInspectionList")
|
@GetMapping("/workerInspectionList")
|
||||||
public CommonResult workerInspectionList(Long partnerId,String status,String searchValue,Integer pageSize,Integer pageNum) {
|
public CommonResult workerInspectionList(Long partnerId, String status, String searchValue, Integer pageSize, Integer pageNum) {
|
||||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||||
LambdaQueryWrapper<PartnerWorker> queryWrapper =new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<PartnerWorker> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(PartnerWorker::getUserId,user.getId()).eq(PartnerWorker::getPartnerId,partnerId);
|
queryWrapper.eq(PartnerWorker::getUserId, user.getId()).eq(PartnerWorker::getPartnerId, partnerId);
|
||||||
PartnerWorker worker = partnerWorkerService.getOne(queryWrapper);
|
PartnerWorker worker = partnerWorkerService.getOne(queryWrapper);
|
||||||
if (ObjectUtil.isEmpty(worker)){
|
if (ObjectUtil.isEmpty(worker)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Page<InspectionInfo> page = new Page<>(pageNum,pageSize);
|
Page<InspectionInfo> page = new Page<>(pageNum, pageSize);
|
||||||
IPage<InspectionInfo> inspectionInfos = partnerList.inspectionList(page,partnerId, status, searchValue);
|
IPage<InspectionInfo> inspectionInfos = partnerList.inspectionList(page, partnerId, status, searchValue);
|
||||||
return success(inspectionInfos);
|
return success(inspectionInfos);
|
||||||
}
|
}
|
||||||
|
|
||||||
//增加检测步骤信息
|
//增加检测步骤信息
|
||||||
@PostMapping("/addStepInfo")
|
@PostMapping("/addStepInfo")
|
||||||
public CommonResult addStepInfo(@RequestBody InspectionStepInfo stepInfo) {
|
public CommonResult addStepInfo(@RequestBody InspectionStepInfo stepInfo) {
|
||||||
partnerList.addStepInfo(stepInfo);
|
partnerList.addStepInfo(stepInfo);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
//增加检测结果
|
//增加检测结果
|
||||||
@PostMapping("/stopInspection")
|
@PostMapping("/stopInspection")
|
||||||
public CommonResult editInspection(@RequestBody InspectionInfo info) throws Exception {
|
public CommonResult editInspection(@RequestBody InspectionInfo info) throws Exception {
|
||||||
partnerList.stopInspection(info);
|
partnerList.stopInspection(info);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
//完成制证
|
//完成制证
|
||||||
@PostMapping("/makeCertOk")
|
@PostMapping("/makeCertOk")
|
||||||
public CommonResult makeCertOk(Long inspectionId) {
|
public CommonResult makeCertOk(Long inspectionId) {
|
||||||
partnerList.makeCertOk(inspectionId);
|
partnerList.makeCertOk(inspectionId);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取到店预约的数据
|
//获取到店预约的数据
|
||||||
@GetMapping("/getAppointmentList")
|
@GetMapping("/getAppointmentList")
|
||||||
public CommonResult getAppointmentList(Long partnerId,String phoneNum,Integer pageSize,Integer pageNum) {
|
public CommonResult getAppointmentList(Long partnerId, String phoneNum, Integer pageSize, Integer pageNum) {
|
||||||
// LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
// LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||||
// ShopMallPartners partnersTmp = partnerList.getById(partnerId);
|
// ShopMallPartners partnersTmp = partnerList.getById(partnerId);
|
||||||
// if (!partnersTmp.getUserId().equals(user.getId())){
|
// if (!partnersTmp.getUserId().equals(user.getId())){
|
||||||
// return null;
|
// return null;
|
||||||
// }
|
// }
|
||||||
Page<InspectionAppointment> page = new Page<>(pageNum,pageSize);
|
Page<InspectionAppointment> page = new Page<>(pageNum, pageSize);
|
||||||
IPage<InspectionAppointment> appointments = partnerList.getAppointmentList(page,partnerId,phoneNum);
|
IPage<InspectionAppointment> appointments = partnerList.getAppointmentList(page, partnerId, phoneNum);
|
||||||
return success(appointments);
|
return success(appointments);
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取上门取车数据
|
//获取上门取车数据
|
||||||
@GetMapping("/getPickCarList")
|
@GetMapping("/getPickCarList")
|
||||||
public CommonResult getPickCarList(Long partnerId,String phoneNum,String pickStatus,Integer pageSize,Integer pageNum) {
|
public CommonResult getPickCarList(Long partnerId, String phoneNum, String pickStatus, Integer pageSize, Integer pageNum) {
|
||||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||||
// ShopMallPartners partnersTmp = partnerList.getById(partnerId);
|
// ShopMallPartners partnersTmp = partnerList.getById(partnerId);
|
||||||
// if (!partnersTmp.getUserId().equals(user.getId())){
|
// if (!partnersTmp.getUserId().equals(user.getId())){
|
||||||
// return null;
|
// return null;
|
||||||
// }
|
// }
|
||||||
Page<InspectionPickCar> page = new Page<>(pageNum,pageSize);
|
Page<InspectionPickCar> page = new Page<>(pageNum, pageSize);
|
||||||
IPage<InspectionPickCar> pickCarList = partnerList.getPickCarList(page,partnerId,phoneNum,pickStatus);
|
IPage<InspectionPickCar> pickCarList = partnerList.getPickCarList(page, partnerId, phoneNum, pickStatus);
|
||||||
return success(pickCarList);
|
return success(pickCarList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -497,16 +500,16 @@ public class PartnerOwnController extends BaseController {
|
|||||||
|
|
||||||
// 核销记录By核销人Id
|
// 核销记录By核销人Id
|
||||||
@GetMapping("/validationList")
|
@GetMapping("/validationList")
|
||||||
public CommonResult validationList(Long partnerId,String searchValue,
|
public CommonResult validationList(Long partnerId, String searchValue,
|
||||||
@RequestParam(value = "pageNum" ,required = false ,defaultValue = "1") Integer pageNum,
|
@RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum,
|
||||||
@RequestParam(value ="pageSize" ,required = false ,defaultValue = "10") Integer pageSize) {
|
@RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) {
|
||||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||||
ShopMallPartners partnersTmp = partnerList.getById(partnerId);
|
ShopMallPartners partnersTmp = partnerList.getById(partnerId);
|
||||||
if (!partnersTmp.getUserId().equals(user.getId())){
|
if (!partnersTmp.getUserId().equals(user.getId())) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Page<OrderInfo> page = new Page<>(pageNum, pageSize);
|
Page<OrderInfo> page = new Page<>(pageNum, pageSize);
|
||||||
IPage<OrderInfo> orderInfos = partnerList.validationList(page,partnerId,searchValue);
|
IPage<OrderInfo> orderInfos = partnerList.validationList(page, partnerId, searchValue);
|
||||||
return success(orderInfos);
|
return success(orderInfos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -519,37 +522,38 @@ public class PartnerOwnController extends BaseController {
|
|||||||
|
|
||||||
//优惠券列表
|
//优惠券列表
|
||||||
@GetMapping("/listCoupon")
|
@GetMapping("/listCoupon")
|
||||||
public CommonResult listCoupon(Long partnerId,String searchValue,
|
public CommonResult listCoupon(Long partnerId, String searchValue,
|
||||||
@RequestParam(value = "pageNum" ,required = false ,defaultValue = "1") Integer pageNum,
|
@RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum,
|
||||||
@RequestParam(value ="pageSize" ,required = false ,defaultValue = "10") Integer pageSize){
|
@RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) {
|
||||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||||
ShopMallPartners partnersTmp = partnerList.getById(partnerId);
|
ShopMallPartners partnersTmp = partnerList.getById(partnerId);
|
||||||
if (!partnersTmp.getUserId().equals(user.getId())){
|
if (!partnersTmp.getUserId().equals(user.getId())) {
|
||||||
return success(new ArrayList<>());
|
return success(new ArrayList<>());
|
||||||
}
|
}
|
||||||
Page<ShopCouponTemplate> page = new Page<>(pageNum, pageSize);
|
Page<ShopCouponTemplate> page = new Page<>(pageNum, pageSize);
|
||||||
IPage<ShopCouponTemplate> shopCouponTemplates = partnerList.listCoupon(page,partnerId, searchValue);
|
IPage<ShopCouponTemplate> shopCouponTemplates = partnerList.listCoupon(page, partnerId, searchValue);
|
||||||
return success(shopCouponTemplates);
|
return success(shopCouponTemplates);
|
||||||
}
|
}
|
||||||
|
|
||||||
//删除优惠券
|
//删除优惠券
|
||||||
@PostMapping("/delCoupon")
|
@PostMapping("/delCoupon")
|
||||||
public CommonResult delCoupon(Long partnerId,Long id){
|
public CommonResult delCoupon(Long partnerId, Long id) {
|
||||||
partnerList.delCoupon(partnerId,id);
|
partnerList.delCoupon(partnerId, id);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
//指派工人上门取车
|
//指派工人上门取车
|
||||||
@PostMapping("/designatePickCarWorker")
|
@PostMapping("/designatePickCarWorker")
|
||||||
public CommonResult designatePickCarWorker(Long pickCarId,Long workerId){
|
public CommonResult designatePickCarWorker(Long pickCarId, Long workerId) {
|
||||||
partnerList.designatePickCarWorker(pickCarId,workerId);
|
partnerList.designatePickCarWorker(pickCarId, workerId);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取上门取车数据
|
//获取上门取车数据
|
||||||
@GetMapping("/getPickCarListOfWorker")
|
@GetMapping("/getPickCarListOfWorker")
|
||||||
public CommonResult getPickCarListOfWorker(Long partnerId,String phoneNum,
|
public CommonResult getPickCarListOfWorker(Long partnerId, String phoneNum,
|
||||||
@RequestParam(value = "pageNum" ,required = false ,defaultValue = "1") Integer pageNum,
|
@RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum,
|
||||||
@RequestParam(value ="pageSize" ,required = false ,defaultValue = "10") Integer pageSize) {
|
@RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) {
|
||||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||||
// .eq(PartnerWorker::getUserId,user.getId())
|
// .eq(PartnerWorker::getUserId,user.getId())
|
||||||
// LambdaQueryWrapper<PartnerWorker> queryWrapper =new LambdaQueryWrapper<>();
|
// LambdaQueryWrapper<PartnerWorker> queryWrapper =new LambdaQueryWrapper<>();
|
||||||
@ -559,7 +563,7 @@ public class PartnerOwnController extends BaseController {
|
|||||||
// return null;
|
// return null;
|
||||||
// }
|
// }
|
||||||
Page<InspectionPickCar> page = new Page<>(pageNum, pageSize);
|
Page<InspectionPickCar> page = new Page<>(pageNum, pageSize);
|
||||||
IPage<InspectionPickCar> pickCarList = partnerList.getPickCarListOfWorker(page,user.getId(),phoneNum);
|
IPage<InspectionPickCar> pickCarList = partnerList.getPickCarListOfWorker(page, user.getId(), phoneNum);
|
||||||
return success(pickCarList);
|
return success(pickCarList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -567,22 +571,22 @@ public class PartnerOwnController extends BaseController {
|
|||||||
@GetMapping("/getCustomerSource")
|
@GetMapping("/getCustomerSource")
|
||||||
public CommonResult getCustomerSource(String searchValue) throws Exception {
|
public CommonResult getCustomerSource(String searchValue) throws Exception {
|
||||||
ShopMallPartners partners = partnerList.shopInfoByUserId();
|
ShopMallPartners partners = partnerList.shopInfoByUserId();
|
||||||
String dictStr = "customer_source-"+partners.getPartnerId();
|
String dictStr = "customer_source-" + partners.getPartnerId();
|
||||||
DictTypeDO sysDictType = dictTypeService.getDictType(dictStr);
|
DictTypeDO sysDictType = dictTypeService.getDictType(dictStr);
|
||||||
if (ObjectUtil.isEmpty(sysDictType)){
|
if (ObjectUtil.isEmpty(sysDictType)) {
|
||||||
//初始化
|
//初始化
|
||||||
DictTypeSaveReqVO save = new DictTypeSaveReqVO();
|
DictTypeSaveReqVO save = new DictTypeSaveReqVO();
|
||||||
save.setName("客户来源-"+partners.getPartnerName());
|
save.setName("客户来源-" + partners.getPartnerName());
|
||||||
save.setStatus(0);
|
save.setStatus(0);
|
||||||
save.setType(dictStr);
|
save.setType(dictStr);
|
||||||
dictTypeService.createDictType(save);
|
dictTypeService.createDictType(save);
|
||||||
}
|
}
|
||||||
List<DictDataDO> dataList = dictDataService.getDictDataListByDictType(dictStr);
|
List<DictDataDO> dataList = dictDataService.getDictDataListByDictType(dictStr);
|
||||||
if (CollectionUtil.isEmpty(dataList)){
|
if (CollectionUtil.isEmpty(dataList)) {
|
||||||
dataList =new ArrayList<>();
|
dataList = new ArrayList<>();
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(searchValue)){
|
if (StringUtils.isNotEmpty(searchValue)) {
|
||||||
dataList = dataList.stream().filter(it->{
|
dataList = dataList.stream().filter(it -> {
|
||||||
return it.getLabel().contains(searchValue);
|
return it.getLabel().contains(searchValue);
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
@ -593,7 +597,7 @@ public class PartnerOwnController extends BaseController {
|
|||||||
@PostMapping("/addCustomerSource")
|
@PostMapping("/addCustomerSource")
|
||||||
public CommonResult addCustomerSource(@RequestBody SysDictData dictData) throws Exception {
|
public CommonResult addCustomerSource(@RequestBody SysDictData dictData) throws Exception {
|
||||||
ShopMallPartners partners = partnerList.shopInfo();
|
ShopMallPartners partners = partnerList.shopInfo();
|
||||||
String dictStr = "customer_source-"+partners.getPartnerId();
|
String dictStr = "customer_source-" + partners.getPartnerId();
|
||||||
DictTypeDO sysDictType = dictTypeService.getDictType(dictStr);
|
DictTypeDO sysDictType = dictTypeService.getDictType(dictStr);
|
||||||
|
|
||||||
DictDataSaveReqVO dictSave = new DictDataSaveReqVO();
|
DictDataSaveReqVO dictSave = new DictDataSaveReqVO();
|
||||||
@ -609,52 +613,51 @@ public class PartnerOwnController extends BaseController {
|
|||||||
|
|
||||||
//新增客户来源
|
//新增客户来源
|
||||||
@PostMapping("/delCustomerSource")
|
@PostMapping("/delCustomerSource")
|
||||||
public CommonResult delCustomerSource(Long dictId){
|
public CommonResult delCustomerSource(Long dictId) {
|
||||||
dictDataService.deleteDictData(dictId);
|
dictDataService.deleteDictData(dictId);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
//批量删除客户来源
|
//批量删除客户来源
|
||||||
@PostMapping("/delCustomerSourceBatch")
|
@PostMapping("/delCustomerSourceBatch")
|
||||||
public CommonResult delCustomerSourceBatch(@RequestBody List<Long> dictIds){
|
public CommonResult delCustomerSourceBatch(@RequestBody List<Long> dictIds) {
|
||||||
dictDataService.deleteDictDataBatch(dictIds);
|
dictDataService.deleteDictDataBatch(dictIds);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/vehicleLicenseOCR")
|
@PostMapping("/vehicleLicenseOCR")
|
||||||
public CommonResult vehicleLicenseOCR(String imagePath) throws Exception
|
public CommonResult vehicleLicenseOCR(String imagePath) throws Exception {
|
||||||
{
|
|
||||||
return success(partnerList.vehicleLicenseOCR(imagePath));
|
return success(partnerList.vehicleLicenseOCR(imagePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
//线下收费
|
//线下收费
|
||||||
@PostMapping("/offlineCharging")
|
@PostMapping("/offlineCharging")
|
||||||
public CommonResult offlineCharging(@RequestBody InspectionInfoVo infoVo)
|
public CommonResult offlineCharging(@RequestBody InspectionInfoVo infoVo) {
|
||||||
{
|
|
||||||
partnerList.offlineCharging(infoVo);
|
partnerList.offlineCharging(infoVo);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//获取收款账号
|
//获取收款账号
|
||||||
@GetMapping("/getBankAccountList")
|
@GetMapping("/getBankAccountList")
|
||||||
public CommonResult getBankAccountList(String searchValue) throws Exception {
|
public CommonResult getBankAccountList(String searchValue) throws Exception {
|
||||||
ShopMallPartners partners = partnerList.shopInfoByUserId();
|
ShopMallPartners partners = partnerList.shopInfoByUserId();
|
||||||
String dictStr = "partner_bankList-"+partners.getPartnerId();
|
String dictStr = "partner_bankList-" + partners.getPartnerId();
|
||||||
DictTypeDO sysDictType = dictTypeService.getDictType(dictStr);
|
DictTypeDO sysDictType = dictTypeService.getDictType(dictStr);
|
||||||
if (ObjectUtil.isEmpty(sysDictType)){
|
if (ObjectUtil.isEmpty(sysDictType)) {
|
||||||
//初始化
|
//初始化
|
||||||
DictTypeSaveReqVO sysDictTypeSave =new DictTypeSaveReqVO();
|
DictTypeSaveReqVO sysDictTypeSave = new DictTypeSaveReqVO();
|
||||||
sysDictTypeSave.setName("收款账户-"+partners.getPartnerName());
|
sysDictTypeSave.setName("收款账户-" + partners.getPartnerName());
|
||||||
sysDictTypeSave.setStatus(0);
|
sysDictTypeSave.setStatus(0);
|
||||||
sysDictTypeSave.setType(dictStr);
|
sysDictTypeSave.setType(dictStr);
|
||||||
dictTypeService.createDictType(sysDictTypeSave);
|
dictTypeService.createDictType(sysDictTypeSave);
|
||||||
}
|
}
|
||||||
List<DictDataDO> dataList = dictDataService.getDictDataListByDictType(dictStr);
|
List<DictDataDO> dataList = dictDataService.getDictDataListByDictType(dictStr);
|
||||||
if (CollectionUtil.isEmpty(dataList)){
|
if (CollectionUtil.isEmpty(dataList)) {
|
||||||
dataList =new ArrayList<>();
|
dataList = new ArrayList<>();
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(searchValue)){
|
if (StringUtils.isNotEmpty(searchValue)) {
|
||||||
dataList = dataList.stream().filter(it->{
|
dataList = dataList.stream().filter(it -> {
|
||||||
return it.getLabel().contains(searchValue);
|
return it.getLabel().contains(searchValue);
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
@ -665,7 +668,7 @@ public class PartnerOwnController extends BaseController {
|
|||||||
@PostMapping("/addBankAccount")
|
@PostMapping("/addBankAccount")
|
||||||
public CommonResult addBankAccount(@RequestBody SysDictData dictData) throws Exception {
|
public CommonResult addBankAccount(@RequestBody SysDictData dictData) throws Exception {
|
||||||
ShopMallPartners partners = partnerList.shopInfo();
|
ShopMallPartners partners = partnerList.shopInfo();
|
||||||
String dictStr = "partner_bankList-"+partners.getPartnerId();
|
String dictStr = "partner_bankList-" + partners.getPartnerId();
|
||||||
DictTypeDO sysDictType = dictTypeService.getDictType(dictStr);
|
DictTypeDO sysDictType = dictTypeService.getDictType(dictStr);
|
||||||
|
|
||||||
DictDataSaveReqVO dictSave = new DictDataSaveReqVO();
|
DictDataSaveReqVO dictSave = new DictDataSaveReqVO();
|
||||||
@ -682,83 +685,90 @@ public class PartnerOwnController extends BaseController {
|
|||||||
|
|
||||||
//删除银行卡账户
|
//删除银行卡账户
|
||||||
@PostMapping("/delBankAccount")
|
@PostMapping("/delBankAccount")
|
||||||
public CommonResult delBankAccount(Long dictId){
|
public CommonResult delBankAccount(Long dictId) {
|
||||||
dictDataService.deleteDictData(dictId);
|
dictDataService.deleteDictData(dictId);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
//工单预览
|
//工单预览
|
||||||
@GetMapping("/workOrderView")
|
@GetMapping("/workOrderView")
|
||||||
public CommonResult workOrderView(Long inspectionId){
|
public CommonResult workOrderView(Long inspectionId) {
|
||||||
return success(partnerList.workOrderView(inspectionId));
|
return success(partnerList.workOrderView(inspectionId));
|
||||||
}
|
}
|
||||||
|
|
||||||
//岗位信息
|
//岗位信息
|
||||||
@GetMapping("/inspectionPostInfo")
|
@GetMapping("/inspectionPostInfo")
|
||||||
public CommonResult inspectionPostInfo(){
|
public CommonResult inspectionPostInfo() {
|
||||||
return success(partnerList.inspectionPostInfo());
|
return success(partnerList.inspectionPostInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
//统计表格1
|
//统计表格1
|
||||||
@GetMapping("/staticsTable1")
|
@GetMapping("/staticsTable1")
|
||||||
public CommonResult staticsTable1(String startTime,String endTime) throws Exception {
|
public CommonResult staticsTable1(String startTime, String endTime) throws Exception {
|
||||||
ShopMallPartners partners = partnerList.shopInfo();
|
ShopMallPartners partners = partnerList.shopInfo();
|
||||||
return success(partnerList.staticsTable1(partners.getPartnerId(),startTime,endTime));
|
return success(partnerList.staticsTable1(partners.getPartnerId(), startTime, endTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
//统计表格1
|
//统计表格1
|
||||||
@GetMapping("/newStaticsTable1")
|
@GetMapping("/newStaticsTable1")
|
||||||
public CommonResult newStaticsTable1(String startTime,String endTime) throws Exception {
|
public CommonResult newStaticsTable1(String startTime, String endTime) throws Exception {
|
||||||
return success(partnerList.newStaticsTable1(startTime,endTime));
|
return success(partnerList.newStaticsTable1(startTime, endTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
//统计表格2
|
//统计表格2
|
||||||
@GetMapping("/staticsTable2")
|
@GetMapping("/staticsTable2")
|
||||||
public CommonResult staticsTable2(String startTime,String endTime) throws Exception {
|
public CommonResult staticsTable2(String startTime, String endTime) throws Exception {
|
||||||
ShopMallPartners partners = partnerList.shopInfo();
|
ShopMallPartners partners = partnerList.shopInfo();
|
||||||
return success(partnerList.staticsTable2(partners.getPartnerId(),startTime,endTime));
|
return success(partnerList.staticsTable2(partners.getPartnerId(), startTime, endTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
//新统计表格2
|
//新统计表格2
|
||||||
@GetMapping("/newStaticsTable2")
|
@GetMapping("/newStaticsTable2")
|
||||||
public CommonResult newStaticsTable2(String startTime,String endTime) throws Exception {
|
public CommonResult newStaticsTable2(String startTime, String endTime) throws Exception {
|
||||||
return success(partnerList.newStaticsTable2(startTime,endTime));
|
return success(partnerList.newStaticsTable2(startTime, endTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
//统计表格3
|
//统计表格3
|
||||||
@GetMapping("/staticsTable3")
|
@GetMapping("/staticsTable3")
|
||||||
public CommonResult staticsTable3(String startTime,String endTime) throws Exception {
|
public CommonResult staticsTable3(String startTime, String endTime) throws Exception {
|
||||||
ShopMallPartners partners = partnerList.shopInfo();
|
ShopMallPartners partners = partnerList.shopInfo();
|
||||||
return success(partnerList.staticsTable3(partners.getPartnerId(),startTime,endTime));
|
return success(partnerList.staticsTable3(partners.getPartnerId(), startTime, endTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
//新统计表格3
|
//新统计表格3
|
||||||
@GetMapping("/newStaticsTable3")
|
@GetMapping("/newStaticsTable3")
|
||||||
public CommonResult newStaticsTable3(String startTime,String endTime) throws Exception {
|
public CommonResult newStaticsTable3(String startTime, String endTime) throws Exception {
|
||||||
return success(partnerList.newStaticsTable3(startTime,endTime));
|
return success(partnerList.newStaticsTable3(startTime, endTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
//统计表格3
|
//统计表格3
|
||||||
@GetMapping("/staticsTable3Detail")
|
@GetMapping("/staticsTable3Detail")
|
||||||
public CommonResult staticsTable3Detail(String startTime,String endTime,String remark) throws Exception {
|
public CommonResult staticsTable3Detail(String startTime, String endTime, String remark) throws Exception {
|
||||||
ShopMallPartners partners = partnerList.shopInfo();
|
ShopMallPartners partners = partnerList.shopInfo();
|
||||||
return success(partnerList.staticsTable3Detail(partners.getPartnerId(),startTime,endTime,remark));
|
return success(partnerList.staticsTable3Detail(partners.getPartnerId(), startTime, endTime, remark));
|
||||||
}
|
}
|
||||||
|
|
||||||
//统计表格4
|
//统计表格4
|
||||||
@GetMapping("/staticsTable4")
|
@GetMapping("/staticsTable4")
|
||||||
public CommonResult staticsTable4(String startTime,String endTime) throws Exception {
|
public CommonResult staticsTable4(String startTime, String endTime) throws Exception {
|
||||||
ShopMallPartners partners = partnerList.shopInfo();
|
ShopMallPartners partners = partnerList.shopInfo();
|
||||||
return success(partnerList.staticsTable4(partners.getPartnerId(),startTime,endTime));
|
return success(partnerList.staticsTable4(partners.getPartnerId(), startTime, endTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
//统计表格5
|
//统计表格5
|
||||||
@GetMapping("/staticsTable5")
|
@GetMapping("/staticsTable5")
|
||||||
public CommonResult staticsTable5(String startTime,String endTime) throws Exception {
|
public CommonResult staticsTable5(String startTime, String endTime) throws Exception {
|
||||||
ShopMallPartners partners = partnerList.shopInfo();
|
ShopMallPartners partners = partnerList.shopInfo();
|
||||||
return success(partnerList.staticsTable5(partners.getPartnerId(),startTime,endTime));
|
return success(partnerList.staticsTable5(partners.getPartnerId(), startTime, endTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据inspection_info的id查有的项目名称
|
* 根据inspection_info的id查有的项目名称
|
||||||
*
|
*
|
||||||
|
* @param ids inspection_info的id
|
||||||
* @author 小李
|
* @author 小李
|
||||||
* @date 14:52 2024/12/10
|
* @date 14:52 2024/12/10
|
||||||
* @param ids inspection_info的id
|
**/
|
||||||
**/
|
|
||||||
@GetMapping("/getProjectByIds")
|
@GetMapping("/getProjectByIds")
|
||||||
public CommonResult<?> getProjectByIds(Long[] ids) {
|
public CommonResult<?> getProjectByIds(Long[] ids) {
|
||||||
return success(partnerList.getProjectByIds(ids));
|
return success(partnerList.getProjectByIds(ids));
|
||||||
@ -767,19 +777,36 @@ public class PartnerOwnController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 根据时间查订单
|
* 根据时间查订单
|
||||||
*
|
*
|
||||||
|
* @param startTime 开始时间 非必传
|
||||||
|
* @param endTime 结束时间 非必传
|
||||||
|
* @param pageNum 页码
|
||||||
|
* @param pageSize 条数
|
||||||
* @author 小李
|
* @author 小李
|
||||||
* @date 14:39 2024/12/12
|
* @date 14:39 2024/12/12
|
||||||
* @param startTime 开始时间 非必传
|
**/
|
||||||
* @param endTime 结束时间 非必传
|
|
||||||
* @param pageNum 页码
|
|
||||||
* @param pageSize 条数
|
|
||||||
**/
|
|
||||||
@GetMapping("/getOrderByDate")
|
@GetMapping("/getOrderByDate")
|
||||||
public CommonResult<?> getOrderByDate(@RequestParam(value = "startTime", required = false) String startTime,
|
public CommonResult<?> getOrderByDate(@RequestParam(value = "startTime", required = false) String startTime,
|
||||||
@RequestParam(value = "endTime", required = false) String endTime,
|
@RequestParam(value = "endTime", required = false) String endTime,
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1")Integer pageNum,
|
@RequestParam(value = "chooseStatus", required = false) String chooseStatus,
|
||||||
@RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize){
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
Page<OrderTable> page = new Page<>(pageNum, pageSize);
|
Page<OrderTable> page = new Page<>(pageNum, pageSize);
|
||||||
return success(partnerList.getOrderByDate(startTime, endTime, page));
|
return success(partnerList.getOrderByDate(startTime, endTime, chooseStatus, page));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分类计数
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 17:14 2024/12/16
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param chooseStatus 状态
|
||||||
|
**/
|
||||||
|
@GetMapping("/getTypeCount")
|
||||||
|
public CommonResult<?> getTypeCount(@RequestParam(value = "startTime", required = false) String startTime,
|
||||||
|
@RequestParam(value = "endTime", required = false) String endTime,
|
||||||
|
@RequestParam(value = "chooseStatus", required = false) String chooseStatus){
|
||||||
|
return success(partnerList.getTypeCount(startTime, endTime, chooseStatus));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,16 +5,12 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.util.ExcelUtil;
|
import cn.iocoder.yudao.util.ExcelUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import cn.iocoder.yudao.module.core.controller.BaseController;
|
import cn.iocoder.yudao.module.core.controller.BaseController;
|
||||||
import cn.iocoder.yudao.module.inspection.entity.WarnMessage;
|
import cn.iocoder.yudao.module.inspection.entity.WarnMessage;
|
||||||
import cn.iocoder.yudao.module.inspection.service.IWarnMessageService;
|
import cn.iocoder.yudao.module.inspection.service.IWarnMessageService;
|
||||||
@ -27,8 +23,7 @@ import cn.iocoder.yudao.module.inspection.service.IWarnMessageService;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/admin-api/warnMsg/warnMsg")
|
@RequestMapping("/admin-api/warnMsg/warnMsg")
|
||||||
public class WarnMessageController extends BaseController
|
public class WarnMessageController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IWarnMessageService warnMessageService;
|
private IWarnMessageService warnMessageService;
|
||||||
|
|
||||||
@ -42,11 +37,12 @@ public class WarnMessageController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/pageList")
|
@GetMapping("/pageList")
|
||||||
public CommonResult pageList(WarnMessage warnMessage,Integer pageNo,Integer pageSize) throws Exception {
|
public CommonResult pageList(WarnMessage warnMessage, Integer pageNo, Integer pageSize) throws Exception {
|
||||||
Page page =new Page(pageNo,pageSize);
|
Page page = new Page(pageNo, pageSize);
|
||||||
IPage<WarnMessage> list = warnMessageService.pageList(page,warnMessage);
|
IPage<WarnMessage> list = warnMessageService.pageList(page, warnMessage);
|
||||||
return success(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, WarnMessage warnMessage) throws Exception {
|
public void export(HttpServletResponse response, WarnMessage warnMessage) throws Exception {
|
||||||
List<WarnMessage> list = warnMessageService.selectWarnMessageList(warnMessage);
|
List<WarnMessage> list = warnMessageService.selectWarnMessageList(warnMessage);
|
||||||
@ -58,29 +54,56 @@ public class WarnMessageController extends BaseController
|
|||||||
* 获取warnMsg详细信息
|
* 获取warnMsg详细信息
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public CommonResult getInfo(@PathVariable("id") Long id)
|
public CommonResult getInfo(@PathVariable("id") Long id) {
|
||||||
{
|
WarnMessage warnMessage = new WarnMessage();
|
||||||
|
warnMessage.setId(id);
|
||||||
|
warnMessage.setIsRead("1");
|
||||||
|
warnMessageService.updateById(warnMessage);
|
||||||
return success(warnMessageService.selectWarnMessageById(id));
|
return success(warnMessageService.selectWarnMessageById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public CommonResult add(@RequestBody WarnMessage warnMessage)
|
public CommonResult add(@RequestBody WarnMessage warnMessage) {
|
||||||
{
|
|
||||||
return toAjax(warnMessageService.insertWarnMessage(warnMessage));
|
return toAjax(warnMessageService.insertWarnMessage(warnMessage));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/edit")
|
@PostMapping("/edit")
|
||||||
public CommonResult edit(@RequestBody WarnMessage warnMessage)
|
public CommonResult edit(@RequestBody WarnMessage warnMessage) {
|
||||||
{
|
|
||||||
return toAjax(warnMessageService.updateWarnMessage(warnMessage));
|
return toAjax(warnMessageService.updateWarnMessage(warnMessage));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public CommonResult remove(@PathVariable Long[] ids)
|
public CommonResult remove(@PathVariable Long[] ids) {
|
||||||
{
|
|
||||||
return toAjax(warnMessageService.deleteWarnMessageByIds(ids));
|
return toAjax(warnMessageService.deleteWarnMessageByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取未读的提醒数量
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 14:33 2024/12/16
|
||||||
|
**/
|
||||||
|
@GetMapping("/getCount")
|
||||||
|
public CommonResult<?> getCount() {
|
||||||
|
long count = warnMessageService.count(new LambdaQueryWrapper<WarnMessage>().eq(WarnMessage::getIsRead, "0"));
|
||||||
|
return success(count);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已读全部
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 15:57 2024/12/16
|
||||||
|
**/
|
||||||
|
@GetMapping("/readAll")
|
||||||
|
public CommonResult<?> readAll() {
|
||||||
|
warnMessageService.update(new LambdaUpdateWrapper<WarnMessage>()
|
||||||
|
.set(WarnMessage::getIsRead, "1")
|
||||||
|
.eq(WarnMessage::getIsRead, "0")
|
||||||
|
);
|
||||||
|
return CommonResult.ok();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,5 +74,16 @@ public interface AppInspectionPartnerMapper extends BaseMapper<ShopMallPartners>
|
|||||||
* @param startTime 开始时间 非必传
|
* @param startTime 开始时间 非必传
|
||||||
* @param endTime 结束时间 非必传
|
* @param endTime 结束时间 非必传
|
||||||
**/
|
**/
|
||||||
IPage<OrderTable> getOrderByDate(@Param("startTime") String startTime, @Param("endTime") String endTime, Page<OrderTable> page);
|
IPage<OrderTable> getOrderByDate(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("chooseStatus") String chooseStatus, Page<OrderTable> page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分类计数
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 17:14 2024/12/16
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param chooseStatus 状态
|
||||||
|
**/
|
||||||
|
List<Map<String, Long>> getTypeCount(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("chooseStatus") String chooseStatus);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -128,5 +128,16 @@ public interface AppInspectionPartnerService extends IService<ShopMallPartners>
|
|||||||
* @param startTime 开始时间 非必传
|
* @param startTime 开始时间 非必传
|
||||||
* @param endTime 结束时间 非必传
|
* @param endTime 结束时间 非必传
|
||||||
**/
|
**/
|
||||||
IPage<OrderTable> getOrderByDate(String startTime, String endTime, Page<OrderTable> page);
|
IPage<OrderTable> getOrderByDate(String startTime, String endTime, String chooseStatus, Page<OrderTable> page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分类计数
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 17:14 2024/12/16
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param chooseStatus 状态
|
||||||
|
**/
|
||||||
|
Map<String, Long> getTypeCount(String startTime, String endTime, String chooseStatus);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1951,13 +1951,34 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
* @param endTime 结束时间 非必传
|
* @param endTime 结束时间 非必传
|
||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public IPage<OrderTable> getOrderByDate(String startTime, String endTime, Page<OrderTable> page){
|
public IPage<OrderTable> getOrderByDate(String startTime, String endTime, String chooseStatus, Page<OrderTable> page){
|
||||||
if (StringUtils.isEmpty(startTime)){
|
if (StringUtils.isEmpty(startTime)){
|
||||||
startTime = DateUtil.format(new Date(), "yyyy-MM-dd");
|
startTime = DateUtil.format(new Date(), "yyyy-MM-dd");
|
||||||
endTime = DateUtil.format(new Date(), "yyyy-MM-dd");
|
endTime = DateUtil.format(new Date(), "yyyy-MM-dd");
|
||||||
}
|
}
|
||||||
startTime = startTime + " 00:00:00";
|
startTime = startTime + " 00:00:00";
|
||||||
endTime = endTime + " 23:59:59";
|
endTime = endTime + " 23:59:59";
|
||||||
return baseMapper.getOrderByDate(startTime, endTime, page);
|
return baseMapper.getOrderByDate(startTime, endTime, chooseStatus, page);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分类计数
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 17:14 2024/12/16
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @param chooseStatus 状态
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public Map<String, Long> getTypeCount(String startTime, String endTime, String chooseStatus){
|
||||||
|
if (StringUtils.isEmpty(startTime)){
|
||||||
|
startTime = DateUtil.format(new Date(), "yyyy-MM-dd");
|
||||||
|
endTime = DateUtil.format(new Date(), "yyyy-MM-dd");
|
||||||
|
}
|
||||||
|
startTime = startTime + " 00:00:00";
|
||||||
|
endTime = endTime + " 23:59:59";
|
||||||
|
List<Map<String, Long>> typeCount = baseMapper.getTypeCount(startTime, endTime, chooseStatus);
|
||||||
|
return typeCount.stream().collect(Collectors.toMap(map -> String.valueOf(map.get("type")), map -> map.get("count")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -574,6 +574,78 @@ FROM
|
|||||||
ii.id = iwn_agg.inspection_info_id
|
ii.id = iwn_agg.inspection_info_id
|
||||||
WHERE oi.create_time BETWEEN #{startTime} AND #{endTime}
|
WHERE oi.create_time BETWEEN #{startTime} AND #{endTime}
|
||||||
AND oi.deleted = '0') t
|
AND oi.deleted = '0') t
|
||||||
|
<where>
|
||||||
|
<choose>
|
||||||
|
<when test="chooseStatus == '2'.toString()">
|
||||||
|
t.status = '检测中'
|
||||||
|
</when>
|
||||||
|
<when test="chooseStatus == '3'.toString()">
|
||||||
|
t.status = '已完成'
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</where>
|
||||||
ORDER BY t.create_time DESC
|
ORDER BY t.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getTypeCount" resultType="java.util.Map">
|
||||||
|
SELECT t2.type as type, COUNT(*) as count FROM (
|
||||||
|
SELECT t.id,
|
||||||
|
t.carNum,
|
||||||
|
t.type,
|
||||||
|
t.pay,
|
||||||
|
t.payType,
|
||||||
|
CASE
|
||||||
|
WHEN t.status = '已完成' AND t.is_pass = 0 THEN '不合格'
|
||||||
|
WHEN t.status = '已完成' AND t.is_pass = 1 THEN '合格'
|
||||||
|
WHEN t.status = '已完成' THEN '未知'
|
||||||
|
ELSE ''
|
||||||
|
END AS result,
|
||||||
|
t.status
|
||||||
|
FROM (SELECT ii.id,
|
||||||
|
ii.car_num AS carNum,
|
||||||
|
oi.sku_name AS type,
|
||||||
|
oi.pay_type as payType,
|
||||||
|
CASE
|
||||||
|
WHEN oi.pay_type IS NULL THEN '未支付'
|
||||||
|
ELSE '已支付'
|
||||||
|
END AS pay,
|
||||||
|
CASE
|
||||||
|
WHEN oi.pay_type IS NOT NULL THEN '已完成'
|
||||||
|
WHEN has_status_0_or_null THEN '检测中'
|
||||||
|
WHEN (ii.status = 0 OR ii.status = 2) AND has_status_1 THEN '检测中'
|
||||||
|
WHEN (COALESCE(max_iwn_status, 0) = 2 OR ii.status = 1) THEN '已完成'
|
||||||
|
WHEN (ii.status = 0 OR ii.status = 2) AND COALESCE(max_iwn_status, 0) = 0 THEN '待检测'
|
||||||
|
ELSE '未知状态' -- 这是为了处理任何未预期的情况
|
||||||
|
END AS status,
|
||||||
|
ii.is_pass,
|
||||||
|
COALESCE(max_iwn_status, 0) AS max_iwn_status,
|
||||||
|
oi.create_time
|
||||||
|
FROM order_info oi
|
||||||
|
INNER JOIN
|
||||||
|
inspection_info ii
|
||||||
|
ON
|
||||||
|
oi.id = ii.inspection_order_id
|
||||||
|
LEFT JOIN (SELECT inspection_info_id,
|
||||||
|
MAX(COALESCE(status, 0)) AS max_iwn_status,
|
||||||
|
MAX(CASE WHEN COALESCE(status, 0) = 1 THEN 1 ELSE 0 END) AS has_status_1,
|
||||||
|
MAX(CASE WHEN COALESCE(status, 0) = 0 THEN 1 ELSE 0 END) AS has_status_0_or_null
|
||||||
|
FROM inspection_work_node
|
||||||
|
GROUP BY inspection_info_id) iwn_agg
|
||||||
|
ON
|
||||||
|
ii.id = iwn_agg.inspection_info_id
|
||||||
|
WHERE oi.create_time BETWEEN #{startTime} AND #{endTime}
|
||||||
|
AND oi.deleted = '0') t
|
||||||
|
<where>
|
||||||
|
<choose>
|
||||||
|
<when test="chooseStatus == '2'.toString()">
|
||||||
|
t.status = '检测中'
|
||||||
|
</when>
|
||||||
|
<when test="chooseStatus == '3'.toString()">
|
||||||
|
t.status = '已完成'
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</where>
|
||||||
|
) t2
|
||||||
|
GROUP BY t2.type
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<select id="selectWarnMessageList" resultType="cn.iocoder.yudao.module.inspection.entity.WarnMessage">
|
<select id="selectWarnMessageList" resultType="cn.iocoder.yudao.module.inspection.entity.WarnMessage">
|
||||||
select * from warn_message
|
select * from warn_message
|
||||||
<where>
|
<where>
|
||||||
and warn_time <![CDATA[<=]]> NOW()
|
and warn_time <![CDATA[<=]]> NOW() and deleted = '0'
|
||||||
<if test="title != null and title != ''"> and title = #{title}</if>
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
||||||
<if test="partnerId != null "> and partner_id = #{partnerId}</if>
|
<if test="partnerId != null "> and partner_id = #{partnerId}</if>
|
||||||
<if test="isRead != null and isRead != ''"> and is_read = #{isRead}</if>
|
<if test="isRead != null and isRead != ''"> and is_read = #{isRead}</if>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user