Commit a064fbc3 authored by 吴卿华's avatar 吴卿华

气瓶小程序接口

parent f199f097
package com.zehong.web.controller.gasBottleTrack; package com.zehong.web.controller.gasBottleTrack;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List; import java.util.List;
import com.zehong.system.domain.AirChargeOperatorStatistics; import com.zehong.system.domain.AirChargeOperatorStatistics;
...@@ -42,7 +46,7 @@ public class TAirChargeRecordController extends BaseController ...@@ -42,7 +46,7 @@ public class TAirChargeRecordController extends BaseController
/** /**
* 查询充装记录列表 * 查询充装记录列表
*/ */
@PreAuthorize("@ss.hasPermi('charge:record:list')") // @PreAuthorize("@ss.hasPermi('charge:record:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TAirChargeRecord tAirChargeRecord) public TableDataInfo list(TAirChargeRecord tAirChargeRecord)
{ {
...@@ -74,6 +78,19 @@ public class TAirChargeRecordController extends BaseController ...@@ -74,6 +78,19 @@ public class TAirChargeRecordController extends BaseController
return AjaxResult.success(tAirChargeRecordService.selectTAirChargeRecordById(chargeRecordId)); return AjaxResult.success(tAirChargeRecordService.selectTAirChargeRecordById(chargeRecordId));
} }
/**
* 微信小程序 首页列表查询接口
* @param chargeRecordId
* @return
*/
@GetMapping("/selectGetInfo")
public AjaxResult selectGetInfo(Long chargeRecordId){
TAirChargeRecord tAirChargeRecord = tAirChargeRecordService.selectTAirChargeRecordById(chargeRecordId);
AjaxResult ajax = AjaxResult.success();
ajax.put("tAirChargeRecord", tAirChargeRecord);
return ajax;
}
/** /**
* 新增充装记录 * 新增充装记录
*/ */
...@@ -85,6 +102,20 @@ public class TAirChargeRecordController extends BaseController ...@@ -85,6 +102,20 @@ public class TAirChargeRecordController extends BaseController
return toAjax(tAirChargeRecordService.insertTAirChargeRecord(tAirChargeRecord)); return toAjax(tAirChargeRecordService.insertTAirChargeRecord(tAirChargeRecord));
} }
/**
* 小程序充装记录
* @param tAirChargeRecord
* @return
*/
@PostMapping("/addAirChargeRecord")
public AjaxResult addAirChargeRecord(@RequestBody TAirChargeRecord tAirChargeRecord) throws ParseException {
DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = fmt.parse(tAirChargeRecord.getChargeDates());
tAirChargeRecord.setChargeDate(date);
return toAjax(tAirChargeRecordService.insertTAirChargeRecord(tAirChargeRecord));
}
/** /**
* 修改充装记录 * 修改充装记录
*/ */
......
...@@ -32,7 +32,7 @@ public class TGasBottleInfoController extends BaseController ...@@ -32,7 +32,7 @@ public class TGasBottleInfoController extends BaseController
/** /**
* 查询气瓶信息列表 * 查询气瓶信息列表
*/ */
@PreAuthorize("@ss.hasPermi('gasBottle:info:list')") // @PreAuthorize("@ss.hasPermi('gasBottle:info:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TGasBottleInfo tGasBottleInfo) public TableDataInfo list(TGasBottleInfo tGasBottleInfo)
{ {
...@@ -64,17 +64,30 @@ public class TGasBottleInfoController extends BaseController ...@@ -64,17 +64,30 @@ public class TGasBottleInfoController extends BaseController
/** /**
* 获取气瓶信息详细信息 * 获取气瓶信息详细信息
*/ */
@PreAuthorize("@ss.hasPermi('gasBottle:info:query')") // @PreAuthorize("@ss.hasPermi('gasBottle:info:query')")
@GetMapping(value = "/{bottleId}") @GetMapping(value = "/{bottleId}")
public AjaxResult getInfo(@PathVariable("bottleId") Long bottleId) public AjaxResult getInfo(@PathVariable("bottleId") Long bottleId)
{ {
return AjaxResult.success(tGasBottleInfoService.selectTGasBottleInfoById(bottleId)); return AjaxResult.success(tGasBottleInfoService.selectTGasBottleInfoById(bottleId));
} }
@GetMapping("/getInf")
public AjaxResult getInf(String bottleId)
{
/**
* 查询气瓶详细信息
*/
TGasBottleInfo inf = tGasBottleInfoService.getInf(bottleId);
AjaxResult ajax = AjaxResult.success();
ajax.put("tGasBottleInfo", inf);
return ajax;
}
/** /**
* 新增气瓶信息 * 新增气瓶信息
*/ */
@PreAuthorize("@ss.hasPermi('gasBottle:info:add')") // @PreAuthorize("@ss.hasPermi('gasBottle:info:add')")
@Log(title = "气瓶信息", businessType = BusinessType.INSERT) @Log(title = "气瓶信息", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TGasBottleInfo tGasBottleInfo) public AjaxResult add(@RequestBody TGasBottleInfo tGasBottleInfo)
...@@ -85,7 +98,7 @@ public class TGasBottleInfoController extends BaseController ...@@ -85,7 +98,7 @@ public class TGasBottleInfoController extends BaseController
/** /**
* 修改气瓶信息 * 修改气瓶信息
*/ */
@PreAuthorize("@ss.hasPermi('gasBottle:info:edit')") // @PreAuthorize("@ss.hasPermi('gasBottle:info:edit')")
@Log(title = "气瓶信息", businessType = BusinessType.UPDATE) @Log(title = "气瓶信息", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TGasBottleInfo tGasBottleInfo) public AjaxResult edit(@RequestBody TGasBottleInfo tGasBottleInfo)
...@@ -96,7 +109,7 @@ public class TGasBottleInfoController extends BaseController ...@@ -96,7 +109,7 @@ public class TGasBottleInfoController extends BaseController
/** /**
* 删除气瓶信息 * 删除气瓶信息
*/ */
@PreAuthorize("@ss.hasPermi('gasBottle:info:remove')") // @PreAuthorize("@ss.hasPermi('gasBottle:info:remove')")
@Log(title = "气瓶信息", businessType = BusinessType.DELETE) @Log(title = "气瓶信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{bottleIds}") @DeleteMapping("/{bottleIds}")
public AjaxResult remove(@PathVariable Long[] bottleIds) public AjaxResult remove(@PathVariable Long[] bottleIds)
......
package com.zehong.web.controller.gasBottleTrack; package com.zehong.web.controller.gasBottleTrack;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List; import java.util.List;
import com.zehong.system.domain.TGasBottleInfo;
import com.zehong.system.service.ITGasBottleInfoService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -25,7 +32,8 @@ public class TGasBottleTrackRecordController extends BaseController ...@@ -25,7 +32,8 @@ public class TGasBottleTrackRecordController extends BaseController
{ {
@Autowired @Autowired
private ITGasBottleTrackRecordService tGasBottleTrackRecordService; private ITGasBottleTrackRecordService tGasBottleTrackRecordService;
@Autowired
private ITGasBottleInfoService tGasBottleInfoService;
/** /**
* 查询气瓶追溯列表 * 查询气瓶追溯列表
*/ */
...@@ -79,6 +87,29 @@ public class TGasBottleTrackRecordController extends BaseController ...@@ -79,6 +87,29 @@ public class TGasBottleTrackRecordController extends BaseController
return toAjax(tGasBottleTrackRecordService.insertTGasBottleTrackRecord(tGasBottleTrackRecord)); return toAjax(tGasBottleTrackRecordService.insertTGasBottleTrackRecord(tGasBottleTrackRecord));
} }
/**
* 气瓶回收信息添加
* @param tGasBottleTrackRecord
* @return
*/
@PostMapping("/addTGasBottleTrackRecord")
public AjaxResult addTGasBottleTrackRecord(@RequestBody TGasBottleTrackRecord tGasBottleTrackRecord) throws ParseException {
//修改气瓶状态
TGasBottleInfo tGasBottleInfo=new TGasBottleInfo();
tGasBottleInfo.setBottleId(tGasBottleTrackRecord.getBottleId());
//设置气瓶为离站状态
tGasBottleInfo.setCurrentStatus("1");
tGasBottleInfoService.updateTGasBottleInfo(tGasBottleInfo);
DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = fmt.parse(tGasBottleTrackRecord.getOperateDates());
tGasBottleTrackRecord.setOperateDate(date);
return toAjax(tGasBottleTrackRecordService.insertTGasBottleTrackRecord(tGasBottleTrackRecord));
}
/** /**
* 修改气瓶追溯 * 修改气瓶追溯
*/ */
......
...@@ -8,12 +8,14 @@ import com.zehong.common.enums.BusinessType; ...@@ -8,12 +8,14 @@ import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil; import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.BaseInfoStatistics; import com.zehong.system.domain.BaseInfoStatistics;
import com.zehong.system.domain.TGasStorageStationInfo; import com.zehong.system.domain.TGasStorageStationInfo;
import com.zehong.system.domain.TGasUserInfolins;
import com.zehong.system.service.ITGasStorageStationInfoService; import com.zehong.system.service.ITGasStorageStationInfoService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -32,7 +34,6 @@ public class TGasStorageStationInfoController extends BaseController ...@@ -32,7 +34,6 @@ public class TGasStorageStationInfoController extends BaseController
/** /**
* 查询储配站信息列表 * 查询储配站信息列表
*/ */
@PreAuthorize("@ss.hasPermi('gasBottleTrack:storageStationManage:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TGasStorageStationInfo tGasStorageStationInfo) public TableDataInfo list(TGasStorageStationInfo tGasStorageStationInfo)
{ {
...@@ -47,6 +48,28 @@ public class TGasStorageStationInfoController extends BaseController ...@@ -47,6 +48,28 @@ public class TGasStorageStationInfoController extends BaseController
return AjaxResult.success(list); return AjaxResult.success(list);
} }
/**
* 微信小程序储配站搜索接口
* @param tGasStorageStationInfo
* @return
*/
@GetMapping("/storageStationlist")
public AjaxResult StorageStationList(TGasStorageStationInfo tGasStorageStationInfo){
List<TGasStorageStationInfo> tGasStorageStationInfos = tGasStorageStationInfoService.selectTGasStorageStationInfoList(tGasStorageStationInfo);
List list=new ArrayList();
for (int i=0;i<tGasStorageStationInfos.size();i++){
TGasUserInfolins tGasUserInfolins=new TGasUserInfolins();
tGasUserInfolins.setLabel(tGasStorageStationInfos.get(i).getStationName());
tGasUserInfolins.setValue(String.valueOf(tGasStorageStationInfos.get(i).getStationId()));
list.add(tGasUserInfolins);
}
AjaxResult ajax = AjaxResult.success();
ajax.put("list", list);
return ajax;
}
/** /**
* 导出储配站信息列表 * 导出储配站信息列表
*/ */
......
package com.zehong.web.controller.gasBottleTrack; package com.zehong.web.controller.gasBottleTrack;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.zehong.system.domain.TGasBottleInfo; import com.zehong.system.domain.TGasBottleInfo;
import com.zehong.system.domain.TGasUserInfolins;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
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.GetMapping;
...@@ -77,6 +79,42 @@ public class TGasUserInfoController extends BaseController ...@@ -77,6 +79,42 @@ public class TGasUserInfoController extends BaseController
return AjaxResult.success(tGasUserInfoService.selectTGasUserInfoById(gasUserId)); return AjaxResult.success(tGasUserInfoService.selectTGasUserInfoById(gasUserId));
} }
/**
* 微信小程序下拉信息查询
* @param tGasUserInfo
* @return
*/
@PostMapping("/gasUserId")
public AjaxResult gasUserId(@RequestBody TGasUserInfo tGasUserInfo)
{
TGasUserInfo tGasUserInfo1 = tGasUserInfoService.selectTGasUserInfoById(tGasUserInfo.getGasUserId());
AjaxResult ajax = AjaxResult.success();
ajax.put("tGasUserInfon", tGasUserInfo1);
return ajax;
}
/**
* 小程序 查询燃气用户信息
* @param tGasUserInfo
* @return
*/
@PostMapping("/gasUser")
public AjaxResult gasUser(@RequestBody TGasUserInfo tGasUserInfo)
{
List<TGasUserInfo> tGasUserInfos = tGasUserInfoService.gasUser(tGasUserInfo);
List list=new ArrayList();
for (int i=0;i<tGasUserInfos.size();i++){
TGasUserInfolins tGasUserInfolins=new TGasUserInfolins();
tGasUserInfolins.setLabel(tGasUserInfos.get(i).getGasUserName());
tGasUserInfolins.setValue(String.valueOf(tGasUserInfos.get(i).getGasUserId()));
list.add(tGasUserInfolins);
}
AjaxResult ajax = AjaxResult.success();
ajax.put("list", list);
ajax.put("tGasBottleInfo", tGasUserInfos);
return ajax;
}
/** /**
* 新增燃气用户 * 新增燃气用户
*/ */
...@@ -88,6 +126,19 @@ public class TGasUserInfoController extends BaseController ...@@ -88,6 +126,19 @@ public class TGasUserInfoController extends BaseController
return toAjax(tGasUserInfoService.insertTGasUserInfo(tGasUserInfo)); return toAjax(tGasUserInfoService.insertTGasUserInfo(tGasUserInfo));
} }
/**
* 微信小程序新增燃气用户
* @param tGasUserInfo
* @return
*/
@PostMapping("/addUserInfo")
public AjaxResult addUserInfo(@RequestBody TGasUserInfo tGasUserInfo){
return toAjax(tGasUserInfoService.insertTGasUserInfo(tGasUserInfo));
}
/** /**
* 修改燃气用户 * 修改燃气用户
*/ */
......
...@@ -2,6 +2,7 @@ package com.zehong.web.controller.gasBottleTrack; ...@@ -2,6 +2,7 @@ package com.zehong.web.controller.gasBottleTrack;
import java.util.List; import java.util.List;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.domain.TGasBottleInfo; import com.zehong.system.domain.TGasBottleInfo;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -71,13 +72,18 @@ public class TPractitionerInfoController extends BaseController ...@@ -71,13 +72,18 @@ public class TPractitionerInfoController extends BaseController
/** /**
* 获取从业人员信息详细信息 * 获取从业人员信息详细信息
*/ */
@PreAuthorize("@ss.hasPermi('practitioner:info:query')")
@GetMapping(value = "/{practitionerId}") @GetMapping(value = "/{practitionerId}")
public AjaxResult getInfo(@PathVariable("practitionerId") Long practitionerId) public AjaxResult getInfo(@PathVariable("practitionerId") Long practitionerId)
{ {
return AjaxResult.success(tPractitionerInfoService.selectTPractitionerInfoById(practitionerId)); return AjaxResult.success(tPractitionerInfoService.selectTPractitionerInfoById(practitionerId));
} }
@GetMapping(value = "/getInfo")
public AjaxResult getInfos(TPractitionerInfo tPractitionerInfo)
{
return AjaxResult.success(tPractitionerInfoService.selectTPractitionerInfoById(tPractitionerInfo.getPractitionerId()));
}
/** /**
* 新增从业人员信息 * 新增从业人员信息
*/ */
...@@ -100,6 +106,15 @@ public class TPractitionerInfoController extends BaseController ...@@ -100,6 +106,15 @@ public class TPractitionerInfoController extends BaseController
return toAjax(tPractitionerInfoService.updateTPractitionerInfo(tPractitionerInfo)); return toAjax(tPractitionerInfoService.updateTPractitionerInfo(tPractitionerInfo));
} }
@RequestMapping("/updatePractitionerInfo")
public AjaxResult updatePractitionerInfo(TPractitionerInfo tPractitionerInfo){
String pass = SecurityUtils.encryptPassword(tPractitionerInfo.getPassword());
tPractitionerInfo.setPassword(pass);
return toAjax(tPractitionerInfoService.updateTPractitionerInfo(tPractitionerInfo));
}
/** /**
* 删除从业人员信息 * 删除从业人员信息
*/ */
......
package com.zehong.web.controller.gasBottleTrack; package com.zehong.web.controller.gasBottleTrack;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List; import java.util.List;
import com.zehong.system.domain.TGasBottleInfo;
import com.zehong.system.service.ITGasBottleInfoService;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
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.GetMapping;
...@@ -33,6 +41,8 @@ public class TSafeCheckRecordController extends BaseController ...@@ -33,6 +41,8 @@ public class TSafeCheckRecordController extends BaseController
@Autowired @Autowired
private ITSafeCheckRecordService tSafeCheckRecordService; private ITSafeCheckRecordService tSafeCheckRecordService;
/** /**
* 查询安检记录列表 * 查询安检记录列表
*/ */
...@@ -71,7 +81,6 @@ public class TSafeCheckRecordController extends BaseController ...@@ -71,7 +81,6 @@ public class TSafeCheckRecordController extends BaseController
/** /**
* 新增安检记录 * 新增安检记录
*/ */
@PreAuthorize("@ss.hasPermi('safe:record:add')")
@Log(title = "安检记录", businessType = BusinessType.INSERT) @Log(title = "安检记录", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TSafeCheckRecord tSafeCheckRecord) public AjaxResult add(@RequestBody TSafeCheckRecord tSafeCheckRecord)
...@@ -79,6 +88,21 @@ public class TSafeCheckRecordController extends BaseController ...@@ -79,6 +88,21 @@ public class TSafeCheckRecordController extends BaseController
return toAjax(tSafeCheckRecordService.insertTSafeCheckRecord(tSafeCheckRecord)); return toAjax(tSafeCheckRecordService.insertTSafeCheckRecord(tSafeCheckRecord));
} }
/**
* 安检记录添加 微信小程序调用接口
*/
@PostMapping("/addInfo")
public AjaxResult addInfo(@RequestBody TSafeCheckRecord tSafeCheckRecord) throws ParseException {
DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = fmt.parse(tSafeCheckRecord.getSafeCheckDates());
tSafeCheckRecord.setSafeCheckDate(date);
return toAjax(tSafeCheckRecordService.insertTSafeCheckRecord(tSafeCheckRecord));
}
/** /**
* 修改安检记录 * 修改安检记录
*/ */
......
package com.zehong.web.controller.supervise; package com.zehong.web.controller.supervise;
import java.io.File; import java.io.File;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -247,11 +248,14 @@ public class TDeviceInfoController extends BaseController ...@@ -247,11 +248,14 @@ public class TDeviceInfoController extends BaseController
@GetMapping("/selectDeviceNum") @GetMapping("/selectDeviceNum")
public AjaxResult selectDeviceNum(String enterpriseId) public AjaxResult selectDeviceNum(String enterpriseId)
{ {
if (enterpriseId!=null){
Map<String,Object> map = itDetectorInfoService.selectDetectorNum(enterpriseId); Map<String,Object> map = itDetectorInfoService.selectDetectorNum(enterpriseId);
Map<String,Object> map1 =tDeviceInfoService.selectDeviceNum(enterpriseId); Map<String,Object> map1 =tDeviceInfoService.selectDeviceNum(enterpriseId);
Map<String,Object> map2 =itDetectorUserService.selectUserNum(); Map<String,Object> map2 =itDetectorUserService.selectUserNum();
map.putAll(map2);
map.putAll(map1); map.putAll(map1);
return AjaxResult.success(map); return AjaxResult.success(map);
} }
Map<String,Object> map=new HashMap<>();
return AjaxResult.success(map);
}
} }
...@@ -6,7 +6,9 @@ import java.util.Set; ...@@ -6,7 +6,9 @@ import java.util.Set;
import com.zehong.framework.systemsetting.SystemSetting; import com.zehong.framework.systemsetting.SystemSetting;
import com.zehong.framework.web.domain.server.Sys; import com.zehong.framework.web.domain.server.Sys;
import com.zehong.system.domain.TPractitionerInfo;
import com.zehong.system.service.ISysPostService; import com.zehong.system.service.ISysPostService;
import com.zehong.system.service.ITPractitionerInfoService;
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.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
...@@ -50,6 +52,9 @@ public class SysLoginController ...@@ -50,6 +52,9 @@ public class SysLoginController
@Autowired @Autowired
private ISysPostService iSysPostService; private ISysPostService iSysPostService;
@Autowired
private ITPractitionerInfoService tPractitionerInfoService;
/** /**
* 登录方法 * 登录方法
* *
...@@ -67,6 +72,26 @@ public class SysLoginController ...@@ -67,6 +72,26 @@ public class SysLoginController
return ajax; return ajax;
} }
/**
* 从业人员登录方法
*/
@PostMapping("/loginTPractitioner")
public AjaxResult loginTPractitioner(@RequestBody TPractitionerInfo tPractitionerInfo){
/**
* 查询登录信息
*/
// List<TPractitionerInfo> tPractitionerInfos = tPractitionerInfoService.loginTPractitioner(tPractitionerInfo);
tPractitionerInfo.setTelNum(tPractitionerInfo.getTelNum()+"Y");
AjaxResult ajax = AjaxResult.success();
// 生成令牌
String token = loginService.login(tPractitionerInfo.getTelNum(), tPractitionerInfo.getPassword(), tPractitionerInfo.getCode(),
tPractitionerInfo.getUuid());
ajax.put(Constants.TOKEN, token);
return ajax;
}
/** /**
* 获取用户信息 * 获取用户信息
* *
...@@ -82,10 +107,14 @@ public class SysLoginController ...@@ -82,10 +107,14 @@ public class SysLoginController
// 权限集合 // 权限集合
Set<String> permissions = permissionService.getMenuPermission(user); Set<String> permissions = permissionService.getMenuPermission(user);
HashMap hashMap=new HashMap();
hashMap.put("map_center","[115.66,39.02]");
hashMap.put("prod_test","prod");
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
ajax.put("user", user); ajax.put("user", user);
ajax.put("roles", roles); ajax.put("roles", roles);
ajax.put("permissions", permissions); ajax.put("permissions", permissions);
ajax.put("systemSetting",hashMap);
ajax.put("posts",iSysPostService.getPostListByUserId(user.getUserId())); ajax.put("posts",iSysPostService.getPostListByUserId(user.getUserId()));
ajax.put("systemSetting",systemSetting.getSystemWebSetting()); ajax.put("systemSetting",systemSetting.getSystemWebSetting());
return ajax; return ajax;
......
...@@ -79,6 +79,18 @@ public class TDeliveryRecordController extends BaseController ...@@ -79,6 +79,18 @@ public class TDeliveryRecordController extends BaseController
return toAjax(tDeliveryRecordService.insertTDeliveryRecord(tDeliveryRecord)); return toAjax(tDeliveryRecordService.insertTDeliveryRecord(tDeliveryRecord));
} }
/**
* 新增配送记录
* @param tDeliveryRecord
* @return
*/
@PostMapping("/addRecord")
public AjaxResult addRecord(@RequestBody TDeliveryRecord tDeliveryRecord)
{
return toAjax(tDeliveryRecordService.insertTDeliveryRecord(tDeliveryRecord));
}
/** /**
* 修改配送记录 * 修改配送记录
*/ */
......
...@@ -7,14 +7,7 @@ import com.zehong.system.service.ITVehicleLocationInfoService; ...@@ -7,14 +7,7 @@ import com.zehong.system.service.ITVehicleLocationInfoService;
import io.jsonwebtoken.lang.Collections; import io.jsonwebtoken.lang.Collections;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
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.PutMapping;
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 com.zehong.common.annotation.Log; import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController; import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult; import com.zehong.common.core.domain.AjaxResult;
...@@ -85,6 +78,19 @@ public class TVehicleInfosController extends BaseController ...@@ -85,6 +78,19 @@ public class TVehicleInfosController extends BaseController
return AjaxResult.success(tVehicleInfoService.selectTVehicleInfoById(vehicleId)); return AjaxResult.success(tVehicleInfoService.selectTVehicleInfoById(vehicleId));
} }
/**
* 微信小程序 车辆详细信息查询接口
* @param tVehicleInfo
* @return
*/
@PostMapping("/getTVehicleInfo")
public AjaxResult getTVehicleInfo(@RequestBody TVehicleInfo tVehicleInfo)
{
TVehicleInfo tVehicleInfo1 = tVehicleInfoService.getTVehicleInfo(tVehicleInfo);
AjaxResult ajax = AjaxResult.success();
ajax.put("tGasBottleInfo", tVehicleInfo1);
return ajax;
}
/** /**
* 新增燃气车辆信息 * 新增燃气车辆信息
*/ */
......
package com.zehong.web.controller.system; package com.zehong.web.controller.system;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List; import java.util.List;
import com.zehong.common.core.domain.model.LoginUser; import com.zehong.common.core.domain.model.LoginUser;
...@@ -87,6 +91,24 @@ public class TVehicleUseRecordController extends BaseController ...@@ -87,6 +91,24 @@ public class TVehicleUseRecordController extends BaseController
return toAjax(tVehicleUseRecordService.insertTVehicleUseRecord(tVehicleUseRecord)); return toAjax(tVehicleUseRecordService.insertTVehicleUseRecord(tVehicleUseRecord));
} }
/**
* 微信小程序 车辆使用信息提交
* @param tVehicleUseRecord
* @return
*/
@PostMapping("/addtVehicleUseRecord")
public AjaxResult addtVehicleUseRecord(@RequestBody TVehicleUseRecord tVehicleUseRecord) throws ParseException {
// LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
// Long userId = loginUser.getUser().getUserId();
// tVehicleUseRecord.setVehicleUserId(userId);
DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date VehicleUseDateTime = fmt.parse(tVehicleUseRecord.getVehicleUseDateTime());
Date parse = fmt.parse(tVehicleUseRecord.getVehicleReturnDateTime());
tVehicleUseRecord.setVehicleUseDate(VehicleUseDateTime);
tVehicleUseRecord.setVehicleReturnDate(parse);
return toAjax(tVehicleUseRecordService.insertTVehicleUseRecord(tVehicleUseRecord));
}
/** /**
* 修改车辆使用记录 * 修改车辆使用记录
*/ */
......
...@@ -98,6 +98,22 @@ public class SysUser extends BaseEntity ...@@ -98,6 +98,22 @@ public class SysUser extends BaseEntity
private String enterpriseId; private String enterpriseId;
/**储配站*/
private String stationName;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getStationName() {
return stationName;
}
public void setStationName(String stationName) {
this.stationName = stationName;
}
public String getEnterpriseId() { public String getEnterpriseId() {
return enterpriseId; return enterpriseId;
} }
......
...@@ -114,6 +114,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter ...@@ -114,6 +114,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers("/webjars/**").anonymous() .antMatchers("/webjars/**").anonymous()
.antMatchers("/*/api-docs").anonymous() .antMatchers("/*/api-docs").anonymous()
.antMatchers("/druid/**").anonymous() .antMatchers("/druid/**").anonymous()
// .antMatchers("/charge/record/list").anonymous()
.antMatchers("/loginTPractitioner").anonymous()
// 除上面外的所有请求全部需要鉴权认证 // 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated() .anyRequest().authenticated()
.and() .and()
......
...@@ -107,4 +107,5 @@ public class SysLoginService ...@@ -107,4 +107,5 @@ public class SysLoginService
user.setLoginDate(DateUtils.getNowDate()); user.setLoginDate(DateUtils.getNowDate());
userService.updateUserProfile(user); userService.updateUserProfile(user);
} }
} }
package com.zehong.framework.web.service; package com.zehong.framework.web.service;
import com.zehong.system.domain.TPractitionerInfo;
import com.zehong.system.service.ITPractitionerInfoService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -14,6 +16,8 @@ import com.zehong.common.exception.BaseException; ...@@ -14,6 +16,8 @@ import com.zehong.common.exception.BaseException;
import com.zehong.common.utils.StringUtils; import com.zehong.common.utils.StringUtils;
import com.zehong.system.service.ISysUserService; import com.zehong.system.service.ISysUserService;
import java.util.List;
/** /**
* 用户验证处理 * 用户验证处理
* *
...@@ -30,10 +34,39 @@ public class UserDetailsServiceImpl implements UserDetailsService ...@@ -30,10 +34,39 @@ public class UserDetailsServiceImpl implements UserDetailsService
@Autowired @Autowired
private SysPermissionService permissionService; private SysPermissionService permissionService;
@Autowired
private ITPractitionerInfoService tPractitionerInfoService;
@Override @Override
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException
{ {
String lastChar = String.valueOf(username.charAt(username.length() - 1));
if (lastChar.equals("Y")){
String usernames = StringUtils.substringBefore(username, "Y");
TPractitionerInfo tPractitionerInfo=new TPractitionerInfo();
tPractitionerInfo.setTelNum(usernames);
/**
* 查询登录信息
*/
List<TPractitionerInfo> tPractitionerInfos = tPractitionerInfoService.loginTPractitioner(tPractitionerInfo);
if (tPractitionerInfos.size()<=0){
log.info("登录用户:{} 不存在.", usernames);
throw new UsernameNotFoundException("登录用户:" + usernames + " 不存在");
}else {
SysUser user=new SysUser();
user.setUserName(tPractitionerInfos.get(0).getTelNum());
user.setPassword(tPractitionerInfos.get(0).getPassword());
user.setNickName(tPractitionerInfos.get(0).getName());
user.setAvatar(tPractitionerInfos.get(0).getPersonPhoto());
user.setStationName(tPractitionerInfos.get(0).getStationName());
user.setUserId(tPractitionerInfos.get(0).getPractitionerId());
user.setDeptId(Long.valueOf(-2));
return createLoginUser(user);
}
}else {
System.out.println(username);
SysUser user = userService.selectUserByUserName(username); SysUser user = userService.selectUserByUserName(username);
if (StringUtils.isNull(user)) if (StringUtils.isNull(user))
{ {
log.info("登录用户:{} 不存在.", username); log.info("登录用户:{} 不存在.", username);
...@@ -49,10 +82,12 @@ public class UserDetailsServiceImpl implements UserDetailsService ...@@ -49,10 +82,12 @@ public class UserDetailsServiceImpl implements UserDetailsService
log.info("登录用户:{} 已被停用.", username); log.info("登录用户:{} 已被停用.", username);
throw new BaseException("对不起,您的账号:" + username + " 已停用"); throw new BaseException("对不起,您的账号:" + username + " 已停用");
} }
System.out.println(user);
return createLoginUser(user); return createLoginUser(user);
} }
}
public UserDetails createLoginUser(SysUser user) public UserDetails createLoginUser(SysUser user)
{ {
return new LoginUser(user, permissionService.getMenuPermission(user)); return new LoginUser(user, permissionService.getMenuPermission(user));
......
...@@ -51,6 +51,8 @@ public class TAirChargeRecord extends BaseEntity ...@@ -51,6 +51,8 @@ public class TAirChargeRecord extends BaseEntity
@Excel(name = "充装时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "充装时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date chargeDate; private Date chargeDate;
private String chargeDates;
/** 删除状态:0.否 1.是 */ /** 删除状态:0.否 1.是 */
private String isDel; private String isDel;
...@@ -58,6 +60,18 @@ public class TAirChargeRecord extends BaseEntity ...@@ -58,6 +60,18 @@ public class TAirChargeRecord extends BaseEntity
private Date chargeEndTime; private Date chargeEndTime;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getChargeDates() {
return chargeDates;
}
public void setChargeDates(String chargeDates) {
this.chargeDates = chargeDates;
}
public void setChargeRecordId(Long chargeRecordId) public void setChargeRecordId(Long chargeRecordId)
{ {
this.chargeRecordId = chargeRecordId; this.chargeRecordId = chargeRecordId;
......
...@@ -46,7 +46,7 @@ public class TDeliveryRecord extends BaseEntity ...@@ -46,7 +46,7 @@ public class TDeliveryRecord extends BaseEntity
/** 配送时间 */ /** 配送时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "配送时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "配送时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date deliveryDate; private Date deliveryDate;
/** 删除状态:0.否 1.是 */ /** 删除状态:0.否 1.是 */
......
...@@ -381,35 +381,35 @@ public class TGasBottleInfo extends BaseEntity ...@@ -381,35 +381,35 @@ public class TGasBottleInfo extends BaseEntity
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return "TGasBottleInfo{" +
.append("bottleId", getBottleId()) "bottleId=" + bottleId +
.append("stationId", getStationId()) ", stationId=" + stationId +
.append("bottleCode", getBottleCode()) ", stationName='" + stationName + '\'' +
.append("myselfNum", getMyselfNum()) ", bottleCode='" + bottleCode + '\'' +
.append("produceUnit", getProduceUnit()) ", myselfNum='" + myselfNum + '\'' +
.append("produceDate", getProduceDate()) ", produceUnit='" + produceUnit + '\'' +
.append("produceCode", getProduceCode()) ", produceDate=" + produceDate +
.append("bottleStatus", getBottleStatus()) ", produceCode='" + produceCode + '\'' +
.append("lastChargeDate", getLastChargeDate()) ", bottleStatus='" + bottleStatus + '\'' +
.append("longitude", getLongitude()) ", lastChargeDate=" + lastChargeDate +
.append("latitude", getLatitude()) ", longitude=" + longitude +
.append("chargeMedium", getChargeMedium()) ", latitude=" + latitude +
.append("bottleSpecs", getBottleSpecs()) ", chargeMedium='" + chargeMedium + '\'' +
.append("ratedPresure", getRatedPresure()) ", bottleSpecs='" + bottleSpecs + '\'' +
.append("bottleCapacity", getBottleCapacity()) ", ratedPresure='" + ratedPresure + '\'' +
.append("wallThickness", getWallThickness()) ", bottleCapacity='" + bottleCapacity + '\'' +
.append("tare", getTare()) ", wallThickness='" + wallThickness + '\'' +
.append("useRegisterCode", getUseRegisterCode()) ", tare='" + tare + '\'' +
.append("registerDate", getRegisterDate()) ", useRegisterCode='" + useRegisterCode + '\'' +
.append("lastCheckDate", getLastCheckDate()) ", registerDate=" + registerDate +
.append("nextCheckDate", getNextCheckDate()) ", lastCheckDate=" + lastCheckDate +
.append("scrapDate", getScrapDate()) ", nextCheckDate=" + nextCheckDate +
.append("currentStatus", getCurrentStatus()) ", scrapDate=" + scrapDate +
.append("emptyType", getEmptyType()) ", currentStatus='" + currentStatus + '\'' +
.append("createTime", getCreateTime()) ", emptyType='" + emptyType + '\'' +
.append("updateTime", getUpdateTime()) ", isDel='" + isDel + '\'' +
.append("isDel", getIsDel()) ", produceBeginTime=" + produceBeginTime +
.append("remark", getRemark()) ", produceEndTime=" + produceEndTime +
.toString(); '}';
} }
} }
...@@ -50,8 +50,9 @@ public class TGasBottleTrackRecord extends BaseEntity ...@@ -50,8 +50,9 @@ public class TGasBottleTrackRecord extends BaseEntity
@Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date operateDate; private Date operateDate;
/** 操作人 */ private String operateDates;
/** 操作人 */
private Long operator; private Long operator;
@Excel(name = "操作人") @Excel(name = "操作人")
...@@ -70,6 +71,18 @@ public class TGasBottleTrackRecord extends BaseEntity ...@@ -70,6 +71,18 @@ public class TGasBottleTrackRecord extends BaseEntity
private String messageInfo; private String messageInfo;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getOperateDates() {
return operateDates;
}
public void setOperateDates(String operateDates) {
this.operateDates = operateDates;
}
public void setTrackRecordId(Long trackRecordId) public void setTrackRecordId(Long trackRecordId)
{ {
this.trackRecordId = trackRecordId; this.trackRecordId = trackRecordId;
...@@ -205,20 +218,23 @@ public class TGasBottleTrackRecord extends BaseEntity ...@@ -205,20 +218,23 @@ public class TGasBottleTrackRecord extends BaseEntity
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return "TGasBottleTrackRecord{" +
.append("trackRecordId", getTrackRecordId()) "trackRecordId=" + trackRecordId +
.append("stationId", getStationId()) ", stationId=" + stationId +
.append("bottleId", getBottleId()) ", stationName='" + stationName + '\'' +
.append("processesName", getProcessesName()) ", bottleId=" + bottleId +
.append("processesRelationId", getProcessesRelationId()) ", bottleCode='" + bottleCode + '\'' +
.append("operateDate", getOperateDate()) ", bottleCapacity='" + bottleCapacity + '\'' +
.append("operator", getOperator()) ", processesName='" + processesName + '\'' +
.append("sender", getSender()) ", processesRelationId=" + processesRelationId +
.append("recipient", getRecipient()) ", operateDate=" + operateDate +
.append("createTime", getCreateTime()) ", operateDates='" + operateDates + '\'' +
.append("updateTime", getUpdateTime()) ", operator=" + operator +
.append("isDel", getIsDel()) ", operatorName='" + operatorName + '\'' +
.append("remark", getRemark()) ", sender='" + sender + '\'' +
.toString(); ", recipient='" + recipient + '\'' +
", isDel='" + isDel + '\'' +
", messageInfo='" + messageInfo + '\'' +
'}';
} }
} }
package com.zehong.system.domain;
import lombok.Data;
import lombok.ToString;
/**
* 微信小程序下拉选择信息封装类
*/
@Data
@ToString
public class TGasUserInfolins {
private String label;
private String value;
}
...@@ -21,7 +21,6 @@ public class TPractitionerInfo extends BaseEntity ...@@ -21,7 +21,6 @@ public class TPractitionerInfo extends BaseEntity
private Long practitionerId; private Long practitionerId;
/** 储配站 */ /** 储配站 */
private Long stationId; private Long stationId;
@Excel(name = "储配站") @Excel(name = "储配站")
...@@ -83,6 +82,37 @@ public class TPractitionerInfo extends BaseEntity ...@@ -83,6 +82,37 @@ public class TPractitionerInfo extends BaseEntity
/** 删除状态:0.否 1.是 */ /** 删除状态:0.否 1.是 */
private String isDel; private String isDel;
/**
* 验证码
*/
private String code;
/**
* 唯一标识
*/
private String uuid = "";
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public void setPractitionerId(Long practitionerId) public void setPractitionerId(Long practitionerId)
{ {
this.practitionerId = practitionerId; this.practitionerId = practitionerId;
...@@ -237,25 +267,26 @@ public class TPractitionerInfo extends BaseEntity ...@@ -237,25 +267,26 @@ public class TPractitionerInfo extends BaseEntity
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return "TPractitionerInfo{" +
.append("practitionerId", getPractitionerId()) "practitionerId=" + practitionerId +
.append("stationId", getStationId()) ", stationId=" + stationId +
.append("practitionerNum", getPractitionerNum()) ", stationName='" + stationName + '\'' +
.append("name", getName()) ", practitionerNum='" + practitionerNum + '\'' +
.append("sex", getSex()) ", name='" + name + '\'' +
.append("birthDate", getBirthDate()) ", sex='" + sex + '\'' +
.append("postId", getPostId()) ", birthDate=" + birthDate +
.append("telNum", getTelNum()) ", postId=" + postId +
.append("deliveryArea", getDeliveryArea()) ", postName='" + postName + '\'' +
.append("personPhoto", getPersonPhoto()) ", telNum='" + telNum + '\'' +
.append("licenseFile", getLicenseFile()) ", deliveryArea='" + deliveryArea + '\'' +
.append("certificateNum", getCertificateNum()) ", personPhoto='" + personPhoto + '\'' +
.append("certificateEffectiveDate", getCertificateEffectiveDate()) ", licenseFile='" + licenseFile + '\'' +
.append("password", getPassword()) ", certificateNum='" + certificateNum + '\'' +
.append("createTime", getCreateTime()) ", certificateEffectiveDate=" + certificateEffectiveDate +
.append("updateTime", getUpdateTime()) ", password='" + password + '\'' +
.append("isDel", getIsDel()) ", isDel='" + isDel + '\'' +
.append("remark", getRemark()) ", code='" + code + '\'' +
.toString(); ", uuid='" + uuid + '\'' +
'}';
} }
} }
...@@ -45,6 +45,8 @@ public class TSafeCheckRecord extends BaseEntity ...@@ -45,6 +45,8 @@ public class TSafeCheckRecord extends BaseEntity
@Excel(name = "安检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "安检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date safeCheckDate; private Date safeCheckDate;
private String safeCheckDates;
/** 安检人 */ /** 安检人 */
private Long safeCheckPerson; private Long safeCheckPerson;
...@@ -125,6 +127,18 @@ public class TSafeCheckRecord extends BaseEntity ...@@ -125,6 +127,18 @@ public class TSafeCheckRecord extends BaseEntity
private Date safeCheckEndTime; private Date safeCheckEndTime;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getSafeCheckDates() {
return safeCheckDates;
}
public void setSafeCheckDates(String safeCheckDates) {
this.safeCheckDates = safeCheckDates;
}
public void setSafeCheckId(Long safeCheckId) public void setSafeCheckId(Long safeCheckId)
{ {
this.safeCheckId = safeCheckId; this.safeCheckId = safeCheckId;
......
...@@ -20,6 +20,12 @@ public class TVehicleInfo extends BaseEntity ...@@ -20,6 +20,12 @@ public class TVehicleInfo extends BaseEntity
/** 车辆id */ /** 车辆id */
private Long vehicleId; private Long vehicleId;
/**
* 车辆编号
*/
@Excel(name = "车辆编号")
private String carNumber;
/** 车牌号 */ /** 车牌号 */
@Excel(name = "车牌号") @Excel(name = "车牌号")
private String carNum; private String carNum;
...@@ -79,6 +85,13 @@ public class TVehicleInfo extends BaseEntity ...@@ -79,6 +85,13 @@ public class TVehicleInfo extends BaseEntity
private String beyondEnterpriseName; private String beyondEnterpriseName;
public String getCarNumber() {
return carNumber;
}
public void setCarNumber(String carNumber) {
this.carNumber = carNumber;
}
public String getSiteStationName() { public String getSiteStationName() {
return siteStationName; return siteStationName;
...@@ -236,20 +249,25 @@ public class TVehicleInfo extends BaseEntity ...@@ -236,20 +249,25 @@ public class TVehicleInfo extends BaseEntity
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return "TVehicleInfo{" +
.append("vehicleId", getVehicleId()) "vehicleId=" + vehicleId +
.append("carNum", getCarNum()) ", carNumber='" + carNumber + '\'' +
.append("brandModel", getBrandModel()) ", carNum='" + carNum + '\'' +
.append("vehicleType", getVehicleType()) ", brandModel='" + brandModel + '\'' +
.append("vehicleLoad", getVehicleLoad()) ", vehicleType='" + vehicleType + '\'' +
.append("vehicleSize", getVehicleSize()) ", vehicleLoad='" + vehicleLoad + '\'' +
.append("vehicleLimt", getVehicleLimt()) ", vehicleSize='" + vehicleSize + '\'' +
.append("vehicleInspect", getVehicleInspect()) ", vehicleLimt='" + vehicleLimt + '\'' +
.append("beyondEnterpriseId", getBeyondEnterpriseId()) ", vehicleInspect='" + vehicleInspect + '\'' +
.append("personLiable", getPersonLiable()) ", beyondEnterpriseId=" + beyondEnterpriseId +
.append("phone", getPhone()) ", personLiable='" + personLiable + '\'' +
.append("isDel", getIsDel()) ", phone='" + phone + '\'' +
.append("remarks", getRemarks()) ", isDel='" + isDel + '\'' +
.toString(); ", remarks='" + remarks + '\'' +
", siteStationName='" + siteStationName + '\'' +
", longitude=" + longitude +
", latitude=" + latitude +
", beyondEnterpriseName='" + beyondEnterpriseName + '\'' +
'}';
} }
} }
...@@ -61,10 +61,31 @@ public class TVehicleUseRecord extends BaseEntity ...@@ -61,10 +61,31 @@ public class TVehicleUseRecord extends BaseEntity
@Excel(name = "归还时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "归还时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date vehicleReturnDate; private Date vehicleReturnDate;
/**使用时间*/
private String vehicleUseDateTime;
/**归还时间*/
private String vehicleReturnDateTime;
/** 删除状态:0.否 1.是 */ /** 删除状态:0.否 1.是 */
@Excel(name = "删除状态:0.否 1.是") @Excel(name = "删除状态:0.否 1.是")
private String isDel; private String isDel;
public String getVehicleUseDateTime() {
return vehicleUseDateTime;
}
public void setVehicleUseDateTime(String vehicleUseDateTime) {
this.vehicleUseDateTime = vehicleUseDateTime;
}
public String getVehicleReturnDateTime() {
return vehicleReturnDateTime;
}
public void setVehicleReturnDateTime(String vehicleReturnDateTime) {
this.vehicleReturnDateTime = vehicleReturnDateTime;
}
public static long getSerialVersionUID() { public static long getSerialVersionUID() {
return serialVersionUID; return serialVersionUID;
} }
......
...@@ -67,4 +67,11 @@ public interface TGasBottleInfoMapper ...@@ -67,4 +67,11 @@ public interface TGasBottleInfoMapper
* @return * @return
*/ */
List<BottleStatistics> bottleStatistics(Long stationId); List<BottleStatistics> bottleStatistics(Long stationId);
/**
* 查询气瓶详细信息
* @param bottleId
* @return
*/
TGasBottleInfo getInf(String bottleId);
} }
...@@ -58,4 +58,11 @@ public interface TGasUserInfoMapper ...@@ -58,4 +58,11 @@ public interface TGasUserInfoMapper
* @return 结果 * @return 结果
*/ */
public int deleteTGasUserInfoByIds(Long[] gasUserIds); public int deleteTGasUserInfoByIds(Long[] gasUserIds);
/**
* 查询燃气用户信息
* @param tGasUserInfo
* @return
*/
List<TGasUserInfo> gasUser(TGasUserInfo tGasUserInfo);
} }
...@@ -58,4 +58,11 @@ public interface TPractitionerInfoMapper ...@@ -58,4 +58,11 @@ public interface TPractitionerInfoMapper
* @return 结果 * @return 结果
*/ */
public int deleteTPractitionerInfoByIds(Long[] practitionerIds); public int deleteTPractitionerInfoByIds(Long[] practitionerIds);
/**
* 查询登录信息
* @param tPractitionerInfo
* @return
*/
List<TPractitionerInfo> loginTPractitioner(TPractitionerInfo tPractitionerInfo);
} }
...@@ -58,4 +58,11 @@ public interface TVehicleInfoMapper ...@@ -58,4 +58,11 @@ public interface TVehicleInfoMapper
* @return 结果 * @return 结果
*/ */
public int deleteTVehicleInfoByIds(Long[] vehicleIds); public int deleteTVehicleInfoByIds(Long[] vehicleIds);
/**
* 微信小程序 车辆详细信息查询接口
* @param tVehicleInfo
* @return
*/
TVehicleInfo getTVehicleInfo(TVehicleInfo tVehicleInfo);
} }
...@@ -75,4 +75,10 @@ public interface ITGasBottleInfoService ...@@ -75,4 +75,10 @@ public interface ITGasBottleInfoService
* @return * @return
*/ */
List<BottleStatistics> bottleStatistics(Long stationId); List<BottleStatistics> bottleStatistics(Long stationId);
/**
* 查询气瓶详细信息
* @param bottleId
*/
TGasBottleInfo getInf(String bottleId);
} }
...@@ -66,4 +66,10 @@ public interface ITGasUserInfoService ...@@ -66,4 +66,10 @@ public interface ITGasUserInfoService
* @return * @return
*/ */
String importTGasUserInfo(List<TGasUserInfo> tGasUserInfoList, boolean isUpdateSupport); String importTGasUserInfo(List<TGasUserInfo> tGasUserInfoList, boolean isUpdateSupport);
/**
* 查询燃气用户信息
* @param tGasUserInfo
*/
List<TGasUserInfo> gasUser(TGasUserInfo tGasUserInfo);
} }
...@@ -68,4 +68,11 @@ public interface ITPractitionerInfoService ...@@ -68,4 +68,11 @@ public interface ITPractitionerInfoService
* @return * @return
*/ */
String importTPractitionerInfo(List<TPractitionerInfo> tPractitionerInfoList, Boolean isUpdateSupport); String importTPractitionerInfo(List<TPractitionerInfo> tPractitionerInfoList, Boolean isUpdateSupport);
/**
* 查询登录信息
* @param tPractitionerInfo
* @return
*/
List<TPractitionerInfo> loginTPractitioner(TPractitionerInfo tPractitionerInfo);
} }
...@@ -58,4 +58,11 @@ public interface ITVehicleInfoService ...@@ -58,4 +58,11 @@ public interface ITVehicleInfoService
* @return 结果 * @return 结果
*/ */
public int deleteTVehicleInfoById(Long vehicleId); public int deleteTVehicleInfoById(Long vehicleId);
/**
* 微信小程序 车辆详细信息查询接口
* @param tVehicleInfo
* @return
*/
TVehicleInfo getTVehicleInfo(TVehicleInfo tVehicleInfo);
} }
...@@ -185,4 +185,14 @@ public class TGasBottleInfoServiceImpl implements ITGasBottleInfoService ...@@ -185,4 +185,14 @@ public class TGasBottleInfoServiceImpl implements ITGasBottleInfoService
public List<BottleStatistics> bottleStatistics(Long stationId){ public List<BottleStatistics> bottleStatistics(Long stationId){
return tGasBottleInfoMapper.bottleStatistics(stationId); return tGasBottleInfoMapper.bottleStatistics(stationId);
} }
/**
* 查询气瓶详细信息
* @param bottleId
* @return
*/
@Override
public TGasBottleInfo getInf(String bottleId) {
return tGasBottleInfoMapper.getInf(bottleId);
}
} }
...@@ -158,4 +158,14 @@ public class TGasUserInfoServiceImpl implements ITGasUserInfoService ...@@ -158,4 +158,14 @@ public class TGasUserInfoServiceImpl implements ITGasUserInfoService
} }
return successMsg.toString(); return successMsg.toString();
} }
/**
* 查询燃气用户信息
* @param tGasUserInfo
* @return
*/
@Override
public List<TGasUserInfo> gasUser(TGasUserInfo tGasUserInfo) {
return tGasUserInfoMapper.gasUser(tGasUserInfo);
}
} }
...@@ -193,4 +193,14 @@ public class TPractitionerInfoServiceImpl implements ITPractitionerInfoService ...@@ -193,4 +193,14 @@ public class TPractitionerInfoServiceImpl implements ITPractitionerInfoService
} }
return successMsg.toString(); return successMsg.toString();
} }
/**
* 查询登录信息
* @param tPractitionerInfo
* @return
*/
@Override
public List<TPractitionerInfo> loginTPractitioner(TPractitionerInfo tPractitionerInfo) {
return tPractitionerInfoMapper.loginTPractitioner(tPractitionerInfo);
}
} }
...@@ -90,4 +90,14 @@ public class TVehicleInfoServiceImpl implements ITVehicleInfoService ...@@ -90,4 +90,14 @@ public class TVehicleInfoServiceImpl implements ITVehicleInfoService
{ {
return tVehicleInfoMapper.deleteTVehicleInfoById(vehicleId); return tVehicleInfoMapper.deleteTVehicleInfoById(vehicleId);
} }
/**
* 微信小程序 车辆详细信息查询接口
* @param tVehicleInfo
* @return
*/
@Override
public TVehicleInfo getTVehicleInfo(TVehicleInfo tVehicleInfo) {
return tVehicleInfoMapper.getTVehicleInfo(tVehicleInfo);
}
} }
...@@ -57,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -57,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDel != null and isDel != ''"> and charge.is_del = #{isDel}</if> <if test="isDel != null and isDel != ''"> and charge.is_del = #{isDel}</if>
<if test="chargeBeginTime != null and chargeEndTime != null">and charge.charge_date BETWEEN #{chargeBeginTime} and #{chargeEndTime}</if> <if test="chargeBeginTime != null and chargeEndTime != null">and charge.charge_date BETWEEN #{chargeBeginTime} and #{chargeEndTime}</if>
<if test="bottleCode != null">and bottle.bottle_code like concat('%', #{bottleCode}, '%')</if> <if test="bottleCode != null">and bottle.bottle_code like concat('%', #{bottleCode}, '%')</if>
<if test="stationName != null">and station.station_name like concat('%', #{stationName}, '%')</if>
</where> </where>
</select> </select>
......
...@@ -99,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -99,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="currentStatus != null and currentStatus != ''"> and current_status = #{currentStatus}</if> <if test="currentStatus != null and currentStatus != ''"> and current_status = #{currentStatus}</if>
<if test="emptyType != null and emptyType != ''"> and empty_type = #{emptyType}</if> <if test="emptyType != null and emptyType != ''"> and empty_type = #{emptyType}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if> <if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<if test="stationName != null and stationName != ''"> and (SELECT station_name FROM t_gas_storage_station_info info WHERE info.station_id = station_id) like concat('%', #{stationName}, '%')</if>
</where> </where>
</select> </select>
...@@ -240,4 +241,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -240,4 +241,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)final )final
group by final.station_id group by final.station_id
</select> </select>
<!--查询气瓶详细信息-->
<select id="getInf" resultMap="TGasBottleInfoResult" parameterType="java.lang.String">
<include refid="selectTGasBottleInfoVo"/>
where bottle_code = #{bottleId}
</select>
</mapper> </mapper>
...@@ -110,4 +110,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -110,4 +110,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{gasUserId} #{gasUserId}
</foreach> </foreach>
</delete> </delete>
<!--查询燃气用户信息-->
<select id="gasUser" parameterType="TGasUserInfo" resultMap="TGasUserInfoResult">
<include refid="selectTGasUserInfoVo"/>
where gas_user_name like concat('%', #{gasUserName}, '%')
</select>
</mapper> </mapper>
...@@ -78,6 +78,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -78,6 +78,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where info.practitioner_id = #{practitionerId} where info.practitioner_id = #{practitionerId}
</select> </select>
<!--查询登录信息-->
<select id="loginTPractitioner" resultMap="TPractitionerInfoResult">
<include refid="selectTPractitionerInfoVo"/>
where info.tel_num = #{telNum} and is_del='0'
</select>
<insert id="insertTPractitionerInfo" parameterType="TPractitionerInfo" useGeneratedKeys="true" keyProperty="practitionerId"> <insert id="insertTPractitionerInfo" parameterType="TPractitionerInfo" useGeneratedKeys="true" keyProperty="practitionerId">
insert into t_practitioner_info insert into t_practitioner_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
......
...@@ -20,10 +20,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -20,10 +20,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="remarks" column="remarks" /> <result property="remarks" column="remarks" />
<result property="beyondEnterpriseName" column="enterprise_name" /> <result property="beyondEnterpriseName" column="enterprise_name" />
<result property="siteStationName" column="site_station_name" /> <result property="siteStationName" column="site_station_name" />
<result property="carNumber" column="car_number" />
</resultMap> </resultMap>
<sql id="selectTVehicleInfoVo"> <sql id="selectTVehicleInfoVo">
select vehicle_id, car_num, brand_model, vehicle_type, vehicle_load, vehicle_size, vehicle_limt, vehicle_inspect, beyond_enterprise_id, person_liable, phone, is_del, remarks from t_vehicle_info select vehicle_id, car_number,car_num, brand_model, vehicle_type, vehicle_load, vehicle_size, vehicle_limt, vehicle_inspect, beyond_enterprise_id, person_liable, phone, is_del, remarks from t_vehicle_info
</sql> </sql>
<select id="selectTVehicleInfoList" parameterType="TVehicleInfo" resultMap="TVehicleInfoResult"> <select id="selectTVehicleInfoList" parameterType="TVehicleInfo" resultMap="TVehicleInfoResult">
...@@ -57,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -57,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertTVehicleInfo" parameterType="TVehicleInfo" useGeneratedKeys="true" keyProperty="vehicleId"> <insert id="insertTVehicleInfo" parameterType="TVehicleInfo" useGeneratedKeys="true" keyProperty="vehicleId">
insert into t_vehicle_info insert into t_vehicle_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="carNumber != null">car_number,</if>
<if test="carNum != null">car_num,</if> <if test="carNum != null">car_num,</if>
<if test="brandModel != null">brand_model,</if> <if test="brandModel != null">brand_model,</if>
<if test="vehicleType != null">vehicle_type,</if> <if test="vehicleType != null">vehicle_type,</if>
...@@ -71,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -71,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remarks != null">remarks,</if> <if test="remarks != null">remarks,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="carNumber != null">#{carNumber},</if>
<if test="carNum != null">#{carNum},</if> <if test="carNum != null">#{carNum},</if>
<if test="brandModel != null">#{brandModel},</if> <if test="brandModel != null">#{brandModel},</if>
<if test="vehicleType != null">#{vehicleType},</if> <if test="vehicleType != null">#{vehicleType},</if>
...@@ -89,6 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -89,6 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateTVehicleInfo" parameterType="TVehicleInfo"> <update id="updateTVehicleInfo" parameterType="TVehicleInfo">
update t_vehicle_info update t_vehicle_info
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="carNumber != null">car_number = #{carNumber},</if>
<if test="carNum != null">car_num = #{carNum},</if> <if test="carNum != null">car_num = #{carNum},</if>
<if test="brandModel != null">brand_model = #{brandModel},</if> <if test="brandModel != null">brand_model = #{brandModel},</if>
<if test="vehicleType != null">vehicle_type = #{vehicleType},</if> <if test="vehicleType != null">vehicle_type = #{vehicleType},</if>
...@@ -115,4 +119,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -115,4 +119,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{vehicleId} #{vehicleId}
</foreach> </foreach>
</delete> </delete>
<!--微信小程序 车辆详细信息查询接口-->
<select id="getTVehicleInfo" resultMap="TVehicleInfoResult">
select a.*,b.enterprise_name
from t_vehicle_info a left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
where a.car_number = #{carNumber}
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment