异常bug修改

master
赵嘉伟 4 years ago
parent 9b51db95ec
commit 07f781744a

@ -217,7 +217,11 @@ public class AbnormalBillController {
@RequestParam List<String> ncGroupAndNcCodes,
@RequestParam List<String> dutyCauseType,
@RequestParam List<String> dutyType){
return R.ok(abnormalBillService.anomalyReport(abnormalBill, abnormalBillDispose,ncGroupAndNcCodes,dutyCauseType,dutyType));
try{
return R.ok(abnormalBillService.anomalyReport(abnormalBill, abnormalBillDispose,ncGroupAndNcCodes,dutyCauseType,dutyType));
}catch(Exception e){
return R.failed("质量异常提报失败,"+e.getMessage());
}
}
/**
@ -227,7 +231,12 @@ public class AbnormalBillController {
*/
@GetMapping("/anomalyReportDevice")
public R anomalyReportDevice(AbnormalBill abnormalBill, AbnormalBillDispose abnormalBillDispose){
return R.ok(abnormalBillService.anomalyReportDevice(abnormalBill,abnormalBillDispose));
try{
return R.ok(abnormalBillService.anomalyReportDevice(abnormalBill,abnormalBillDispose));
}catch (Exception e){
return R.failed("设备异常提报失败,"+e.getMessage());
}
}
@ -239,12 +248,21 @@ public class AbnormalBillController {
*/
@GetMapping("/cancelBrowse")
public R cancelBrowse(String handle, String cancelBrowse,String code,String cancelSendUserGroup){
return R.ok( abnormalBillService.cancelBrowse(handle,cancelBrowse,code,cancelSendUserGroup));
try{
return R.ok( abnormalBillService.cancelBrowse(handle,cancelBrowse,code,cancelSendUserGroup));
}catch(Exception e){
return R.failed("取消失败,"+e.getMessage());
}
}
@GetMapping("/backLog")
public R backLog(AbnormalBillDto abnormalBillDto){
return R.ok(abnormalBillService.backLog(abnormalBillDto));
try{
return R.ok(abnormalBillService.backLog(abnormalBillDto));
}catch(Exception e){
return R.failed("检索失败,"+e.getMessage());
}
}
/**
@ -254,7 +272,12 @@ public class AbnormalBillController {
*/
@GetMapping("/findAllByAbnormalNo")
public R findAllByAbnormalNo(AbnormalBill abnormalBill){
return R.ok(abnormalBillService.findAllByAbnormalNo(abnormalBill));
try{
return R.ok(abnormalBillService.findAllByAbnormalNo(abnormalBill));
}catch (Exception e){
return R.failed("检索失败,"+e.getMessage());
}
}
/**
@ -262,7 +285,12 @@ public class AbnormalBillController {
*/
@GetMapping("/findAllByAbnormalNoDevice")
public R findAllByAbnormalNoDevice(AbnormalBill abnormalBill){
return R.ok(abnormalBillService.findAllByAbnormalNoDevice(abnormalBill));
try{
return R.ok(abnormalBillService.findAllByAbnormalNoDevice(abnormalBill));
}catch (Exception e){
return R.failed("设备异常响应检索失败,"+e.getMessage());
}
}
/**
@ -272,8 +300,12 @@ public class AbnormalBillController {
*/
@GetMapping("/resProcessing")
public R resProcessing(AbnormalBill abnormalBill){
abnormalBillService.resProcessing(abnormalBill);
return R.ok();
try{
abnormalBillService.resProcessing(abnormalBill);
return R.ok();
}catch(Exception e){
return R.failed("响应处理失败,"+e.getMessage());
}
}
/**
@ -284,8 +316,12 @@ public class AbnormalBillController {
*/
@GetMapping("/programConfirm")
public R programConfirm(AbnormalBill abnormalBill,AbnormalBillDispose abnormalBillDispose){
abnormalBillService.programConfirm(abnormalBill,abnormalBillDispose);
return R.ok();
try{
abnormalBillService.programConfirm(abnormalBill,abnormalBillDispose);
return R.ok();
}catch (Exception e){
return R.failed("方案确认失败,"+e.getMessage());
}
}
/**
@ -298,8 +334,12 @@ public class AbnormalBillController {
public R dutyConfirm(AbnormalBill abnormalBill,AbnormalBillDispose abnormalBillDispose,
@RequestParam List<String> dutyCauseType,
@RequestParam List<String> dutyType){
abnormalBillService.dutyConfirm(abnormalBill,abnormalBillDispose,dutyCauseType,dutyType);
return R.ok();
try{
abnormalBillService.dutyConfirm(abnormalBill,abnormalBillDispose,dutyCauseType,dutyType);
return R.ok();
}catch(Exception e){
return R.failed("判责提交失败,"+e.getMessage());
}
}
/**
@ -310,25 +350,42 @@ public class AbnormalBillController {
*/
@GetMapping("/anomalyShutDown")
public R anomalyShutDown(AbnormalBill abnormalBill,AbnormalBillDispose abnormalBillDispose){
abnormalBillService.anomalyShutDown(abnormalBill,abnormalBillDispose);
return R.ok();
try{
abnormalBillService.anomalyShutDown(abnormalBill,abnormalBillDispose);
return R.ok();
}catch (Exception e){
return R.failed("闭环关闭失败,"+e.getMessage());
}
}
@GetMapping("/findResrceBySfc")
public R findResrceBySfc(SfcDispatchDto sfcDispatch){
return R.ok(sfcDispatchCommonService.findResrceBySfc(sfcDispatch));
try{
return R.ok(sfcDispatchCommonService.findResrceBySfc(sfcDispatch));
}catch (Exception e){
return R.failed("根据sfc查找设备失败,"+e.getMessage());
}
}
@GetMapping("/show")
public R showFile(HttpServletRequest request, HttpServletResponse response) throws Exception {
return R.ok(fileUploadedService.showFile(request,response));
try{
return R.ok(fileUploadedService.showFile(request,response));
}catch (Exception e){
return R.failed("显示图片失败,"+e.getMessage());
}
}
@PostMapping("/delete")
public R delete(String ftpPath,String fileName){
fileUploadedService.deleteFile(ftpPath,fileName);
// abnormalBillService.deleteFileInDatabase(ftpPath,fileName);
return R.ok();
try{
fileUploadedService.deleteFile(ftpPath,fileName);
return R.ok();
}catch (Exception e){
return R.failed("图片删除失败,"+e.getMessage());
}
}
@GetMapping("/findUploadPictureByAbnormalBo")

@ -1,18 +1,17 @@
package com.foreverwin.mesnac.meapi.controller;
import com.foreverwin.modular.core.util.CommonMethods;
import com.foreverwin.modular.core.util.R;
import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.web.bind.annotation.RequestMapping;
import com.foreverwin.mesnac.meapi.model.UserGroup;
import com.foreverwin.mesnac.meapi.service.UserGroupService;
import com.foreverwin.modular.core.util.CommonMethods;
import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.foreverwin.mesnac.meapi.service.UserGroupService;
import com.foreverwin.mesnac.meapi.model.UserGroup;
import java.util.List;
import java.util.Map;
/**
*
@ -122,4 +121,27 @@ public class UserGroupController {
public R removeByIds(List<String> ids){
return R.ok(userGroupService.removeByIds(ids));
}
}
@ResponseBody
@PostMapping("/findAbnormalUserGroup")
public R findAbnormalUserGroup(@RequestBody Map<String,Object> param){
try{
return R.ok(userGroupService.findAbnormalUserGroup(param));
}catch (Exception e){
return R.failed("找寻用户组失败"+e.getMessage());
}
}
}

@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* <p>
@ -33,4 +34,6 @@ public interface UserGroupMapper extends BaseMapper<UserGroup> {
List<UserGroup> findUserGroupListByUser(@Param("site")String site,@Param("user")String user);
List<UserGroup> findAbnormalUserGroup(@Param("site")String site, @Param("param")Map<String,Object> map);
}

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.modular.core.util.FrontPage;
import java.util.List;
import java.util.Map;
/**
* <p>
@ -29,4 +30,6 @@ public interface UserGroupService extends IService<UserGroup> {
List<UserGroup> getUserGroupListByUserBo(String userBo);
Integer getUserGroupByUser(String userBO,String userGroupBO);
List<UserGroup> findAbnormalUserGroup(Map<String,Object> param);
}

@ -1,17 +1,19 @@
package com.foreverwin.mesnac.meapi.service.impl;
import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.UserGroup;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.foreverwin.mesnac.meapi.mapper.UserGroupMapper;
import com.foreverwin.mesnac.meapi.model.UserGroup;
import com.foreverwin.mesnac.meapi.service.UserGroupService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.foreverwin.modular.core.util.CommonMethods;
import com.foreverwin.modular.core.util.FrontPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
* <p>
@ -52,4 +54,10 @@ public class UserGroupServiceImpl extends ServiceImpl<UserGroupMapper, UserGroup
return userGroupMapper.getUserGroupByUser(userBO,userGroupBO);
}
@Override
public List<UserGroup> findAbnormalUserGroup(Map<String, Object> param) {
String site = CommonMethods.getSite();
return userGroupMapper.findAbnormalUserGroup(site,param);
}
}

@ -390,5 +390,15 @@
WHERE U.USER_ID = #{user} AND U.SITE = #{site}
</select>
<select id="findAbnormalUserGroup" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM USER_GROUP ug
INNER JOIN CUSTOM_FIELDS cf ON cf.HANDLE = ug.HANDLE AND cf."ATTRIBUTE" = 'TYPE'
<where>
<if test="param.type != null and param.type != ''">
cf.VALUE LIKE '%${param.type}%'
</if>
</where>
</select>
</mapper>

Loading…
Cancel
Save