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

气瓶小程序接口

parent f199f097
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 com.zehong.system.domain.AirChargeOperatorStatistics;
......@@ -42,7 +46,7 @@ public class TAirChargeRecordController extends BaseController
/**
* 查询充装记录列表
*/
@PreAuthorize("@ss.hasPermi('charge:record:list')")
// @PreAuthorize("@ss.hasPermi('charge:record:list')")
@GetMapping("/list")
public TableDataInfo list(TAirChargeRecord tAirChargeRecord)
{
......@@ -74,6 +78,19 @@ public class TAirChargeRecordController extends BaseController
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
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
/**
* 查询气瓶信息列表
*/
@PreAuthorize("@ss.hasPermi('gasBottle:info:list')")
// @PreAuthorize("@ss.hasPermi('gasBottle:info:list')")
@GetMapping("/list")
public TableDataInfo list(TGasBottleInfo tGasBottleInfo)
{
......@@ -64,17 +64,30 @@ public class TGasBottleInfoController extends BaseController
/**
* 获取气瓶信息详细信息
*/
@PreAuthorize("@ss.hasPermi('gasBottle:info:query')")
// @PreAuthorize("@ss.hasPermi('gasBottle:info:query')")
@GetMapping(value = "/{bottleId}")
public AjaxResult getInfo(@PathVariable("bottleId") Long 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)
@PostMapping
public AjaxResult add(@RequestBody TGasBottleInfo tGasBottleInfo)
......@@ -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)
@PutMapping
public AjaxResult edit(@RequestBody TGasBottleInfo tGasBottleInfo)
......@@ -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)
@DeleteMapping("/{bottleIds}")
public AjaxResult remove(@PathVariable Long[] bottleIds)
......
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 com.zehong.system.domain.TGasBottleInfo;
import com.zehong.system.service.ITGasBottleInfoService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
......@@ -25,7 +32,8 @@ public class TGasBottleTrackRecordController extends BaseController
{
@Autowired
private ITGasBottleTrackRecordService tGasBottleTrackRecordService;
@Autowired
private ITGasBottleInfoService tGasBottleInfoService;
/**
* 查询气瓶追溯列表
*/
......@@ -79,6 +87,29 @@ public class TGasBottleTrackRecordController extends BaseController
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;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.BaseInfoStatistics;
import com.zehong.system.domain.TGasStorageStationInfo;
import com.zehong.system.domain.TGasUserInfolins;
import com.zehong.system.service.ITGasStorageStationInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -32,7 +34,6 @@ public class TGasStorageStationInfoController extends BaseController
/**
* 查询储配站信息列表
*/
@PreAuthorize("@ss.hasPermi('gasBottleTrack:storageStationManage:list')")
@GetMapping("/list")
public TableDataInfo list(TGasStorageStationInfo tGasStorageStationInfo)
{
......@@ -47,6 +48,28 @@ public class TGasStorageStationInfoController extends BaseController
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;
import java.util.ArrayList;
import java.util.List;
import com.zehong.system.domain.TGasBottleInfo;
import com.zehong.system.domain.TGasUserInfolins;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -77,6 +79,42 @@ public class TGasUserInfoController extends BaseController
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
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;
import java.util.List;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.domain.TGasBottleInfo;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -71,13 +72,18 @@ public class TPractitionerInfoController extends BaseController
/**
* 获取从业人员信息详细信息
*/
@PreAuthorize("@ss.hasPermi('practitioner:info:query')")
@GetMapping(value = "/{practitionerId}")
public AjaxResult getInfo(@PathVariable("practitionerId") Long 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
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;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -33,6 +41,8 @@ public class TSafeCheckRecordController extends BaseController
@Autowired
private ITSafeCheckRecordService tSafeCheckRecordService;
/**
* 查询安检记录列表
*/
......@@ -71,7 +81,6 @@ public class TSafeCheckRecordController extends BaseController
/**
* 新增安检记录
*/
@PreAuthorize("@ss.hasPermi('safe:record:add')")
@Log(title = "安检记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TSafeCheckRecord tSafeCheckRecord)
......@@ -79,6 +88,21 @@ public class TSafeCheckRecordController extends BaseController
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;
import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -247,11 +248,14 @@ public class TDeviceInfoController extends BaseController
@GetMapping("/selectDeviceNum")
public AjaxResult selectDeviceNum(String enterpriseId)
{
if (enterpriseId!=null){
Map<String,Object> map = itDetectorInfoService.selectDetectorNum(enterpriseId);
Map<String,Object> map1 =tDeviceInfoService.selectDeviceNum(enterpriseId);
Map<String,Object> map2 =itDetectorUserService.selectUserNum();
map.putAll(map2);
map.putAll(map1);
return AjaxResult.success(map);
}
Map<String,Object> map=new HashMap<>();
return AjaxResult.success(map);
}
}
......@@ -6,7 +6,9 @@ import java.util.Set;
import com.zehong.framework.systemsetting.SystemSetting;
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.ITPractitionerInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -50,6 +52,9 @@ public class SysLoginController
@Autowired
private ISysPostService iSysPostService;
@Autowired
private ITPractitionerInfoService tPractitionerInfoService;
/**
* 登录方法
*
......@@ -67,6 +72,26 @@ public class SysLoginController
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
// 权限集合
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();
ajax.put("user", user);
ajax.put("roles", roles);
ajax.put("permissions", permissions);
ajax.put("systemSetting",hashMap);
ajax.put("posts",iSysPostService.getPostListByUserId(user.getUserId()));
ajax.put("systemSetting",systemSetting.getSystemWebSetting());
return ajax;
......
......@@ -79,6 +79,18 @@ public class TDeliveryRecordController extends BaseController
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;
import io.jsonwebtoken.lang.Collections;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
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 org.springframework.web.bind.annotation.*;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
......@@ -85,6 +78,19 @@ public class TVehicleInfosController extends BaseController
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;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.zehong.common.core.domain.model.LoginUser;
......@@ -87,6 +91,24 @@ public class TVehicleUseRecordController extends BaseController
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
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() {
return enterpriseId;
}
......
......@@ -114,6 +114,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers("/webjars/**").anonymous()
.antMatchers("/*/api-docs").anonymous()
.antMatchers("/druid/**").anonymous()
// .antMatchers("/charge/record/list").anonymous()
.antMatchers("/loginTPractitioner").anonymous()
// 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated()
.and()
......
......@@ -107,4 +107,5 @@ public class SysLoginService
user.setLoginDate(DateUtils.getNowDate());
userService.updateUserProfile(user);
}
}
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.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -14,6 +16,8 @@ import com.zehong.common.exception.BaseException;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.service.ISysUserService;
import java.util.List;
/**
* 用户验证处理
*
......@@ -30,10 +34,39 @@ public class UserDetailsServiceImpl implements UserDetailsService
@Autowired
private SysPermissionService permissionService;
@Autowired
private ITPractitionerInfoService tPractitionerInfoService;
@Override
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);
if (StringUtils.isNull(user))
{
log.info("登录用户:{} 不存在.", username);
......@@ -49,10 +82,12 @@ public class UserDetailsServiceImpl implements UserDetailsService
log.info("登录用户:{} 已被停用.", username);
throw new BaseException("对不起,您的账号:" + username + " 已停用");
}
System.out.println(user);
return createLoginUser(user);
}
}
public UserDetails createLoginUser(SysUser user)
{
return new LoginUser(user, permissionService.getMenuPermission(user));
......
......@@ -51,6 +51,8 @@ public class TAirChargeRecord extends BaseEntity
@Excel(name = "充装时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date chargeDate;
private String chargeDates;
/** 删除状态:0.否 1.是 */
private String isDel;
......@@ -58,6 +60,18 @@ public class TAirChargeRecord extends BaseEntity
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)
{
this.chargeRecordId = chargeRecordId;
......
......@@ -46,7 +46,7 @@ public class TDeliveryRecord extends BaseEntity
/** 配送时间 */
@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;
/** 删除状态:0.否 1.是 */
......
......@@ -381,35 +381,35 @@ public class TGasBottleInfo extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("bottleId", getBottleId())
.append("stationId", getStationId())
.append("bottleCode", getBottleCode())
.append("myselfNum", getMyselfNum())
.append("produceUnit", getProduceUnit())
.append("produceDate", getProduceDate())
.append("produceCode", getProduceCode())
.append("bottleStatus", getBottleStatus())
.append("lastChargeDate", getLastChargeDate())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("chargeMedium", getChargeMedium())
.append("bottleSpecs", getBottleSpecs())
.append("ratedPresure", getRatedPresure())
.append("bottleCapacity", getBottleCapacity())
.append("wallThickness", getWallThickness())
.append("tare", getTare())
.append("useRegisterCode", getUseRegisterCode())
.append("registerDate", getRegisterDate())
.append("lastCheckDate", getLastCheckDate())
.append("nextCheckDate", getNextCheckDate())
.append("scrapDate", getScrapDate())
.append("currentStatus", getCurrentStatus())
.append("emptyType", getEmptyType())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remark", getRemark())
.toString();
return "TGasBottleInfo{" +
"bottleId=" + bottleId +
", stationId=" + stationId +
", stationName='" + stationName + '\'' +
", bottleCode='" + bottleCode + '\'' +
", myselfNum='" + myselfNum + '\'' +
", produceUnit='" + produceUnit + '\'' +
", produceDate=" + produceDate +
", produceCode='" + produceCode + '\'' +
", bottleStatus='" + bottleStatus + '\'' +
", lastChargeDate=" + lastChargeDate +
", longitude=" + longitude +
", latitude=" + latitude +
", chargeMedium='" + chargeMedium + '\'' +
", bottleSpecs='" + bottleSpecs + '\'' +
", ratedPresure='" + ratedPresure + '\'' +
", bottleCapacity='" + bottleCapacity + '\'' +
", wallThickness='" + wallThickness + '\'' +
", tare='" + tare + '\'' +
", useRegisterCode='" + useRegisterCode + '\'' +
", registerDate=" + registerDate +
", lastCheckDate=" + lastCheckDate +
", nextCheckDate=" + nextCheckDate +
", scrapDate=" + scrapDate +
", currentStatus='" + currentStatus + '\'' +
", emptyType='" + emptyType + '\'' +
", isDel='" + isDel + '\'' +
", produceBeginTime=" + produceBeginTime +
", produceEndTime=" + produceEndTime +
'}';
}
}
......@@ -50,8 +50,9 @@ public class TGasBottleTrackRecord extends BaseEntity
@Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date operateDate;
/** 操作人 */
private String operateDates;
/** 操作人 */
private Long operator;
@Excel(name = "操作人")
......@@ -70,6 +71,18 @@ public class TGasBottleTrackRecord extends BaseEntity
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)
{
this.trackRecordId = trackRecordId;
......@@ -205,20 +218,23 @@ public class TGasBottleTrackRecord extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("trackRecordId", getTrackRecordId())
.append("stationId", getStationId())
.append("bottleId", getBottleId())
.append("processesName", getProcessesName())
.append("processesRelationId", getProcessesRelationId())
.append("operateDate", getOperateDate())
.append("operator", getOperator())
.append("sender", getSender())
.append("recipient", getRecipient())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remark", getRemark())
.toString();
return "TGasBottleTrackRecord{" +
"trackRecordId=" + trackRecordId +
", stationId=" + stationId +
", stationName='" + stationName + '\'' +
", bottleId=" + bottleId +
", bottleCode='" + bottleCode + '\'' +
", bottleCapacity='" + bottleCapacity + '\'' +
", processesName='" + processesName + '\'' +
", processesRelationId=" + processesRelationId +
", operateDate=" + operateDate +
", operateDates='" + operateDates + '\'' +
", operator=" + operator +
", operatorName='" + operatorName + '\'' +
", sender='" + sender + '\'' +
", 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
private Long practitionerId;
/** 储配站 */
private Long stationId;
@Excel(name = "储配站")
......@@ -83,6 +82,37 @@ public class TPractitionerInfo extends BaseEntity
/** 删除状态:0.否 1.是 */
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)
{
this.practitionerId = practitionerId;
......@@ -237,25 +267,26 @@ public class TPractitionerInfo extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("practitionerId", getPractitionerId())
.append("stationId", getStationId())
.append("practitionerNum", getPractitionerNum())
.append("name", getName())
.append("sex", getSex())
.append("birthDate", getBirthDate())
.append("postId", getPostId())
.append("telNum", getTelNum())
.append("deliveryArea", getDeliveryArea())
.append("personPhoto", getPersonPhoto())
.append("licenseFile", getLicenseFile())
.append("certificateNum", getCertificateNum())
.append("certificateEffectiveDate", getCertificateEffectiveDate())
.append("password", getPassword())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remark", getRemark())
.toString();
return "TPractitionerInfo{" +
"practitionerId=" + practitionerId +
", stationId=" + stationId +
", stationName='" + stationName + '\'' +
", practitionerNum='" + practitionerNum + '\'' +
", name='" + name + '\'' +
", sex='" + sex + '\'' +
", birthDate=" + birthDate +
", postId=" + postId +
", postName='" + postName + '\'' +
", telNum='" + telNum + '\'' +
", deliveryArea='" + deliveryArea + '\'' +
", personPhoto='" + personPhoto + '\'' +
", licenseFile='" + licenseFile + '\'' +
", certificateNum='" + certificateNum + '\'' +
", certificateEffectiveDate=" + certificateEffectiveDate +
", password='" + password + '\'' +
", isDel='" + isDel + '\'' +
", code='" + code + '\'' +
", uuid='" + uuid + '\'' +
'}';
}
}
......@@ -45,6 +45,8 @@ public class TSafeCheckRecord extends BaseEntity
@Excel(name = "安检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date safeCheckDate;
private String safeCheckDates;
/** 安检人 */
private Long safeCheckPerson;
......@@ -125,6 +127,18 @@ public class TSafeCheckRecord extends BaseEntity
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)
{
this.safeCheckId = safeCheckId;
......
......@@ -20,6 +20,12 @@ public class TVehicleInfo extends BaseEntity
/** 车辆id */
private Long vehicleId;
/**
* 车辆编号
*/
@Excel(name = "车辆编号")
private String carNumber;
/** 车牌号 */
@Excel(name = "车牌号")
private String carNum;
......@@ -79,6 +85,13 @@ public class TVehicleInfo extends BaseEntity
private String beyondEnterpriseName;
public String getCarNumber() {
return carNumber;
}
public void setCarNumber(String carNumber) {
this.carNumber = carNumber;
}
public String getSiteStationName() {
return siteStationName;
......@@ -236,20 +249,25 @@ public class TVehicleInfo extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("vehicleId", getVehicleId())
.append("carNum", getCarNum())
.append("brandModel", getBrandModel())
.append("vehicleType", getVehicleType())
.append("vehicleLoad", getVehicleLoad())
.append("vehicleSize", getVehicleSize())
.append("vehicleLimt", getVehicleLimt())
.append("vehicleInspect", getVehicleInspect())
.append("beyondEnterpriseId", getBeyondEnterpriseId())
.append("personLiable", getPersonLiable())
.append("phone", getPhone())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
return "TVehicleInfo{" +
"vehicleId=" + vehicleId +
", carNumber='" + carNumber + '\'' +
", carNum='" + carNum + '\'' +
", brandModel='" + brandModel + '\'' +
", vehicleType='" + vehicleType + '\'' +
", vehicleLoad='" + vehicleLoad + '\'' +
", vehicleSize='" + vehicleSize + '\'' +
", vehicleLimt='" + vehicleLimt + '\'' +
", vehicleInspect='" + vehicleInspect + '\'' +
", beyondEnterpriseId=" + beyondEnterpriseId +
", personLiable='" + personLiable + '\'' +
", phone='" + phone + '\'' +
", isDel='" + isDel + '\'' +
", remarks='" + remarks + '\'' +
", siteStationName='" + siteStationName + '\'' +
", longitude=" + longitude +
", latitude=" + latitude +
", beyondEnterpriseName='" + beyondEnterpriseName + '\'' +
'}';
}
}
......@@ -61,10 +61,31 @@ public class TVehicleUseRecord extends BaseEntity
@Excel(name = "归还时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date vehicleReturnDate;
/**使用时间*/
private String vehicleUseDateTime;
/**归还时间*/
private String vehicleReturnDateTime;
/** 删除状态:0.否 1.是 */
@Excel(name = "删除状态:0.否 1.是")
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() {
return serialVersionUID;
}
......
......@@ -67,4 +67,11 @@ public interface TGasBottleInfoMapper
* @return
*/
List<BottleStatistics> bottleStatistics(Long stationId);
/**
* 查询气瓶详细信息
* @param bottleId
* @return
*/
TGasBottleInfo getInf(String bottleId);
}
......@@ -58,4 +58,11 @@ public interface TGasUserInfoMapper
* @return 结果
*/
public int deleteTGasUserInfoByIds(Long[] gasUserIds);
/**
* 查询燃气用户信息
* @param tGasUserInfo
* @return
*/
List<TGasUserInfo> gasUser(TGasUserInfo tGasUserInfo);
}
......@@ -58,4 +58,11 @@ public interface TPractitionerInfoMapper
* @return 结果
*/
public int deleteTPractitionerInfoByIds(Long[] practitionerIds);
/**
* 查询登录信息
* @param tPractitionerInfo
* @return
*/
List<TPractitionerInfo> loginTPractitioner(TPractitionerInfo tPractitionerInfo);
}
......@@ -58,4 +58,11 @@ public interface TVehicleInfoMapper
* @return 结果
*/
public int deleteTVehicleInfoByIds(Long[] vehicleIds);
/**
* 微信小程序 车辆详细信息查询接口
* @param tVehicleInfo
* @return
*/
TVehicleInfo getTVehicleInfo(TVehicleInfo tVehicleInfo);
}
......@@ -75,4 +75,10 @@ public interface ITGasBottleInfoService
* @return
*/
List<BottleStatistics> bottleStatistics(Long stationId);
/**
* 查询气瓶详细信息
* @param bottleId
*/
TGasBottleInfo getInf(String bottleId);
}
......@@ -66,4 +66,10 @@ public interface ITGasUserInfoService
* @return
*/
String importTGasUserInfo(List<TGasUserInfo> tGasUserInfoList, boolean isUpdateSupport);
/**
* 查询燃气用户信息
* @param tGasUserInfo
*/
List<TGasUserInfo> gasUser(TGasUserInfo tGasUserInfo);
}
......@@ -68,4 +68,11 @@ public interface ITPractitionerInfoService
* @return
*/
String importTPractitionerInfo(List<TPractitionerInfo> tPractitionerInfoList, Boolean isUpdateSupport);
/**
* 查询登录信息
* @param tPractitionerInfo
* @return
*/
List<TPractitionerInfo> loginTPractitioner(TPractitionerInfo tPractitionerInfo);
}
......@@ -58,4 +58,11 @@ public interface ITVehicleInfoService
* @return 结果
*/
public int deleteTVehicleInfoById(Long vehicleId);
/**
* 微信小程序 车辆详细信息查询接口
* @param tVehicleInfo
* @return
*/
TVehicleInfo getTVehicleInfo(TVehicleInfo tVehicleInfo);
}
......@@ -185,4 +185,14 @@ public class TGasBottleInfoServiceImpl implements ITGasBottleInfoService
public List<BottleStatistics> bottleStatistics(Long 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
}
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
}
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
{
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"
<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="bottleCode != null">and bottle.bottle_code like concat('%', #{bottleCode}, '%')</if>
<if test="stationName != null">and station.station_name like concat('%', #{stationName}, '%')</if>
</where>
</select>
......
......@@ -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="emptyType != null and emptyType != ''"> and empty_type = #{emptyType}</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>
</select>
......@@ -240,4 +241,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)final
group by final.station_id
</select>
<!--查询气瓶详细信息-->
<select id="getInf" resultMap="TGasBottleInfoResult" parameterType="java.lang.String">
<include refid="selectTGasBottleInfoVo"/>
where bottle_code = #{bottleId}
</select>
</mapper>
......@@ -110,4 +110,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{gasUserId}
</foreach>
</delete>
<!--查询燃气用户信息-->
<select id="gasUser" parameterType="TGasUserInfo" resultMap="TGasUserInfoResult">
<include refid="selectTGasUserInfoVo"/>
where gas_user_name like concat('%', #{gasUserName}, '%')
</select>
</mapper>
......@@ -78,6 +78,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where info.practitioner_id = #{practitionerId}
</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 into t_practitioner_info
<trim prefix="(" suffix=")" suffixOverrides=",">
......
......@@ -20,10 +20,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="remarks" column="remarks" />
<result property="beyondEnterpriseName" column="enterprise_name" />
<result property="siteStationName" column="site_station_name" />
<result property="carNumber" column="car_number" />
</resultMap>
<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>
<select id="selectTVehicleInfoList" parameterType="TVehicleInfo" resultMap="TVehicleInfoResult">
......@@ -57,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertTVehicleInfo" parameterType="TVehicleInfo" useGeneratedKeys="true" keyProperty="vehicleId">
insert into t_vehicle_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="carNumber != null">car_number,</if>
<if test="carNum != null">car_num,</if>
<if test="brandModel != null">brand_model,</if>
<if test="vehicleType != null">vehicle_type,</if>
......@@ -71,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="carNumber != null">#{carNumber},</if>
<if test="carNum != null">#{carNum},</if>
<if test="brandModel != null">#{brandModel},</if>
<if test="vehicleType != null">#{vehicleType},</if>
......@@ -89,6 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateTVehicleInfo" parameterType="TVehicleInfo">
update t_vehicle_info
<trim prefix="SET" suffixOverrides=",">
<if test="carNumber != null">car_number = #{carNumber},</if>
<if test="carNum != null">car_num = #{carNum},</if>
<if test="brandModel != null">brand_model = #{brandModel},</if>
<if test="vehicleType != null">vehicle_type = #{vehicleType},</if>
......@@ -115,4 +119,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{vehicleId}
</foreach>
</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>
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