lsw 11 mesi fa
parent
commit
783b2d6caa

+ 9 - 10
app/pages/user/index.vue

@@ -21,7 +21,7 @@
 			<view class="row">
 				<view class="out">
 					<view class="int">
-						<view class="num">{{ user.receive || 0 }}</view>
+						<view class="num">{{ user.receiveResume || 0 }}</view>
 						<view class="desc">收到简历</view>
 					</view>
 				</view>
@@ -29,7 +29,7 @@
 			<view class="row">
 				<view class="out">
 					<view class="int">
-						<view class="num">{{ user.ask || 0 }}</view>
+						<view class="num">{{ user.inviteUser || 0 }}</view>
 						<view class="desc">面试邀请</view>
 					</view>
 				</view>
@@ -87,7 +87,7 @@
 						<view class="int">
 							<view class="icon" style="background-color: #4caf50">&#xe627;</view>
 							<view class="title">收到简历</view>
-							<view class="bage" v-if="user.noRead > 0">{{ user.noRead > 99 ? '99+' : user.noRead }}</view>
+							<view class="bage" v-if="user.noReadResume > 0">{{ user.noReadResume > 99 ? '99+' : user.noReadResume }}</view>
 						</view>
 					</view>
 				</view>
@@ -157,7 +157,7 @@
 					<view class="int">
 						<view class="icon" style="background-color: #03a9f4">&#xe63c;</view>
 						<view class="title">收到报名</view>
-						<view class="bage" v-if="user.applicationNoRead > 0">{{ user.applicationNoRead > 99 ? '99+' : user.applicationNoRead }}</view>
+						<view class="bage" v-if="user.noReadApplication > 0">{{ user.noReadApplication > 99 ? '99+' : user.noReadApplication }}</view>
 					</view>
 				</view>
 			</view>
@@ -166,7 +166,6 @@
 					<view class="int">
 						<view class="icon" style="background-color: #03a9f4">&#xe63c;</view>
 						<view class="title">我的报名</view>
-						<view class="bage" v-if="user.applicationNoRead > 0">{{ user.applicationNoRead > 99 ? '99+' : user.applicationNoRead }}</view>
 					</view>
 				</view>
 			</view>
@@ -184,7 +183,7 @@
 					<view class="int">
 						<view class="icon" style="background-color: #03a9f4">&#xe63c;</view>
 						<view class="title">任务清单</view>
-						<view class="bage" v-if="user.applicationNoRead > 0">{{ user.applicationNoRead > 99 ? '99+' : user.applicationNoRead }}</view>
+						<!-- <view class="bage" v-if="user.applicationNoRead > 0">{{ user.applicationNoRead > 99 ? '99+' : user.applicationNoRead }}</view> -->
 					</view>
 				</view>
 			</view>
@@ -265,10 +264,10 @@ export default {
 		};
 	},
 	onShow() {
-/* 		 		 	this.user = {
-				token: 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImIwNzE0MjFkLTg1NTAtNDk4Yy1iOTAzLTQ1NTBkMmJhYThkZSJ9.y6PAxUng74T4gq1apPRqTowMGVPqdx0fiNrBmeiP3l7mqgKibRrlOrZUYdaNWE3GxhiGklZ1wHEmzuiq9Tez7Q'
-			};
-			uni.setStorageSync('user', this.user); */
+		/* 		this.user = {
+			token: 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjdhZGY4MzFmLWE0NjQtNGY5YS04YTY5LWMzM2QyNDU2MzI2ZSJ9.EPHElRmlVoFTfT4OxHNpvIC7bDKc1gKpNiO1u_dBOerYh5JFIuSrSkgp0PtQ0kOhO9iuvU0dttEGbsgofdrcpQ'
+		};
+		uni.setStorageSync('user', this.user); */
 
 		if (this.hasLogin()) {
 			this.getUserInfo();

+ 7 - 23
app/pages/user/resume/application/receive/list.vue

@@ -25,10 +25,8 @@
 			</view>
 			<view class="flex">
 				<view class="f" v-if="item.state == 0">待处理</view>
-				<view class="f" v-if="item.state == 1 && item.isAccept == 0">已邀待对方同意</view>
-				<view class="f br" v-if="item.state == 1 && item.isAccept == 1">对方同意面试</view>
-				<view class="f agree" v-if="item.state == 1 && item.isAccept == 1" @click.stop="complete(item)">点击完成面试</view>
-				<view class="f agree" v-if="item.state == 1 && item.isAccept == 3">面试完成</view>
+				<view class="f" v-if="item.state == 1 && item.isAccept == 0">等待对方同意接单</view>
+				<view class="f br" v-if="item.state == 1 && item.isAccept == 1">对方同意接单</view>
 				<view class="f danger" v-if="item.state == 1 && item.isAccept == 2">对方已拒绝</view>
 			</view>
 		</view>
@@ -48,17 +46,20 @@ export default {
 				{ name: '未读', isRead: 0 }
 			],
 			list: [],
-			param: { pageNum: 1, pageSize: 10,type:1},
+			param: { pageNum: 1, pageSize: 10, type: 1 },
 			loadMore: true,
 			show: false
 		};
 	},
 	onLoad(e) {
 		this.param.positionId = e.id;
+		this.getData();
+		uni.$on('agreeApplication', (res) => {
+			this.refresh();
+		});
 		setTimeout(() => {
 			uni.setNavigationBarTitle({ title: e.title + '(' + e.total + ')' });
 		}, 300);
-		this.getData();
 	},
 	methods: {
 		getData() {
@@ -75,23 +76,6 @@ export default {
 		go(url) {
 			uni.navigateTo({ url: url });
 		},
-		complete(item) {
-			uni.showModal({
-				title: '提示',
-				content: '确定完成面试?',
-				success: (res) => {
-					if (res.confirm) {
-						this.http.request({
-							url: '/app/deliver/complete/' + item.id,
-							success: (res) => {
-								uni.showToast({ title: '操作成功' });
-								item.isAccept = 3;
-							}
-						});
-					}
-				}
-			});
-		},
 		tabClick(e) {
 			this.param.isRead = e.isRead;
 			this.refresh();

+ 9 - 4
app/pages/user/resume/application/receive/preview.vue

@@ -65,10 +65,15 @@ export default {
 								uni.requestSubscribeMessage({
 									tmplIds: ['bxOGj5FbyGHSevmWf9yzwpSZDjlFZPnGBeqGgIj9w_o', 'pyUsW2HqOcXmFETHFUDjuH-ekf05QVc29k0tRaY9wP8'],
 									complete: (c) => {
-										uni.showToast({ title: '发送成功,等待对方同意' });
-										setTimeout(() => {
-											uni.navigateBack();
-										}, 700);
+										uni.showModal({
+											title: '提示',
+											content: '发送成功,等待对方同意',
+											showCancel: false,
+											success: (res) => {
+												uni.$emit('agreeApplication');
+												uni.navigateBack();
+											}
+										});
 									}
 								});
 							}

+ 41 - 50
app/pages/user/resume/application/task_detail.vue

@@ -20,14 +20,21 @@
 		</view>
 		<view class="mfooter">
 			<view class="cn">
-				<button class="btn" @click="go('/pages/user/resume/application/task_list?taskId=' + item.taskId)">
-					<text class="icon">&#xe652;</text>
-					<text>任务日志</text>
-				</button>
-				<button class="btn" @click="send()">
-					<text class="icon">&#xe652;</text>
-					<text>确认完成</text>
-				</button>
+				<view class="f">
+					<button class="btn" @click="go('/pages/user/resume/application/task_list?taskId=' + obj.id)">
+						<text class="icon">&#xe656;</text>
+						<text>任务日志</text>
+					</button>
+				</view>
+				<view class="f">
+					<button class="btn" @click="send()" :disabled="obj.isComplete == 1 || obj.isComplete == 2">
+						<text class="icon">&#xe612;</text>
+						<text v-if="obj.isComplete == 0">确认完成</text>
+						<text v-if="obj.isComplete == 1">等待甲方确认</text>
+						<text v-if="obj.isComplete == 2">任务完成</text>
+						<text v-if="obj.isComplete == 3">申请完成驳回</text>
+					</button>
+				</view>
 			</view>
 		</view>
 	</view>
@@ -37,16 +44,17 @@
 export default {
 	data() {
 		return {
-			item: {}
+			item: {},
+			obj: {}
 		};
 	},
 	onLoad(e) {
+		this.obj = JSON.parse(e.item);
 		this.http.request({
-			url: '/app/position/detail/' + e.id,
+			url: '/app/position/detail/' + this.obj.positionId,
 			success: (res) => {
 				this.item = res.data.data.position;
 				this.item.days = this.util.days(this.item.startDate, this.item.endDate);
-				this.item.taskId = e.taskId;
 			}
 		});
 	},
@@ -54,49 +62,27 @@ export default {
 		go(url) {
 			uni.navigateTo({ url: url });
 		},
-		//投递简历
 		send() {
-			this.http.request({
-				url: '/app/deliver/send/' + this.item.id,
+			uni.showModal({
+				title: '提示',
+				content: '确定提交完成申请?',
 				success: (res) => {
-					//实名认证跳转
-					if (res.data.code == 7878) {
-						uni.showModal({
-							title: '提示',
-							content: res.data.msg,
-							showCancel: false,
+					if (res.confirm) {
+						this.http.request({
+							url: '/app/deliver/yTaskComplete',
+							data: { id: this.obj.id },
+							method: 'POST',
 							success: (res) => {
-								uni.navigateTo({ url: '/pages/user/auth' });
+								//通知模板订阅消息
+								uni.requestSubscribeMessage({
+									tmplIds: ['87jYTnpeZJnvdQ6gHcscZ96eQYlSXpfGeFU3g9deTeA'],
+									complete: (c) => {
+										uni.showModal({ content: '提交完成申请成功,等待甲方确认', showCancel: false });
+									}
+								});
 							}
 						});
-						return;
 					}
-					//完善简历跳转
-					if (res.data.code == 7979) {
-						uni.showModal({
-							title: '提示',
-							content: res.data.msg,
-							showCancel: false,
-							success: (res) => {
-								uni.navigateTo({ url: '/pages/user/resume/index' });
-							}
-						});
-						return;
-					}
-					let tmplIds = [];
-					if (this.item.type == 0) {
-						tmplIds = ['ll-qdaEgbDN4rEod0nJpsjUuSqHT9e12EniZfRPiNqM'];
-					}
-					if (this.item.type == 1) {
-						tmplIds = ['yhFtY-hzXerPnIxXcYcRCLpbkuNrzn5yk-rWgHVX2Aw', '87jYTnpeZJnvdQ6gHcscZ96eQYlSXpfGeFU3g9deTeA'];
-					}
-					//通知模板订阅消息
-					uni.requestSubscribeMessage({
-						tmplIds: tmplIds,
-						complete: (c) => {
-							uni.showModal({ content: this.item.type == 0 ? '投递成功,等待企业回应' : '报名成功,等待雇主审核', showCancel: false });
-						}
-					});
 				}
 			});
 		}
@@ -110,10 +96,15 @@ export default {
 	bottom: 0px;
 	border-top: 1px solid $line;
 	.cn {
-		padding: 10px 10px 15px 10px;
+		padding: 0px 10px 15px 10px;
 		overflow: hidden;
-		.btn {
+		display: flex;
+		.f {
 			flex: 1;
+			padding: 0px 10px 0px 10px;
+			.btn {
+				width: 100%;
+			}
 		}
 	}
 }

+ 1 - 1
app/pages/user/resume/application/task_list.vue

@@ -85,7 +85,7 @@ export default {
 		display: flex;
 		.left {
 			flex: 0.1;
-			border-left: 1px solid darkgray;
+			border-left: 1px solid #cacaca;
 			margin-top: -44px;
 			.icon {
 				float: left;

+ 7 - 2
app/pages/user/resume/application/task_to_do.vue

@@ -3,7 +3,7 @@
 		<view class="tab">
 			<u-tabs :list="tab" @click="tabClick"></u-tabs>
 		</view>
-		<view class="item_job" v-for="(item, index) in list" :key="index" @click="go('/pages/user/resume/application/task_detail?id=' + item.positionId + '&taskId=' + item.id)">
+		<view class="item_job" v-for="(item, index) in list" :key="index" @click="go('/pages/user/resume/application/task_detail?item=' + JSON.stringify(item))">
 			<view class="top">
 				<view class="title omit">{{ item.title }}</view>
 				<view class="salary">{{ item.salary }}¥</view>
@@ -14,6 +14,9 @@
 			</view>
 			<view class="flex">
 				<view class="f br agree" v-if="item.isComplete == 0">进行中...</view>
+				<view class="f br agree" v-if="item.isComplete == 1">确认中...</view>
+				<view class="f br agree" v-if="item.isComplete == 2">已完成</view>
+				<view class="f br danger" v-if="item.isComplete == 3">未通过</view>
 			</view>
 		</view>
 		<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
@@ -27,7 +30,9 @@ export default {
 			tab: [
 				{ name: '全部', isComplete: '' },
 				{ name: '进行中', isComplete: 0 },
-				{ name: '已完成', isComplete: 1 }
+				{ name: '确认中', isComplete: 1 },
+				{ name: '已完成', isComplete: 2 },
+				{ name: '未通过', isComplete: 3 }
 			],
 			list: [],
 			param: { pageNum: 1, pageSize: 10, state: 1, type: 1, isAccept: 1 },

+ 18 - 12
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/User.java

@@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
 
 import java.math.BigDecimal;
 import java.util.Date;
+
 /**
  * @author lsw
  * @date 2024-04-15
@@ -17,7 +18,7 @@ import java.util.Date;
 @Data
 @TableName(value = "tb_user")
 @Accessors(chain = true)
-public class User{
+public class User {
     private static final long serialVersionUID = 1L;
 
     private Long id;
@@ -106,32 +107,35 @@ public class User{
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date updateTime;
 
+    /************************************************查询*************************************/
+
     @TableField(exist = false)
     private String token;
 
-    @TableField(exist = false)
-    private Integer noRead;
 
     @TableField(exist = false)
-    private Integer fullTime;
+    @ApiModelProperty(value = "企业收到未查看全职简历数")
+    private Integer noReadResume;
 
     @TableField(exist = false)
-    private Integer partTime;
+    @ApiModelProperty(value = "企业收到全职简历总数")
+    private Integer receiveResume;
 
     @TableField(exist = false)
-    private Integer invite;
+    @ApiModelProperty(value = "企业邀请全职面试总数")
+    private Integer inviteUser;
 
     @TableField(exist = false)
-    private Integer receive;
-
-    @TableField(exist = false)
-    private Integer ask;
+    @ApiModelProperty(value = "个人全职投递")
+    private Integer fullTime;
 
     @TableField(exist = false)
-    private Integer agree;
+    @ApiModelProperty(value = "个人兼职投递")
+    private Integer partTime;
 
     @TableField(exist = false)
-    private Integer applicationNoRead;
+    @ApiModelProperty(value = "甲方收到未查看报名数")
+    private Integer noReadApplication;
 
     @TableField(exist = false)
     @ApiModelProperty(value = "全职邀约未处理")
@@ -142,8 +146,10 @@ public class User{
     private Integer partTimeAccept;
 
     @TableField(exist = false)
+    @ApiModelProperty(value = "简历信息")
     private String resume;
 
     @TableField(exist = false)
+    @ApiModelProperty(value = "企业信息")
     private String enterprise;
 }

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/work/mapper/UserMapper.java

@@ -17,5 +17,5 @@ public interface UserMapper extends BaseMapper<User> {
     @Select("SELECT * FROM tb_user WHERE open_id=#{openId}")
     User selectByOpenId(@Param("openId") String openId);
 
-    User selectUser(@Param("id") Long id);
+    User selectUser(User user);
 }

+ 4 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/ResumeDeliverServiceImpl.java

@@ -131,7 +131,7 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
     @Override
     public AjaxResult agreeApplication(Long id) throws ParseException {
         ResumeDeliver resumeDeliver = getById(id);
-        if (resumeDeliver == null || !resumeDeliver.getUserId().equals(AppUtil.getUser().getId())) {
+        if (resumeDeliver == null || !resumeDeliver.getEnterpriseId().equals(AppUtil.getUser().getId())) {
             return AjaxResult.error("简历不存在或非法操作");
         }
         if (resumeDeliver.getIsAccept() == 2) {
@@ -254,6 +254,9 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
         if (resumeDeliver == null || !resumeDeliver.getUserId().equals(AppUtil.getUser().getId())) {
             return AjaxResult.error("兼职任务不存在或非法操作");
         }
+        if (resumeDeliver.getIsComplete() == 2) {
+            return AjaxResult.error("任务已完成");
+        }
         resumeDeliver.setIsComplete(1);
         resumeDeliver.setCMsg(dto.getCMsg());
         if (!updateById(resumeDeliver)) {

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/UserServiceImpl.java

@@ -155,6 +155,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
 
     @Override
     public AjaxResult info() {
-        return AjaxResult.success(userMapper.selectUser(AppUtil.getUser().getId()));
+        return AjaxResult.success(userMapper.selectUser(AppUtil.getUser()));
     }
 }

+ 14 - 12
ruoyi-admin/src/main/resources/mapper/work/UserMapper.xml

@@ -16,18 +16,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectUser" resultType="com.ruoyi.web.work.domain.User">
         SELECT
             u.*,
-            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.enterprise_id = u.id AND d.is_read = 0 AND d.type=0) AS noRead,
-            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.user_id = u.id AND d.is_read = 0 AND d.type=1) AS applicationNoRead,
-            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.user_id = u.id AND d.state = 1 AND is_accept = 0 AND type=0 ) AS fullTimeAccept,
-            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.user_id = u.id AND d.state = 1 AND is_accept = 0 AND type=1) AS partTimeAccept,
-            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.user_id = u.id AND d.type = 0 ) AS fullTime,
-            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.user_id = u.id AND d.type = 1 ) AS partTime,
-            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.user_id = u.id AND d.state=1 AND d.is_accept=1) AS invite,
-            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.enterprise_id = u.id) AS receive,
-            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.enterprise_id = u.id AND d.state=1) AS ask,
-            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.enterprise_id = u.id AND d.state=1 AND d.is_accept=1) AS agree,
-            ( SELECT name FROM tb_resume d WHERE d.id = u.id) AS resume,
-            ( SELECT name FROM tb_enterprise d WHERE d.id = u.id) AS enterprise
+            <if test="type==0">
+            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.user_id = u.id AND d.type = 0 ) AS fullTime,/*全职投递*/
+            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.user_id = u.id AND d.type = 1 ) AS partTime,/*兼职投递*/
+            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.user_id = u.id AND d.state = 1 AND is_accept = 0 AND type=0 ) AS fullTimeAccept,/*全职邀约未处理*/
+            ( SELECT name FROM tb_resume d WHERE d.id = u.id) AS resume,/*简历信息*/
+            </if>
+            <if test="type==1">
+            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.enterprise_id = u.id AND d.is_read = 0 AND d.type=0) AS noReadResume,/*企业收到未查看全职简历数*/
+            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.enterprise_id = u.id AND d.type=0) AS receiveResume,/*企业收到全职简历总数*/
+            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.enterprise_id = u.id AND d.state=1 AND d.type=0) AS inviteUser,/*企业邀请全职面试总数*/
+            ( SELECT name FROM tb_enterprise d WHERE d.id = u.id) AS enterprise, /*企业信息*/
+            </if>
+            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.enterprise_id = u.id AND d.is_read = 0 AND d.type=1) AS noReadApplication, /*甲方收到未查看报名数*/
+            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.user_id = u.id AND d.state = 1 AND is_accept = 0 AND type=1) AS partTimeAccept/*兼职邀约未处理*/
         FROM
             tb_user u
         WHERE