分包
This commit is contained in:
@ -17,6 +17,7 @@ public class BgtMessageConstant {
|
||||
public static final String BGT_SMALL_LEAVE = "3"; //小类型-请假
|
||||
public static final String BGT_SMALL_MAKE_UP = "4"; //小类型-补卡
|
||||
public static final String BGT_SMALL_REPORT_MAKE_UP = "5"; //小类型-日报补卡
|
||||
public static final String BGT_SMALL_PROGRESS = "5"; //小类型-任务进度
|
||||
|
||||
public static final List<String> AUDIT_TYPE = Arrays.asList("2", "3", "4", "5");
|
||||
/**
|
||||
@ -65,13 +66,13 @@ public class BgtMessageConstant {
|
||||
* ============================================系统->包工头 模板==================================================
|
||||
*/
|
||||
//承接任务
|
||||
public static final String BGT_TASK_APPLY_HEADLINE = "您已申请【%s】项目";
|
||||
public static final String BGT_TASK_APPLY_SUBHEADING = "您已成功申请到【%s】项目,请耐心等待回复!";
|
||||
public static final String BGT_TASK_APPLY_HEADLINE = "您已申请【%s】任务";
|
||||
public static final String BGT_TASK_APPLY_SUBHEADING = "您已成功申请到【%s】任务,请耐心等待回复!";
|
||||
//取消承接任务
|
||||
public static final String BGT_TASK_APPLY_CANCEL_HEADLINE = "您已申请取消【%s】项目!";
|
||||
public static final String BGT_TASK_APPLY_CANCEL_SUBHEADING = "您已成功取消【%s】项目";
|
||||
public static final String BGT_TASK_APPLY_CANCEL_HEADLINE = "您已取消【%s】任务申请!";
|
||||
public static final String BGT_TASK_APPLY_CANCEL_SUBHEADING = "您已成功取消【%s】项目申请!";
|
||||
//工资结算
|
||||
public static final String BGT_SETTLEMENT_APPLY_HEADLINE = "您正在申请【%s】项目,总共【%s】元的工资结算操作!";
|
||||
public static final String BGT_SETTLEMENT_APPLY_HEADLINE = "您正在申请【%s】任务,总共【%s】元的工资结算操作!";
|
||||
public static final String BGT_SETTLEMENT_APPLY_SUBHEADING = "您已成功发起金额为【%s】元的工资结算操作,请耐心等待回复!";
|
||||
|
||||
|
||||
@ -92,10 +93,14 @@ public class BgtMessageConstant {
|
||||
//工资结算
|
||||
public static final String BGT_TO_FBG_SETTLEMENT_APPLY_HEADLINE = "包工头【%s】正在向你发起工资结算!";
|
||||
public static final String BGT_TO_FBG_SETTLEMENT_APPLY_SUBHEADING = "包工头【%s】向你发起金额为【%s】元的工资结算操作!";
|
||||
//任务进度
|
||||
public static final String BGT_TO_FBG_PROGRESS_HEADLINE = "包工头【%s】已提交【%s】任务的新进度!";
|
||||
public static final String BGT_TO_FBG_PROGRESS_SUBHEADING = "包工头【%s】已提交【%s】任务的新进度,请查看!";
|
||||
|
||||
//包工头->分包商 消息类型
|
||||
public static final String BGT_TYPE_TASK_TO_FBG = "9"; //任务
|
||||
public static final String BGT_TYPE_SETTLEMEN_TO_FBGT = "10"; //结算
|
||||
public static final String BGT_TYPE_TASK_TO_FBS = "9"; //任务
|
||||
public static final String BGT_TYPE_SETTLEMENT_TO_FBS = "10"; //结算
|
||||
public static final String BGT_TYPE_PROGRESS_TO_FBS = "13"; //结算
|
||||
|
||||
|
||||
/**
|
||||
@ -167,6 +172,10 @@ public class BgtMessageConstant {
|
||||
map.put(HEADLINE, String.format(BGT_LEAVE_REPORT_MAKE_UP_HEADLINE, projectName));
|
||||
map.put(SUBHEADING, String.format(BGT_LEAVE_REPORT_MAKE_UP_SUBHEADING_ONE, projectName,auditor,pass));
|
||||
break;
|
||||
case "13":
|
||||
map.put(HEADLINE, String.format(BGT_TO_FBG_PROGRESS_HEADLINE,auditor, projectName));
|
||||
map.put(SUBHEADING, String.format(BGT_TO_FBG_PROGRESS_SUBHEADING, auditor,projectName));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -5,6 +5,9 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.ruoyi.common.constants.BgtMessageConstant.HEADLINE;
|
||||
import static com.ruoyi.common.constants.BgtMessageConstant.SUBHEADING;
|
||||
|
||||
public class FbsMessageConstant {
|
||||
// 公共常量
|
||||
|
||||
@ -14,7 +17,7 @@ public class FbsMessageConstant {
|
||||
|
||||
public static final String FBS_SMALL_SIGN_UP = "1"; //小类型-包工头报名
|
||||
public static final String FBS_SMALL_PAY = "2"; //小类型-付款
|
||||
public static final String FBS_SMALL_LEAVE = "3"; //小类型-进度
|
||||
public static final String FBS_SMALL_PROGRESS = "3"; //小类型-进度
|
||||
|
||||
public static final List<String> AUDIT_TYPE = Arrays.asList("2", "3");
|
||||
/**
|
||||
@ -77,7 +80,7 @@ public class FbsMessageConstant {
|
||||
|
||||
//分包商->总包方 消息类型
|
||||
public static final String FBS_TYPE_SUB_TO_ZBF = "7"; //任务
|
||||
public static final String FBS_TYPE_SETTLEMEN_TO_FBGT = "8"; //结算
|
||||
public static final String FBS_TYPE_SETTLEMENT_TO_ZBF = "8"; //结算
|
||||
|
||||
|
||||
/**
|
||||
@ -85,12 +88,9 @@ public class FbsMessageConstant {
|
||||
* ============================================调用方法==================================================
|
||||
* ============================================调用方法==================================================
|
||||
*/
|
||||
//主副标志
|
||||
public static final String HEADLINE = "headline"; //主标题
|
||||
public static final String SUBHEADING = "subheading"; //副标题
|
||||
|
||||
//包工头消息返回
|
||||
public static Map<String, String> bgtMessage(Map<String, String> mp, String type, Boolean isPass) {
|
||||
public static Map<String, String> fbsMessage(Map<String, String> mp, String type, Boolean isPass) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
String pass = isPass ? "通过" : "拒绝";
|
||||
String projectName = mp.get("projectName");
|
||||
|
||||
@ -8,7 +8,10 @@ public class WgzAndBgtMessageConstant {
|
||||
public static final String USERTYPE_WGZ = "1"; //务工者
|
||||
public static final String USERTYPE_BGT = "2"; //包工头
|
||||
public static final String USERTYPE_FBS = "3"; //分包商
|
||||
public static final String USERTYPE_ZBF = "4"; //分包商
|
||||
|
||||
//系统ID
|
||||
public static final Long SYSTEM_ID = 0L;
|
||||
|
||||
public static final String OPERATION_NO = "0"; //不需要操作
|
||||
public static final String OPERATION_NEED = "1"; //需要操作
|
||||
|
||||
@ -0,0 +1,93 @@
|
||||
package com.ruoyi.common.constants;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.ruoyi.common.constants.BgtMessageConstant.HEADLINE;
|
||||
import static com.ruoyi.common.constants.BgtMessageConstant.SUBHEADING;
|
||||
|
||||
public class ZbfMessageConstant {
|
||||
// 公共常量
|
||||
|
||||
public static final String ZBF_LARGE_TASK = "1"; //大类型-任务
|
||||
public static final String ZBF_LARGE_SETTLEMENT = "2"; //大类型-结算
|
||||
public static final String ZBF_LARGE_OTHER = "3"; //大类型-其它
|
||||
|
||||
public static final String ZBF_SMALL_SIGN_UP = "1"; //小类型-分包商报名
|
||||
public static final String ZBF_SMALL_PAY = "2"; //小类型-付款
|
||||
public static final String ZBF_SMALL_PROGRESS = "3"; //小类型-进度
|
||||
|
||||
public static final List<String> AUDIT_TYPE = Arrays.asList("2", "3");
|
||||
/**
|
||||
* ============================================总包方->分包商 模板==================================================
|
||||
* ============================================总包方->分包商 模板==================================================
|
||||
* ============================================总包方->分包商 模板==================================================
|
||||
*/
|
||||
|
||||
//任务审批
|
||||
public static final String ZBF_SIGN_UP_APPLY_HEADLINE = "您申请的【%s】项目【%s】分包,已得到回复!";
|
||||
public static final String ZBF_SIGN_UP_APPLY_SUBHEADING = "您申请的【%s】任务【%s】分包,审核人【%s】已%s!";
|
||||
//工资审批
|
||||
public static final String ZBF_PAY_APPLY_HEADLINE = "您【%s】任务【%s】分包工资申请已审批!";
|
||||
public static final String ZBF_PAY_APPLY_SUBHEADING = "您申请的【%s】任务【%s】分包工资,审核人【%s】已%s!";
|
||||
|
||||
|
||||
//分包商->包工头 消息类型
|
||||
public static final String ZBF_TYPE_SIGN_UP = "1"; //包工头报名
|
||||
public static final String ZBF_TYPE_PAY = "2"; //付款
|
||||
|
||||
/**
|
||||
* ============================================系统->分包商 模板==================================================
|
||||
* ============================================系统->分包商 模板==================================================
|
||||
* ============================================系统->分包商 模板==================================================
|
||||
*/
|
||||
// //承接任务
|
||||
// public static final String FBS_SUB_APPLY_HEADLINE = "您已成功申请【%s】项目【%s】分包";
|
||||
// public static final String FBS_SUB_APPLY_SUBHEADING = "您已成功申请到【%s】项目【%s】分包,请耐心等待回复!";
|
||||
// //取消承接任务
|
||||
// public static final String FBS_TASK_APPLY_CANCEL_HEADLINE = "您已成功取消【%s】项目【%s】分包申请!";
|
||||
// public static final String FBS_TASK_APPLY_CANCEL_SUBHEADING = "您已成功取消【%s】项目【%s】分包申请";
|
||||
// //工资结算
|
||||
// public static final String FBS_SETTLEMENT_APPLY_HEADLINE = "您正在申请【%s】项目【%s】分包,总共【%s】元的工资结算操作!";
|
||||
// public static final String FBS_SETTLEMENT_APPLY_SUBHEADING = "您已成功发起金额为【%s】元的工资结算操作,请耐心等待回复!";
|
||||
//
|
||||
//
|
||||
// //系统->包工头 消息类型
|
||||
// public static final String FBS_TYPE_TASK = "4"; //任务报名
|
||||
// public static final String FBS_TYPE_TASK_CANCEL = "5"; //任务取消
|
||||
// public static final String FBS_TYPE_SETTLEMENT = "6"; //结算
|
||||
|
||||
|
||||
/**
|
||||
* ============================================调用方法==================================================
|
||||
* ============================================调用方法==================================================
|
||||
* ============================================调用方法==================================================
|
||||
*/
|
||||
|
||||
//包工头消息返回
|
||||
public static Map<String, String> zbfMessage(Map<String, String> mp, String type, Boolean isPass) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
String pass = isPass ? "通过" : "拒绝";
|
||||
String projectName = mp.get("projectName");
|
||||
String subName = mp.get("subName");
|
||||
String auditor = mp.get("auditor");
|
||||
String amount = mp.get("amount");
|
||||
switch (type) {
|
||||
case "1":
|
||||
map.put(HEADLINE, String.format(ZBF_SIGN_UP_APPLY_HEADLINE, projectName,subName));
|
||||
map.put(SUBHEADING, String.format(ZBF_SIGN_UP_APPLY_SUBHEADING, projectName,subName, auditor, pass));
|
||||
break;
|
||||
case "2":
|
||||
map.put(HEADLINE, String.format(ZBF_PAY_APPLY_HEADLINE, projectName,subName));
|
||||
map.put(SUBHEADING, String.format(ZBF_PAY_APPLY_SUBHEADING, projectName,subName, auditor, pass));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,108 +0,0 @@
|
||||
package com.ruoyi.common.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.ruoyi.common.domain.Company;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.bo.CompanyQueryBo;
|
||||
import com.ruoyi.common.service.ICompanyService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* 企业认证Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-26
|
||||
*/
|
||||
@Api(value = "企业认证控制器", tags = {"企业认证管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/common/company")
|
||||
public class CompanyController extends BaseController {
|
||||
|
||||
private final ICompanyService iCommonCompanyService;
|
||||
|
||||
/**
|
||||
* 查询企业认证列表
|
||||
*/
|
||||
@ApiOperation("查询企业认证列表")
|
||||
@PreAuthorize("@ss.hasPermi('common:company:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<Company> list(@Validated CompanyQueryBo bo) {
|
||||
return iCommonCompanyService.queryPageList(bo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出企业认证列表
|
||||
*/
|
||||
@ApiOperation("导出企业认证列表")
|
||||
@PreAuthorize("@ss.hasPermi('common:company:export')")
|
||||
@Log(title = "企业认证", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult<Company> export(@Validated CompanyQueryBo bo) {
|
||||
List<Company> list = iCommonCompanyService.queryList(bo);
|
||||
ExcelUtil<Company> util = new ExcelUtil<Company>(Company.class);
|
||||
return util.exportExcel(list, "企业认证");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取企业认证详细信息
|
||||
*/
|
||||
@ApiOperation("获取企业认证详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('common:company:query')")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult<Company> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(iCommonCompanyService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增企业认证
|
||||
*/
|
||||
@ApiOperation("新增企业认证")
|
||||
@PreAuthorize("@ss.hasPermi('common:company:add')")
|
||||
@Log(title = "企业认证", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit
|
||||
@PostMapping()
|
||||
public AjaxResult<Void> add(@Validated @RequestBody Company bo) {
|
||||
return toAjax(iCommonCompanyService.insert(bo) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改企业认证
|
||||
*/
|
||||
@ApiOperation("修改企业认证")
|
||||
@PreAuthorize("@ss.hasPermi('common:company:edit')")
|
||||
@Log(title = "企业认证", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@PutMapping()
|
||||
public AjaxResult<Void> edit(@Validated @RequestBody Company bo) {
|
||||
return toAjax(iCommonCompanyService.update(bo) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除企业认证
|
||||
*/
|
||||
@ApiOperation("删除企业认证")
|
||||
@PreAuthorize("@ss.hasPermi('common:company:remove')")
|
||||
@Log(title = "企业认证" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(iCommonCompanyService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
@ -1,9 +1,6 @@
|
||||
package com.ruoyi.common.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -33,7 +30,7 @@ public class Company implements Serializable {
|
||||
|
||||
/** 主键ID */
|
||||
@ApiModelProperty("主键ID")
|
||||
@TableId(value = "id")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 企业名称 */
|
||||
@ -66,6 +63,19 @@ public class Company implements Serializable {
|
||||
@ApiModelProperty("注册资本")
|
||||
private BigDecimal registrationAmount;
|
||||
|
||||
|
||||
@ApiModelProperty("联系人")
|
||||
private String contact;
|
||||
|
||||
@ApiModelProperty("联系电话")
|
||||
private String contactPhone;
|
||||
|
||||
@ApiModelProperty("银行")
|
||||
private String bank;
|
||||
|
||||
@ApiModelProperty("银行卡号")
|
||||
private String cardNo;
|
||||
|
||||
/** 企业简介 */
|
||||
@Excel(name = "企业简介")
|
||||
@ApiModelProperty("企业简介")
|
||||
|
||||
@ -40,6 +40,18 @@ public class CompanyAuthenticateDTO {
|
||||
@ApiModelProperty("注册资本")
|
||||
private BigDecimal registrationAmount;
|
||||
|
||||
@ApiModelProperty("联系人")
|
||||
private String contact;
|
||||
|
||||
@ApiModelProperty("联系电话")
|
||||
private String contactPhone;
|
||||
|
||||
@ApiModelProperty("银行")
|
||||
private String bank;
|
||||
|
||||
@ApiModelProperty("银行卡号")
|
||||
private String cardNo;
|
||||
|
||||
@ApiModelProperty("企业简介")
|
||||
private String introduce;
|
||||
|
||||
|
||||
@ -52,4 +52,9 @@ public interface ICompanyService extends IServicePlus<Company> {
|
||||
* @return
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 获取公司的名称
|
||||
*/
|
||||
String getCompanyNameById(Long id);
|
||||
}
|
||||
|
||||
@ -89,4 +89,13 @@ public class CompanyServiceImpl extends ServicePlusImpl<CommonCompanyMapper, Com
|
||||
}
|
||||
return removeByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCompanyNameById(Long id) {
|
||||
if(id == null) {
|
||||
return "";
|
||||
}
|
||||
Company byId = getById(id);
|
||||
return byId.getCompanyName();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user