| | |
| | | import com.fgkj.services.User_logService; |
| | | import com.google.gson.Gson; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | @RequestMapping("userInf") |
| | | @RestController |
| | | @Api |
| | | @Api(tags = "userInf接口") |
| | | public class User_infController{ |
| | | @Resource |
| | | private User_infService service; |
| | |
| | | |
| | | //添加用户 |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "",value="添加用户") |
| | | public ServiceModel add(@RequestBody User_inf uif) { |
| | | System.out.println("uif = " + uif); |
| | | uif.setUpassword(ActionUtil.EncryptionMD5(uif.getUpassword()).toString()); |
| | |
| | | } |
| | | //修改用户信息 |
| | | @PutMapping("/") |
| | | @ApiOperation(notes = "",value="修改用户信息") |
| | | public ServiceModel update(@RequestBody User_inf uif) { |
| | | ServiceModel model = new ServiceModel(); |
| | | model = service.update(uif); |
| | |
| | | } |
| | | //删除用户信息 |
| | | @DeleteMapping("/") |
| | | @ApiOperation(notes = "",value="删除用户信息") |
| | | public ServiceModel delete(@RequestBody User_inf uif) { |
| | | ServiceModel model = new ServiceModel(); |
| | | if(uif!=null){ |
| | |
| | | |
| | | return model; |
| | | } |
| | | @GetMapping("byCondition") |
| | | @PostMapping("byCondition") |
| | | @ApiOperation(notes = "",value="byCondition") |
| | | public ServiceModel serchByCondition(@RequestBody User_inf uif) { |
| | | return service.serchByCondition(uif); |
| | | } |
| | | |
| | | @GetMapping("all") |
| | | @PostMapping("all") |
| | | @ApiOperation(notes = "TODO 待测",value="all") |
| | | public ServiceModel searchAll(@RequestBody Batt_User_Permit bup) { |
| | | ServiceModel model = new ServiceModel(); |
| | | System.out.println("bup = " + bup); |
| | |
| | | return model; |
| | | } |
| | | //根据员工信息和员工编号去匹配合适的员工 |
| | | @GetMapping("byNameOrId") |
| | | @PostMapping("byNameOrId") |
| | | @ApiOperation(notes = "",value="员工信息和员工编号去匹配合适的员工") |
| | | public ServiceModel searchByNameOrId(@RequestBody Batt_User_Permit bup) { |
| | | ServiceModel model = service.searchByNameOrId(bup); |
| | | |
| | |
| | | } |
| | | //重置用户密码 |
| | | @PutMapping("resetPassword") |
| | | @ApiOperation(notes = "",value="重置用户密码") |
| | | public ServiceModel resetPassword(@RequestBody User_inf uif){ |
| | | ServiceModel model = new ServiceModel(); |
| | | model=service.resetPassword(uif); |
| | |
| | | } |
| | | |
| | | //根据用户的id查询用户所在的包机组 |
| | | @GetMapping("byInfo") |
| | | @PostMapping("byInfo") |
| | | @ApiOperation(notes = "",value="用户的id查询用户所在的包机组") |
| | | public ServiceModel serchByInfo(@RequestBody User_inf uif){ |
| | | ServiceModel model=service.serchByInfo(uif); |
| | | |
| | |
| | | |
| | | //添加新的用户模板 |
| | | @PostMapping("newUser") |
| | | @ApiOperation(notes = "",value="添加新的用户模板") |
| | | public ServiceModel createNewUser(){ |
| | | User_inf uinf=utilityFactoryService.CreateUinf(); |
| | | System.out.println("uinf = " + uinf); |
| | |
| | | |
| | | //更新多个用户 |
| | | @PutMapping("user") |
| | | @ApiOperation(notes = "",value="更新多个用户") |
| | | public ServiceModel updateUser(@RequestBody List<User_inf> addlist){ |
| | | Gson gson=ActionUtil.getGson("yyyy-MM-dd"); |
| | | String msg=""; |
| | |
| | | |
| | | //修改多个用户 |
| | | @PostMapping("user") |
| | | @ApiOperation(notes = "",value="修改多个用户") |
| | | public ServiceModel addUser(@RequestBody List<Battalarm_data> list){ |
| | | ServiceModel model = new ServiceModel(); |
| | | /*if(addjson!=null && addjson.length()>0){ |
| | |
| | | |
| | | //修改密码 |
| | | @PutMapping("password") |
| | | @ApiOperation(notes = "",value="修改密码") |
| | | public ServiceModel updatePassword(@RequestBody User_inf uif){ |
| | | ServiceModel model = new ServiceModel(); |
| | | User_inf uinf=(User_inf)ActionUtil.getUser(); |
| | |
| | | |
| | | //查询当前用户的信息 |
| | | @GetMapping("userFromSession") |
| | | @ApiOperation(notes = "",value="查询当前用户的信息") |
| | | public ServiceModel serchUserfromSession(){ |
| | | ServiceModel model = new ServiceModel(); |
| | | User_inf uif= (User_inf) ActionUtil.getUser(); |
| | |
| | | |
| | | //检查用户的密码 |
| | | @GetMapping("checkUserPass") |
| | | @ApiOperation(notes = "",value="检查用户的密码") |
| | | public ServiceModel checkUserPass(@RequestParam String addjson){ |
| | | User_inf user = (User_inf)ActionUtil.getUser(); |
| | | ServiceModel model = new ServiceModel(); |
| | |
| | | |
| | | //查询当前用户的用户名 |
| | | @GetMapping("uName") |
| | | @ApiOperation(notes = "",value="查询当前用户的用户名") |
| | | public ServiceModelImpl searchUname(){ |
| | | User_inf user = (User_inf)ActionUtil.getUser(); |
| | | ServiceModelImpl model = new ServiceModelImpl(); |
| | |
| | | } |
| | | |
| | | //界面请求监测服务是否断开 |
| | | @GetMapping("checkService") |
| | | @PostMapping("checkService") |
| | | @ApiOperation(notes = "",value="界面请求监测服务是否断开") |
| | | public ServiceModel checkService(@RequestBody ServiceModel model){ |
| | | return model; |
| | | } |
| | | |
| | | //包机组重做(穿梭框)查询所有的用户 |
| | | @GetMapping("csAll") |
| | | @ApiOperation(notes = "",value="包机组重做(穿梭框)查询所有的用户") |
| | | public ServiceModel searchCS_All() { |
| | | ServiceModel model=service.searchCS_All(); |
| | | |