lsw před 9 měsíci
rodič
revize
87936e578b

+ 1 - 1
app/common/common.scss

@@ -287,7 +287,7 @@
 		overflow: hidden;
 		.address {
 			float: left;
-			width: 68%;
+			width: 63%;
 			.icon {
 				padding-right: 2px;
 			}

+ 1 - 1
app/components/job/job.vue

@@ -17,7 +17,7 @@
 					<text class="icon" v-if="item.location">&#xe757;</text>
 					<text>{{ item.location || '' }}</text>
 				</view>
-				<view class="distance" v-if="item.distance">距离你{{ item.distance }}km</view>
+				<view class="distance" v-if="item.distance && item.latitude">距离你{{ item.distance }}km</view>
 			</view>
 		</view>
 	</view>

+ 1 - 1
app/components/task/task.vue

@@ -26,7 +26,7 @@ export default {
 	methods: {
 		init(taskId) {
 			this.show = true;
-			this.item.taskId = taskId;
+			this.item = { pic: [], taskId: taskId };
 		},
 		add() {
 			let rule = [

+ 1 - 1
app/pages/job/detail.vue

@@ -137,7 +137,7 @@ export default {
 						tmplIds = ['ll-qdaEgbDN4rEod0nJpsjUuSqHT9e12EniZfRPiNqM'];
 					}
 					if (this.item.type == 1) {
-						tmplIds = ['yhFtY-hzXerPnIxXcYcRCLpbkuNrzn5yk-rWgHVX2Aw', '87jYTnpeZJnvdQ6gHcscZ96eQYlSXpfGeFU3g9deTeA'];
+						tmplIds = ['yhFtY-hzXerPnIxXcYcRCAjQUf8CdLoYEQQi5nBgim0', '87jYTnpeZJnvdQ6gHcscZ96eQYlSXpfGeFU3g9deTeA'];
 					}
 					//通知模板订阅消息
 					uni.requestSubscribeMessage({

+ 3 - 3
app/pages/user/index.vue

@@ -192,7 +192,7 @@
 					<view class="int">
 						<view class="icon" style="background-color: #03a9f4">&#xe63c;</view>
 						<view class="title">乙方任务</view>
-						<view class="bage" v-if="user.completeReject > 0">{{ user.completeReject > 99 ? '99+' : user.completeReject }}</view>
+						<view class="bage" v-if="user.completeIng > 0">进行中</view>
 					</view>
 				</view>
 			</view>
@@ -273,10 +273,10 @@ export default {
 		};
 	},
 	onShow() {
-/* 		this.user = {
+ 		this.user = {
 			token: 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjdhZGY4MzFmLWE0NjQtNGY5YS04YTY5LWMzM2QyNDU2MzI2ZSJ9.EPHElRmlVoFTfT4OxHNpvIC7bDKc1gKpNiO1u_dBOerYh5JFIuSrSkgp0PtQ0kOhO9iuvU0dttEGbsgofdrcpQ'
 		};
-		uni.setStorageSync('user', this.user); */
+		uni.setStorageSync('user', this.user);
 
 		if (this.hasLogin()) {
 			this.getUserInfo();

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

@@ -66,7 +66,7 @@ export default {
 		agree(item, isAccept) {
 			uni.showModal({
 				title: '提示',
-				content: isAccept == 1 ? '确定同意去面试' : '确定拒绝该邀请',
+				content: isAccept == 1 ? '确定同意接受这个兼职工作' : '确定拒绝该邀请',
 				success: (res) => {
 					if (res.confirm) {
 						this.http.request({

+ 4 - 3
app/pages/user/resume/application/task_detail.vue

@@ -15,18 +15,17 @@
 				<view class="desc mb15">在规定时间内完工结算(平台打款)</view>
 				<view class="mtitle">兼职描述</view>
 				<u-parse :content="item.contents" class="item"></u-parse>
-				<map :latitude="item.latitude" :longitude="item.longitude" :markers="covers" v-if="item.latitude"></map>
 			</view>
 		</view>
 		<view class="mfooter">
 			<view class="cn">
 				<view class="f">
-					<button class="btn" @click="go('/pages/user/resume/application/task_list?taskId=' + obj.id + '&role=' + obj.role)">
+					<button class="btn" style="background-color: #607d8b" @click="go('/pages/user/resume/application/task_list?taskId=' + obj.id + '&role=' + obj.role)">
 						<text class="icon">&#xe656;</text>
 						<text>任务日志</text>
 					</button>
 				</view>
-				<view class="f" style="flex: 1.4;">
+				<view class="f" style="flex: 1.4">
 					<button class="btn" @click="send()" :disabled="obj.isComplete == 1 || obj.isComplete == 2" v-if="obj.role == 1">
 						<text class="icon">&#xe612;</text>
 						<text v-if="obj.isComplete == 0">确认完成</text>
@@ -86,6 +85,8 @@ export default {
 									tmplIds: ['87jYTnpeZJnvdQ6gHcscZ96eQYlSXpfGeFU3g9deTeA'],
 									complete: (c) => {
 										uni.showModal({ content: '提交完成申请成功,等待甲方确认', showCancel: false });
+										uni.$emit('task_to_do');
+										uni.navigateBack();
 									}
 								});
 							}

+ 0 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/ResumeDeliver.java

@@ -30,9 +30,6 @@ public class ResumeDeliver {
     @ApiModelProperty(value = "关联账号")
     private Long userId;
 
-    @ApiModelProperty(value = "微信id")
-    private String openId;
-
     @ApiModelProperty(value = "企业id")
     private Long enterpriseId;
 

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

@@ -159,5 +159,5 @@ public class User {
 
     @TableField(exist = false)
     @ApiModelProperty(value = "已方收到申请完成驳回数")
-    private String completeReject;
+    private String completeIng;
 }

+ 25 - 13
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/ResumeDeliverServiceImpl.java

@@ -72,6 +72,9 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
         if (position == null || position.getState() != 0 || position.getAudit() != 1) {
             return AjaxResult.error("该职位不存在或已下架");
         }
+        if (position.getUserId().equals(AppUtil.getUser().getId())) {
+            return AjaxResult.error("不能自己报名自己");
+        }
         ResumeDeliver resumeDeliver = resumeDeliverMapper.check(position.getId(), AppUtil.getUser().getId());
         if (resumeDeliver != null) {
             return AjaxResult.error("请勿重复投递简历");
@@ -81,7 +84,6 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
         resumeDeliver.setType(position.getType());
         resumeDeliver.setPositionId(position.getId());
         resumeDeliver.setEnterpriseId(position.getUserId());
-        resumeDeliver.setOpenId(AppUtil.getUser().getOpenId());
         if (!save(resumeDeliver)) {
             throw new ServiceException("投递简历失败");
         }
@@ -207,13 +209,14 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
     public void sendMessage(ResumeDeliver resumeDeliver) throws ParseException {
         JSONObject jsonObject = JSONUtil.parseObj(HttpUtil.get("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + env.getProperty("wx.appid") + "&secret=" + env.getProperty("wx.appSecret")));
         JSONObject body = new JSONObject();
-        body.set("touser", resumeDeliver.getOpenId());
         body.set("appid", env.getProperty("wx.appid"));
         JSONObject content = new JSONObject();
         //面试邀请通知
         if (resumeDeliver.getState() == 1 && resumeDeliver.getIsAccept() == 0 && resumeDeliver.getType() == 0) {
             Position position = positionService.getById(resumeDeliver.getPositionId());
             Enterprise enterprise = enterpriseService.getById(position.getUserId());
+            User user = userService.getById(resumeDeliver.getUserId());
+            body.set("touser", user.getOpenId());
             body.set("template_id", "ll-qdaEgbDN4rEod0nJpsjUuSqHT9e12EniZfRPiNqM");
             body.set("page", "pages/user/resume/deliver/invite");
             content.set("thing5", new JSONObject().set("value", enterprise.getName()));//公司名称
@@ -221,33 +224,42 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
             content.set("time3", new JSONObject().set("value", DateUtils.formatDate(resumeDeliver.getInviteTime())));//面试时间
             content.set("thing4", new JSONObject().set("value", StringUtils.truncateString(position.getAddress(), 15))); //面试地点
         }
-        //兼职报名审核结果通知
-        if (resumeDeliver.getState() == 1 && resumeDeliver.getIsAccept() == 0 && resumeDeliver.getType() == 1) {
-            Position position = positionService.getById(resumeDeliver.getPositionId());
-            body.set("template_id", "yhFtY-hzXerPnIxXcYcRCLpbkuNrzn5yk-rWgHVX2Aw");
-            body.set("page", "pages/user/resume/application/invite");
-            content.set("thing1", new JSONObject().set("value", position.getTitle()));//兼职名称
-            content.set("phrase5", new JSONObject().set("value", "通过"));//状态
-        }
-        //兼职报名审核结果通知
+        //接单成功提醒
         if (resumeDeliver.getState() == 1 && resumeDeliver.getIsAccept() == 1 && resumeDeliver.getType() == 1) {
             Position position = positionService.getById(resumeDeliver.getPositionId());
+            User user = userService.getById(resumeDeliver.getUserId());
+            body.set("touser", user.getOpenId());
             body.set("template_id", "bxOGj5FbyGHSevmWf9yzwpSZDjlFZPnGBeqGgIj9w_o");
             body.set("page", "pages/user/resume/application/invite");
             content.set("thing4", new JSONObject().set("value", position.getTitle()));//兼职名称
             content.set("thing6", new JSONObject().set("value", "对方已同意接单,请留意工作进度"));//备注
         }
-        //兼职报名审核结果通知
+        //接单失败提醒
         if (resumeDeliver.getState() == 1 && resumeDeliver.getIsAccept() == 2 && resumeDeliver.getType() == 1) {
             Position position = positionService.getById(resumeDeliver.getPositionId());
+            User user = userService.getById(resumeDeliver.getEnterpriseId());
+            body.set("touser", user.getOpenId());
             body.set("template_id", "pyUsW2HqOcXmFETHFUDjuH-ekf05QVc29k0tRaY9wP8");
             body.set("page", "pages/user/resume/application/invite");
             content.set("thing3", new JSONObject().set("value", position.getTitle()));//兼职名称
             content.set("thing5", new JSONObject().set("value", "对方拒绝接单,请重新选择接单人员"));//备注
         }
+        //兼职报名审核结果通知
+        if (resumeDeliver.getState() == 1 && resumeDeliver.getIsAccept() == 0 && resumeDeliver.getType() == 1) {
+            Position position = positionService.getById(resumeDeliver.getPositionId());
+            User user = userService.getById(resumeDeliver.getUserId());
+            body.set("touser", user.getOpenId());
+            body.set("template_id", "yhFtY-hzXerPnIxXcYcRCAjQUf8CdLoYEQQi5nBgim0");
+            body.set("page", "pages/user/resume/application/invite");
+            content.set("thing1", new JSONObject().set("value", position.getTitle()));//兼职名称
+            content.set("amount4", new JSONObject().set("value", position.getSalary() + "元"));//工作报酬
+            content.set("phrase5", new JSONObject().set("value", "通过"));//状态
+        }
         //兼职薪资到账通知
-        if (resumeDeliver.getState() == 1 && resumeDeliver.getIsAccept() == 2 && resumeDeliver.getType() == 1 && resumeDeliver.getIsComplete() == 2) {
+        if (resumeDeliver.getState() == 1 && resumeDeliver.getIsAccept() == 1 && resumeDeliver.getType() == 1 && resumeDeliver.getIsComplete() == 2) {
             Position position = positionService.getById(resumeDeliver.getPositionId());
+            User user = userService.getById(resumeDeliver.getUserId());
+            body.set("touser", user.getOpenId());
             body.set("template_id", "87jYTnpeZJnvdQ6gHcscZ96eQYlSXpfGeFU3g9deTeA");
             body.set("page", "pages/user/money/index");
             content.set("thing1", new JSONObject().set("value", position.getTitle()));//兼职名称

+ 1 - 1
ruoyi-admin/src/main/resources/mapper/work/PositionMapper.xml

@@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         longitude,
         start_date,
         end_date
-        <if test="longitude !=null and longitude !=null ">,ROUND( ST_Distance_Sphere ( POINT ( #{longitude}, #{latitude} ), POINT ( longitude, latitude ))/ 1000, 2 ) AS distance</if>
+        <if test="longitude !=null and longitude != '' ">,ROUND( ST_Distance_Sphere ( POINT ( #{longitude}, #{latitude} ), POINT ( longitude, latitude ))/ 1000, 2 ) AS distance</if>
         FROM
         tb_position
         WHERE

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

@@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             ( 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_complete = 1 AND d.type=1) AS completeApplication, /*甲方收到确认完成申请数*/
-            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.user_id = u.id AND d.is_complete = 3 AND d.type=1) AS completeReject, /*已方收到申请完成驳回数*/
+            ( SELECT COUNT( d.id ) FROM tb_resume_deliver d WHERE d.user_id = u.id AND d.is_complete !=2 AND d.type=1) AS completeIng, /*已方正在进行任务数*/
             ( 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