代码优化

This commit is contained in:
Administrator 2023-04-18 18:01:44 +08:00
parent 4250163a12
commit 2eca209d10
17 changed files with 25 additions and 21 deletions

View File

@ -48,7 +48,7 @@ import com.alibaba.fastjson.JSON;
@RestController
@RequestMapping("/xmgl/gt/gtMaterialContractArrivalAcceptance")
@Slf4j
@Api(tags = "GtMaterialContractArrivalAcceptanceController相关Api")
@Api(tags = "GtMaterial合同-到货验收")
public class GtMaterialContractArrivalAcceptanceController {
@Autowired
private IGtMaterialContractArrivalAcceptanceService gtMaterialContractArrivalAcceptanceService;

View File

@ -48,7 +48,7 @@ import com.alibaba.fastjson.JSON;
@RestController
@RequestMapping("/xmgl/gt/gtMaterialContract")
@Slf4j
@Api(tags = "GtMaterialContractController相关Api")
@Api(tags = "GtMaterial合同")
public class GtMaterialContractController {
@Autowired
private IGtMaterialContractService gtMaterialContractService;

View File

@ -48,7 +48,7 @@ import com.alibaba.fastjson.JSONObject;
@RestController
@RequestMapping("/xmgl/gt/gtMaterialContractPaymentRecord")
@Slf4j
@Api(tags = "GtMaterialContractPaymentRecordController相关Api")
@Api(tags = "GtMaterial合同-付款记录")
public class GtMaterialContractPaymentRecordController {
@Autowired
private IGtMaterialContractPaymentRecordService gtMaterialContractPaymentRecordService;

View File

@ -48,7 +48,7 @@ import com.alibaba.fastjson.JSONObject;
@RestController
@RequestMapping("/xmgl/gt/gtMaterialDevice")
@Slf4j
@Api(tags = "GtMaterialDeviceController相关Api")
@Api(tags = "GtMaterial设备")
public class GtMaterialDeviceController {
@Autowired
private IGtMaterialDeviceService gtMaterialDeviceService;

View File

@ -48,7 +48,7 @@ import com.alibaba.fastjson.JSONObject;
@RestController
@RequestMapping("/xmgl/gt/gtMaterialDeviceMaintenanceRecord")
@Slf4j
@Api(tags = "GtMaterialDeviceMaintenanceRecordController相关Api")
@Api(tags = "GtMaterial设备维保记录")
public class GtMaterialDeviceMaintenanceRecordController {
@Autowired
private IGtMaterialDeviceMaintenanceRecordService gtMaterialDeviceMaintenanceRecordService;

View File

@ -48,7 +48,7 @@ import com.alibaba.fastjson.JSONObject;
@RestController
@RequestMapping("/xmgl/gt/gtMaterialDeviceMandatoryInspectionRecord")
@Slf4j
@Api(tags = "GtMaterialDeviceMandatoryInspectionRecordController相关Api")
@Api(tags = "GtMaterial设备强制检验记录")
public class GtMaterialDeviceMandatoryInspectionRecordController {
@Autowired
private IGtMaterialDeviceMandatoryInspectionRecordService gtMaterialDeviceMandatoryInspectionRecordService;

View File

@ -48,7 +48,7 @@ import com.alibaba.fastjson.JSONObject;
@RestController
@RequestMapping("/xmgl/gt/gtMaterialInOutWarehouse")
@Slf4j
@Api(tags = "GtMaterialInOutWarehouseController相关Api")
@Api(tags = "GtMaterial出入库")
public class GtMaterialInOutWarehouseController {
@Autowired
private IGtMaterialInOutWarehouseService gtMaterialInOutWarehouseService;

View File

@ -48,7 +48,7 @@ import com.alibaba.fastjson.JSON;
@RestController
@RequestMapping("/xmgl/gt/gtMaterialPointCheckIntoWarehouseDetail")
@Slf4j
@Api(tags = "GtMaterialPointCheckIntoWarehouseDetailController相关Api")
@Api(tags = "GtMaterial出入库的物料详情")
public class GtMaterialPointCheckIntoWarehouseDetailController {
@Autowired
private IGtMaterialPointCheckIntoWarehouseDetailService gtMaterialPointCheckIntoWarehouseDetailService;

View File

@ -48,7 +48,7 @@ import com.alibaba.fastjson.JSONObject;
@RestController
@RequestMapping("/xmgl/gt/gtMaterialPurchaseDemandPlanning")
@Slf4j
@Api(tags = "GtMaterialPurchaseDemandPlanningController相关Api")
@Api(tags = "GtMaterial采购需求计划")
public class GtMaterialPurchaseDemandPlanningController {
@Autowired
private IGtMaterialPurchaseDemandPlanningService gtMaterialPurchaseDemandPlanningService;

View File

@ -48,7 +48,7 @@ import com.alibaba.fastjson.JSONObject;
@RestController
@RequestMapping("/xmgl/gt/gtMaterialSupplierEvaluationRecord")
@Slf4j
@Api(tags = "GtMaterialSupplierEvaluationRecordController相关Api")
@Api(tags = "GtMaterial供应商评价记录")
public class GtMaterialSupplierEvaluationRecordController {
@Autowired
private IGtMaterialSupplierEvaluationRecordService gtMaterialSupplierEvaluationRecordService;

View File

@ -48,7 +48,7 @@ import com.alibaba.fastjson.JSONObject;
@RestController
@RequestMapping("/xmgl/gt/gtMaterialTenderBid")
@Slf4j
@Api(tags = "GtMaterialTenderBidController相关Api")
@Api(tags = "GtMaterial招标-投标清单")
public class GtMaterialTenderBidController {
@Autowired
private IGtMaterialTenderBidService gtMaterialTenderBidService;

View File

@ -48,7 +48,7 @@ import com.alibaba.fastjson.JSONObject;
@RestController
@RequestMapping("/xmgl/gt/gtMaterialTender")
@Slf4j
@Api(tags = "GtMaterialTenderController相关Api")
@Api(tags = "GtMaterial招标")
public class GtMaterialTenderController {
@Autowired
private IGtMaterialTenderService gtMaterialTenderService;

View File

@ -48,7 +48,7 @@ import com.alibaba.fastjson.JSONObject;
@RestController
@RequestMapping("/xmgl/gt/gtMaterialTenderRecord")
@Slf4j
@Api(tags = "GtMaterialTenderRecordController相关Api")
@Api(tags = "GtMaterial招标-投标记录")
public class GtMaterialTenderRecordController {
@Autowired
private IGtMaterialTenderRecordService gtMaterialTenderRecordService;

View File

@ -48,7 +48,7 @@ import com.alibaba.fastjson.JSONObject;
@RestController
@RequestMapping("/xmgl/gt/gtMaterialVendor")
@Slf4j
@Api(tags = "GtMaterialVendorController相关Api")
@Api(tags = "GtMaterial供应商")
public class GtMaterialVendorController {
@Autowired
private IGtMaterialVendorService gtMaterialVendorService;

View File

@ -2,6 +2,7 @@ package com.zhgd.xmgl.modules.worker.controller;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.xmgl.modules.worker.service.IWorkerAttendanceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -131,10 +132,8 @@ public class UfaceCallbackController {
@ApiOperation(value = " 保存考勤数据", notes = "保存考勤数据", httpMethod="POST")
@PostMapping(value = "/saveAttendance")
public String saveAttendance(@RequestBody Map<String,Object> map) {
workerAttendanceService.saveAttendance(map);
String result = "{\"result\":1,\"success\":true}";
return result;
public Result saveAttendance(@RequestBody Map<String,Object> map) {
return workerAttendanceService.saveAttendance(map);
}
@ApiOperation(value = " 海康考勤回调", notes = "海康考勤回调", httpMethod="POST")

View File

@ -2,6 +2,7 @@ package com.zhgd.xmgl.modules.worker.service;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.modules.worker.entity.WorkerAttendance;
import com.baomidou.mybatisplus.extension.service.IService;
@ -57,7 +58,7 @@ public interface IWorkerAttendanceService extends IService<WorkerAttendance> {
List<EntityMap> selectWorkNewAttendanceList(Map<String, Object> map);
void saveAttendance(Map<String, Object> map);
Result saveAttendance(Map<String, Object> map);
Map<String, Object> saveExternalPassRecord(Map<String, Object> map);

View File

@ -1,5 +1,6 @@
package com.zhgd.xmgl.modules.worker.service.impl;
import cn.hutool.core.exceptions.ExceptionUtil;
import cn.hutool.core.io.FileUtil;
import cn.xuyanwu.spring.file.storage.FileInfo;
import com.alibaba.fastjson.JSONObject;
@ -11,6 +12,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.async.AsyncSendAttendance;
import com.zhgd.xmgl.modules.basicdata.service.ICompanyService;
@ -718,7 +720,7 @@ public class WorkerAttendanceServiceImpl extends ServiceImpl<WorkerAttendanceMap
}
@Override
public void saveAttendance(Map<String, Object> map) {
public Result saveAttendance(Map<String, Object> map) {
try {
String idCard = MapUtils.getString(map, "idCard");
Integer type = MapUtils.getInteger(map, "passType");
@ -758,8 +760,10 @@ public class WorkerAttendanceServiceImpl extends ServiceImpl<WorkerAttendanceMap
}
}
} catch (Exception e) {
e.printStackTrace();
log.error("err:", e);
return Result.error(ExceptionUtil.stacktraceToString(e));
}
return Result.ok();
}
@Override