Merge branch 'dev' of http://git.znkjfw.com/ak/zn-cloud into frx
This commit is contained in:
commit
7806582045
@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.common.enums.SocialTypeEnum;
|
||||
import cn.iocoder.yudao.framework.common.template.dto.ApprovalResultNotificationMessageDTO;
|
||||
import cn.iocoder.yudao.framework.common.template.dto.PerformanceResultConfirmationReminderDTO;
|
||||
import cn.iocoder.yudao.framework.common.template.dto.ProcessToDoReminderDTO;
|
||||
import cn.iocoder.yudao.framework.common.template.dto.StaffCertificateInformationDTO;
|
||||
import cn.iocoder.yudao.framework.common.template.vo.MsgData;
|
||||
import cn.iocoder.yudao.framework.common.template.vo.SubscribeMessageReqDTO;
|
||||
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
||||
@ -149,4 +150,46 @@ public class WxMpMsgTemplateUtils {
|
||||
return message;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 叉车年检过期提醒
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
public SubscribeMessageReqDTO forkliftAnnualInspectionExpiredReminder(StaffCertificateInformationDTO dto) {
|
||||
SubscribeMessageReqDTO message = new SubscribeMessageReqDTO();
|
||||
message.setToUser(dto.getOpenId());
|
||||
message.setTemplateId(PERFORMANCE_RESULT_CONFIRMATION_REMINDER);
|
||||
//证件类型
|
||||
MsgData certificateName = new MsgData();
|
||||
certificateName.setName("thing1");
|
||||
certificateName.setValue(dto.getCertificateName());
|
||||
message.addData(certificateName);
|
||||
|
||||
//到期时间
|
||||
MsgData time = new MsgData();
|
||||
time.setName("time2");
|
||||
time.setValue(dto.getTime());
|
||||
message.addData(time);
|
||||
|
||||
//姓名
|
||||
MsgData name = new MsgData();
|
||||
name.setName("thing4");
|
||||
name.setValue(dto.getTime());
|
||||
message.addData(name);
|
||||
|
||||
//备注
|
||||
MsgData remarks = new MsgData();
|
||||
remarks.setName("thing3");
|
||||
remarks.setValue(dto.getTime());
|
||||
message.addData(remarks);
|
||||
|
||||
message.setJumpWxMaFlag(false);
|
||||
// message.setMiniProgramState(dto.getMiniProgramState());
|
||||
// message.setPage(dto.getPage());
|
||||
message.setSocialType(SocialTypeEnum.WECHAT_MINI_APP.getType());
|
||||
return message;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
package cn.iocoder.yudao.framework.common.template.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class StaffCertificateInformationDTO {
|
||||
@Schema(description = "接收者(用户)的 openid")
|
||||
private String openId;
|
||||
@Schema(description = "工人名称")
|
||||
private String userName;
|
||||
@Schema(description = "证书名称")
|
||||
private String certificateName;
|
||||
@Schema(description = "到期时间")
|
||||
private String time;
|
||||
@Schema(description = "备注")
|
||||
private String remarks;
|
||||
@Schema(description = "跳转小程序类型")
|
||||
private String miniProgramState = "formal";
|
||||
@Schema(description = "小程序页面地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "pages/home/index")
|
||||
private String page;
|
||||
}
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.crm.controller.admin.crmanalysis;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.ContractVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.TimeQueryVO;
|
||||
import cn.iocoder.yudao.module.crm.service.crmanalysis.RankService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@ -28,14 +29,14 @@ public class RankController {
|
||||
|
||||
@GetMapping("/contract")
|
||||
@Operation(summary = "获得合同排名")
|
||||
public CommonResult<List<ContractVO>> getContractRank() {
|
||||
return success(rankService.getContractRank());
|
||||
public CommonResult<List<ContractVO>> getContractRank(TimeQueryVO vo) {
|
||||
return success(rankService.getContractRank(vo));
|
||||
}
|
||||
|
||||
@GetMapping("/receivables")
|
||||
@Operation(summary = "获得回款排名")
|
||||
public CommonResult<List<ContractVO>> getRecevablesRank() {
|
||||
return success(rankService.getReceivablesRank());
|
||||
public CommonResult<List<ContractVO>> getRecevablesRank(TimeQueryVO vo) {
|
||||
return success(rankService.getReceivablesRank(vo));
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,16 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Data
|
||||
public class TimeQueryVO {
|
||||
@Schema(description = "时间数组")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] times;
|
||||
}
|
@ -91,9 +91,4 @@ public class CrmContractController {
|
||||
contractService.check(checkInfoVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -40,14 +40,12 @@ public class SalesPerformanceAssessmentController {
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建绩效考核设置")
|
||||
@PreAuthorize("@ss.hasPermission('crm:sales-performance-assessment:create')")
|
||||
public CommonResult<Long> createSalesPerformanceAssessment(@Valid @RequestBody SalesPerformanceAssessmentSaveReqVO createReqVO) {
|
||||
return success(salesPerformanceAssessmentService.createSalesPerformanceAssessment(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新绩效考核设置")
|
||||
@PreAuthorize("@ss.hasPermission('crm:sales-performance-assessment:update')")
|
||||
public CommonResult<Boolean> updateSalesPerformanceAssessment(@Valid @RequestBody SalesPerformanceAssessmentSaveReqVO updateReqVO) {
|
||||
salesPerformanceAssessmentService.updateSalesPerformanceAssessment(updateReqVO);
|
||||
return success(true);
|
||||
@ -56,7 +54,6 @@ public class SalesPerformanceAssessmentController {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除绩效考核设置")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('crm:sales-performance-assessment:delete')")
|
||||
public CommonResult<Boolean> deleteSalesPerformanceAssessment(@RequestParam("id") Long id) {
|
||||
salesPerformanceAssessmentService.deleteSalesPerformanceAssessment(id);
|
||||
return success(true);
|
||||
@ -65,7 +62,6 @@ public class SalesPerformanceAssessmentController {
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得绩效考核设置")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('crm:sales-performance-assessment:query')")
|
||||
public CommonResult<SalesPerformanceAssessmentRespVO> getSalesPerformanceAssessment(@RequestParam("id") Long id) {
|
||||
SalesPerformanceAssessmentDO salesPerformanceAssessment = salesPerformanceAssessmentService.getSalesPerformanceAssessment(id);
|
||||
return success(BeanUtils.toBean(salesPerformanceAssessment, SalesPerformanceAssessmentRespVO.class));
|
||||
@ -73,7 +69,6 @@ public class SalesPerformanceAssessmentController {
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得绩效考核设置分页")
|
||||
@PreAuthorize("@ss.hasPermission('crm:sales-performance-assessment:query')")
|
||||
public CommonResult<PageResult<SalesPerformanceAssessmentRespVO>> getSalesPerformanceAssessmentPage(@Valid SalesPerformanceAssessmentPageReqVO pageReqVO) {
|
||||
PageResult<SalesPerformanceAssessmentDO> pageResult = salesPerformanceAssessmentService.getSalesPerformanceAssessmentPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, SalesPerformanceAssessmentRespVO.class));
|
||||
|
@ -10,17 +10,14 @@ import cn.iocoder.yudao.module.crm.controller.admin.salesperformancesettlement.v
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.salesperformancesettlement.vo.SalesPerformanceSettlementRespVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.salesperformancesettlement.vo.SalesPerformanceSettlementSaveReqVO;
|
||||
import cn.iocoder.yudao.module.crm.dal.dataobject.salesperformancesettlement.SalesPerformanceSettlementDO;
|
||||
import cn.iocoder.yudao.module.crm.dal.dataobject.userlivetree.UserLiveTreeDO;
|
||||
import cn.iocoder.yudao.module.crm.service.salesperformancesettlement.SalesPerformanceSettlementService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.annotation.security.PermitAll;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
@ -49,7 +46,6 @@ public class SalesPerformanceSettlementController {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除销售业绩结算记录")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('crm:sales-performance-settlement:delete')")
|
||||
public CommonResult<Boolean> deleteSalesPerformanceSettlement(@RequestParam("id") Long id) {
|
||||
salesPerformanceSettlementService.deleteSalesPerformanceSettlement(id);
|
||||
return success(true);
|
||||
@ -58,7 +54,6 @@ public class SalesPerformanceSettlementController {
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得销售业绩结算记录")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('crm:sales-performance-settlement:query')")
|
||||
public CommonResult<SalesPerformanceSettlementRespVO> getSalesPerformanceSettlement(@RequestParam("id") Long id) {
|
||||
SalesPerformanceSettlementDO salesPerformanceSettlement = salesPerformanceSettlementService.getSalesPerformanceSettlement(id);
|
||||
return success(BeanUtils.toBean(salesPerformanceSettlement, SalesPerformanceSettlementRespVO.class));
|
||||
@ -73,7 +68,6 @@ public class SalesPerformanceSettlementController {
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出销售业绩结算记录 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('crm:sales-performance-settlement:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportSalesPerformanceSettlementExcel(@Valid SalesPerformanceSettlementPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
@ -84,12 +78,4 @@ public class SalesPerformanceSettlementController {
|
||||
BeanUtils.toBean(list, SalesPerformanceSettlementRespVO.class));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/test")
|
||||
@Operation(summary = "测试")
|
||||
@PermitAll
|
||||
public CommonResult<Boolean> test() {
|
||||
salesPerformanceSettlementService.settlement();
|
||||
return success(true);
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,6 @@ public class SalesPerformanceWeightController {
|
||||
|
||||
@PutMapping("/saveOrEdit")
|
||||
@Operation(summary = "新增/修改销售业绩权重设置")
|
||||
@PreAuthorize("@ss.hasPermission('crm:sales-performance-weight:update')")
|
||||
public CommonResult<Boolean> saveOrEdit(@Valid @RequestBody SalesPerformanceWeightSaveReqVO updateReqVO) {
|
||||
salesPerformanceWeightService.saveOrEdit(updateReqVO);
|
||||
return success(true);
|
||||
@ -36,7 +35,6 @@ public class SalesPerformanceWeightController {
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得销售业绩权重设置")
|
||||
@PreAuthorize("@ss.hasPermission('crm:sales-performance-weight:query')")
|
||||
public CommonResult<SalesPerformanceWeightRespVO> getSalesPerformanceWeight() {
|
||||
SalesPerformanceWeightDO salesPerformanceWeight = salesPerformanceWeightService.getSalesPerformanceWeight();
|
||||
return success(BeanUtils.toBean(salesPerformanceWeight, SalesPerformanceWeightRespVO.class));
|
||||
|
@ -44,7 +44,6 @@ public class UserLiveTreeController {
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建crm用户结构树")
|
||||
@PreAuthorize("@ss.hasPermission('crm:user-live-tree:create')")
|
||||
public CommonResult<Long> createUserLiveTree(@Valid @RequestBody UserLiveTreeSaveReqVO createReqVO) {
|
||||
return success(userLiveTreeService.createUserLiveTree(createReqVO));
|
||||
}
|
||||
@ -58,7 +57,6 @@ public class UserLiveTreeController {
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新crm用户结构树")
|
||||
@PreAuthorize("@ss.hasPermission('crm:user-live-tree:update')")
|
||||
public CommonResult<Boolean> updateUserLiveTree(@Valid @RequestBody UserLiveTreeSaveReqVO updateReqVO) {
|
||||
userLiveTreeService.updateUserLiveTree(updateReqVO);
|
||||
return success(true);
|
||||
@ -67,7 +65,6 @@ public class UserLiveTreeController {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除crm用户结构树")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('crm:user-live-tree:delete')")
|
||||
public CommonResult<Boolean> deleteUserLiveTree(@RequestParam("id") Long id) {
|
||||
userLiveTreeService.deleteUserLiveTree(id);
|
||||
return success(true);
|
||||
@ -76,7 +73,6 @@ public class UserLiveTreeController {
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得crm用户结构树")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('crm:user-live-tree:query')")
|
||||
public CommonResult<UserLiveTreeRespVO> getUserLiveTree(@RequestParam("id") Long id) {
|
||||
UserLiveTreeDO userLiveTree = userLiveTreeService.getUserLiveTree(id);
|
||||
return success(BeanUtils.toBean(userLiveTree, UserLiveTreeRespVO.class));
|
||||
@ -93,7 +89,6 @@ public class UserLiveTreeController {
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得crm用户结构树分页")
|
||||
@PreAuthorize("@ss.hasPermission('crm:user-live-tree:query')")
|
||||
public CommonResult<PageResult<UserLiveTreeListVO>> getUserLiveTreePage(@Valid UserLiveTreePageReqVO pageReqVO) {
|
||||
|
||||
return success(userLiveTreeService.getUserLiveTreePage(pageReqVO));
|
||||
@ -101,7 +96,6 @@ public class UserLiveTreeController {
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出crm用户结构树 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('crm:user-live-tree:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportUserLiveTreeExcel(@Valid UserLiveTreePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.crm.dal.dataobject.crmcustomer;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
@ -145,4 +146,7 @@ public class CrmCustomerDO extends BaseDO {
|
||||
*/
|
||||
private Integer followStatus;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String ownUserName;
|
||||
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.ContractVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.TimeQueryVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmcontract.vo.CrmContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmcontract.vo.CrmContractRespVO;
|
||||
import cn.iocoder.yudao.module.crm.dal.dataobject.crmcontract.CrmContractDO;
|
||||
@ -55,7 +56,7 @@ public interface CrmContractMapper extends BaseMapperX<CrmContractDO> {
|
||||
.orderByDesc(CrmContractDO::getId));
|
||||
}
|
||||
|
||||
List<ContractVO> selectContractTop();
|
||||
List<ContractVO> selectContractTop(@Param("vo") TimeQueryVO vo);
|
||||
|
||||
/**
|
||||
* 获取用户合同产品数量
|
||||
|
@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.ContractVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.TimeQueryVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmcontractreceivables.vo.CrmContractReceivablesPageReqVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmcontractreceivables.vo.CrmContractReceivablesRespVO;
|
||||
import cn.iocoder.yudao.module.crm.dal.dataobject.crmcontractreceivables.CrmContractReceivablesDO;
|
||||
@ -45,5 +46,5 @@ public interface CrmContractReceivablesMapper extends BaseMapperX<CrmContractRec
|
||||
.orderByDesc(CrmContractReceivablesDO::getId));
|
||||
}
|
||||
|
||||
List<ContractVO> selectReceivablesTop();
|
||||
List<ContractVO> selectReceivablesTop(@Param("vo") TimeQueryVO vo);
|
||||
}
|
||||
|
@ -22,24 +22,26 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface CrmCustomerMapper extends BaseMapperX<CrmCustomerDO> {
|
||||
|
||||
default PageResult<CrmCustomerDO> selectPage(CrmCustomerPageReqVO reqVO, List<Long> ids) {
|
||||
// default PageResult<CrmCustomerDO> selectPage(CrmCustomerPageReqVO reqVO, List<Long> ids) {
|
||||
//
|
||||
//
|
||||
// return selectPage(reqVO, new LambdaQueryWrapperX<CrmCustomerDO>()
|
||||
// //.eq(CustomerTypesEnum.OPEN.getValue().equals(reqVO.getType()),)
|
||||
// .inIfPresent(CrmCustomerDO::getOwnerUserId, ids)
|
||||
// .likeIfPresent(CrmCustomerDO::getName, reqVO.getName())
|
||||
// .eqIfPresent(CrmCustomerDO::getMobile, reqVO.getMobile())
|
||||
// .eqIfPresent(CrmCustomerDO::getTelephone, reqVO.getTelephone())
|
||||
// .eqIfPresent(CrmCustomerDO::getDealStatus, reqVO.getDealStatus())
|
||||
// .eqIfPresent(CrmCustomerDO::getLevel, reqVO.getLevel())
|
||||
// .eqIfPresent(CrmCustomerDO::getIndustry, reqVO.getIndustry())
|
||||
// .eqIfPresent(CrmCustomerDO::getSource, reqVO.getSource())
|
||||
// .eqIfPresent(CrmCustomerDO::getWeixin, reqVO.getWeixin())
|
||||
// .eqIfPresent(CrmCustomerDO::getQq, reqVO.getQq())
|
||||
// .eqIfPresent(CrmCustomerDO::getFollowStatus, reqVO.getFollowStatus())
|
||||
// .orderByDesc(CrmCustomerDO::getId));
|
||||
// }
|
||||
|
||||
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<CrmCustomerDO>()
|
||||
//.eq(CustomerTypesEnum.OPEN.getValue().equals(reqVO.getType()),)
|
||||
.inIfPresent(CrmCustomerDO::getOwnerUserId, ids)
|
||||
.likeIfPresent(CrmCustomerDO::getName, reqVO.getName())
|
||||
.eqIfPresent(CrmCustomerDO::getMobile, reqVO.getMobile())
|
||||
.eqIfPresent(CrmCustomerDO::getTelephone, reqVO.getTelephone())
|
||||
.eqIfPresent(CrmCustomerDO::getDealStatus, reqVO.getDealStatus())
|
||||
.eqIfPresent(CrmCustomerDO::getLevel, reqVO.getLevel())
|
||||
.eqIfPresent(CrmCustomerDO::getIndustry, reqVO.getIndustry())
|
||||
.eqIfPresent(CrmCustomerDO::getSource, reqVO.getSource())
|
||||
.eqIfPresent(CrmCustomerDO::getWeixin, reqVO.getWeixin())
|
||||
.eqIfPresent(CrmCustomerDO::getQq, reqVO.getQq())
|
||||
.eqIfPresent(CrmCustomerDO::getFollowStatus, reqVO.getFollowStatus())
|
||||
.orderByDesc(CrmCustomerDO::getId));
|
||||
}
|
||||
IPage<CrmCustomerDO> selectPage(@Param("page") IPage page, @Param("dto") CrmCustomerPageReqVO pageReqVO, @Param("ids") List<Long> ids);
|
||||
|
||||
IPage<CrmCustomerRespVO> selectPageList2(@Param("page") IPage page, @Param("dto") CrmCustomerPageReqVO pageReqVO, @Param("ids") List<Long> ids);
|
||||
|
||||
|
@ -13,7 +13,7 @@ import javax.annotation.Resource;
|
||||
@Slf4j
|
||||
public class AutoConfirmJob {
|
||||
|
||||
// TODO: 2024/11/04 - 每个月月初03号 未确认的 自动确认上个月的结算记录
|
||||
// TODO: 2024/11/04 - 每个月月初04号 0点10分 未确认的 自动确认上个月的结算记录
|
||||
@Resource
|
||||
private SalesPerformanceSettlementService salesPerformanceSettlementService;
|
||||
|
||||
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.crm.service.crmanalysis;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.ContractVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.TimeQueryVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -13,8 +14,8 @@ import java.util.List;
|
||||
public interface RankService {
|
||||
|
||||
|
||||
List<ContractVO> getContractRank();
|
||||
List<ContractVO> getContractRank(TimeQueryVO vo);
|
||||
|
||||
List<ContractVO> getReceivablesRank();
|
||||
List<ContractVO> getReceivablesRank(TimeQueryVO vo);
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package cn.iocoder.yudao.module.crm.service.crmanalysis;
|
||||
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.ContractVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.TimeQueryVO;
|
||||
import cn.iocoder.yudao.module.crm.dal.mysql.crmcontract.CrmContractMapper;
|
||||
import cn.iocoder.yudao.module.crm.dal.mysql.crmcontractreceivables.CrmContractReceivablesMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -25,12 +26,12 @@ public class RankServiceImpl implements RankService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<ContractVO> getContractRank() {
|
||||
return contractMapper.selectContractTop();
|
||||
public List<ContractVO> getContractRank(TimeQueryVO vo) {
|
||||
return contractMapper.selectContractTop(vo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ContractVO> getReceivablesRank() {
|
||||
return contractReceivablesMapper.selectReceivablesTop();
|
||||
public List<ContractVO> getReceivablesRank(TimeQueryVO vo) {
|
||||
return contractReceivablesMapper.selectReceivablesTop(vo);
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +126,8 @@ public class CrmCustomerServiceImpl implements CrmCustomerService {
|
||||
&& CollUtil.isNotEmpty(repeatOwnerUserNameList)
|
||||
&& updateReqVO.getRepeatConfirmationFlag() == 0) {
|
||||
List<String> items = repeatOwnerUserNameList.stream().distinct().collect(Collectors.toList());
|
||||
throw exception(new ErrorCode(200012, "该客户已被:" + String.join(",", items) + "添加过,是否继续添加?")); }
|
||||
throw exception(new ErrorCode(200012, "该客户已被:" + String.join(",", items) + "添加过,是否继续添加?"));
|
||||
}
|
||||
|
||||
// 更新
|
||||
CrmCustomerDO updateObj = BeanUtils.toBean(updateReqVO, CrmCustomerDO.class);
|
||||
@ -260,10 +261,10 @@ public class CrmCustomerServiceImpl implements CrmCustomerService {
|
||||
return PageResult.empty();
|
||||
}
|
||||
IPage<CrmCustomerDO> pageResult;
|
||||
IPage mpPage = MyBatisUtils.buildPage(pageReqVO);
|
||||
if (pageReqVO.getDistinctFlag() == 0) {
|
||||
return customerMapper.selectPage(pageReqVO, ids);
|
||||
pageResult = customerMapper.selectPage(mpPage, pageReqVO, ids);
|
||||
} else {
|
||||
IPage mpPage = MyBatisUtils.buildPage(pageReqVO);
|
||||
pageResult = customerMapper.selectPageList(mpPage, pageReqVO, ids);
|
||||
}
|
||||
return new PageResult<>(pageResult.getRecords(), pageResult.getTotal());
|
||||
|
@ -81,9 +81,16 @@ spring:
|
||||
--- #################### 定时任务相关配置 ####################
|
||||
xxl:
|
||||
job:
|
||||
enabled: false # 是否开启调度中心,默认为 true 开启
|
||||
enabled: true # 是否开启调度中心,默认为 true 开启
|
||||
admin:
|
||||
addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
|
||||
executor:
|
||||
appname: ${spring.application.name} # 执行器 AppName
|
||||
ip: # 执行器IP [选填]:默认为空表示自动获取IP,多网卡时可手动设置指定IP,该IP不会绑定Host仅作为通讯实用;地址信息用于 "执行器注册" 和 "调度中心请求并触发任务";
|
||||
port: 6670 # ### 执行器端口号 [选填]:小于等于0则自动获取;默认端口为9999,单机部署多个执行器时,注意要配置不同执行器端口;
|
||||
logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径 # 执行器运行日志文件存储磁盘路径 [选填] :需要对该路径拥有读写权限;为空则使用默认路径;
|
||||
#accessToken: default_token
|
||||
logretentiondays: 30 # 执行器日志文件保存天数 [选填] : 过期日志自动清理, 限制值大于等于3时生效; 否则, 如-1, 关闭自动清理功能;
|
||||
|
||||
--- #################### 服务保障相关配置 ####################
|
||||
|
||||
|
@ -75,6 +75,14 @@
|
||||
t.deleted = 0
|
||||
AND t.result = 2
|
||||
AND t.contract_type = 1
|
||||
<if test="vo.times != null and vo.times.length > 0">
|
||||
<if test="vo.times[0] != null">
|
||||
and t.signing_date >= #{vo.times[0]}
|
||||
</if>
|
||||
<if test="vo.times[1] != null">
|
||||
and t.signing_date <= #{vo.times[1]}
|
||||
</if>
|
||||
</if>
|
||||
GROUP BY
|
||||
t.user_id
|
||||
ORDER BY
|
||||
|
@ -69,6 +69,14 @@
|
||||
WHERE
|
||||
t.deleted = 0
|
||||
AND t.result = 2
|
||||
<if test="vo.times != null and vo.times.length > 0">
|
||||
<if test="vo.times[0] != null">
|
||||
and t.return_time >= #{vo.times[0]}
|
||||
</if>
|
||||
<if test="vo.times[1] != null">
|
||||
and t.return_time <= #{vo.times[1]}
|
||||
</if>
|
||||
</if>
|
||||
GROUP BY
|
||||
t.user_id
|
||||
ORDER BY
|
||||
|
@ -135,4 +135,57 @@
|
||||
and t1.deleted = 0
|
||||
and a.name = #{name}
|
||||
</select>
|
||||
<select id="selectPage" resultType="cn.iocoder.yudao.module.crm.dal.dataobject.crmcustomer.CrmCustomerDO">
|
||||
select
|
||||
a.*,
|
||||
t1.nickname as ownUserName
|
||||
from crm_customer as a
|
||||
left join system_users as t1 on a.owner_user_id = t1.id
|
||||
<where>
|
||||
a.deleted = 0
|
||||
<if test="ids != null and ids.size() > 0">
|
||||
and a.owner_user_id in
|
||||
<foreach item="ownerUserId" collection="ids" separator="," open="(" close=")" index="">
|
||||
#{ownerUserId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.name != null and dto.name != ''">
|
||||
and a.name like concat('%', #{dto.name}, '%')
|
||||
</if>
|
||||
<if test="dto.mobile != null and dto.mobile != ''">
|
||||
and a.mobile = #{dto.mobile}
|
||||
</if>
|
||||
<if test="dto.telephone != null and dto.telephone != ''">
|
||||
and a.telephone = #{dto.telephone}
|
||||
</if>
|
||||
<if test="dto.dealStatus != null">
|
||||
and a.deal_status = #{dto.dealStatus}
|
||||
</if>
|
||||
<if test="dto.level != null">
|
||||
and a.level = #{dto.level}
|
||||
</if>
|
||||
<if test="dto.industry != null">
|
||||
and a.industry = #{dto.industry}
|
||||
</if>
|
||||
<if test="dto.source != null">
|
||||
and a.source = #{dto.source}
|
||||
</if>
|
||||
<if test="dto.weixin != null and dto.weixin != ''">
|
||||
and a.weixin = #{dto.weixin}
|
||||
</if>
|
||||
<if test="dto.qq != null and dto.qq != ''">
|
||||
and a.qq = #{dto.qq}
|
||||
</if>
|
||||
<if test="dto.qq != null and dto.qq != ''">
|
||||
and a.qq = #{dto.qq}
|
||||
</if>
|
||||
<if test="dto.followStatus != null">
|
||||
and a.follow_status = #{dto.followStatus}
|
||||
</if>
|
||||
<if test="dto.ownUserName != null and dto.ownUserName != ''">
|
||||
and t1.nickname like concat('%', #{dto.ownUserName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
order by a.id desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -33,14 +33,14 @@ public class AttendanceMissingCardJob {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
String time = now.format(Constants.REPO_DATE_FORMAT);
|
||||
String yesterdayStr = LocalDateTimeUtil.offset(now, -1, ChronoUnit.DAYS).format(Constants.REPO_DATE_FORMAT);
|
||||
LambdaQueryWrapper<AttendancePunchRecordDO> le = new LambdaQueryWrapper<AttendancePunchRecordDO>()
|
||||
LambdaQueryWrapper<AttendancePunchRecordDO> lambdaQueryWrapper = new LambdaQueryWrapper<AttendancePunchRecordDO>()
|
||||
.in(AttendancePunchRecordDO::getDayTime, Arrays.asList(time, yesterdayStr))
|
||||
.eq(AttendancePunchRecordDO::getNextDayFlag, Constants.TRUE)
|
||||
.eq(AttendancePunchRecordDO::getStatus, AttendanceOnTheDayDTO.PUNCH_STATUS_UN_PUNCH)
|
||||
.le(AttendancePunchRecordDO::getLatestPunchTime, now);
|
||||
AttendancePunchRecordDO attendancePunchRecordDO = new AttendancePunchRecordDO();
|
||||
attendancePunchRecordDO.setStatus(AttendanceOnTheDayDTO.PUNCH_STATUS_MISS).setNextDayFlag(Constants.FALSE);
|
||||
attendancePunchRecordMapper.update(attendancePunchRecordDO, le);
|
||||
attendancePunchRecordMapper.update(attendancePunchRecordDO, lambdaQueryWrapper);
|
||||
log.info("结束 修改考勤缺卡");
|
||||
// 返回执行成功
|
||||
return ReturnT.SUCCESS;
|
||||
|
@ -19,6 +19,7 @@ import cn.iocoder.yudao.module.system.service.attendance.punchrecord.AttendanceP
|
||||
import cn.iocoder.yudao.module.system.service.auth.AdminOauthUserOtherInfoService;
|
||||
import cn.iocoder.yudao.module.system.service.auth.dto.AdminOauthUserOtherInfoDTO;
|
||||
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.xxl.job.core.biz.model.ReturnT;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -30,6 +31,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
@ -59,10 +61,9 @@ public class RemindJob {
|
||||
|
||||
//还有10分钟就要上班了,别忘记打卡哦~
|
||||
//幸苦一天了,研发部全体人员提醒您,记得打卡哦~
|
||||
|
||||
Map<Long, AttendanceWorkDTO> map = new HashMap<>();
|
||||
//打卡时间 - 15分钟之后是否是 大于打卡时间 - 是的话 - 把用户id拿出来 组装好消息发送
|
||||
List<AttendancePunchRecordDO> editList = new ArrayList<>();
|
||||
List<Long> editIdsList = new ArrayList<>();
|
||||
for (AttendancePunchRecordDO attendancePunchRecordDO : attendancePunchRecordDOS) {
|
||||
if (attendancePunchRecordDO.getWorkType().equals(Constants.ZERO) && futureTime.isAfter(attendancePunchRecordDO.getShouldPunchTime())) {
|
||||
AttendanceWorkDTO dto = new AttendanceWorkDTO();
|
||||
@ -70,15 +71,13 @@ public class RemindJob {
|
||||
dto.setData(String.format("还有%s钟就要上班了,别忘记打卡哦~",
|
||||
DateUtil.formatBetween(LocalDateTimeUtil.between(localDateTime, attendancePunchRecordDO.getShouldPunchTime()).toMillis(), BetweenFormatter.Level.MINUTE)));
|
||||
map.put(attendancePunchRecordDO.getUserId(), dto);
|
||||
attendancePunchRecordDO.setRemindFlag(Constants.TRUE);
|
||||
editList.add(attendancePunchRecordDO);
|
||||
editIdsList.add(attendancePunchRecordDO.getId());
|
||||
} else if (attendancePunchRecordDO.getWorkType().equals(Constants.ONE) && localDateTime.isAfter(attendancePunchRecordDO.getShouldPunchTime())) {
|
||||
AttendanceWorkDTO dto = new AttendanceWorkDTO();
|
||||
dto.setWorkTypeStr("下班打卡");
|
||||
dto.setData("工作幸苦了,记得打卡哦~");
|
||||
map.put(attendancePunchRecordDO.getUserId(), dto);
|
||||
attendancePunchRecordDO.setRemindFlag(Constants.TRUE);
|
||||
editList.add(attendancePunchRecordDO);
|
||||
editIdsList.add(attendancePunchRecordDO.getId());
|
||||
}
|
||||
}
|
||||
//获取到所有的用户id
|
||||
@ -107,8 +106,10 @@ public class RemindJob {
|
||||
subscribeMessageSendApi.sendMaMsg(dto);
|
||||
}
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(editList)) {
|
||||
attendancePunchRecordService.batchUpdate(editList);
|
||||
if (CollectionUtil.isNotEmpty(editIdsList)) {
|
||||
attendancePunchRecordService.update(new AttendancePunchRecordDO().setRemindFlag(Constants.TRUE),
|
||||
new LambdaQueryWrapper<AttendancePunchRecordDO>()
|
||||
.in(AttendancePunchRecordDO::getId, editIdsList));
|
||||
}
|
||||
// 返回执行成功
|
||||
return ReturnT.SUCCESS;
|
||||
|
@ -14,6 +14,7 @@ import cn.iocoder.yudao.module.system.dal.dataobject.attendance.groupuser.Attend
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.attendance.punchrecord.AttendancePunchRecordDO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.holiday.holidaysetting.HolidaySettingDO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.holiday.holidaysettingrange.HolidaySettingRangeDO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.holiday.holidayworkingage.HolidayWorkingAgeDO;
|
||||
import cn.iocoder.yudao.module.system.dal.mysql.attendance.groupuser.AttendanceGroupUserMapper;
|
||||
import cn.iocoder.yudao.module.system.dal.mysql.attendance.punchrecord.AttendancePunchRecordMapper;
|
||||
import cn.iocoder.yudao.module.system.service.attendance.punch.dto.AttendanceOnTheDayDTO;
|
||||
@ -21,6 +22,7 @@ import cn.iocoder.yudao.module.system.service.attendance.punchrecord.AttendanceP
|
||||
import cn.iocoder.yudao.module.system.service.holiday.holidaysetting.HolidaySettingService;
|
||||
import cn.iocoder.yudao.module.system.service.holiday.holidaysettingrange.HolidaySettingRangeService;
|
||||
import cn.iocoder.yudao.module.system.service.holiday.holidayuserrecord.HolidayUserRecordService;
|
||||
import cn.iocoder.yudao.module.system.service.holiday.holidayworkingage.HolidayWorkingAgeService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
@ -63,6 +65,8 @@ public class AttendanceGroupUserServiceImpl implements AttendanceGroupUserServic
|
||||
@Resource
|
||||
@Lazy
|
||||
private HolidaySettingService holidaySettingService;
|
||||
@Resource
|
||||
private HolidayWorkingAgeService holidayWorkingAgeService;
|
||||
|
||||
@Override
|
||||
public AttendanceGroupUserCreateOrDelVO createOrDel(Long attendanceGroupId, List<Long> userIds) {
|
||||
@ -97,11 +101,14 @@ public class AttendanceGroupUserServiceImpl implements AttendanceGroupUserServic
|
||||
List<Long> holidaySettingIds = holidaySettingRangeService.getHolidaySettingIdsByGroupId(attendanceGroupId);
|
||||
|
||||
if (CollUtil.isNotEmpty(holidaySettingIds)) {
|
||||
List<HolidayWorkingAgeDO> holidayWorkingAgeDOS = holidayWorkingAgeService.selectBySettingIds(holidaySettingIds);
|
||||
Map<Long, List<HolidayWorkingAgeDO>> holidayWorkingAgeDOMap = holidayWorkingAgeDOS.stream().collect(Collectors.groupingBy(HolidayWorkingAgeDO::getHolidaySettingId, Collectors.toList()));
|
||||
|
||||
List<HolidaySettingDO> holidaySettings = holidaySettingService.getHolidaySettingByIds(holidaySettingIds);
|
||||
Map<Long, HolidaySettingDO> holidaySettingMap = holidaySettings.stream().collect(Collectors.toMap(HolidaySettingDO::getId, holidaySettingDO -> holidaySettingDO));
|
||||
for (HolidaySettingDO holidaySetting : holidaySettings) {
|
||||
holidayUserRecordService.grant(holidaySetting,
|
||||
items, holidaySettingMap.get(holidaySetting.getId()).getHolidayBalanceSettingDO(), ListUtil.empty(), true);
|
||||
items, holidaySettingMap.get(holidaySetting.getId()).getHolidayBalanceSettingDO(), holidayWorkingAgeDOMap.get(holidaySetting.getId()), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,4 +36,8 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode STAFF_SALARY_NOT_EXISTS = new ErrorCode(1_000_004_001, "工资记录不存在!");
|
||||
ErrorCode INDUSTRIAL_INJURY_NOT_EXISTS = new ErrorCode(1_000_004_002, "工伤记录不存在!");
|
||||
ErrorCode STAFF_SALARY_EXISTS = new ErrorCode(1_000_004_003, "工资记录已存在");
|
||||
// ========== 搬运模块 1_000_005_000 ==========
|
||||
ErrorCode CANNOT_FIND_THE_CORRESPONDING_FACTORY_HANDLING_SPECIFICATION = new ErrorCode(1_000_005_001, "找不到对应的工厂搬运规格");
|
||||
|
||||
|
||||
}
|
||||
|
@ -90,4 +90,4 @@ public class SfFactoryInfoController {
|
||||
BeanUtils.toBean(list, SfFactoryInfoRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,86 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupamountspecifications;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupamountspecifications.vo.HandlingGroupAmountSpecificationsPageReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupamountspecifications.vo.HandlingGroupAmountSpecificationsRespVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupamountspecifications.vo.HandlingGroupAmountSpecificationsSaveReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlinggroupamountspecifications.HandlingGroupAmountSpecificationsDO;
|
||||
import cn.iocoder.yudao.module.smartfactory.service.handlinggroupamountspecifications.HandlingGroupAmountSpecificationsService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
|
||||
@Tag(name = "管理后台 - 搬运组工资规格关联")
|
||||
@RestController
|
||||
@RequestMapping("/smartfactory/handling-group-amount-specifications")
|
||||
@Validated
|
||||
public class HandlingGroupAmountSpecificationsController {
|
||||
|
||||
@Resource
|
||||
private HandlingGroupAmountSpecificationsService handlingGroupAmountSpecificationsService;
|
||||
|
||||
@PostMapping("/createOrEdit")
|
||||
@Operation(summary = "创建搬运组工资规格关联")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:handling-group-amount-specifications:create')")
|
||||
public CommonResult<Boolean> createOrEdit(@Valid @RequestBody HandlingGroupAmountSpecificationsSaveReqVO createReqVO) {
|
||||
handlingGroupAmountSpecificationsService.createOrEdit(createReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除搬运组工资规格关联")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:handling-group-amount-specifications:delete')")
|
||||
public CommonResult<Boolean> deleteHandlingGroupAmountSpecifications(@RequestParam("id") Long id) {
|
||||
handlingGroupAmountSpecificationsService.deleteHandlingGroupAmountSpecifications(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得搬运组工资规格关联")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:handling-group-amount-specifications:query')")
|
||||
public CommonResult<HandlingGroupAmountSpecificationsRespVO> getHandlingGroupAmountSpecifications(@RequestParam("id") Long id) {
|
||||
HandlingGroupAmountSpecificationsDO handlingGroupAmountSpecifications = handlingGroupAmountSpecificationsService.getHandlingGroupAmountSpecifications(id);
|
||||
return success(BeanUtils.toBean(handlingGroupAmountSpecifications, HandlingGroupAmountSpecificationsRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得搬运组工资规格关联分页")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:handling-group-amount-specifications:query')")
|
||||
public CommonResult<PageResult<HandlingGroupAmountSpecificationsRespVO>> getHandlingGroupAmountSpecificationsPage(@Valid HandlingGroupAmountSpecificationsPageReqVO pageReqVO) {
|
||||
PageResult<HandlingGroupAmountSpecificationsDO> pageResult = handlingGroupAmountSpecificationsService.getHandlingGroupAmountSpecificationsPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, HandlingGroupAmountSpecificationsRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出搬运组工资规格关联 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:handling-group-amount-specifications:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportHandlingGroupAmountSpecificationsExcel(@Valid HandlingGroupAmountSpecificationsPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<HandlingGroupAmountSpecificationsDO> list = handlingGroupAmountSpecificationsService.getHandlingGroupAmountSpecificationsPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "搬运组工资规格关联.xls", "数据", HandlingGroupAmountSpecificationsRespVO.class,
|
||||
BeanUtils.toBean(list, HandlingGroupAmountSpecificationsRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupamountspecifications.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 搬运组工资规格关联分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class HandlingGroupAmountSpecificationsPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "搬运规格id", example = "23178")
|
||||
private Long handlingSpecificationsId;
|
||||
|
||||
@Schema(description = "数量", example = "15611")
|
||||
private Integer totalCount;
|
||||
|
||||
@Schema(description = "日期 格式 yyyy-MM-dd")
|
||||
private String dateStr;
|
||||
|
||||
@Schema(description = "总金额(根据规格和总量计算出 该搬运组获得的总金额)")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupamountspecifications.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 搬运组工资规格关联 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class HandlingGroupAmountSpecificationsRespVO {
|
||||
|
||||
@Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9721")
|
||||
@ExcelProperty("主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "搬运规格id", example = "23178")
|
||||
@ExcelProperty("搬运规格id")
|
||||
private Long handlingSpecificationsId;
|
||||
|
||||
@Schema(description = "搬运规格名称", example = "23178")
|
||||
@ExcelProperty("搬运规格名称")
|
||||
private String handlingSpecificationsName;
|
||||
|
||||
@Schema(description = "数量", example = "15611")
|
||||
@ExcelProperty("数量")
|
||||
private Integer totalCount;
|
||||
|
||||
@Schema(description = "日期 格式 yyyy-MM-dd")
|
||||
@ExcelProperty("日期 格式 yyyy-MM-dd")
|
||||
private String dateStr;
|
||||
|
||||
@Schema(description = "总金额(根据规格和总量计算出 该搬运组获得的总金额)")
|
||||
@ExcelProperty("总金额(根据规格和总量计算出 该搬运组获得的总金额)")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupamountspecifications.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 搬运组工资规格关联新增/修改 Request VO")
|
||||
@Data
|
||||
public class HandlingGroupAmountSpecificationsSaveReqVO {
|
||||
|
||||
@Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9721")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "搬运规格id", example = "23178")
|
||||
@NotNull(message = "搬运规格不能为空")
|
||||
private Long handlingSpecificationsId;
|
||||
|
||||
@Schema(description = "数量", example = "15611")
|
||||
@NotNull(message = "数量不能为空")
|
||||
private Integer totalCount;
|
||||
|
||||
@Schema(description = "日期 格式 yyyy-MM-dd")
|
||||
@NotNull(message = "日期不能为空")
|
||||
private String dateStr;
|
||||
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount;
|
||||
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.dto.StaffWagesPageDTO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.vo.*;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlinggroupuseramount.HandlingGroupUserAmountDO;
|
||||
import cn.iocoder.yudao.module.smartfactory.service.handlinggroupuseramount.HandlingGroupUserAmountService;
|
||||
|
||||
@Tag(name = "管理后台 - 搬运组每日个人工资记录")
|
||||
@RestController
|
||||
@RequestMapping("/smartfactory/handling-group-user-amount")
|
||||
@Validated
|
||||
public class HandlingGroupUserAmountController {
|
||||
|
||||
@Resource
|
||||
private HandlingGroupUserAmountService handlingGroupUserAmountService;
|
||||
|
||||
@PostMapping("/createOrEdit")
|
||||
@Operation(summary = "创建搬运组每日个人工资记录")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:handling-group-user-amount:create')")
|
||||
public CommonResult<Boolean> createOrEdit(@Valid @RequestBody HandlingGroupUserAmountSaveReqVO createReqVO) {
|
||||
handlingGroupUserAmountService.createOrEdit(createReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新搬运组每日个人工资记录")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:handling-group-user-amount:update')")
|
||||
public CommonResult<Boolean> updateHandlingGroupUserAmount(@Valid @RequestBody HandlingGroupUserAmountSaveReqVO updateReqVO) {
|
||||
handlingGroupUserAmountService.updateHandlingGroupUserAmount(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除搬运组每日个人工资记录")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:handling-group-user-amount:delete')")
|
||||
public CommonResult<Boolean> deleteHandlingGroupUserAmount(@RequestParam("id") Long id) {
|
||||
handlingGroupUserAmountService.deleteHandlingGroupUserAmount(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得搬运组每日个人工资记录")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:handling-group-user-amount:query')")
|
||||
public CommonResult<HandlingGroupUserAmountRespVO> getHandlingGroupUserAmount(@RequestParam("id") Long id) {
|
||||
HandlingGroupUserAmountDO handlingGroupUserAmount = handlingGroupUserAmountService.getHandlingGroupUserAmount(id);
|
||||
return success(BeanUtils.toBean(handlingGroupUserAmount, HandlingGroupUserAmountRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得搬运组每日个人工资记录分页")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:handling-group-user-amount:query')")
|
||||
public CommonResult<PageResult<HandlingGroupUserAmountRespVO>> getHandlingGroupUserAmountPage(@Valid HandlingGroupUserAmountPageReqVO pageReqVO) {
|
||||
PageResult<HandlingGroupUserAmountDO> pageResult = handlingGroupUserAmountService.getHandlingGroupUserAmountPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, HandlingGroupUserAmountRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/staffWagesPage")
|
||||
@Operation(summary = "以用户分组工资分页列表")
|
||||
public CommonResult<PageResult<StaffWagesPageVO>> staffWagesPage(@Valid StaffWagesPageDTO dto) {
|
||||
PageResult<StaffWagesPageVO> pageResult = handlingGroupUserAmountService.staffWagesPage(dto);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出搬运组每日个人工资记录 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:handling-group-user-amount:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportHandlingGroupUserAmountExcel(@Valid HandlingGroupUserAmountPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<HandlingGroupUserAmountDO> list = handlingGroupUserAmountService.getHandlingGroupUserAmountPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "搬运组每日个人工资记录.xls", "数据", HandlingGroupUserAmountRespVO.class,
|
||||
BeanUtils.toBean(list, HandlingGroupUserAmountRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.dto;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Data
|
||||
public class StaffWagesPageDTO extends PageParam {
|
||||
|
||||
@Schema(description = "用户id", example = "12639")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "工厂id", example = "12639")
|
||||
private Long factoryId;
|
||||
|
||||
@Schema(description = "搬运组工资规格关联id", example = "27617")
|
||||
private Long handlingGroupAmountSpecificationsId;
|
||||
|
||||
@Schema(description = "日期 格式 yyyy-MM-dd")
|
||||
private String dateStr;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 搬运组每日个人工资记录分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class HandlingGroupUserAmountPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "用户id", example = "12639")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "搬运组工资规格关联id", example = "27617")
|
||||
private Long handlingGroupAmountSpecificationsId;
|
||||
|
||||
@Schema(description = "日期 格式 yyyy-MM-dd")
|
||||
private String dateStr;
|
||||
|
||||
@Schema(description = "搬运组每日个人工资")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 搬运组每日个人工资记录 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class HandlingGroupUserAmountRespVO {
|
||||
|
||||
@Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "17728")
|
||||
@ExcelProperty("主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "用户id", example = "12639")
|
||||
@ExcelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "用户名称", example = "12639")
|
||||
@ExcelProperty("用户名称")
|
||||
private String userName;
|
||||
|
||||
@Schema(description = "搬运组工资规格关联id", example = "27617")
|
||||
@ExcelProperty("搬运组工资规格关联id")
|
||||
private Long handlingGroupAmountSpecificationsId;
|
||||
|
||||
@Schema(description = "日期 格式 yyyy-MM-dd")
|
||||
@ExcelProperty("日期 格式 yyyy-MM-dd")
|
||||
private String dateStr;
|
||||
|
||||
@Schema(description = "搬运组每日个人工资")
|
||||
@ExcelProperty("搬运组每日个人工资")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 搬运组每日个人工资记录新增/修改 Request VO")
|
||||
@Data
|
||||
public class HandlingGroupUserAmountSaveReqVO {
|
||||
|
||||
@Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "17728")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "用户id", example = "12639")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "搬运组工资规格关联id", example = "27617")
|
||||
private Long handlingGroupAmountSpecificationsId;
|
||||
|
||||
@Schema(description = "日期 格式 yyyy-MM-dd")
|
||||
private String dateStr;
|
||||
|
||||
@Schema(description = "搬运组每日个人工资")
|
||||
private BigDecimal amount;
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class StaffWagesPageVO {
|
||||
@Schema(description = "用户id", example = "12639")
|
||||
@ExcelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "用户名称", example = "12639")
|
||||
@ExcelProperty("用户名称")
|
||||
private String userName;
|
||||
|
||||
@Schema(description = "总工资")
|
||||
@ExcelProperty("总工资")
|
||||
private BigDecimal totalAmount;
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.handlingspecifications;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlingspecifications.vo.*;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlingspecifications.HandlingSpecificationsDO;
|
||||
import cn.iocoder.yudao.module.smartfactory.service.handlingspecifications.HandlingSpecificationsService;
|
||||
|
||||
@Tag(name = "管理后台 - 工厂搬运规格")
|
||||
@RestController
|
||||
@RequestMapping("/smartfactory/handling-specifications")
|
||||
@Validated
|
||||
public class HandlingSpecificationsController {
|
||||
|
||||
@Resource
|
||||
private HandlingSpecificationsService handlingSpecificationsService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建工厂搬运规格")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:handling-specifications:create')")
|
||||
public CommonResult<Long> createHandlingSpecifications(@Valid @RequestBody HandlingSpecificationsSaveReqVO createReqVO) {
|
||||
return success(handlingSpecificationsService.createHandlingSpecifications(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新工厂搬运规格")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:handling-specifications:update')")
|
||||
public CommonResult<Boolean> updateHandlingSpecifications(@Valid @RequestBody HandlingSpecificationsSaveReqVO updateReqVO) {
|
||||
handlingSpecificationsService.updateHandlingSpecifications(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除工厂搬运规格")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:handling-specifications:delete')")
|
||||
public CommonResult<Boolean> deleteHandlingSpecifications(@RequestParam("id") Long id) {
|
||||
handlingSpecificationsService.deleteHandlingSpecifications(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得工厂搬运规格")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:handling-specifications:query')")
|
||||
public CommonResult<HandlingSpecificationsRespVO> getHandlingSpecifications(@RequestParam("id") Long id) {
|
||||
HandlingSpecificationsDO handlingSpecifications = handlingSpecificationsService.getHandlingSpecifications(id);
|
||||
return success(BeanUtils.toBean(handlingSpecifications, HandlingSpecificationsRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得工厂搬运规格分页")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:handling-specifications:query')")
|
||||
public CommonResult<PageResult<HandlingSpecificationsRespVO>> getHandlingSpecificationsPage(@Valid HandlingSpecificationsPageReqVO pageReqVO) {
|
||||
PageResult<HandlingSpecificationsDO> pageResult = handlingSpecificationsService.getHandlingSpecificationsPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, HandlingSpecificationsRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得工厂搬运规格列表")
|
||||
public CommonResult<List<HandlingSpecificationsRespVO>> getHandlingSpecificationsList(@Valid HandlingSpecificationsPageReqVO pageReqVO) {
|
||||
List<HandlingSpecificationsDO> list = handlingSpecificationsService.getHandlingSpecificationsList(pageReqVO);
|
||||
return success(BeanUtils.toBean(list, HandlingSpecificationsRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出工厂搬运规格 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:handling-specifications:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportHandlingSpecificationsExcel(@Valid HandlingSpecificationsPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<HandlingSpecificationsDO> list = handlingSpecificationsService.getHandlingSpecificationsPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "工厂搬运规格.xls", "数据", HandlingSpecificationsRespVO.class,
|
||||
BeanUtils.toBean(list, HandlingSpecificationsRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.handlingspecifications.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 工厂搬运规格分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class HandlingSpecificationsPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "工厂id", example = "9106")
|
||||
private Long factoryId;
|
||||
|
||||
@Schema(description = "规格名称", example = "张三")
|
||||
private String specificationsName;
|
||||
|
||||
@Schema(description = "类型 0数量 1重量 默认数量", example = "1")
|
||||
private Integer type;
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.handlingspecifications.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 工厂搬运规格 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class HandlingSpecificationsRespVO {
|
||||
|
||||
@Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26164")
|
||||
@ExcelProperty("主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工厂id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9106")
|
||||
@ExcelProperty("工厂id")
|
||||
private Long factoryId;
|
||||
|
||||
@Schema(description = "工厂名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "9106")
|
||||
@ExcelProperty("工厂名称")
|
||||
private String factoryName;
|
||||
|
||||
@Schema(description = "规格名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("规格名称")
|
||||
private String specificationsName;
|
||||
|
||||
@Schema(description = "类型 0数量 1重量 默认数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("类型 0数量 1重量 默认数量")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "重量 /(公斤 kg)")
|
||||
@ExcelProperty("重量 /(公斤 kg)")
|
||||
private BigDecimal weight;
|
||||
|
||||
@Schema(description = "数量")
|
||||
@ExcelProperty("数量")
|
||||
private Integer num;
|
||||
|
||||
@Schema(description = "单价/(吨/1000 or 件) ", requiredMode = Schema.RequiredMode.REQUIRED, example = "18521")
|
||||
@ExcelProperty("单价/(吨/1000 or 件) ")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.handlingspecifications.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 工厂搬运规格新增/修改 Request VO")
|
||||
@Data
|
||||
public class HandlingSpecificationsSaveReqVO {
|
||||
|
||||
@Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26164")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工厂id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9106")
|
||||
@NotNull(message = "工厂id不能为空")
|
||||
private Long factoryId;
|
||||
|
||||
@Schema(description = "规格名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "规格名称不能为空")
|
||||
private String specificationsName;
|
||||
|
||||
@Schema(description = "类型 0数量 1重量 默认数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "类型 0数量 1重量 默认数量不能为空")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "重量 /(公斤 kg)")
|
||||
private BigDecimal weight;
|
||||
|
||||
@Schema(description = "数量")
|
||||
private Integer num;
|
||||
|
||||
@Schema(description = "单价/(吨/1000 or 件) ", requiredMode = Schema.RequiredMode.REQUIRED, example = "18521")
|
||||
@NotNull(message = "单价/(吨/1000 or 件) 不能为空")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
}
|
@ -60,6 +60,12 @@ public class StaffController {
|
||||
return success(staffService.createStaff(createReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/getTheFactoryOfTheCurrentlyLoggedInUser")
|
||||
@Operation(summary = "获取当前登录用户所属工厂Id(为null就是不属于任何工厂)")
|
||||
public CommonResult<Long> getTheFactoryOfTheCurrentlyLoggedInUser() {
|
||||
return success(staffService.getTheFactoryOfTheCurrentlyLoggedInUser());
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新员工")
|
||||
@PreAuthorize("@ss.hasPermission('factory:staff:update')")
|
||||
@ -97,6 +103,15 @@ public class StaffController {
|
||||
return success(BeanUtils.toBean(staffs, StaffRespVO.class));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getListByFactoryId")
|
||||
@Operation(summary = "获得指定厂员工")
|
||||
public CommonResult<List<StaffRespVO>> getListByFactoryId(@RequestParam("factoryId") Long factoryId,
|
||||
@RequestParam(value = "nickName", required = false) String nickName) {
|
||||
List<StaffDO> staffs = staffService.getListByFactoryId(factoryId, nickName);
|
||||
return success(BeanUtils.toBean(staffs, StaffRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得员工分页")
|
||||
@PreAuthorize("@ss.hasPermission('factory:staff:query')")
|
||||
@ -122,12 +137,12 @@ public class StaffController {
|
||||
@PreAuthorize("@ss.hasPermission('factory:staff:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportStaffExcel(@Valid StaffPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<StaffDO> list = staffService.getStaffPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "员工.xls", "数据", StaffRespVO.class,
|
||||
BeanUtils.toBean(list, StaffRespVO.class));
|
||||
BeanUtils.toBean(list, StaffRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/get-import-template")
|
||||
@ -175,4 +190,4 @@ public class StaffController {
|
||||
List<StaffImportExcelVO> list = ExcelUtils.read(file, StaffImportExcelVO.class);
|
||||
return success(staffService.importUserList(list, updateSupport));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,102 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.staffcertificateinformation;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.staffcertificateinformation.vo.StaffCertificateInformationPageReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.staffcertificateinformation.vo.StaffCertificateInformationRespVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.staffcertificateinformation.vo.StaffCertificateInformationSaveReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.staffcertificateinformation.StaffCertificateInformationDO;
|
||||
import cn.iocoder.yudao.module.smartfactory.service.staffcertificateinformation.StaffCertificateInformationService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
|
||||
@Tag(name = "管理后台 - 叉车员工证件信息")
|
||||
@RestController
|
||||
@RequestMapping("/smartfactory/staff-certificate-information")
|
||||
@Validated
|
||||
public class StaffCertificateInformationController {
|
||||
|
||||
@Resource
|
||||
private StaffCertificateInformationService staffCertificateInformationService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建叉车员工证件信息")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:staff-certificate-information:create')")
|
||||
public CommonResult<Long> createStaffCertificateInformation(@Valid @RequestBody StaffCertificateInformationSaveReqVO createReqVO) {
|
||||
return success(staffCertificateInformationService.createStaffCertificateInformation(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新叉车员工证件信息")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:staff-certificate-information:update')")
|
||||
public CommonResult<Boolean> updateStaffCertificateInformation(@Valid @RequestBody StaffCertificateInformationSaveReqVO updateReqVO) {
|
||||
staffCertificateInformationService.updateStaffCertificateInformation(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除叉车员工证件信息")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:staff-certificate-information:delete')")
|
||||
public CommonResult<Boolean> deleteStaffCertificateInformation(@RequestParam("id") Long id) {
|
||||
staffCertificateInformationService.deleteStaffCertificateInformation(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得叉车员工证件信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:staff-certificate-information:query')")
|
||||
public CommonResult<StaffCertificateInformationRespVO> getStaffCertificateInformation(@RequestParam("id") Long id) {
|
||||
StaffCertificateInformationDO staffCertificateInformation = staffCertificateInformationService.getStaffCertificateInformation(id);
|
||||
return success(BeanUtils.toBean(staffCertificateInformation, StaffCertificateInformationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/getByStaffId")
|
||||
@Operation(summary = "通过工厂员工ID获得叉车员工证件信息")
|
||||
@Parameter(name = "staffId", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:staff-certificate-information:query')")
|
||||
public CommonResult<StaffCertificateInformationRespVO> getByStaffId(@RequestParam("staffId") Long staffId) {
|
||||
StaffCertificateInformationDO staffCertificateInformation = staffCertificateInformationService.getByStaffId(staffId);
|
||||
return success(BeanUtils.toBean(staffCertificateInformation, StaffCertificateInformationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得叉车员工证件信息分页")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:staff-certificate-information:query')")
|
||||
public CommonResult<PageResult<StaffCertificateInformationRespVO>> getStaffCertificateInformationPage(@Valid StaffCertificateInformationPageReqVO pageReqVO) {
|
||||
PageResult<StaffCertificateInformationDO> pageResult = staffCertificateInformationService.getStaffCertificateInformationPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, StaffCertificateInformationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出叉车员工证件信息 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('smartfactory:staff-certificate-information:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportStaffCertificateInformationExcel(@Valid StaffCertificateInformationPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<StaffCertificateInformationDO> list = staffCertificateInformationService.getStaffCertificateInformationPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "叉车员工证件信息.xls", "数据", StaffCertificateInformationRespVO.class,
|
||||
BeanUtils.toBean(list, StaffCertificateInformationRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.staffcertificateinformation.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 叉车员工证件信息分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class StaffCertificateInformationPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "工厂员工id", example = "93")
|
||||
private Long staffId;
|
||||
|
||||
@Schema(description = "身份证正面")
|
||||
private String idCardFront;
|
||||
|
||||
@Schema(description = "身份证反面")
|
||||
private String idCardReverse;
|
||||
|
||||
@Schema(description = "叉车证书")
|
||||
private String forkliftCertificate;
|
||||
|
||||
@Schema(description = "叉车年检信息")
|
||||
private String forkliftAnnualInspection;
|
||||
|
||||
@Schema(description = "年检过期时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] forkliftAnnualInspectionExpiredTime;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.staffcertificateinformation.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 叉车员工证件信息 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class StaffCertificateInformationRespVO {
|
||||
|
||||
@Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9880")
|
||||
@ExcelProperty("主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工厂员工id", example = "93")
|
||||
@ExcelProperty("工厂员工id")
|
||||
private Long staffId;
|
||||
|
||||
@Schema(description = "工厂员工名称", example = "93")
|
||||
@ExcelProperty("工厂员工名称")
|
||||
private String staffName;
|
||||
|
||||
@Schema(description = "身份证正面")
|
||||
@ExcelProperty("身份证正面")
|
||||
private String idCardFront;
|
||||
|
||||
@Schema(description = "身份证反面")
|
||||
@ExcelProperty("身份证反面")
|
||||
private String idCardReverse;
|
||||
|
||||
@Schema(description = "叉车证书")
|
||||
@ExcelProperty("叉车证书")
|
||||
private String forkliftCertificate;
|
||||
|
||||
@Schema(description = "叉车年检信息")
|
||||
@ExcelProperty("叉车年检信息")
|
||||
private String forkliftAnnualInspection;
|
||||
|
||||
@Schema(description = "年检过期时间")
|
||||
@ExcelProperty("年检过期时间")
|
||||
private LocalDateTime forkliftAnnualInspectionExpiredTime;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.controller.admin.staffcertificateinformation.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 叉车员工证件信息新增/修改 Request VO")
|
||||
@Data
|
||||
public class StaffCertificateInformationSaveReqVO {
|
||||
|
||||
@Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9880")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工厂员工id", example = "93")
|
||||
private Long staffId;
|
||||
|
||||
@Schema(description = "身份证正面")
|
||||
private String idCardFront;
|
||||
|
||||
@Schema(description = "身份证反面")
|
||||
private String idCardReverse;
|
||||
|
||||
@Schema(description = "叉车证书")
|
||||
private String forkliftCertificate;
|
||||
|
||||
@Schema(description = "叉车年检信息")
|
||||
private String forkliftAnnualInspection;
|
||||
|
||||
@Schema(description = "年检过期时间")
|
||||
private LocalDateTime forkliftAnnualInspectionExpiredTime;
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(new Date().getTime());
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlinggroupamountspecifications;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 搬运组工资规格关联 DO
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@TableName("sf_handling_group_amount_specifications")
|
||||
@KeySequence("sf_handling_group_amount_specifications_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class HandlingGroupAmountSpecificationsDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 搬运规格id
|
||||
*/
|
||||
private Long handlingSpecificationsId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String handlingSpecificationsName;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer totalCount;
|
||||
/**
|
||||
* 日期 格式 yyyy-MM-dd
|
||||
*/
|
||||
private String dateStr;
|
||||
/**
|
||||
* 总金额(根据规格和总量计算出 该搬运组获得的总金额)
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlinggroupuseramount;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 搬运组每日个人工资记录 DO
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@TableName("sf_handling_group_user_amount")
|
||||
@KeySequence("sf_handling_group_user_amount_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class HandlingGroupUserAmountDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 搬运组工资规格关联id
|
||||
*/
|
||||
private Long handlingGroupAmountSpecificationsId;
|
||||
/**
|
||||
* 日期 格式 yyyy-MM-dd
|
||||
*/
|
||||
private String dateStr;
|
||||
/**
|
||||
* 搬运组每日个人工资
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlingspecifications;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 工厂搬运规格 DO
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@TableName("sf_handling_specifications")
|
||||
@KeySequence("sf_handling_specifications_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class HandlingSpecificationsDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 工厂id
|
||||
*/
|
||||
private Long factoryId;
|
||||
/**
|
||||
* 工厂名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String factoryName;
|
||||
/**
|
||||
* 规格名称
|
||||
*/
|
||||
private String specificationsName;
|
||||
/**
|
||||
* 类型 0数量 1重量 默认数量
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 重量 /(公斤 kg)
|
||||
*/
|
||||
private BigDecimal weight;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer num;
|
||||
/**
|
||||
* 单价/(吨/1000 or 件)
|
||||
*/
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.dal.dataobject.staffcertificateinformation;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 叉车员工证件信息 DO
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@TableName("sf_staff_certificate_information")
|
||||
@KeySequence("sf_staff_certificate_information_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class StaffCertificateInformationDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 工厂员工id
|
||||
*/
|
||||
private Long staffId;
|
||||
/**
|
||||
* 工厂员工名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String staffName;
|
||||
/**
|
||||
* 身份证正面
|
||||
*/
|
||||
private String idCardFront;
|
||||
/**
|
||||
* 身份证反面
|
||||
*/
|
||||
private String idCardReverse;
|
||||
/**
|
||||
* 叉车证书
|
||||
*/
|
||||
private String forkliftCertificate;
|
||||
/**
|
||||
* 叉车年检信息
|
||||
*/
|
||||
private String forkliftAnnualInspection;
|
||||
/**
|
||||
* 年检过期时间
|
||||
*/
|
||||
private LocalDateTime forkliftAnnualInspectionExpiredTime;
|
||||
/**
|
||||
* 年检过期提醒 是否提醒 0否 1是
|
||||
*/
|
||||
private Integer reminderFlag;
|
||||
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.dal.mysql.handlinggroupamountspecifications;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupamountspecifications.vo.HandlingGroupAmountSpecificationsPageReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlinggroupamountspecifications.HandlingGroupAmountSpecificationsDO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 搬运组工资规格关联 Mapper
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@Mapper
|
||||
public interface HandlingGroupAmountSpecificationsMapper extends BaseMapperX<HandlingGroupAmountSpecificationsDO> {
|
||||
|
||||
default PageResult<HandlingGroupAmountSpecificationsDO> selectPage(HandlingGroupAmountSpecificationsPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<HandlingGroupAmountSpecificationsDO>()
|
||||
.eqIfPresent(HandlingGroupAmountSpecificationsDO::getHandlingSpecificationsId, reqVO.getHandlingSpecificationsId())
|
||||
.eqIfPresent(HandlingGroupAmountSpecificationsDO::getTotalCount, reqVO.getTotalCount())
|
||||
.eqIfPresent(HandlingGroupAmountSpecificationsDO::getDateStr, reqVO.getDateStr())
|
||||
.eqIfPresent(HandlingGroupAmountSpecificationsDO::getAmount, reqVO.getAmount())
|
||||
.betweenIfPresent(HandlingGroupAmountSpecificationsDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(HandlingGroupAmountSpecificationsDO::getId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分页列表
|
||||
*
|
||||
* @param page
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
IPage<HandlingGroupAmountSpecificationsDO> getHandlingGroupAmountSpecificationsPage(@Param("page") Page page, @Param("vo") HandlingGroupAmountSpecificationsPageReqVO vo);
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
HandlingGroupAmountSpecificationsDO getHandlingGroupAmountSpecifications(@Param("id") Long id);
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.dal.mysql.handlinggroupuseramount;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.dto.StaffWagesPageDTO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.vo.HandlingGroupUserAmountPageReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.vo.StaffWagesPageVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlinggroupuseramount.HandlingGroupUserAmountDO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 搬运组每日个人工资记录 Mapper
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@Mapper
|
||||
public interface HandlingGroupUserAmountMapper extends BaseMapperX<HandlingGroupUserAmountDO> {
|
||||
|
||||
default PageResult<HandlingGroupUserAmountDO> selectPage(HandlingGroupUserAmountPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<HandlingGroupUserAmountDO>()
|
||||
.eqIfPresent(HandlingGroupUserAmountDO::getUserId, reqVO.getUserId())
|
||||
.eqIfPresent(HandlingGroupUserAmountDO::getHandlingGroupAmountSpecificationsId, reqVO.getHandlingGroupAmountSpecificationsId())
|
||||
.eqIfPresent(HandlingGroupUserAmountDO::getDateStr, reqVO.getDateStr())
|
||||
.eqIfPresent(HandlingGroupUserAmountDO::getAmount, reqVO.getAmount())
|
||||
.betweenIfPresent(HandlingGroupUserAmountDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(HandlingGroupUserAmountDO::getId));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param page
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
IPage<HandlingGroupUserAmountDO> getHandlingGroupUserAmountPage(@Param("page") Page page, @Param("vo") HandlingGroupUserAmountPageReqVO vo);
|
||||
|
||||
/**
|
||||
* 员工工资列表
|
||||
*
|
||||
* @param page
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
IPage<StaffWagesPageVO> staffWagesPage(@Param("page") Page page, @Param("dto") StaffWagesPageDTO dto);
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.dal.mysql.handlingspecifications;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlingspecifications.vo.HandlingSpecificationsPageReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlingspecifications.HandlingSpecificationsDO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工厂搬运规格 Mapper
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@Mapper
|
||||
public interface HandlingSpecificationsMapper extends BaseMapperX<HandlingSpecificationsDO> {
|
||||
|
||||
default PageResult<HandlingSpecificationsDO> selectPage(HandlingSpecificationsPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<HandlingSpecificationsDO>()
|
||||
.eqIfPresent(HandlingSpecificationsDO::getFactoryId, reqVO.getFactoryId())
|
||||
.likeIfPresent(HandlingSpecificationsDO::getSpecificationsName, reqVO.getSpecificationsName())
|
||||
.eqIfPresent(HandlingSpecificationsDO::getType, reqVO.getType())
|
||||
.orderByDesc(HandlingSpecificationsDO::getId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表
|
||||
*
|
||||
* @param page
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
IPage<HandlingSpecificationsDO> getHandlingSpecificationsPage(@Param("page") Page page, @Param("vo") HandlingSpecificationsPageReqVO vo);
|
||||
|
||||
/**
|
||||
* 获取列表
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
List<HandlingSpecificationsDO> getHandlingSpecificationsList(@Param("vo") HandlingSpecificationsPageReqVO vo);
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.dal.mysql.staffcertificateinformation;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.staffcertificateinformation.vo.StaffCertificateInformationPageReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.staffcertificateinformation.StaffCertificateInformationDO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 叉车员工证件信息 Mapper
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@Mapper
|
||||
public interface StaffCertificateInformationMapper extends BaseMapperX<StaffCertificateInformationDO> {
|
||||
|
||||
default PageResult<StaffCertificateInformationDO> selectPage(StaffCertificateInformationPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<StaffCertificateInformationDO>()
|
||||
.eqIfPresent(StaffCertificateInformationDO::getStaffId, reqVO.getStaffId())
|
||||
.eqIfPresent(StaffCertificateInformationDO::getIdCardFront, reqVO.getIdCardFront())
|
||||
.eqIfPresent(StaffCertificateInformationDO::getIdCardReverse, reqVO.getIdCardReverse())
|
||||
.eqIfPresent(StaffCertificateInformationDO::getForkliftCertificate, reqVO.getForkliftCertificate())
|
||||
.eqIfPresent(StaffCertificateInformationDO::getForkliftAnnualInspection, reqVO.getForkliftAnnualInspection())
|
||||
.betweenIfPresent(StaffCertificateInformationDO::getForkliftAnnualInspectionExpiredTime, reqVO.getForkliftAnnualInspectionExpiredTime())
|
||||
.betweenIfPresent(StaffCertificateInformationDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(StaffCertificateInformationDO::getId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id获取
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
StaffCertificateInformationDO getStaffCertificateInformation(@Param("id") Long id);
|
||||
|
||||
/**
|
||||
* 分页列表
|
||||
*
|
||||
* @param page
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
IPage<StaffCertificateInformationDO> getStaffCertificateInformationPage(@Param("page") Page page, @Param("vo") StaffCertificateInformationPageReqVO vo);
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.framework.job.staffCertificateInformation;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.iocoder.yudao.framework.common.Constants;
|
||||
import cn.iocoder.yudao.framework.common.enums.SocialTypeEnum;
|
||||
import cn.iocoder.yudao.framework.common.template.WxMpMsgTemplateUtils;
|
||||
import cn.iocoder.yudao.framework.common.template.dto.StaffCertificateInformationDTO;
|
||||
import cn.iocoder.yudao.framework.common.template.vo.SubscribeMessageReqDTO;
|
||||
import cn.iocoder.yudao.framework.tenant.core.job.TenantJob;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.staff.StaffDO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.staffcertificateinformation.StaffCertificateInformationDO;
|
||||
import cn.iocoder.yudao.module.smartfactory.service.staff.StaffService;
|
||||
import cn.iocoder.yudao.module.smartfactory.service.staffcertificateinformation.StaffCertificateInformationService;
|
||||
import cn.iocoder.yudao.module.system.api.auth.AdminOauthUserOtherInfoApi;
|
||||
import cn.iocoder.yudao.module.system.api.auth.dto.AdminOauthUserOtherInfoApiDTO;
|
||||
import cn.iocoder.yudao.module.system.api.auth.vo.AdminOauthUserOtherInfoApiVO;
|
||||
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
||||
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
||||
import cn.iocoder.yudao.module.system.api.subscribe.SubscribeMessageSendApi;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.xxl.job.core.biz.model.ReturnT;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 员工证件过期提醒 工厂负责人 - 每天下午3点执行 过期前3个月就提醒下
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class StaffCertificateInformationJob {
|
||||
|
||||
@Resource
|
||||
private StaffCertificateInformationService staffCertificateInformationService;
|
||||
@Resource
|
||||
private StaffService staffService;
|
||||
@Resource
|
||||
private DeptApi deptApi;
|
||||
@Resource
|
||||
private AdminOauthUserOtherInfoApi adminOauthUserOtherInfoApi;
|
||||
|
||||
@Resource
|
||||
private SubscribeMessageSendApi subscribeMessageSendApi;
|
||||
private static final String CERTIFICATE_NAME = "叉车年检信息";
|
||||
private static final String REMARKS = "的叉车年检信息即将到期,请注意!";
|
||||
|
||||
@XxlJob("staffCertificateInformationJob")
|
||||
@TenantJob // --- ⚠️ 这个注解 会将租户列表拉出来 完了后逐个租户执行 定时任务需要注意
|
||||
public ReturnT<String> execute() throws Exception {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
now = now.plusMonths(3L);
|
||||
// 获取当前日期 上个月得第一天
|
||||
List<StaffCertificateInformationDO> list = staffCertificateInformationService.list(new LambdaQueryWrapper<StaffCertificateInformationDO>()
|
||||
.eq(StaffCertificateInformationDO::getReminderFlag, 0)
|
||||
.le(StaffCertificateInformationDO::getForkliftAnnualInspectionExpiredTime, now));
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
return ReturnT.SUCCESS;
|
||||
}
|
||||
List<Long> ids = list.stream().map(StaffCertificateInformationDO::getId).collect(Collectors.toList());
|
||||
|
||||
Map<Long, LocalDateTime> forkliftAnnualInspectionExpiredTimeMap = list.stream().collect(Collectors.toMap(StaffCertificateInformationDO::getStaffId, StaffCertificateInformationDO::getForkliftAnnualInspectionExpiredTime));
|
||||
// 获取员工id 列表
|
||||
List<Long> staffIds = list.stream().map(StaffCertificateInformationDO::getStaffId).collect(Collectors.toList());
|
||||
// 查询员工列表 - 员工列表里面有工厂id 然后拿到工厂id 去查询部门表 获取到工厂负责人
|
||||
List<StaffDO> staffList = staffService.getList(staffIds);
|
||||
//根据工厂id分组
|
||||
Map<Long, List<StaffDO>> map = staffList.stream().collect(Collectors.groupingBy(StaffDO::getFactoryId));
|
||||
List<Long> factoryIds = new ArrayList<>(map.keySet());
|
||||
// 查询部门表根据工厂ids
|
||||
List<DeptRespDTO> deptList = deptApi.getDeptByFactoryIds(factoryIds).getCheckedData();
|
||||
//工厂负责人map
|
||||
Map<Long, Long> factoryLeaderUserIdMap = new HashMap<>();
|
||||
if (CollUtil.isEmpty(deptList)) {
|
||||
factoryLeaderUserIdMap = deptList.stream().collect(Collectors.toMap(DeptRespDTO::getFactoryId, DeptRespDTO::getLeaderUserId));
|
||||
}
|
||||
|
||||
if (MapUtil.isNotEmpty(factoryLeaderUserIdMap)) {
|
||||
// -- 获取发起人的openId
|
||||
List<AdminOauthUserOtherInfoApiVO> adminOauthUserOtherInfoApiVOS = adminOauthUserOtherInfoApi.getOpenIdByCondition(
|
||||
new AdminOauthUserOtherInfoApiDTO().setUserIds(new ArrayList<>(factoryLeaderUserIdMap.values()))
|
||||
.setSocialType(SocialTypeEnum.WECHAT_MP.getType())).getCheckedData();
|
||||
Map<Long, String> leaderOpenIdMap = adminOauthUserOtherInfoApiVOS.stream().collect(Collectors.toMap(AdminOauthUserOtherInfoApiVO::getUserId, AdminOauthUserOtherInfoApiVO::getOpenId));
|
||||
for (StaffDO staffDO : staffList) {
|
||||
Long factoryId = staffDO.getFactoryId();
|
||||
Long leaderUserId = factoryLeaderUserIdMap.get(factoryId);
|
||||
String leaderOpenId = leaderOpenIdMap.get(leaderUserId);
|
||||
if (leaderOpenId == null) {
|
||||
continue;
|
||||
}
|
||||
LocalDateTime localDateTime = forkliftAnnualInspectionExpiredTimeMap.get(staffDO.getId());
|
||||
if (localDateTime == null) {
|
||||
continue;
|
||||
}
|
||||
String time = localDateTime.format(Constants.REPO_DATE_FORMAT);
|
||||
SubscribeMessageReqDTO dto = new WxMpMsgTemplateUtils().forkliftAnnualInspectionExpiredReminder(new StaffCertificateInformationDTO()
|
||||
.setOpenId(leaderOpenId)
|
||||
.setUserName(staffDO.getNickName())
|
||||
.setCertificateName(CERTIFICATE_NAME)
|
||||
.setTime(time)
|
||||
.setRemarks(staffDO.getNickName() + REMARKS)
|
||||
.setMiniProgramState("formal"));
|
||||
subscribeMessageSendApi.sendMpMsg(dto);
|
||||
}
|
||||
// -- 将这些人设为已经提醒
|
||||
staffCertificateInformationService.update(new StaffCertificateInformationDO().setReminderFlag(1),
|
||||
new LambdaQueryWrapper<StaffCertificateInformationDO>()
|
||||
.in(StaffCertificateInformationDO::getId, ids));
|
||||
}
|
||||
// 返回执行成功
|
||||
return ReturnT.SUCCESS;
|
||||
}
|
||||
}
|
@ -5,6 +5,7 @@ import cn.iocoder.yudao.module.bpm.api.oa.BpmOALoanApi;
|
||||
import cn.iocoder.yudao.module.infra.api.config.ConfigApi;
|
||||
import cn.iocoder.yudao.module.infra.api.file.FileApi;
|
||||
import cn.iocoder.yudao.module.system.api.assets.AssetsTypeApi;
|
||||
import cn.iocoder.yudao.module.system.api.auth.AdminOauthUserOtherInfoApi;
|
||||
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
||||
import cn.iocoder.yudao.module.system.api.dept.PostApi;
|
||||
import cn.iocoder.yudao.module.system.api.dict.DictDataApi;
|
||||
@ -20,7 +21,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableFeignClients(clients = {FileApi.class, RoleApi.class, DeptApi.class, PostApi.class, AdminUserApi.class, SmsSendApi.class, DictDataApi.class, NotifyMessageSendApi.class,
|
||||
SubscribeMessageSendApi.class, ConfigApi.class, PermissionApi.class, AssetsTypeApi.class, LoanApi.class, BpmOALoanApi.class
|
||||
SubscribeMessageSendApi.class, ConfigApi.class, PermissionApi.class, AssetsTypeApi.class, LoanApi.class, BpmOALoanApi.class, AdminOauthUserOtherInfoApi.class
|
||||
})
|
||||
public class RpcConfiguration {
|
||||
}
|
||||
|
@ -1,13 +1,12 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.service.factory;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.factory.vo.SfFactoryInfoPageReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.factory.vo.SfFactoryInfoSaveReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.factory.SfFactoryInfoDO;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 工厂信息 Service 接口
|
||||
*
|
||||
@ -53,4 +52,4 @@ public interface SfFactoryInfoService {
|
||||
*/
|
||||
PageResult<SfFactoryInfoDO> getSfFactoryInfoPage(SfFactoryInfoPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -56,4 +56,4 @@ public class SfFactoryInfoServiceImpl implements SfFactoryInfoService {
|
||||
return sfFactoryInfoMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,61 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.service.handlinggroupamountspecifications;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupamountspecifications.vo.HandlingGroupAmountSpecificationsPageReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupamountspecifications.vo.HandlingGroupAmountSpecificationsSaveReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlinggroupamountspecifications.HandlingGroupAmountSpecificationsDO;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 搬运组工资规格关联 Service 接口
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
public interface HandlingGroupAmountSpecificationsService {
|
||||
|
||||
/**
|
||||
* 创建搬运组工资规格关联
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createHandlingGroupAmountSpecifications(@Valid HandlingGroupAmountSpecificationsSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新搬运组工资规格关联
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateHandlingGroupAmountSpecifications(@Valid HandlingGroupAmountSpecificationsSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除搬运组工资规格关联
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteHandlingGroupAmountSpecifications(Long id);
|
||||
|
||||
/**
|
||||
* 获得搬运组工资规格关联
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 搬运组工资规格关联
|
||||
*/
|
||||
HandlingGroupAmountSpecificationsDO getHandlingGroupAmountSpecifications(Long id);
|
||||
|
||||
/**
|
||||
* 获得搬运组工资规格关联分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 搬运组工资规格关联分页
|
||||
*/
|
||||
PageResult<HandlingGroupAmountSpecificationsDO> getHandlingGroupAmountSpecificationsPage(HandlingGroupAmountSpecificationsPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 新增编辑
|
||||
*
|
||||
* @param createReqVO
|
||||
*/
|
||||
void createOrEdit(@Valid HandlingGroupAmountSpecificationsSaveReqVO createReqVO);
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.service.handlinggroupamountspecifications;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupamountspecifications.vo.HandlingGroupAmountSpecificationsPageReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupamountspecifications.vo.HandlingGroupAmountSpecificationsSaveReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlinggroupamountspecifications.HandlingGroupAmountSpecificationsDO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlingspecifications.HandlingSpecificationsDO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.mysql.handlinggroupamountspecifications.HandlingGroupAmountSpecificationsMapper;
|
||||
import cn.iocoder.yudao.module.smartfactory.service.handlingspecifications.HandlingSpecificationsService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.smartfactory.enums.ErrorCodeConstants.CANNOT_FIND_THE_CORRESPONDING_FACTORY_HANDLING_SPECIFICATION;
|
||||
|
||||
/**
|
||||
* 搬运组工资规格关联 Service 实现类
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class HandlingGroupAmountSpecificationsServiceImpl implements HandlingGroupAmountSpecificationsService {
|
||||
|
||||
@Resource
|
||||
private HandlingGroupAmountSpecificationsMapper handlingGroupAmountSpecificationsMapper;
|
||||
@Resource
|
||||
private HandlingSpecificationsService handlingSpecificationsService;
|
||||
private static final BigDecimal THOUSANDTH = new BigDecimal("0.001");
|
||||
|
||||
@Override
|
||||
public Long createHandlingGroupAmountSpecifications(HandlingGroupAmountSpecificationsSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
HandlingGroupAmountSpecificationsDO handlingGroupAmountSpecifications = BeanUtils.toBean(createReqVO, HandlingGroupAmountSpecificationsDO.class);
|
||||
handlingGroupAmountSpecificationsMapper.insert(handlingGroupAmountSpecifications);
|
||||
|
||||
// 返回
|
||||
return handlingGroupAmountSpecifications.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateHandlingGroupAmountSpecifications(HandlingGroupAmountSpecificationsSaveReqVO updateReqVO) {
|
||||
// 更新
|
||||
HandlingGroupAmountSpecificationsDO updateObj = BeanUtils.toBean(updateReqVO, HandlingGroupAmountSpecificationsDO.class);
|
||||
handlingGroupAmountSpecificationsMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteHandlingGroupAmountSpecifications(Long id) {
|
||||
// 删除
|
||||
handlingGroupAmountSpecificationsMapper.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public HandlingGroupAmountSpecificationsDO getHandlingGroupAmountSpecifications(Long id) {
|
||||
return handlingGroupAmountSpecificationsMapper.getHandlingGroupAmountSpecifications(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<HandlingGroupAmountSpecificationsDO> getHandlingGroupAmountSpecificationsPage(HandlingGroupAmountSpecificationsPageReqVO pageReqVO) {
|
||||
IPage<HandlingGroupAmountSpecificationsDO> pageResult = handlingGroupAmountSpecificationsMapper.getHandlingGroupAmountSpecificationsPage(MyBatisUtils.buildPage(pageReqVO), pageReqVO);
|
||||
return new PageResult<>(pageResult.getRecords(), pageResult.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void createOrEdit(HandlingGroupAmountSpecificationsSaveReqVO createReqVO) {
|
||||
HandlingSpecificationsDO handlingSpecificationsDO = handlingSpecificationsService.getById(createReqVO.getHandlingSpecificationsId());
|
||||
if (handlingSpecificationsDO == null) {
|
||||
throw exception(CANNOT_FIND_THE_CORRESPONDING_FACTORY_HANDLING_SPECIFICATION);
|
||||
}
|
||||
BigDecimal totalAmount;
|
||||
if (handlingSpecificationsDO.getType() == 0) {
|
||||
totalAmount = new BigDecimal(createReqVO.getTotalCount().toString()).multiply(handlingSpecificationsDO.getUnitPrice());
|
||||
} else {
|
||||
totalAmount = new BigDecimal(createReqVO.getTotalCount().toString()).multiply(handlingSpecificationsDO.getWeight())
|
||||
.multiply(handlingSpecificationsDO.getUnitPrice().multiply(THOUSANDTH));
|
||||
}
|
||||
// 插入
|
||||
HandlingGroupAmountSpecificationsDO handlingGroupAmountSpecifications = BeanUtils.toBean(createReqVO, HandlingGroupAmountSpecificationsDO.class);
|
||||
handlingGroupAmountSpecifications.setAmount(totalAmount);
|
||||
handlingGroupAmountSpecificationsMapper.insertOrUpdate(handlingGroupAmountSpecifications);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.service.handlinggroupuseramount;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.dto.StaffWagesPageDTO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.vo.HandlingGroupUserAmountPageReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.vo.HandlingGroupUserAmountSaveReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.vo.StaffWagesPageVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlinggroupuseramount.HandlingGroupUserAmountDO;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 搬运组每日个人工资记录 Service 接口
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
public interface HandlingGroupUserAmountService {
|
||||
|
||||
/**
|
||||
* 创建搬运组每日个人工资记录
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createHandlingGroupUserAmount(@Valid HandlingGroupUserAmountSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新搬运组每日个人工资记录
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateHandlingGroupUserAmount(@Valid HandlingGroupUserAmountSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除搬运组每日个人工资记录
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteHandlingGroupUserAmount(Long id);
|
||||
|
||||
/**
|
||||
* 获得搬运组每日个人工资记录
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 搬运组每日个人工资记录
|
||||
*/
|
||||
HandlingGroupUserAmountDO getHandlingGroupUserAmount(Long id);
|
||||
|
||||
/**
|
||||
* 获得搬运组每日个人工资记录分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 搬运组每日个人工资记录分页
|
||||
*/
|
||||
PageResult<HandlingGroupUserAmountDO> getHandlingGroupUserAmountPage(HandlingGroupUserAmountPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 新增编辑
|
||||
*
|
||||
* @param createReqVO
|
||||
*/
|
||||
void createOrEdit(@Valid HandlingGroupUserAmountSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 员工工资分页列表
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
PageResult<StaffWagesPageVO> staffWagesPage(@Valid StaffWagesPageDTO dto);
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.service.handlinggroupuseramount;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.dto.StaffWagesPageDTO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.vo.HandlingGroupUserAmountPageReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.vo.HandlingGroupUserAmountSaveReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.vo.StaffWagesPageVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlinggroupuseramount.HandlingGroupUserAmountDO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlingspecifications.HandlingSpecificationsDO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.mysql.handlinggroupuseramount.HandlingGroupUserAmountMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 搬运组每日个人工资记录 Service 实现类
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class HandlingGroupUserAmountServiceImpl implements HandlingGroupUserAmountService {
|
||||
|
||||
@Resource
|
||||
private HandlingGroupUserAmountMapper handlingGroupUserAmountMapper;
|
||||
|
||||
@Override
|
||||
public Long createHandlingGroupUserAmount(HandlingGroupUserAmountSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
HandlingGroupUserAmountDO handlingGroupUserAmount = BeanUtils.toBean(createReqVO, HandlingGroupUserAmountDO.class);
|
||||
handlingGroupUserAmountMapper.insert(handlingGroupUserAmount);
|
||||
// 返回
|
||||
return handlingGroupUserAmount.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateHandlingGroupUserAmount(HandlingGroupUserAmountSaveReqVO updateReqVO) {
|
||||
// 更新
|
||||
HandlingGroupUserAmountDO updateObj = BeanUtils.toBean(updateReqVO, HandlingGroupUserAmountDO.class);
|
||||
handlingGroupUserAmountMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteHandlingGroupUserAmount(Long id) {
|
||||
// 删除
|
||||
handlingGroupUserAmountMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlingGroupUserAmountDO getHandlingGroupUserAmount(Long id) {
|
||||
return handlingGroupUserAmountMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<HandlingGroupUserAmountDO> getHandlingGroupUserAmountPage(HandlingGroupUserAmountPageReqVO pageReqVO) {
|
||||
IPage<HandlingGroupUserAmountDO> page = handlingGroupUserAmountMapper.getHandlingGroupUserAmountPage(MyBatisUtils.buildPage(pageReqVO) ,pageReqVO);
|
||||
return new PageResult<>(page.getRecords(), page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void createOrEdit(HandlingGroupUserAmountSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
HandlingGroupUserAmountDO handlingGroupUserAmount = BeanUtils.toBean(createReqVO, HandlingGroupUserAmountDO.class);
|
||||
handlingGroupUserAmountMapper.insertOrUpdate(handlingGroupUserAmount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<StaffWagesPageVO> staffWagesPage(StaffWagesPageDTO dto) {
|
||||
IPage<StaffWagesPageVO> page = handlingGroupUserAmountMapper.staffWagesPage(MyBatisUtils.buildPage(dto) ,dto);
|
||||
return new PageResult<>(page.getRecords(), page.getTotal());
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.service.handlingspecifications;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlingspecifications.vo.HandlingSpecificationsPageReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlingspecifications.vo.HandlingSpecificationsSaveReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlingspecifications.HandlingSpecificationsDO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工厂搬运规格 Service 接口
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
public interface HandlingSpecificationsService extends IService<HandlingSpecificationsDO> {
|
||||
|
||||
/**
|
||||
* 创建工厂搬运规格
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createHandlingSpecifications(@Valid HandlingSpecificationsSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新工厂搬运规格
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateHandlingSpecifications(@Valid HandlingSpecificationsSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除工厂搬运规格
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteHandlingSpecifications(Long id);
|
||||
|
||||
/**
|
||||
* 获得工厂搬运规格
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 工厂搬运规格
|
||||
*/
|
||||
HandlingSpecificationsDO getHandlingSpecifications(Long id);
|
||||
|
||||
/**
|
||||
* 获得工厂搬运规格分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 工厂搬运规格分页
|
||||
*/
|
||||
PageResult<HandlingSpecificationsDO> getHandlingSpecificationsPage(HandlingSpecificationsPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获取列表
|
||||
*
|
||||
* @param pageReqVO
|
||||
* @return
|
||||
*/
|
||||
List<HandlingSpecificationsDO> getHandlingSpecificationsList(@Valid HandlingSpecificationsPageReqVO pageReqVO);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.service.handlingspecifications;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlingspecifications.vo.HandlingSpecificationsPageReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.handlingspecifications.vo.HandlingSpecificationsSaveReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlingspecifications.HandlingSpecificationsDO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.mysql.handlingspecifications.HandlingSpecificationsMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工厂搬运规格 Service 实现类
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class HandlingSpecificationsServiceImpl extends ServiceImpl<HandlingSpecificationsMapper, HandlingSpecificationsDO> implements HandlingSpecificationsService {
|
||||
|
||||
@Resource
|
||||
private HandlingSpecificationsMapper handlingSpecificationsMapper;
|
||||
|
||||
@Override
|
||||
public Long createHandlingSpecifications(HandlingSpecificationsSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
HandlingSpecificationsDO handlingSpecifications = BeanUtils.toBean(createReqVO, HandlingSpecificationsDO.class);
|
||||
handlingSpecificationsMapper.insert(handlingSpecifications);
|
||||
// 返回
|
||||
return handlingSpecifications.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateHandlingSpecifications(HandlingSpecificationsSaveReqVO updateReqVO) {
|
||||
// 更新
|
||||
HandlingSpecificationsDO updateObj = BeanUtils.toBean(updateReqVO, HandlingSpecificationsDO.class);
|
||||
handlingSpecificationsMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteHandlingSpecifications(Long id) {
|
||||
// 删除
|
||||
handlingSpecificationsMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlingSpecificationsDO getHandlingSpecifications(Long id) {
|
||||
return handlingSpecificationsMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<HandlingSpecificationsDO> getHandlingSpecificationsPage(HandlingSpecificationsPageReqVO pageReqVO) {
|
||||
IPage<HandlingSpecificationsDO> page = handlingSpecificationsMapper.getHandlingSpecificationsPage(MyBatisUtils.buildPage(pageReqVO) ,pageReqVO);
|
||||
return new PageResult<>(page.getRecords(), page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HandlingSpecificationsDO> getHandlingSpecificationsList(HandlingSpecificationsPageReqVO pageReqVO) {
|
||||
return handlingSpecificationsMapper.getHandlingSpecificationsList(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -1,8 +1,11 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.service.staff;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.staff.vo.*;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.screendata.factory.vo.StaffDataRespVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.staff.vo.StaffImportExcelVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.staff.vo.StaffImportRespVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.staff.vo.StaffPageReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.staff.vo.StaffSaveReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.staff.StaffDO;
|
||||
|
||||
import javax.validation.Valid;
|
||||
@ -64,12 +67,14 @@ public interface StaffService {
|
||||
|
||||
/**
|
||||
* 获取人员数量
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Integer getCount();
|
||||
|
||||
/**
|
||||
* 查询工厂员工信息
|
||||
*
|
||||
* @param factoryId 工厂编号
|
||||
* @return
|
||||
*/
|
||||
@ -77,7 +82,8 @@ public interface StaffService {
|
||||
|
||||
/**
|
||||
* 导入员工
|
||||
* @param list 导入数据集合
|
||||
*
|
||||
* @param list 导入数据集合
|
||||
* @param updateSupport 是否可更新
|
||||
* @return 导入结果
|
||||
*/
|
||||
@ -87,7 +93,7 @@ public interface StaffService {
|
||||
* 获取指定厂区得员工列表
|
||||
*
|
||||
* @param factoryId 工厂编号
|
||||
* @param isIn 是否获取该厂区员工
|
||||
* @param isIn 是否获取该厂区员工
|
||||
* @return 员工列表
|
||||
*/
|
||||
List<StaffDO> getListByFactory(Long factoryId, Boolean isIn);
|
||||
@ -102,8 +108,25 @@ public interface StaffService {
|
||||
|
||||
/**
|
||||
* 获取员工信息列表
|
||||
*
|
||||
* @param staffIds 员工编号集合
|
||||
* @return 员工信息列表
|
||||
*/
|
||||
List<StaffDO> getList(Collection<Long> staffIds);
|
||||
|
||||
/**
|
||||
* 获得指定工厂员工
|
||||
*
|
||||
* @param factoryId
|
||||
* @param nickName
|
||||
* @return
|
||||
*/
|
||||
List<StaffDO> getListByFactoryId(Long factoryId, String nickName);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Long getTheFactoryOfTheCurrentlyLoggedInUser();
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import cn.iocoder.yudao.framework.common.util.string.DTO.IdCardDO;
|
||||
import cn.iocoder.yudao.framework.common.util.string.StrUtils;
|
||||
import cn.iocoder.yudao.framework.datapermission.core.util.DataPermissionUtils;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.screendata.factory.vo.StaffDataRespVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.staff.vo.StaffImportExcelVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.staff.vo.StaffImportRespVO;
|
||||
@ -16,8 +17,12 @@ import cn.iocoder.yudao.module.smartfactory.controller.admin.staff.vo.StaffPageR
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.staff.vo.StaffSaveReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.staff.StaffDO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.mysql.staff.StaffMapper;
|
||||
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
||||
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
||||
import cn.iocoder.yudao.module.system.api.dict.DictDataApi;
|
||||
import cn.iocoder.yudao.module.system.api.dict.dto.DictDataRespDTO;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -46,6 +51,10 @@ public class StaffServiceImpl implements StaffService {
|
||||
|
||||
@Resource
|
||||
private DictDataApi dictDataApi;
|
||||
@Resource
|
||||
private DeptApi deptApi;
|
||||
@Resource
|
||||
private AdminUserApi adminUserApi;
|
||||
|
||||
@Override
|
||||
public Long createStaff(StaffSaveReqVO createReqVO) {
|
||||
@ -238,4 +247,31 @@ public class StaffServiceImpl implements StaffService {
|
||||
public List<StaffDO> getList(Collection<Long> staffIds) {
|
||||
return staffMapper.selectList(StaffDO::getId, staffIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StaffDO> getListByFactoryId(Long factoryId, String nickName) {
|
||||
return staffMapper.selectList(new LambdaQueryWrapperX<StaffDO>()
|
||||
.eq(factoryId != null, StaffDO::getFactoryId, factoryId)
|
||||
.like(StrUtil.isNotEmpty(nickName), StaffDO::getNickName, nickName));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getTheFactoryOfTheCurrentlyLoggedInUser() {
|
||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||
//获取当前登录用户
|
||||
AdminUserRespDTO adminUserRespDTO = adminUserApi.getUser(userId).getCheckedData();
|
||||
Long deptId = null;
|
||||
if (adminUserRespDTO != null) {
|
||||
deptId = adminUserRespDTO.getDeptId();
|
||||
}
|
||||
DeptRespDTO dto = null;
|
||||
if (deptId != null) {
|
||||
dto = deptApi.getDept(deptId).getCheckedData();
|
||||
}
|
||||
// 获取当前登录用户所属部门
|
||||
if (dto == null) {
|
||||
return null;
|
||||
}
|
||||
return dto.getFactoryId();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,63 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.service.staffcertificateinformation;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.staffcertificateinformation.vo.StaffCertificateInformationPageReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.staffcertificateinformation.vo.StaffCertificateInformationSaveReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.staffcertificateinformation.StaffCertificateInformationDO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 叉车员工证件信息 Service 接口
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
public interface StaffCertificateInformationService extends IService<StaffCertificateInformationDO> {
|
||||
|
||||
/**
|
||||
* 创建叉车员工证件信息
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createStaffCertificateInformation(@Valid StaffCertificateInformationSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新叉车员工证件信息
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateStaffCertificateInformation(@Valid StaffCertificateInformationSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除叉车员工证件信息
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteStaffCertificateInformation(Long id);
|
||||
|
||||
/**
|
||||
* 获得叉车员工证件信息
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 叉车员工证件信息
|
||||
*/
|
||||
StaffCertificateInformationDO getStaffCertificateInformation(Long id);
|
||||
|
||||
/**
|
||||
* 获得叉车员工证件信息分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 叉车员工证件信息分页
|
||||
*/
|
||||
PageResult<StaffCertificateInformationDO> getStaffCertificateInformationPage(StaffCertificateInformationPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 通过员工ID获得叉车员工证件信息
|
||||
*
|
||||
* @param staffId
|
||||
* @return
|
||||
*/
|
||||
StaffCertificateInformationDO getByStaffId(Long staffId);
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.service.staffcertificateinformation;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.Constants;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.staffcertificateinformation.vo.StaffCertificateInformationPageReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.staffcertificateinformation.vo.StaffCertificateInformationSaveReqVO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.staffcertificateinformation.StaffCertificateInformationDO;
|
||||
import cn.iocoder.yudao.module.smartfactory.dal.mysql.staffcertificateinformation.StaffCertificateInformationMapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 叉车员工证件信息 Service 实现类
|
||||
*
|
||||
* @author 艾楷
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class StaffCertificateInformationServiceImpl extends ServiceImpl<StaffCertificateInformationMapper, StaffCertificateInformationDO> implements StaffCertificateInformationService {
|
||||
|
||||
@Resource
|
||||
private StaffCertificateInformationMapper staffCertificateInformationMapper;
|
||||
|
||||
@Override
|
||||
public Long createStaffCertificateInformation(StaffCertificateInformationSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
StaffCertificateInformationDO staffCertificateInformation = BeanUtils.toBean(createReqVO, StaffCertificateInformationDO.class);
|
||||
staffCertificateInformationMapper.insert(staffCertificateInformation);
|
||||
// 返回
|
||||
return staffCertificateInformation.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStaffCertificateInformation(StaffCertificateInformationSaveReqVO updateReqVO) {
|
||||
// 更新
|
||||
StaffCertificateInformationDO updateObj = BeanUtils.toBean(updateReqVO, StaffCertificateInformationDO.class);
|
||||
// 判断时间是否有过改动 - 有的话 设置为未提醒
|
||||
StaffCertificateInformationDO staffCertificateInformation = this.getStaffCertificateInformation(updateObj.getId());
|
||||
String oldTimeStr = staffCertificateInformation.getForkliftAnnualInspectionExpiredTime().format(Constants.REPO_DATE_FORMAT);
|
||||
String newTimeStr = updateObj.getForkliftAnnualInspectionExpiredTime().format(Constants.REPO_DATE_FORMAT);
|
||||
if (!oldTimeStr.equals(newTimeStr)) {
|
||||
updateObj.setReminderFlag(0);
|
||||
}
|
||||
staffCertificateInformationMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteStaffCertificateInformation(Long id) {
|
||||
// 删除
|
||||
staffCertificateInformationMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffCertificateInformationDO getStaffCertificateInformation(Long id) {
|
||||
return staffCertificateInformationMapper.getStaffCertificateInformation(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<StaffCertificateInformationDO> getStaffCertificateInformationPage(StaffCertificateInformationPageReqVO pageReqVO) {
|
||||
IPage<StaffCertificateInformationDO> page = staffCertificateInformationMapper.getStaffCertificateInformationPage(MyBatisUtils.buildPage(pageReqVO), pageReqVO);
|
||||
return new PageResult<>(page.getRecords(), page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public StaffCertificateInformationDO getByStaffId(Long staffId) {
|
||||
return staffCertificateInformationMapper.selectOne(new LambdaQueryWrapper<StaffCertificateInformationDO>()
|
||||
.eq(StaffCertificateInformationDO::getStaffId, staffId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.smartfactory.dal.mysql.handlinggroupamountspecifications.HandlingGroupAmountSpecificationsMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<select id="getHandlingGroupAmountSpecificationsPage"
|
||||
resultType="cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlinggroupamountspecifications.HandlingGroupAmountSpecificationsDO">
|
||||
SELECT a.*,
|
||||
b.specifications_name as handlingSpecificationsName
|
||||
FROM sf_handling_group_amount_specifications AS a
|
||||
LEFT JOIN sf_handling_specifications AS b ON a.handling_specifications_id = b.id
|
||||
<where>
|
||||
a.deleted = 0
|
||||
and b.deleted = 0
|
||||
<if test="vo.handlingSpecificationsId != null">
|
||||
AND a.handling_specifications_id = #{vo.handlingSpecificationsId}
|
||||
</if>
|
||||
<if test="vo.dateStr != null and vo.dateStr != ''">
|
||||
and a.date_str like concat('%', #{vo.dateStr}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getHandlingGroupAmountSpecifications"
|
||||
resultType="cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlinggroupamountspecifications.HandlingGroupAmountSpecificationsDO">
|
||||
SELECT a.*,
|
||||
b.specifications_name as handlingSpecificationsName
|
||||
FROM sf_handling_group_amount_specifications AS a
|
||||
LEFT JOIN sf_handling_specifications AS b ON a.handling_specifications_id = b.id
|
||||
<where>
|
||||
a.deleted = 0
|
||||
and b.deleted = 0
|
||||
and a.id = #{id}
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.smartfactory.dal.mysql.handlinggroupuseramount.HandlingGroupUserAmountMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<select id="getHandlingGroupUserAmountPage"
|
||||
resultType="cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlinggroupuseramount.HandlingGroupUserAmountDO">
|
||||
SELECT a.*,
|
||||
b.nick_name as userName
|
||||
FROM sf_handling_group_user_amount as a
|
||||
LEFT JOIN sf_staff as b on a.user_id = b.id
|
||||
<where>
|
||||
a.deleted = 0
|
||||
and b.deleted = 0
|
||||
<if test="vo.userId != null">
|
||||
AND a.user_id = #{vo.userId}
|
||||
</if>
|
||||
<if test="vo.handlingGroupAmountSpecificationsId != null">
|
||||
AND a.handling_group_amount_specifications_id= #{vo.handlingGroupAmountSpecificationsId}
|
||||
</if>
|
||||
<if test="vo.dateStr != null and vo.dateStr != ''">
|
||||
and a.dateStr like concat('%', #{vo.dateStr}, '%')
|
||||
</if>
|
||||
<if test="vo.createTime != null and vo.createTime.length > 0">
|
||||
<if test="vo.createTime[0] != null">
|
||||
and a.create_time >= #{vo.createTime[0]}
|
||||
</if>
|
||||
<if test="vo.createTime[1] != null">
|
||||
and a.create_time <= #{vo.createTime[1]}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="staffWagesPage"
|
||||
resultType="cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupuseramount.vo.StaffWagesPageVO">
|
||||
select
|
||||
a.id as userId,
|
||||
a.nick_name as userName,
|
||||
IFNULL(sum( b.amount ),0) AS totalAmount
|
||||
from sf_staff as a
|
||||
left join sf_handling_group_user_amount as b on a.id = b.user_id
|
||||
<where>
|
||||
a.deleted = 0
|
||||
and b.deleted = 0
|
||||
<if test="dto.userId != null">
|
||||
AND a.id = #{dto.userId}
|
||||
</if>
|
||||
<if test="dto.factoryId != null">
|
||||
AND a.factory_id = #{dto.factoryId}
|
||||
</if>
|
||||
<if test="dto.handlingGroupAmountSpecificationsId != null">
|
||||
AND b.handling_group_amount_specifications_id = #{dto.handlingGroupAmountSpecificationsId}
|
||||
</if>
|
||||
<if test="dto.dateStr != null and dto.dateStr != ''">
|
||||
and b.date_str like concat('%', #{dto.dateStr}, '%')
|
||||
</if>
|
||||
<if test="dto.createTime != null and dto.createTime.length > 0">
|
||||
<if test="dto.createTime[0] != null">
|
||||
and b.create_time >= #{dto.createTime[0]}
|
||||
</if>
|
||||
<if test="dto.createTime[1] != null">
|
||||
and b.create_time <= #{dto.createTime[1]}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
group by a.id
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.smartfactory.dal.mysql.handlingspecifications.HandlingSpecificationsMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<select id="getHandlingSpecificationsPage"
|
||||
resultType="cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlingspecifications.HandlingSpecificationsDO">
|
||||
select
|
||||
a.*,
|
||||
b.short_name as factoryName
|
||||
from sf_handling_specifications as a
|
||||
left join sf_factory_info as b on a.factory_id = b.id
|
||||
<where>
|
||||
a.deleted = 0
|
||||
and b.deleted = 0
|
||||
<if test="vo.factoryId != null">
|
||||
and a.factory_id = #{vo.factoryId}
|
||||
</if>
|
||||
<if test="vo.specificationsName != null and vo.specificationsName != ''">
|
||||
and a.specifications_name like concat('%', #{vo.specificationsName}, '%')
|
||||
</if>
|
||||
<if test="vo.type != null">
|
||||
and a.type = #{vo.type}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getHandlingSpecificationsList"
|
||||
resultType="cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlingspecifications.HandlingSpecificationsDO">
|
||||
select
|
||||
a.*,
|
||||
b.short_name as factoryName
|
||||
from sf_handling_specifications as a
|
||||
left join sf_factory_info as b on a.factory_id = b.id
|
||||
<where>
|
||||
a.deleted = 0
|
||||
and b.deleted = 0
|
||||
<if test="vo.factoryId != null">
|
||||
and a.factory_id = #{vo.factoryId}
|
||||
</if>
|
||||
<if test="vo.specificationsName != null and vo.specificationsName != ''">
|
||||
and a.specifications_name like concat('%', #{vo.specificationsName}, '%')
|
||||
</if>
|
||||
<if test="vo.type != null">
|
||||
and a.type = #{vo.type}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.smartfactory.dal.mysql.staffcertificateinformation.StaffCertificateInformationMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<select id="getStaffCertificateInformation"
|
||||
resultType="cn.iocoder.yudao.module.smartfactory.dal.dataobject.staffcertificateinformation.StaffCertificateInformationDO">
|
||||
select
|
||||
a.*,
|
||||
b.nick_name as staffName
|
||||
from sf_staff_certificate_information as a
|
||||
left join sf_staff as b on a.staff_id = b.id
|
||||
<where>
|
||||
a.deleted = 0
|
||||
and b.deleted = 0
|
||||
<if test="id != null">
|
||||
and a.id = #{id}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getStaffCertificateInformationPage"
|
||||
resultType="cn.iocoder.yudao.module.smartfactory.dal.dataobject.staffcertificateinformation.StaffCertificateInformationDO">
|
||||
select
|
||||
a.*,
|
||||
b.nick_name as staffName
|
||||
from sf_staff_certificate_information as a
|
||||
left join sf_staff as b on a.staff_id = b.id
|
||||
<where>
|
||||
a.deleted = 0
|
||||
and b.deleted = 0
|
||||
<if test="vo.staffId != null">
|
||||
and a.staff_id = #{vo.staffId}
|
||||
</if>
|
||||
<if test="vo.createTime != null and vo.createTime.length > 0">
|
||||
<if test="vo.createTime[0] != null">
|
||||
and a.create_time >= #{vo.createTime[0]}
|
||||
</if>
|
||||
<if test="vo.createTime[1] != null">
|
||||
and a.create_time <= #{vo.createTime[1]}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user