feat: v3版疗休养优化

This commit is contained in:
2026-10-26 09:45:30 +08:00
parent 7f2ac97dea
commit 1a1946b1f8
87 changed files with 1564 additions and 964 deletions
@@ -16,7 +16,7 @@ import java.util.*;
@IocBean(create = "init")
public class TherapyRecuperationModule {
public static final String ROOT = "/platform/staffTherapyRecuperation";
public static final String ROOT = "/platform/inclusiveTherapyV3";
public static final String[][] SCREENS = {
{"config", "基础设置", "/TheRapyConfig", "TheRapyConfig"},
{"agency", "旅行社管理", "/travelAgency", "travelAgency"},
@@ -49,6 +49,7 @@ public class TherapyRecuperationModule {
private SysUserService sysUserService;
public void init() {
renameLegacyTables();
Class<?>[] tables = {TheRapyRecuperationBaseManagement.class, TheRapyRecuperationCluster.class,
TheRapyRecuperationClusterMember.class, TheRapyRecuperationConfig.class,
TheRapyRecuperationEnroll.class, TheRapyRecuperationEnrollBed.class,
@@ -57,9 +58,10 @@ public class TherapyRecuperationModule {
TheRapyRecuperationLot.class, TheRapyRecuperationTravelAgency.class,
TherapyAudit.class, TherapyAuditState.class};
for (Class<?> table : tables) dao.create(table, false);
createView("staff_therapy_user", "SELECT u.*, u.arrivalAtSchoolDate AS schoolTime FROM vw_user u");
createView("staff_therapy_union", "SELECT u.*, u.name AS unionname FROM sys_union u");
createView("staff_therapy_unit", "SELECT u.* FROM sys_unit u");
widenLineImageAddress();
createView("inclusive_therapy_v3_user", "SELECT u.*, u.arrivalAtSchoolDate AS schoolTime FROM vw_user u");
createView("inclusive_therapy_v3_union", "SELECT u.*, u.name AS unionname FROM sys_union u");
createView("inclusive_therapy_v3_unit", "SELECT u.* FROM sys_unit u");
Trans.exec(() -> {
seedStates();
seedVersion();
@@ -95,14 +97,14 @@ public class TherapyRecuperationModule {
Sys_config setting = new Sys_config();
setting.setConfigKey("staffTherapyRecuperationVersion");
setting.setConfigValue("zjnu");
setting.setNote("职工疗休养独立子模块报名规则版本");
setting.setNote("普惠疗休养V3独立子模块报名规则版本");
dao.insert(setting);
}
private void seedConfig() {
if (dao.count(TheRapyRecuperationConfig.class) != 0) return;
TheRapyRecuperationConfig config = new TheRapyRecuperationConfig();
config.setConfigName("智慧工会疗休养配置");
config.setConfigName("普惠疗休养V3配置");
config.setIsSnLine(false);
config.setIsSwLine(false);
config.setTravelAudit(false);
@@ -114,6 +116,7 @@ public class TherapyRecuperationModule {
}
private void seedMenus() {
migrateLegacyMenuIdentifiers();
Sys_menu existing = dao.fetch(Sys_menu.class, Cnd.where("href", "like", "/platform/recuperation%").and("platform", "=", "pc"));
Sys_module module = existing == null ? null : dao.fetch(Sys_module.class, existing.getModuleId());
if (module == null) module = dao.fetch(Sys_module.class, Cnd.where("name", "=", "职工福利").and("platform", "=", "pc"));
@@ -125,11 +128,11 @@ public class TherapyRecuperationModule {
module.setFaIcon("fa fa-heart");
dao.insert(module);
}
Sys_menu root = addMenu(module.getId(), "", "职工疗休养", ROOT, "staffTherapyRecuperation", "pc");
Sys_menu root = addMenu(module.getId(), "", "普惠疗休养V3", ROOT, "inclusiveTherapyV3", "pc");
List<Sys_role> roles = dao.query(Sys_role.class, Cnd.where("disabled", "=", false));
for (String[] screen : SCREENS) {
Sys_menu menu = addMenu(module.getId(), root.getId(), screen[1], ROOT + "?screen=" + screen[0],
"staffTherapyRecuperation." + screen[3], "pc");
"inclusiveTherapyV3." + screen[3], "pc");
for (Sys_role role : roles) {
String code = role.getCode();
boolean school = List.of("sysadmin", "superadmin", "A06", "SchoolUnionMemberAdmin", "SYSADMIN", "SCHOOL_UNION_ADMIN", "SCHOOL_UNION_WELFARE_ADMIN", "SCHOOL_UNION_MEMBER_ADMIN").contains(code);
@@ -141,7 +144,7 @@ public class TherapyRecuperationModule {
}
}
}
Sys_menu signup = addMenu(module.getId(), root.getId(), "疗休养报名", ROOT + "?screen=signup", "staffTherapyRecuperation.signup", "pc");
Sys_menu signup = addMenu(module.getId(), root.getId(), "疗休养报名", ROOT + "?screen=signup", "inclusiveTherapyV3.signup", "pc");
Sys_module h5Module = dao.fetch(Sys_module.class, Cnd.where("name", "=", module.getName()).and("platform", "=", "h5"));
if (h5Module == null) {
h5Module = new Sys_module();
@@ -151,7 +154,7 @@ public class TherapyRecuperationModule {
h5Module.setFaIcon("fa fa-heart");
dao.insert(h5Module);
}
Sys_menu mobile = addMenu(h5Module.getId(), "", "职工疗休养", ROOT + "/mobile/index", "staffTherapyRecuperation.mobile", "h5");
Sys_menu mobile = addMenu(h5Module.getId(), "", "普惠疗休养V3", ROOT + "/mobile/index", "inclusiveTherapyV3.mobile", "h5");
for (Sys_role role : roles) {
if (List.of("public", "PUBLIC", "MEMBER", "sysadmin", "superadmin", "SYSADMIN").contains(role.getCode())) {
grant(role.getId(), root.getId());
@@ -21,7 +21,7 @@ import java.io.*;
import java.util.*;
@IocBean
@At("/platform/staffTherapyRecuperation/common")
@At("/platform/inclusiveTherapyV3/common")
@Ok("json:full")
public class TherapyCommonController {
@Inject
@@ -8,7 +8,7 @@ import org.nutz.mvc.annotation.*;
import javax.servlet.http.HttpServletRequest;
@IocBean
@At("/platform/staffTherapyRecuperation")
@At("/platform/inclusiveTherapyV3")
public class TherapyWorkspaceController {
@At("")
@SaCheckLogin
@@ -19,13 +19,13 @@ public class TherapyWorkspaceController {
boolean found = false;
for (String[] candidate : TherapyRecuperationModule.SCREENS) {
if (candidate[0].equals(screen)) {
StpUtil.checkPermission("staffTherapyRecuperation." + candidate[3]);
StpUtil.checkPermission("inclusiveTherapyV3." + candidate[3]);
url = TherapyRecuperationModule.ROOT + candidate[2];
found = true;
break;
}
}
if (!found) throw new IllegalArgumentException("未知的职工疗休养页面");
if (!found) throw new IllegalArgumentException("未知的普惠疗休养V3页面");
}
request.setAttribute("therapyPageUrl", url);
}
@@ -39,14 +39,14 @@ import java.util.List;
import java.util.Map;
@IocBean
@At("/platform/staffTherapyRecuperation/TheRapyAudit")
@At("/platform/inclusiveTherapyV3/TheRapyAudit")
@Ok("json:full")
public class TheRapyRecuperationAuditController {
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/audit/TheRapyAudit.html")
@SaCheckPermission("staffTherapyRecuperation.TheRapyAudit")
@SaCheckPermission("inclusiveTherapyV3.TheRapyAudit")
public void index() {
}
@@ -86,8 +86,8 @@ public class TheRapyRecuperationAuditController {
ts.playStartTime,
ts.playEndTime
FROM
staff_therapy_line_union_select ts
LEFT JOIN staff_therapy_line line ON line.id = ts.lineId
inclusive_therapy_v3_line_union_select ts
LEFT JOIN inclusive_therapy_v3_line line ON line.id = ts.lineId
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -108,7 +108,7 @@ public class TheRapyRecuperationAuditController {
@At
@ViReturn
@SaCheckLogin
@SaCheckPermission("staffTherapyRecuperation.TheRapyAudit")
@SaCheckPermission("inclusiveTherapyV3.TheRapyAudit")
public Object pageData(PageForm pageForm, String year, String unionId,
String unitId, String state, String takePartInLineId,
String isAudit, String regionalNature, String lotId,
@@ -125,13 +125,13 @@ public class TheRapyRecuperationAuditController {
CONCAT(DATE_FORMAT(lineu.playStartTime,'%m月%d日'),'-',DATE_FORMAT(lineu.playEndTime,'%m月%d日')) AS linePlayTime,
IF
( enroll.takePartInUnionId != enroll.selfUnionId, TRUE, FALSE ) isTransferIn,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id ) isFamily,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id ) num
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id ) isFamily,
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id ) num
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_audit_state state ON state.stateId = enroll.stateId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_audit_state state ON state.stateId = enroll.stateId
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -223,7 +223,7 @@ public class TheRapyRecuperationAuditController {
@At
@ViReturn
@SaCheckLogin
@SaCheckPermission("staffTherapyRecuperation.TheRapyAudit")
@SaCheckPermission("inclusiveTherapyV3.TheRapyAudit")
public Object doAudit(String id, boolean flag, Boolean adjustment, boolean isTransferIn, String auditOpinion) {
Trans.exec(() -> {
TheRapyRecuperationEnroll enroll = auditService.dao().fetch(TheRapyRecuperationEnroll.class, id);
@@ -280,7 +280,7 @@ public class TheRapyRecuperationAuditController {
@At
@ViReturn
@SaCheckLogin
@SaCheckPermission("staffTherapyRecuperation.TheRapyAudit")
@SaCheckPermission("inclusiveTherapyV3.TheRapyAudit")
public Object doRecall(String id) {
TheRapyRecuperationEnroll enroll = auditService.dao().fetch(TheRapyRecuperationEnroll.class, id);
TheRapyRecuperationLineUnionSelect unionSelect = auditService.dao().fetch(TheRapyRecuperationLineUnionSelect.class, Cnd.where("id", "=", enroll.getTakePartInLineId()));
@@ -319,7 +319,7 @@ public class TheRapyRecuperationAuditController {
@ViReturn
@SaCheckLogin
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("staffTherapyRecuperation.TheRapyAudit")
@SaCheckPermission("inclusiveTherapyV3.TheRapyAudit")
public Object doOnekeyAudit(String[] ids, String auditOpinion, boolean flag, Boolean adjustment) {
TherapyAudit audit = new TherapyAudit();
audit.setAuditOpinion(auditOpinion);
@@ -395,7 +395,7 @@ public class TheRapyRecuperationAuditController {
unionName unionname,
selfUnionId id
FROM
`staff_therapy_enroll`
`inclusive_therapy_v3_enroll`
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -429,15 +429,15 @@ public class TheRapyRecuperationAuditController {
COUNT(1) as signUpNum,
$val as familyNumber
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id = enroll.takePartInLineId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id = enroll.takePartInLineId
$condition
""");
String val = "";
if (config.getFamilyInfo() == 1) {
val = "IFNULL(sum(familyNumber),0)";
} else {
val = "IFNULL((select count(1) from staff_therapy_enroll_companion where trreId = enroll.id),0)";
val = "IFNULL((select count(1) from inclusive_therapy_v3_enroll_companion where trreId = enroll.id),0)";
}
sql.setVar("val", val);
Sql sql2 = sql;
@@ -42,7 +42,7 @@ import java.util.Map;
* @注释
*/
@IocBean
@At("/platform/staffTherapyRecuperation/TheRapyTravelAudit")
@At("/platform/inclusiveTherapyV3/TheRapyTravelAudit")
@Ok("json:full")
public class TheRapyRecuperationTravelAuditController {
@@ -57,7 +57,7 @@ public class TheRapyRecuperationTravelAuditController {
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/audit/TheRapyTravelAudit.html")
@SaCheckPermission("staffTherapyRecuperation.TheRapyTravelAudit")
@SaCheckPermission("inclusiveTherapyV3.TheRapyTravelAudit")
public void index() {
}
@@ -76,11 +76,11 @@ public class TheRapyRecuperationTravelAuditController {
state.stateColor,
state.stateName,
ta.travelAgencyName,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id ) isFamily
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id ) isFamily
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_audit_state state ON state.stateId = enroll.stateId
left join staff_therapy_travel_agency ta on ta.id = enroll.takePartInTravelAgencyId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_audit_state state ON state.stateId = enroll.stateId
left join inclusive_therapy_v3_travel_agency ta on ta.id = enroll.takePartInTravelAgencyId
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -118,7 +118,7 @@ public class TheRapyRecuperationTravelAuditController {
unionName unionname,
selfUnionId id
FROM
`staff_therapy_enroll`
`inclusive_therapy_v3_enroll`
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -144,14 +144,14 @@ public class TheRapyRecuperationTravelAuditController {
count(1) as signUpNum,
$val as familyNumber
FROM
`staff_therapy_enroll` enroll
`inclusive_therapy_v3_enroll` enroll
$condition
""");
String val = "";
if(config.getFamilyInfo() == 1) {
val = "IFNULL(sum(familyNumber),0)";
} else {
val = "IFNULL((select count(1) from staff_therapy_enroll_companion where trreId = enroll.id),0)";
val = "IFNULL((select count(1) from inclusive_therapy_v3_enroll_companion where trreId = enroll.id),0)";
}
sql.setVar("val", val);
Cnd cnd = Cnd.NEW();
@@ -38,13 +38,13 @@ import java.util.List;
import java.util.stream.Collectors;
@IocBean
@At("/platform/staffTherapyRecuperation/TheRapyXghAudit")
@At("/platform/inclusiveTherapyV3/TheRapyXghAudit")
@Ok("json:full")
public class TheRapyRecuperationXghAuditController {
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/audit/TheRapyXghAudit.html")
@SaCheckPermission("staffTherapyRecuperation.TheRapyXghAudit")
@SaCheckPermission("inclusiveTherapyV3.TheRapyXghAudit")
public void index() {
}
@@ -65,7 +65,7 @@ public class TheRapyRecuperationXghAuditController {
@At
@ViReturn
@SaCheckLogin
@SaCheckPermission("staffTherapyRecuperation.TheRapyXghAudit")
@SaCheckPermission("inclusiveTherapyV3.TheRapyXghAudit")
public Object pageData(PageForm pageForm, String year, String unionId,
String unitId, String state, String takePartInLineId,
String isAudit, String regionalNature, String lotId,
@@ -82,13 +82,13 @@ public class TheRapyRecuperationXghAuditController {
CONCAT(DATE_FORMAT(rs.playStartTime,'%m月%d日'),'-',DATE_FORMAT(rs.playEndTime,'%m月%d日')) AS linePlayTime,
IF
( enroll.takePartInUnionId != enroll.selfUnionId, TRUE, FALSE ) isTransferIn,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id ) isFamily,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id ) num
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id ) isFamily,
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id ) num
FROM
`staff_therapy_enroll` enroll
LEFT JOIN `staff_therapy_line_union_select` rs ON rs.id = enroll.takePartInLineId
LEFT JOIN `staff_therapy_line` line on line.id=rs.lineId
LEFT JOIN staff_therapy_audit_state state ON state.stateId = enroll.stateId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN `inclusive_therapy_v3_line_union_select` rs ON rs.id = enroll.takePartInLineId
LEFT JOIN `inclusive_therapy_v3_line` line on line.id=rs.lineId
LEFT JOIN inclusive_therapy_v3_audit_state state ON state.stateId = enroll.stateId
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -124,7 +124,7 @@ public class TheRapyRecuperationXghAuditController {
@At
@ViReturn
@SaCheckLogin
@SaCheckPermission("staffTherapyRecuperation.TheRapyXghAudit")
@SaCheckPermission("inclusiveTherapyV3.TheRapyXghAudit")
public Object getLineNumber(PageForm pageForm, String year, String unionId,
String unitId, String state, String takePartInLineId,
String isAudit, String regionalNature, String lotId, String selectId) {
@@ -139,13 +139,13 @@ public class TheRapyRecuperationXghAuditController {
state.stateName,
IF
( enroll.takePartInUnionId != enroll.selfUnionId, TRUE, FALSE ) isTransferIn,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id ) isFamily,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id ) num
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id ) isFamily,
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id ) num
FROM
`staff_therapy_enroll` enroll
LEFT JOIN `staff_therapy_line_union_select` rs ON rs.id = enroll.takePartInLineId
LEFT JOIN `staff_therapy_line` line on line.id=rs.lineId
LEFT JOIN staff_therapy_audit_state state ON state.stateId = enroll.stateId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN `inclusive_therapy_v3_line_union_select` rs ON rs.id = enroll.takePartInLineId
LEFT JOIN `inclusive_therapy_v3_line` line on line.id=rs.lineId
LEFT JOIN inclusive_therapy_v3_audit_state state ON state.stateId = enroll.stateId
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -193,7 +193,7 @@ public class TheRapyRecuperationXghAuditController {
@At
@ViReturn
@SaCheckLogin
@SaCheckPermission("staffTherapyRecuperation.TheRapyXghAudit")
@SaCheckPermission("inclusiveTherapyV3.TheRapyXghAudit")
public Object doAudit(String id, boolean flag, boolean isTransferIn, String auditOpinion, Boolean adjustment) {
Trans.exec(() -> {
TheRapyRecuperationEnroll enroll = auditService.dao().fetch(TheRapyRecuperationEnroll.class, id);
@@ -231,7 +231,7 @@ public class TheRapyRecuperationXghAuditController {
@At
@ViReturn
@SaCheckLogin
@SaCheckPermission("staffTherapyRecuperation.TheRapyXghAudit")
@SaCheckPermission("inclusiveTherapyV3.TheRapyXghAudit")
public Object doRecall(String id) {
TheRapyRecuperationEnroll enroll = auditService.dao().fetch(TheRapyRecuperationEnroll.class, id);
enroll.setStateId(TheRapyRecuperationState.SCHOOL);
@@ -252,7 +252,7 @@ public class TheRapyRecuperationXghAuditController {
@ViReturn
@SaCheckLogin
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("staffTherapyRecuperation.TheRapyXghAudit")
@SaCheckPermission("inclusiveTherapyV3.TheRapyXghAudit")
public Object doOnekeyAudit(String[] ids, String auditOpinion, boolean flag, Boolean adjustment) {
TherapyAudit audit = new TherapyAudit();
audit.setAuditOpinion(auditOpinion);
@@ -288,17 +288,17 @@ public class TheRapyRecuperationXghAuditController {
@At
@ViReturn
@SaCheckLogin
@SaCheckPermission("staffTherapyRecuperation.TheRapyXghAudit")
@SaCheckPermission("inclusiveTherapyV3.TheRapyXghAudit")
public Object getXghLine() {
Sql sql = Sqls.create("""
SELECT
line.*,
un.unionname
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id = enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_union un ON un.id = enroll.takePartInUnionId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id = enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_union un ON un.id = enroll.takePartInUnionId
where line.signUpMode='2' and line.createMode='2'
group by line.id
""");
@@ -56,7 +56,7 @@ import java.util.stream.Collectors;
**/
@IocBean
@At("/platform/staffTherapyRecuperation/baseManagement")
@At("/platform/inclusiveTherapyV3/baseManagement")
@Ok("json:full")
public class TheRapyRecuperationBaseManagerController {
@@ -70,7 +70,7 @@ public class TheRapyRecuperationBaseManagerController {
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/baseManage/baseManagement.html")
@SaCheckPermission("staffTherapyRecuperation.line")
@SaCheckPermission("inclusiveTherapyV3.line")
public void index() {
}
@@ -121,10 +121,10 @@ public class TheRapyRecuperationBaseManagerController {
ta.contactMobileNumber,
ta.officialWebsite
FROM
`staff_therapy_base_management` tb
LEFT JOIN staff_therapy_travel_agency ta ON ta.id = tb.travelAgencyId
LEFT JOIN staff_therapy_union gh ON gh.id = tb.createUnionid
LEFT JOIN staff_therapy_user u ON u.id = tb.opBy
`inclusive_therapy_v3_base_management` tb
LEFT JOIN inclusive_therapy_v3_travel_agency ta ON ta.id = tb.travelAgencyId
LEFT JOIN inclusive_therapy_v3_union gh ON gh.id = tb.createUnionid
LEFT JOIN inclusive_therapy_v3_user u ON u.id = tb.opBy
$condition
""");
cnd.where().andEX("tb.`year`", "=", year);
@@ -228,7 +228,7 @@ public class TheRapyRecuperationBaseManagerController {
@ViReturn
@SaCheckLogin
public Object listAllBase(String startYear, String endYear, String year) {
Sql sql = Sqls.create("select * from `staff_therapy_base_management` tb left join `staff_therapy_lot` lot on lot.id=tb.lotId $condition");
Sql sql = Sqls.create("select * from `inclusive_therapy_v3_base_management` tb left join `inclusive_therapy_v3_lot` lot on lot.id=tb.lotId $condition");
CndPlus cnd = new CndPlus();
cnd.andEX("tb.`year`", ">=", startYear);
@@ -261,7 +261,7 @@ public class TheRapyRecuperationBaseManagerController {
*/
@At
@Ok("void")
@SaCheckPermission("staffTherapyRecuperation.TheBaseManagement")
@SaCheckPermission("inclusiveTherapyV3.TheBaseManagement")
public void exportTemplate(HttpServletResponse response) {
try {
//查旅行社,转数组
@@ -80,7 +80,7 @@ import java.util.stream.Collectors;
* @Version V1.0
**/
@IocBean
@At("/platform/staffTherapyRecuperation/line")
@At("/platform/inclusiveTherapyV3/line")
@Ok("json:full")
@Slf4j
public class TheRapyRecuperationLineController {
@@ -107,7 +107,7 @@ public class TheRapyRecuperationLineController {
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/basicManage/line.html")
@SaCheckPermission("staffTherapyRecuperation.line")
@SaCheckPermission("inclusiveTherapyV3.line")
public void index() {
}
@@ -299,7 +299,7 @@ public class TheRapyRecuperationLineController {
*/
@At
@ViReturn
@SaCheckPermission("staffTherapyRecuperation.line")
@SaCheckPermission("inclusiveTherapyV3.line")
public Object getTravelAgencyOptions(Integer year) {
List<TheRapyRecuperationTravelAgency> travelAgencies = lineService.dao().query(TheRapyRecuperationTravelAgency.class, Cnd.NEW().andEX("year","=",year).asc("serialNumber"));
return travelAgencies;
@@ -387,7 +387,7 @@ public class TheRapyRecuperationLineController {
@At
@ViReturn
@SaCheckLogin
@SaCheckPermission("staffTherapyRecuperation.line")
@SaCheckPermission("inclusiveTherapyV3.line")
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
@Aop(TransAop.READ_COMMITTED)
public Object importLineByPageFields(TempFile file) {
@@ -430,7 +430,7 @@ public class TheRapyRecuperationLineController {
*/
@At
@Ok("void")
@SaCheckPermission("staffTherapyRecuperation.line")
@SaCheckPermission("inclusiveTherapyV3.line")
public void exportPageFieldsTemplate(HttpServletResponse response) {
try {
// 标段下拉复用页面配置接口返回的标段数据。
@@ -657,7 +657,7 @@ public class TheRapyRecuperationLineController {
@At
@Ok("void")
@SaCheckPermission("staffTherapyRecuperation.line")
@SaCheckPermission("inclusiveTherapyV3.line")
public void exportTemplate(HttpServletResponse response) {
try {
//查旅行社,转数组
@@ -42,7 +42,7 @@ import java.util.stream.Collectors;
* @date 2022/05/31
*/
@IocBean
@At("/platform/staffTherapyRecuperation/travelAgency")
@At("/platform/inclusiveTherapyV3/travelAgency")
@Ok("json:full")
@Slf4j
public class TheRapyRecuperationTravelAgencyController {
@@ -54,7 +54,7 @@ public class TheRapyRecuperationTravelAgencyController {
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/basicManage/travelAgency.html")
@SaCheckPermission("staffTherapyRecuperation.travelAgency")
@SaCheckPermission("inclusiveTherapyV3.travelAgency")
public void index() {
}
@@ -197,7 +197,7 @@ public class TheRapyRecuperationTravelAgencyController {
@SaCheckLogin
public Object selectLineByAgencyId(String agencyId) {
Sql sql = Sqls.create("""
SELECT id,lineName FROM `staff_therapy_line` WHERE travelAgencyId=@travelAgencyId
SELECT id,lineName FROM `inclusive_therapy_v3_line` WHERE travelAgencyId=@travelAgencyId
""").setParam("travelAgencyId", agencyId);
return travelAgencyService.listMap(sql);
}
@@ -11,7 +11,7 @@ import org.nutz.mvc.annotation.Ok;
* @Description 疗休养页面跳转controller
*/
@IocBean
@At("/platform/staffTherapyRecuperation/mobile")
@At("/platform/inclusiveTherapyV3/mobile")
@Ok("json:full")
public class MobileTheRapyRecuperationEnrollController {
@@ -46,7 +46,7 @@ import java.util.stream.Collectors;
* @Version V1.0
**/
@IocBean
@At("/platform/staffTherapyRecuperation/line/enroll")
@At("/platform/inclusiveTherapyV3/line/enroll")
@Ok("json:full")
public class TheRapyRecuperationEnrollController {
@@ -306,19 +306,19 @@ public class TheRapyRecuperationEnrollController {
List<String> outSelectIds = outSelectList.stream().map(TheRapyRecuperationLineUnionSelect::getId).collect(Collectors.toList());
//是否报省内
int inCount = dao.count("staff_therapy_enroll", Cnd.where("loginName", "=", TherapyContext.getPrincipalProperty("loginname"))
int inCount = dao.count("inclusive_therapy_v3_enroll", Cnd.where("loginName", "=", TherapyContext.getPrincipalProperty("loginname"))
.and("takePartInLineId", "in", inSelectIds).and("isNormal", "=", true));
if (inCount > 0) {
return 0;
}
//是否报省外
int outCount = dao.count("staff_therapy_enroll", Cnd.where("loginName", "=", TherapyContext.getPrincipalProperty("loginname"))
int outCount = dao.count("inclusive_therapy_v3_enroll", Cnd.where("loginName", "=", TherapyContext.getPrincipalProperty("loginname"))
.and("takePartInLineId", "in", outSelectIds).and("isNormal", "=", true));
if (outCount > 0) {
return 1;
}
//是否报旅行社
int travelCount = dao.count("staff_therapy_enroll", Cnd.where("loginName", "=", TherapyContext.getPrincipalProperty("loginname"))
int travelCount = dao.count("inclusive_therapy_v3_enroll", Cnd.where("loginName", "=", TherapyContext.getPrincipalProperty("loginname"))
.and("takePartInLineId", "is", null).and("takePartInTravelAgencyId", "is not", null));
if (travelCount > 0) {
return 2;
@@ -456,8 +456,8 @@ public class TheRapyRecuperationEnrollController {
Sql sql = Sqls.create("""
select
(select count(1) from staff_therapy_enroll where isNormal=true and takePartInUnionId = @unionId AND takePartInLineId = @lineId AND stateId = @signUpSuccessCode) as signUpUserNum,
(select count(1) from staff_therapy_enroll_companion where trreId in (select id from staff_therapy_enroll where isNormal=true and takePartInUnionId = @unionId AND takePartInLineId = @lineId AND stateId = @signUpSuccessCode)) as signUpUserFamilyNum
(select count(1) from inclusive_therapy_v3_enroll where isNormal=true and takePartInUnionId = @unionId AND takePartInLineId = @lineId AND stateId = @signUpSuccessCode) as signUpUserNum,
(select count(1) from inclusive_therapy_v3_enroll_companion where trreId in (select id from inclusive_therapy_v3_enroll where isNormal=true and takePartInUnionId = @unionId AND takePartInLineId = @lineId AND stateId = @signUpSuccessCode)) as signUpUserFamilyNum
""");
sql.setParam("signUpSuccessCode", TheRapyRecuperationState.PASS);
sql.setParam("lineId", lineId);
@@ -45,7 +45,7 @@ import java.util.Map;
* @Version V1.0
**/
@IocBean
@At("/platform/staffTherapyRecuperation/joinUserImport")
@At("/platform/inclusiveTherapyV3/joinUserImport")
@Ok("json:full")
@Slf4j
public class TheRapyRecuperationEnrollJoinUserImportController {
@@ -58,12 +58,12 @@ public class TheRapyRecuperationEnrollJoinUserImportController {
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/process/joinUserImport.html")
@SaCheckPermission("staffTherapyRecuperation.joinUser.import")
@SaCheckPermission("inclusiveTherapyV3.joinUser.import")
public void index() {
}
@At
@SaCheckPermission("staffTherapyRecuperation.joinUser.import")
@SaCheckPermission("inclusiveTherapyV3.joinUser.import")
@ViReturn
public Object selectLineAndTravelAgencyList(Integer year, String keyword) {
return joinUserImportService.selectLineAndTravelAgencyList(year, keyword);
@@ -71,7 +71,7 @@ public class TheRapyRecuperationEnrollJoinUserImportController {
@At
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
@SaCheckPermission("staffTherapyRecuperation.joinUser.import")
@SaCheckPermission("inclusiveTherapyV3.joinUser.import")
public Object readExcel(@Param("file") TempFile tempFile, @Param("lineId") String lineId, @Param("travelAgencyId") String travelAgencyId) {
try {
Assert.notNull(tempFile);
@@ -117,7 +117,7 @@ public class TheRapyRecuperationEnrollJoinUserImportController {
@At
@ViReturn
@SaCheckPermission("staffTherapyRecuperation.joinUser.import")
@SaCheckPermission("inclusiveTherapyV3.joinUser.import")
public Object selectLineOrTravelAgency(Integer year) {
return joinUserImportService.selectLineOrTravelAgency(year);
}
@@ -130,7 +130,7 @@ public class TheRapyRecuperationEnrollJoinUserImportController {
*/
@At
@ViReturn
@SaCheckPermission("staffTherapyRecuperation.joinUser.import")
@SaCheckPermission("inclusiveTherapyV3.joinUser.import")
public Object doImportTakePartInUsers(@Param("enroll") TheRapyRecuperationEnroll[] enrolls) {
for (TheRapyRecuperationEnroll enroll : enrolls) {
enroll.setTakePartIn(true);
@@ -147,7 +147,7 @@ public class TheRapyRecuperationEnrollJoinUserImportController {
*/
@At
@Ok("void")
@SaCheckPermission("staffTherapyRecuperation.joinUser.import")
@SaCheckPermission("inclusiveTherapyV3.joinUser.import")
public void downloadTemplate(HttpServletResponse response) {
ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF);
@@ -12,7 +12,7 @@ import org.nutz.mvc.annotation.Ok;
* @Version V1.0
**/
@IocBean
@At("/platform/staffTherapyRecuperation/line/UnionSelect")
@At("/platform/inclusiveTherapyV3/line/UnionSelect")
@Ok("json:full")
public class TheRapyRecuperationExamineController {
}
@@ -42,7 +42,7 @@ import java.util.stream.Collectors;
* @Version V1.0
**/
@IocBean
@At("/platform/staffTherapyRecuperation/lineAdjustment")
@At("/platform/inclusiveTherapyV3/lineAdjustment")
@Ok("json:full")
@Slf4j
public class TheRapyRecuperationLineAdjustmentController {
@@ -58,7 +58,7 @@ public class TheRapyRecuperationLineAdjustmentController {
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/process/lineAdjustment.html")
@SaCheckPermission("staffTherapyRecuperation.line.adjustment")
@SaCheckPermission("inclusiveTherapyV3.line.adjustment")
public void index() {
}
@@ -98,7 +98,7 @@ public class TheRapyRecuperationLineAdjustmentController {
@SaCheckLogin
public Object findUnionSignUpModeLineList(Integer year) {
Sql sql = Sqls.create("""
select id,lineName from staff_therapy_line
select id,lineName from inclusive_therapy_v3_line
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -174,9 +174,9 @@ public class TheRapyRecuperationLineAdjustmentController {
rl.regionalNature,
lot.lotName
FROM
`staff_therapy_line_union_select` rlus
LEFT JOIN `staff_therapy_line` rl ON rlus.lineId = rl.id
LEFT JOIN `staff_therapy_lot` lot ON rl.lotId = lot.id
`inclusive_therapy_v3_line_union_select` rlus
LEFT JOIN `inclusive_therapy_v3_line` rl ON rlus.lineId = rl.id
LEFT JOIN `inclusive_therapy_v3_lot` lot ON rl.lotId = lot.id
WHERE
rlus.id = @id
""").setParam("id",lineId);
@@ -33,7 +33,7 @@ import java.util.Map;
* @Version V1.0
**/
@IocBean
@At("/platform/staffTherapyRecuperation/lineCluster")
@At("/platform/inclusiveTherapyV3/lineCluster")
@Ok("json:full")
public class TheRapyRecuperationLineClusterController {
@@ -42,7 +42,7 @@ public class TheRapyRecuperationLineClusterController {
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/process/lineCluster.html")
@SaCheckPermission("staffTherapyRecuperation.lineCluster")
@SaCheckPermission("inclusiveTherapyV3.lineCluster")
public void index() {
}
@@ -58,7 +58,7 @@ public class TheRapyRecuperationLineClusterController {
@ViReturn
@POST
@SaCheckLogin
@SaCheckPermission("staffTherapyRecuperation.lineCluster")
@SaCheckPermission("inclusiveTherapyV3.lineCluster")
public Object pageData(PageForm pageForm, Integer year, String keywords, String unionId) {
Pagination pagination = clusterService.pageData(pageForm, year, unionId, keywords);
return pagination;
@@ -52,7 +52,7 @@ import java.util.stream.Collectors;
* 管理员查看全部分工会已选择线路。
*/
@IocBean
@At("/platform/staffTherapyRecuperation/lineSelectionOverview")
@At("/platform/inclusiveTherapyV3/lineSelectionOverview")
@Ok("json:full")
public class TheRapyRecuperationLineSelectionOverviewController {
@@ -67,7 +67,7 @@ public class TheRapyRecuperationLineSelectionOverviewController {
*/
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/process/lineSelectionOverview.html")
@SaCheckPermission("staffTherapyRecuperation.lineSelectionOverview")
@SaCheckPermission("inclusiveTherapyV3.lineSelectionOverview")
public void index() {
}
@@ -86,7 +86,7 @@ public class TheRapyRecuperationLineSelectionOverviewController {
@At
@POST
@ViReturn
@SaCheckPermission("staffTherapyRecuperation.lineSelectionOverview")
@SaCheckPermission("inclusiveTherapyV3.lineSelectionOverview")
public Object pageData(PageForm pageForm,
@Param(value = "year", required = false) Integer year,
@Param(value = "keywords", required = false) String keywords,
@@ -134,7 +134,7 @@ public class TheRapyRecuperationLineSelectionOverviewController {
*/
@At
@Ok("void")
@SaCheckPermission("staffTherapyRecuperation.lineSelectionOverview")
@SaCheckPermission("inclusiveTherapyV3.lineSelectionOverview")
public void doExportExcel(PageForm pageForm,
@Param(value = "year", required = false) Integer year,
@Param(value = "keywords", required = false) String keywords,
@@ -164,7 +164,7 @@ public class TheRapyRecuperationLineSelectionOverviewController {
/**
* 查询某个分工会已选择线路的出行时间段。
*
* @param lineId 线路 ID,对应 staff_therapy_line.id
* @param lineId 线路 ID,对应 inclusive_therapy_v3_line.id
* @param unionId 分工会 ID,对应 sys_union.id
* @param year 年度;为空时默认当前年度
* @return 出行时间段 VO 列表,元素为 {@link LineSelectionOverviewTimeSlotVo}
@@ -172,7 +172,7 @@ public class TheRapyRecuperationLineSelectionOverviewController {
@At
@POST
@ViReturn
@SaCheckPermission("staffTherapyRecuperation.lineSelectionOverview")
@SaCheckPermission("inclusiveTherapyV3.lineSelectionOverview")
public Object timeSlots(@Param("lineId") String lineId,
@Param("unionId") String unionId,
@Param(value = "year", required = false) Integer year) {
@@ -199,8 +199,8 @@ public class TheRapyRecuperationLineSelectionOverviewController {
us.maxPeopleNumber,
us.enable
FROM
staff_therapy_line_union_select us
LEFT JOIN staff_therapy_travel_agency ta ON ta.id = us.travelAgencyId
inclusive_therapy_v3_line_union_select us
LEFT JOIN inclusive_therapy_v3_travel_agency ta ON ta.id = us.travelAgencyId
WHERE
us.lineId = @lineId
AND us.unionId = @unionId
@@ -242,7 +242,7 @@ public class TheRapyRecuperationLineSelectionOverviewController {
* 管理员修改某个分工会已选择线路的出行时间段。
*
* @param lineUnionSelects 出行时间段数组,包含报名时间、出行时间、旅行社、联系人、人数和启用状态等字段
* @param lineId 线路 ID,对应 staff_therapy_line.id
* @param lineId 线路 ID,对应 inclusive_therapy_v3_line.id
* @param unionId 分工会 ID,对应 sys_union.id
* @param year 年度;为空时默认当前年度
* @return ViReturn 统一包装结果,成功时 data 为空
@@ -250,7 +250,7 @@ public class TheRapyRecuperationLineSelectionOverviewController {
@At
@POST
@ViReturn
@SaCheckPermission("staffTherapyRecuperation.lineSelectionOverview")
@SaCheckPermission("inclusiveTherapyV3.lineSelectionOverview")
@Aop(TransAop.READ_COMMITTED)
public Object saveTimeSlots(@Param("lineUnionSelects") TheRapyRecuperationLineUnionSelect[] lineUnionSelects,
@Param("lineId") String lineId,
@@ -265,7 +265,7 @@ public class TheRapyRecuperationLineSelectionOverviewController {
/**
* 管理员取消分工会已选择线路。
*
* @param lineId 线路 ID,对应 staff_therapy_line.id
* @param lineId 线路 ID,对应 inclusive_therapy_v3_line.id
* @param unionId 分工会 ID,对应 sys_union.id
* @param year 年度;为空时默认当前年度
* @return ViReturn 统一包装结果,成功时 data 为空
@@ -273,7 +273,7 @@ public class TheRapyRecuperationLineSelectionOverviewController {
@At
@POST
@ViReturn
@SaCheckPermission("staffTherapyRecuperation.lineSelectionOverview")
@SaCheckPermission("inclusiveTherapyV3.lineSelectionOverview")
@Aop(TransAop.READ_COMMITTED)
public Object cancelLine(@Param("lineId") String lineId,
@Param("unionId") String unionId,
@@ -335,7 +335,7 @@ public class TheRapyRecuperationLineSelectionOverviewController {
*/
@At
@ViReturn
@SaCheckPermission("staffTherapyRecuperation.lineSelectionOverview")
@SaCheckPermission("inclusiveTherapyV3.lineSelectionOverview")
public Object travelAgencyOptions(@Param(value = "year", required = false) Integer year) {
// 旅行社按年度维护,管理员查看页切换年度时下拉框只展示该年度可选旅行社。
return dao.query(TheRapyRecuperationTravelAgency.class,
@@ -349,7 +349,7 @@ public class TheRapyRecuperationLineSelectionOverviewController {
*/
@At
@ViReturn
@SaCheckPermission("staffTherapyRecuperation.lineSelectionOverview")
@SaCheckPermission("inclusiveTherapyV3.lineSelectionOverview")
public Object lotOptions() {
TheRapyRecuperationConfig config = dao.fetch(TheRapyRecuperationConfig.class, Cnd.NEW());
return Optional.ofNullable(config)
@@ -383,11 +383,11 @@ public class TheRapyRecuperationLineSelectionOverviewController {
selectUnion.unionname AS unionName,
us.isOpen
FROM
staff_therapy_line_union_select us
LEFT JOIN staff_therapy_line line ON line.id = us.lineId
LEFT JOIN staff_therapy_union selectUnion ON selectUnion.id = us.unionId
LEFT JOIN staff_therapy_travel_agency ta ON ta.id = us.travelAgencyId
LEFT JOIN staff_therapy_lot lot ON lot.id = line.lotId
inclusive_therapy_v3_line_union_select us
LEFT JOIN inclusive_therapy_v3_line line ON line.id = us.lineId
LEFT JOIN inclusive_therapy_v3_union selectUnion ON selectUnion.id = us.unionId
LEFT JOIN inclusive_therapy_v3_travel_agency ta ON ta.id = us.travelAgencyId
LEFT JOIN inclusive_therapy_v3_lot lot ON lot.id = line.lotId
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -45,7 +45,7 @@ import java.util.stream.Collectors;
* @date 2023/06/26
*/
@IocBean
@At(value = {"/platform/staffTherapyRecuperation/lineFghSelect", "/platform/staffTherapyRecuperation/lineXghSelect", "/platform/staffTherapyRecuperation/lineUnionSelect"})
@At(value = {"/platform/inclusiveTherapyV3/lineFghSelect", "/platform/inclusiveTherapyV3/lineXghSelect", "/platform/inclusiveTherapyV3/lineUnionSelect"})
@Ok("json:full")
@Slf4j
public class TheRapyRecuperationLineUnionSelectController {
@@ -62,7 +62,7 @@ public class TheRapyRecuperationLineUnionSelectController {
@At("")
@Ok("re")
// @Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/process/lineUnionSelect.html")
@SaCheckPermission(value = {"staffTherapyRecuperation.lineFghSelect", "staffTherapyRecuperation.lineXghSelect"}, mode = SaMode.OR)
@SaCheckPermission(value = {"inclusiveTherapyV3.lineFghSelect", "inclusiveTherapyV3.lineXghSelect"}, mode = SaMode.OR)
public String index(@Param("mode") Integer mode) {
return "beetl:/platform/zhgh/staffbenefit/therapyRecuperation/process/lineUnionSelect.html";
}
@@ -77,7 +77,7 @@ public class TheRapyRecuperationLineUnionSelectController {
@At
@POST
@ViReturn
@SaCheckPermission(value = {"staffTherapyRecuperation.lineFghSelect", "staffTherapyRecuperation.lineXghSelect"}, mode = SaMode.OR)
@SaCheckPermission(value = {"inclusiveTherapyV3.lineFghSelect", "inclusiveTherapyV3.lineXghSelect"}, mode = SaMode.OR)
public Object pageData(PageForm pageForm, Integer year, String keywords, int selectStatus, String unionId,
String lotId, String travelAgencyId, Integer mode, String regionalNature) {
@@ -103,16 +103,16 @@ public class TheRapyRecuperationLineUnionSelectController {
lineScope.or("line.createMode", "=", 2);
cnd.and(lineScope);
hasSelectLineSql = Sqls.createf("""
select lineId from staff_therapy_line_union_select where unionId = '%s' AND signUpMode = %s AND year(selectTime) = %s
select lineId from inclusive_therapy_v3_line_union_select where unionId = '%s' AND signUpMode = %s AND year(selectTime) = %s
""", TherapyContext.getUnionId(), queryMode, year == null ? DateUtil.thisYear() : year);
} else {
hasSelectLineSql = Sqls.createf("""
select lineId from staff_therapy_line_union_select where signUpMode = %s AND year(selectTime) = %s
select lineId from inclusive_therapy_v3_line_union_select where signUpMode = %s AND year(selectTime) = %s
""", queryMode, year == null ? DateUtil.thisYear() : year);
}
/*hasSelectLineSql = Sqls.createf("""
select lineId from staff_therapy_line_union_select where unionId = '%s'
select lineId from inclusive_therapy_v3_line_union_select where unionId = '%s'
""", Vi.getUnionId());*/
switch (selectStatus) {
@@ -168,7 +168,7 @@ public class TheRapyRecuperationLineUnionSelectController {
*/
@At
@ViReturn
@SaCheckPermission(value = {"staffTherapyRecuperation.lineFghSelect", "staffTherapyRecuperation.lineXghSelect"}, mode = SaMode.OR)
@SaCheckPermission(value = {"inclusiveTherapyV3.lineFghSelect", "inclusiveTherapyV3.lineXghSelect"}, mode = SaMode.OR)
public Object getUnionLineSelectLimit(Integer year, Integer mode) {
String unionId = TherapyContext.getUnionId();
Integer queryYear = year == null ? DateUtil.thisYear() : year;
@@ -197,8 +197,8 @@ public class TheRapyRecuperationLineUnionSelectController {
line.regionalNature,
COUNT(us.id) AS selectedNumber
FROM
staff_therapy_line_union_select us
LEFT JOIN staff_therapy_line line ON line.id = us.lineId
inclusive_therapy_v3_line_union_select us
LEFT JOIN inclusive_therapy_v3_line line ON line.id = us.lineId
WHERE
us.unionId = @unionId
AND us.signUpMode = @mode
@@ -229,7 +229,7 @@ public class TheRapyRecuperationLineUnionSelectController {
@At("/selectLine")
@POST
@ViReturn
@SaCheckPermission(value = {"staffTherapyRecuperation.lineFghSelect", "staffTherapyRecuperation.lineXghSelect"}, mode = SaMode.OR)
@SaCheckPermission(value = {"inclusiveTherapyV3.lineFghSelect", "inclusiveTherapyV3.lineXghSelect"}, mode = SaMode.OR)
@Aop(TransAop.READ_COMMITTED)
public Object selectLine(TheRapyRecuperationLineUnionSelect us) {
unionSelectService.validateLineSelectTime(us.getMode());
@@ -246,7 +246,7 @@ public class TheRapyRecuperationLineUnionSelectController {
@At("/selectLineTimes")
@POST
@ViReturn
@SaCheckPermission(value = {"staffTherapyRecuperation.lineFghSelect", "staffTherapyRecuperation.lineXghSelect"}, mode = SaMode.OR)
@SaCheckPermission(value = {"inclusiveTherapyV3.lineFghSelect", "inclusiveTherapyV3.lineXghSelect"}, mode = SaMode.OR)
@Aop(TransAop.READ_COMMITTED)
public Object selectLineTimes(@Param("lineUnionSelects") TheRapyRecuperationLineUnionSelect[] lineUnionSelects) {
unionSelectService.selectLineTimes(lineUnionSelects);
@@ -256,7 +256,7 @@ public class TheRapyRecuperationLineUnionSelectController {
@At
@POST
@SaCheckPermission(value = {"staffTherapyRecuperation.lineFghSelect", "staffTherapyRecuperation.lineXghSelect"}, mode = SaMode.OR)
@SaCheckPermission(value = {"inclusiveTherapyV3.lineFghSelect", "inclusiveTherapyV3.lineXghSelect"}, mode = SaMode.OR)
public Object selectLineInfo(@Param("lineId") String lineId, @Param("unionId") String unionId, @Param("mode") Integer mode, @Param("year") Integer year) {
try {
Assert.notBlank(lineId);
@@ -280,7 +280,7 @@ public class TheRapyRecuperationLineUnionSelectController {
@At
@POST
@ViReturn
@SaCheckPermission(value = {"staffTherapyRecuperation.lineFghSelect", "staffTherapyRecuperation.lineXghSelect"}, mode = SaMode.OR)
@SaCheckPermission(value = {"inclusiveTherapyV3.lineFghSelect", "inclusiveTherapyV3.lineXghSelect"}, mode = SaMode.OR)
public Object findUsLineInfo(String lineId, String usUnionId) {
return unionSelectService.findUsLineInfo(lineId, usUnionId);
}
@@ -288,7 +288,7 @@ public class TheRapyRecuperationLineUnionSelectController {
@At("/deSelect")
@POST
@ViReturn
@SaCheckPermission(value = {"staffTherapyRecuperation.lineFghSelect", "staffTherapyRecuperation.lineXghSelect"}, mode = SaMode.OR)
@SaCheckPermission(value = {"inclusiveTherapyV3.lineFghSelect", "inclusiveTherapyV3.lineXghSelect"}, mode = SaMode.OR)
@SLog(tag = "疗休养", msg = "取消选择线路", param = true, result = true)
@Aop(TransAop.READ_COMMITTED)
public Object deSelect(@Param("lineId") String lineId, @Param("unionId") String unionId, @Param("mode") Integer mode) {
@@ -337,7 +337,7 @@ public class TheRapyRecuperationLineUnionSelectController {
*/
@At
@ViReturn
@SaCheckPermission(value = {"staffTherapyRecuperation.lineFghSelect", "staffTherapyRecuperation.lineXghSelect"}, mode = SaMode.OR)
@SaCheckPermission(value = {"inclusiveTherapyV3.lineFghSelect", "inclusiveTherapyV3.lineXghSelect"}, mode = SaMode.OR)
public Object getTravelAgencyOptions(Integer year) {
Cnd cnd = Cnd.NEW();
cnd.andEX("year", "=", year);
@@ -384,9 +384,9 @@ public class TheRapyRecuperationLineUnionSelectController {
@At("/getLineConfig/?")
@POST
@ViReturn
@SaCheckPermission(value = {"staffTherapyRecuperation.lineFghSelect", "staffTherapyRecuperation.lineXghSelect"}, mode = SaMode.OR)
@SaCheckPermission(value = {"inclusiveTherapyV3.lineFghSelect", "inclusiveTherapyV3.lineXghSelect"}, mode = SaMode.OR)
public Object getLineConfig(String id) {
Sql sql = Sqls.create("select lotId, travelAgencyId from staff_therapy_line where id = @lineId");
Sql sql = Sqls.create("select lotId, travelAgencyId from inclusive_therapy_v3_line where id = @lineId");
sql.setParam("lineId", id);
NutMap lineInfo = (NutMap) Daos.query(dao, sql.toString(), Sqls.callback.map());
String lotId = lineInfo != null ? lineInfo.getString("lotId") : null;
@@ -411,7 +411,7 @@ public class TheRapyRecuperationLineUnionSelectController {
@At("/setGiveLineTimes")
@POST
@ViReturn
@SaCheckPermission(value = {"staffTherapyRecuperation.lineFghSelect", "staffTherapyRecuperation.lineXghSelect"}, mode = SaMode.OR)
@SaCheckPermission(value = {"inclusiveTherapyV3.lineFghSelect", "inclusiveTherapyV3.lineXghSelect"}, mode = SaMode.OR)
@Aop(TransAop.READ_COMMITTED)
@SLog(type = "普惠疗休养", tag = "分工会/校工会选择线路", msg = "一键统赋时间,针对于已选择的线路", param = true, result = true)
public Object setGiveLineTimes(@Param("lineIds") String[] lineIds, @Param("lineUnionSelects") TheRapyRecuperationLineUnionSelect[] lineUnionSelects) {
@@ -438,7 +438,7 @@ public class TheRapyRecuperationLineUnionSelectController {
@At
@ViReturn
@SaCheckPermission(value = {"staffTherapyRecuperation.lineFghSelect", "staffTherapyRecuperation.lineXghSelect"}, mode = SaMode.OR)
@SaCheckPermission(value = {"inclusiveTherapyV3.lineFghSelect", "inclusiveTherapyV3.lineXghSelect"}, mode = SaMode.OR)
@SLog(type = "普惠疗休养", tag = "分工会/校工会选择线路", msg = "是否开放对外报名", param = true, result = true)
public Object doEditOpen(String id) {
dao.update(TheRapyRecuperationLineUnionSelect.class, Chain.makeSpecial("isOpen", "isOpen ^ 1"), Cnd.where("id", "=", id));
@@ -25,7 +25,7 @@ import java.util.Map;
* @date 2022/06/15
*/
@IocBean
@At("/platform/staffTherapyRecuperation/query/statics")
@At("/platform/inclusiveTherapyV3/query/statics")
@Ok("json:full")
public class TheRapyRecuperationStatisticsController {
@@ -34,7 +34,7 @@ public class TheRapyRecuperationStatisticsController {
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/process/queryStatics.html")
@SaCheckPermission("staffTherapyRecuperation.queryStatics")
@SaCheckPermission("inclusiveTherapyV3.queryStatics")
public void index() {
}
@@ -46,19 +46,19 @@ public class TheRapyRecuperationStatisticsController {
Sql sql = Sqls.create("""
SELECT
line.lineName,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll WHERE isNormal=true and line.id = takePartInLineId ) AS enrollNum,
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll WHERE isNormal=true and line.id = takePartInLineId ) AS enrollNum,
(
SELECT
COUNT( 1 )
FROM
staff_therapy_enroll_companion com
LEFT JOIN staff_therapy_enroll enroll ON enroll.id = com.trreId
inclusive_therapy_v3_enroll_companion com
LEFT JOIN inclusive_therapy_v3_enroll enroll ON enroll.id = com.trreId
WHERE
line.id = enroll.takePartInLineId
AND com.loginName IS NULL
) AS companionNum
FROM
`staff_therapy_line` line
`inclusive_therapy_v3_line` line
where line.regionalNature=@regionalNature and line.year=@year
ORDER BY
signUpStartTime DESC
@@ -80,15 +80,15 @@ public class TheRapyRecuperationStatisticsController {
SELECT
COUNT( 1 )
FROM
staff_therapy_enroll_companion com
LEFT JOIN staff_therapy_enroll enroll ON enroll.id = com.trreId
inclusive_therapy_v3_enroll_companion com
LEFT JOIN inclusive_therapy_v3_enroll enroll ON enroll.id = com.trreId
WHERE
line.id = enroll.takePartInLineId
AND com.loginName IS NULL
) AS companionNum
FROM
staff_therapy_enroll enroll
LEFT JOIN staff_therapy_line line ON line.id = enroll.takePartInLineId
inclusive_therapy_v3_enroll enroll
LEFT JOIN inclusive_therapy_v3_line line ON line.id = enroll.takePartInLineId
$condition
""");
Cnd cndSn = Cnd.NEW();
@@ -122,9 +122,9 @@ public class TheRapyRecuperationStatisticsController {
Sql sql = Sqls.create("""
SELECT
agency.travelAgencyName,
( SELECT AVG( evaluationForTravelAgency ) FROM staff_therapy_enroll where isNormal=true and agency.id=takePartInTravelAgencyId) AS avg
( SELECT AVG( evaluationForTravelAgency ) FROM inclusive_therapy_v3_enroll where isNormal=true and agency.id=takePartInTravelAgencyId) AS avg
FROM
`staff_therapy_travel_agency` agency
`inclusive_therapy_v3_travel_agency` agency
WHERE
agency.`year` = @year
""").setParam("year", year);
@@ -139,9 +139,9 @@ public class TheRapyRecuperationStatisticsController {
Sql sql = Sqls.create("""
SELECT
line.lineName,
( SELECT AVG( evaluationForLine ) FROM staff_therapy_enroll where isNormal=true and line.id=takePartInLineId) AS avg
( SELECT AVG( evaluationForLine ) FROM inclusive_therapy_v3_enroll where isNormal=true and line.id=takePartInLineId) AS avg
FROM
`staff_therapy_line` line
`inclusive_therapy_v3_line` line
WHERE
line.`year` = @year
""").setParam("year", year);
@@ -53,7 +53,7 @@ import java.util.*;
import java.util.stream.Collectors;
@IocBean
@At("/platform/staffTherapyRecuperation/query")
@At("/platform/inclusiveTherapyV3/query")
@Ok("json:full")
public class TheRapyRecuperationUnionQueryController {
@@ -70,7 +70,7 @@ public class TheRapyRecuperationUnionQueryController {
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/process/TheRapyQuery.html")
@SaCheckPermission("staffTherapyRecuperation.TheRapyQuery")
@SaCheckPermission("inclusiveTherapyV3.TheRapyQuery")
public void index() {
}
@@ -111,19 +111,19 @@ public class TheRapyRecuperationUnionQueryController {
IFNULL(enrollStats.lineNum, 0) AS lineNum,
IFNULL(companionStats.signUpUserFamilyNum, 0) AS signUpUserFamilyNum
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_lot lot ON lot.id = line.lotId
LEFT JOIN staff_therapy_travel_agency lxs ON lxs.id = IFNULL(lineu.travelAgencyId, line.travelAgencyId)
LEFT JOIN staff_therapy_union un ON un.id = enroll.takePartInUnionId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_lot lot ON lot.id = line.lotId
LEFT JOIN inclusive_therapy_v3_travel_agency lxs ON lxs.id = IFNULL(lineu.travelAgencyId, line.travelAgencyId)
LEFT JOIN inclusive_therapy_v3_union un ON un.id = enroll.takePartInUnionId
LEFT JOIN (
SELECT
e.takePartInLineId,
COUNT(1) AS lineNum,
SUM(IFNULL(e.familyNumber, 0)) AS familyNumber
FROM
staff_therapy_enroll e
inclusive_therapy_v3_enroll e
WHERE
e.isNormal = TRUE
AND e.stateId = @stateId
@@ -136,8 +136,8 @@ public class TheRapyRecuperationUnionQueryController {
e.takePartInLineId,
COUNT(c.id) AS signUpUserFamilyNum
FROM
staff_therapy_enroll e
LEFT JOIN staff_therapy_enroll_companion c ON c.trreId = e.id
inclusive_therapy_v3_enroll e
LEFT JOIN inclusive_therapy_v3_enroll_companion c ON c.trreId = e.id
WHERE
e.isNormal = TRUE
AND e.stateId = @stateId
@@ -154,11 +154,11 @@ public class TheRapyRecuperationUnionQueryController {
SELECT
enroll.takePartInLineId
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_lot lot ON lot.id = line.lotId
LEFT JOIN staff_therapy_union un ON un.id = enroll.takePartInUnionId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_lot lot ON lot.id = line.lotId
LEFT JOIN inclusive_therapy_v3_union un ON un.id = enroll.takePartInUnionId
$condition
) lineCount
""");
@@ -239,15 +239,15 @@ public class TheRapyRecuperationUnionQueryController {
lineu.lineId,
lineu.playStartTime,
lineu.playEndTime,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id ) isFamily
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id ) isFamily
$lotSql
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_travel_agency agency ON agency.id = IFNULL(enroll.takePartInTravelAgencyId, IFNULL(lineu.travelAgencyId, line.travelAgencyId))
LEFT JOIN staff_therapy_base_management ma on ma.id = enroll.takePartInBaseManagementId
LEFT JOIN staff_therapy_audit_state state ON state.stateId = enroll.stateId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_travel_agency agency ON agency.id = IFNULL(enroll.takePartInTravelAgencyId, IFNULL(lineu.travelAgencyId, line.travelAgencyId))
LEFT JOIN inclusive_therapy_v3_base_management ma on ma.id = enroll.takePartInBaseManagementId
LEFT JOIN inclusive_therapy_v3_audit_state state ON state.stateId = enroll.stateId
$condition
""");
if (Strings.isNotBlank(pageForm.getSearchKeyword()) && Strings.isNotBlank(pageForm.getSearchName())) {
@@ -303,7 +303,7 @@ public class TheRapyRecuperationUnionQueryController {
cnd.andEX("line.regionalNature", "=", regionalNature);
cnd.and("enroll.takePartInLineId", "is not", null);
cnd.and("enroll.takePartInLineId", "!=", "");
sql.setVar("lotSql", ",(select lotName from staff_therapy_lot where id = line.lotId) as lotName");
sql.setVar("lotSql", ",(select lotName from inclusive_therapy_v3_lot where id = line.lotId) as lotName");
} else if (state.equals("2")) {
cnd.and("enroll.takePartInTravelAgencyId", "is not", null);
cnd.and("enroll.takePartInTravelAgencyId", "!=", "");
@@ -311,7 +311,7 @@ public class TheRapyRecuperationUnionQueryController {
} else if ("3".equals(state)) {
cnd.and("enroll.takePartInBaseManagementId", "is not", null);
cnd.andEX("enroll.takePartInBaseManagementId", "=", takePartInBaseManagementId);
sql.setVar("lotSql", ",(select lotName from staff_therapy_lot where id = ma.lotId) as lotName");
sql.setVar("lotSql", ",(select lotName from inclusive_therapy_v3_lot where id = ma.lotId) as lotName");
}
cnd.desc("enroll.stateId");
sql.setCondition(cnd);
@@ -336,9 +336,9 @@ public class TheRapyRecuperationUnionQueryController {
SELECT
*,
files AS fileId,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll WHERE agency.id = takePartInTravelAgencyId and isNormal=true and stateId=@stateId $unionCnd $yearCnd) agencyNum
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll WHERE agency.id = takePartInTravelAgencyId and isNormal=true and stateId=@stateId $unionCnd $yearCnd) agencyNum
FROM
staff_therapy_travel_agency agency
inclusive_therapy_v3_travel_agency agency
$condition
""").setParam("stateId", TheRapyRecuperationState.PASS);
if (!TherapyContext.hasAnyRoles("sysadmin,H06")) {
@@ -365,15 +365,15 @@ public class TheRapyRecuperationUnionQueryController {
Sql sql = Sqls.create("""
SELECT
man.* ,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll WHERE man.id = takePartInBaseManagementId and isNormal=true and stateId=@stateId $unionCnd $yearCnd) agencyNum,
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll WHERE man.id = takePartInBaseManagementId and isNormal=true and stateId=@stateId $unionCnd $yearCnd) agencyNum,
ta.travelAgencyName,
ta.officialWebsite,
lot.lotName,
ta.email
FROM
`staff_therapy_base_management` man
LEFT JOIN staff_therapy_travel_agency ta ON ta.id = man.travelAgencyId
LEFT JOIN staff_therapy_lot lot ON lot.id = man.lotId
`inclusive_therapy_v3_base_management` man
LEFT JOIN inclusive_therapy_v3_travel_agency ta ON ta.id = man.travelAgencyId
LEFT JOIN inclusive_therapy_v3_lot lot ON lot.id = man.lotId
$condition
""").setParam("stateId", TheRapyRecuperationState.PASS);
if (StrUtil.isNotBlank(year)) {
@@ -409,14 +409,14 @@ public class TheRapyRecuperationUnionQueryController {
line.regionalNature,
agency.travelAgencyName,
ma.baseName,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id ) isFamily
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id ) isFamily
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_travel_agency agency ON agency.id = IFNULL(enroll.takePartInTravelAgencyId, IFNULL(lineu.travelAgencyId, line.travelAgencyId))
LEFT JOIN staff_therapy_base_management ma on ma.id = enroll.takePartInBaseManagementId
LEFT JOIN staff_therapy_audit_state state ON state.stateId = enroll.stateId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_travel_agency agency ON agency.id = IFNULL(enroll.takePartInTravelAgencyId, IFNULL(lineu.travelAgencyId, line.travelAgencyId))
LEFT JOIN inclusive_therapy_v3_base_management ma on ma.id = enroll.takePartInBaseManagementId
LEFT JOIN inclusive_therapy_v3_audit_state state ON state.stateId = enroll.stateId
$condition
""");
if (Strings.isNotBlank(pageForm.getSearchName()) && Strings.isNotBlank(pageForm.getSearchKeyword())) {
@@ -621,10 +621,10 @@ public class TheRapyRecuperationUnionQueryController {
SELECT
COUNT( 1 )
FROM
staff_therapy_enroll enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_base_management ma ON ma.id = enroll.takePartInBaseManagementId
inclusive_therapy_v3_enroll enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_base_management ma ON ma.id = enroll.takePartInBaseManagementId
$condition
""");
@@ -705,19 +705,19 @@ public class TheRapyRecuperationUnionQueryController {
SELECT
count( 1 )
FROM
staff_therapy_enroll_companion
inclusive_therapy_v3_enroll_companion
WHERE
trreId IN ( SELECT enroll.id FROM staff_therapy_enroll enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id = enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_base_management ma ON ma.id = enroll.takePartInBaseManagementId $condition )
trreId IN ( SELECT enroll.id FROM inclusive_therapy_v3_enroll enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id = enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_base_management ma ON ma.id = enroll.takePartInBaseManagementId $condition )
""");
} else {
sql2 = Sqls.create("""
SELECT sum(familyNumber) FROM staff_therapy_enroll enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id = enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_base_management ma ON ma.id = enroll.takePartInBaseManagementId $condition
SELECT sum(familyNumber) FROM inclusive_therapy_v3_enroll enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id = enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_base_management ma ON ma.id = enroll.takePartInBaseManagementId $condition
""");
}
Cnd cnd2 = Cnd.NEW();
@@ -889,7 +889,7 @@ public class TheRapyRecuperationUnionQueryController {
List<NutMap> maps = Json.fromJsonAsList(NutMap.class, multipleSelection);
maps.forEach(v -> {
Chain chain = Chain.make("lotId", v.getString("lotId")).add("takePartInTime", v.getString("takePartInTime")).add("isTakePartIn", true);
baseService.update("staff_therapy_enroll", chain, Cnd.where("id", "=", v.getString("id")));
baseService.update("inclusive_therapy_v3_enroll", chain, Cnd.where("id", "=", v.getString("id")));
});
});
return null;
@@ -929,10 +929,10 @@ public class TheRapyRecuperationUnionQueryController {
rs.contact,
rs.contactPhone
FROM
`staff_therapy_line_union_select` rs
left join `staff_therapy_line` rl on rs.lineId=rl.id
LEFT JOIN `staff_therapy_travel_agency` ta ON rl.travelAgencyId = ta.id
LEFT JOIN `staff_therapy_lot` lot ON rl.lotId = lot.id
`inclusive_therapy_v3_line_union_select` rs
left join `inclusive_therapy_v3_line` rl on rs.lineId=rl.id
LEFT JOIN `inclusive_therapy_v3_travel_agency` ta ON rl.travelAgencyId = ta.id
LEFT JOIN `inclusive_therapy_v3_lot` lot ON rl.lotId = lot.id
where rs.signUpMode='1' and YEAR(rs.selectTime)=@year
""");
sql.setParam("year", DateUtil.thisYear());
@@ -991,11 +991,11 @@ public class TheRapyRecuperationUnionQueryController {
ta.travelAgencyName,
lot.lotName
FROM
`staff_therapy_enroll` re
left join `staff_therapy_line_union_select` rs on rs.id = re.takePartInLineId
LEFT JOIN `staff_therapy_line` rl ON rs.lineId=rl.id
LEFT JOIN `staff_therapy_travel_agency` ta ON ta.id = rl.travelAgencyId
LEFT JOIN `staff_therapy_lot` lot ON rl.lotId = lot.id
`inclusive_therapy_v3_enroll` re
left join `inclusive_therapy_v3_line_union_select` rs on rs.id = re.takePartInLineId
LEFT JOIN `inclusive_therapy_v3_line` rl ON rs.lineId=rl.id
LEFT JOIN `inclusive_therapy_v3_travel_agency` ta ON ta.id = rl.travelAgencyId
LEFT JOIN `inclusive_therapy_v3_lot` lot ON rl.lotId = lot.id
WHERE
rl.lineName IS NOT NULL and rs.signUpMode='1' and re.isNormal='1'
and re.takePartInUnionId=@unionid
@@ -1052,10 +1052,10 @@ public class TheRapyRecuperationUnionQueryController {
en.signingUptime,
if(en.takePartInLineId is not null and en.takePartInLineId != '', line.lineName, ta.travelAgencyName) as address
FROM
`staff_therapy_enroll` en
LEFT JOIN staff_therapy_travel_agency ta ON ta.id = en.takePartInTravelAgencyId
LEFT JOIN staff_therapy_line_union_select us ON en.takePartInLineId = us.id
LEFT JOIN staff_therapy_line line ON us.lineId = line.id
`inclusive_therapy_v3_enroll` en
LEFT JOIN inclusive_therapy_v3_travel_agency ta ON ta.id = en.takePartInTravelAgencyId
LEFT JOIN inclusive_therapy_v3_line_union_select us ON en.takePartInLineId = us.id
LEFT JOIN inclusive_therapy_v3_line line ON us.lineId = line.id
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -66,7 +66,7 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
@IocBean
@At("/platform/staffTherapyRecuperation/user/query")
@At("/platform/inclusiveTherapyV3/user/query")
@Ok("json:full")
@Slf4j
public class TheRapyRecuperationUserQueryController {
@@ -81,7 +81,7 @@ public class TheRapyRecuperationUserQueryController {
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/process/TheRapyUserQuery.html")
@SaCheckPermission("staffTherapyRecuperation.TheRapyUserQuery")
@SaCheckPermission("inclusiveTherapyV3.TheRapyUserQuery")
public void index() {
}
@@ -106,10 +106,10 @@ public class TheRapyRecuperationUserQueryController {
enroll.*,
IF(enroll.isReimbursement = 1,'已报销','未报销') AS reimbursementStatus,
lxs.travelAgencyName,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id ) isFamily
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id ) isFamily
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_travel_agency lxs ON lxs.id = enroll.takePartInTravelAgencyId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_travel_agency lxs ON lxs.id = enroll.takePartInTravelAgencyId
$condition
""");
if (!TherapyContext.hasAnyRoles("sysadmin, A06")) {
@@ -134,14 +134,14 @@ public class TheRapyRecuperationUserQueryController {
lineu.lineId,
lineu.playStartTime,
lineu.playEndTime,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id ) isFamily
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id ) isFamily
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_lot lot ON lot.id = line.lotId
LEFT JOIN staff_therapy_base_management ma on ma.id = enroll.takePartInBaseManagementId
LEFT JOIN staff_therapy_travel_agency lxs ON lxs.id = IFNULL(lineu.travelAgencyId, line.travelAgencyId)
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_lot lot ON lot.id = line.lotId
LEFT JOIN inclusive_therapy_v3_base_management ma on ma.id = enroll.takePartInBaseManagementId
LEFT JOIN inclusive_therapy_v3_travel_agency lxs ON lxs.id = IFNULL(lineu.travelAgencyId, line.travelAgencyId)
$condition
""");
cnd.andEX("YEAR(enroll.signingUptime)", ">=", startYear);
@@ -153,11 +153,11 @@ public class TheRapyRecuperationUserQueryController {
addLineTravelAgencyCondition(cnd, agencyId);
cnd.andEX("enroll.isTakePartIn","=",isTakePartIn);
if (state == 3) {
sql.setVar("lotSql", "(select lotName from staff_therapy_lot where id = ma.lotId) as lotName");
sql.setVar("lotSql", "(select lotName from inclusive_therapy_v3_lot where id = ma.lotId) as lotName");
cnd.and("enroll.takePartInBaseManagementId", "is not", null);
cnd.andEX("enroll.takePartInBaseManagementId", "=", takePartInBaseManagementId);
} else {
sql.setVar("lotSql", "(select lotName from staff_therapy_lot where id = line.lotId) as lotName");
sql.setVar("lotSql", "(select lotName from inclusive_therapy_v3_lot where id = line.lotId) as lotName");
cnd.and("enroll.takePartInLineId", "is not", null);
cnd.and("enroll.takePartInLineId", "!=", "");
}
@@ -193,7 +193,7 @@ public class TheRapyRecuperationUserQueryController {
cnd.and("takePartInLineId", "!=", "");
cnd.and("stateId", "=", TheRapyRecuperationState.PASS);
cnd.andEX("isTakePartIn", "=", isTakePartIn);
cnd.andEX("(select signUpMode from staff_therapy_line_union_select where id = takePartInLineId)", "=", signUpMode);
cnd.andEX("(select signUpMode from inclusive_therapy_v3_line_union_select where id = takePartInLineId)", "=", signUpMode);
int count = baseService.dao().count(TheRapyRecuperationEnroll.class, cnd);
int count1 = baseService.dao().count(TheRapyRecuperationEnroll.class, Cnd.where("takePartInTravelAgencyId", "is not", null)
.and("takePartInTravelAgencyId", "!=", "")
@@ -203,7 +203,7 @@ public class TheRapyRecuperationUserQueryController {
.andEX("stateId", "=", TheRapyRecuperationState.PASS)
.andEX("isNormal", "=", true)
.andEX("isTakePartIn", "=", isTakePartIn)
.andEX("(select signUpMode from staff_therapy_line_union_select where id = takePartInLineId)", "=", signUpMode));
.andEX("(select signUpMode from inclusive_therapy_v3_line_union_select where id = takePartInLineId)", "=", signUpMode));
int count2 = baseService.dao().count(TheRapyRecuperationEnroll.class, Cnd.where("takePartInBaseManagementId", "is not", null)
.andEX("selfUnionId", "=", unionId)
.andEX("YEAR(signingUptime)", ">=", startYear)
@@ -211,7 +211,7 @@ public class TheRapyRecuperationUserQueryController {
.andEX("stateId", "=", TheRapyRecuperationState.PASS)
.andEX("isNormal", "=", true)
.andEX("isTakePartIn", "=", isTakePartIn)
.andEX("(select signUpMode from staff_therapy_line_union_select where id = takePartInLineId)", "=", signUpMode));
.andEX("(select signUpMode from inclusive_therapy_v3_line_union_select where id = takePartInLineId)", "=", signUpMode));
return Map.of("xlCount", count, "lxsCount", count1, "jdCount", count2);
}
@@ -338,10 +338,10 @@ public class TheRapyRecuperationUserQueryController {
lot.lotName,
un.unionname
FROM
`staff_therapy_line_union_select` rlus
LEFT JOIN `staff_therapy_line` rl ON rlus.lineId = rl.id
LEFT JOIN `staff_therapy_lot` lot ON rl.lotId = lot.id
LEFT JOIN staff_therapy_union un ON un.id = rlus.unionId
`inclusive_therapy_v3_line_union_select` rlus
LEFT JOIN `inclusive_therapy_v3_line` rl ON rlus.lineId = rl.id
LEFT JOIN `inclusive_therapy_v3_lot` lot ON rl.lotId = lot.id
LEFT JOIN inclusive_therapy_v3_union un ON un.id = rlus.unionId
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -403,7 +403,7 @@ public class TheRapyRecuperationUserQueryController {
@At
@ViReturn
@SaCheckLogin
@SaCheckPermission("staffTherapyRecuperation.TheRapyUserQuery")
@SaCheckPermission("inclusiveTherapyV3.TheRapyUserQuery")
public Object searchProxySignUpUsers(String keyword) {
return enrollService.searchProxySignUpUsers(keyword);
}
@@ -417,7 +417,7 @@ public class TheRapyRecuperationUserQueryController {
@At
@ViReturn
@SaCheckLogin
@SaCheckPermission("staffTherapyRecuperation.TheRapyUserQuery")
@SaCheckPermission("inclusiveTherapyV3.TheRapyUserQuery")
public Object getProxySignUpLines(Integer year) {
return enrollService.getProxySignUpLines(year);
}
@@ -434,7 +434,7 @@ public class TheRapyRecuperationUserQueryController {
@ViReturn
@SaCheckLogin
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("staffTherapyRecuperation.TheRapyUserQuery")
@SaCheckPermission("inclusiveTherapyV3.TheRapyUserQuery")
public Object doProxySignUpForLine(@Param("enroll") TheRapyRecuperationEnroll enrollInfo) {
if (enrollInfo == null) {
return Result.error("请填写代报名信息");
@@ -516,10 +516,10 @@ public class TheRapyRecuperationUserQueryController {
enroll.*,
IF(enroll.isReimbursement = 1,'已报销','未报销') AS reimbursementStatus,
lxs.travelAgencyName,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id ) isFamily
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id ) isFamily
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_travel_agency lxs ON lxs.id = enroll.takePartInTravelAgencyId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_travel_agency lxs ON lxs.id = enroll.takePartInTravelAgencyId
$condition
""");
if (!TherapyContext.hasAnyRoles("sysadmin, A06")) {
@@ -544,14 +544,14 @@ public class TheRapyRecuperationUserQueryController {
lineu.lineId,
lineu.playStartTime,
lineu.playEndTime,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id ) isFamily
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id ) isFamily
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_lot lot ON lot.id = line.lotId
LEFT JOIN staff_therapy_base_management ma on ma.id = enroll.takePartInBaseManagementId
LEFT JOIN staff_therapy_travel_agency lxs ON lxs.id = IFNULL(lineu.travelAgencyId, line.travelAgencyId)
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_lot lot ON lot.id = line.lotId
LEFT JOIN inclusive_therapy_v3_base_management ma on ma.id = enroll.takePartInBaseManagementId
LEFT JOIN inclusive_therapy_v3_travel_agency lxs ON lxs.id = IFNULL(lineu.travelAgencyId, line.travelAgencyId)
$condition
""");
cnd.andEX("YEAR(enroll.signingUptime)", ">=", startYear);
@@ -563,11 +563,11 @@ public class TheRapyRecuperationUserQueryController {
addLineTravelAgencyCondition(cnd, agencyId);
cnd.andEX("enroll.isTakePartIn", "=", isTakePartIn);
if (state != null && state == 3) {
sql.setVar("lotSql", "(select lotName from staff_therapy_lot where id = ma.lotId) as lotName");
sql.setVar("lotSql", "(select lotName from inclusive_therapy_v3_lot where id = ma.lotId) as lotName");
cnd.and("enroll.takePartInBaseManagementId", "is not", null);
cnd.andEX("enroll.takePartInBaseManagementId", "=", takePartInBaseManagementId);
} else {
sql.setVar("lotSql", "(select lotName from staff_therapy_lot where id = line.lotId) as lotName");
sql.setVar("lotSql", "(select lotName from inclusive_therapy_v3_lot where id = line.lotId) as lotName");
cnd.and("enroll.takePartInLineId", "is not", null);
cnd.and("enroll.takePartInLineId", "!=", "");
}
@@ -672,8 +672,8 @@ public class TheRapyRecuperationUserQueryController {
bed.bedNum,
bed.otherSleepUser
FROM
staff_therapy_enroll_companion companion
LEFT JOIN staff_therapy_enroll_bed bed ON bed.id = companion.bedInfoId
inclusive_therapy_v3_enroll_companion companion
LEFT JOIN inclusive_therapy_v3_enroll_bed bed ON bed.id = companion.bedInfoId
$condition
""");
Cnd companionCnd = Cnd.where("companion.trreId", "in", enrollIds);
@@ -763,15 +763,15 @@ public class TheRapyRecuperationUserQueryController {
date_format( enroll.signingUptime, '%Y-%m-%d %H:%i:%s' ) signingUptimeFormat,
date_format( lineu.playStartTime, '%Y-%m-%d' ) playStartTime,
lineu.lineId,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id) familyCount,
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id) familyCount,
u.schoolTime
FROM
`staff_therapy_enroll` enroll
LEFT JOIN `staff_therapy_user` u on enroll.loginName = u.loginname
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_union un ON un.id = lineu.unionId
LEFT JOIN staff_therapy_travel_agency lxs ON lxs.id = IFNULL(lineu.travelAgencyId, line.travelAgencyId)
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN `inclusive_therapy_v3_user` u on enroll.loginName = u.loginname
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_union un ON un.id = lineu.unionId
LEFT JOIN inclusive_therapy_v3_travel_agency lxs ON lxs.id = IFNULL(lineu.travelAgencyId, line.travelAgencyId)
$condition
""");
Cnd lineCnd = commonCnd.clone();
@@ -806,9 +806,9 @@ public class TheRapyRecuperationUserQueryController {
lxs.travelAgencyName,
u.schoolTime
FROM
`staff_therapy_enroll` enroll
LEFT JOIN `staff_therapy_user` u on enroll.loginName = u.loginname
LEFT JOIN staff_therapy_travel_agency lxs ON lxs.id = enroll.takePartInTravelAgencyId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN `inclusive_therapy_v3_user` u on enroll.loginName = u.loginname
LEFT JOIN inclusive_therapy_v3_travel_agency lxs ON lxs.id = enroll.takePartInTravelAgencyId
$condition
""");
Cnd travelCnd = commonCnd.clone();
@@ -938,16 +938,16 @@ public class TheRapyRecuperationUserQueryController {
date_format( enroll.signingUptime, '%Y-%m-%d %H:%i:%s' ) signingUptimeFormat,
date_format( lineu.playStartTime, '%Y-%m-%d' ) playStartTime,
lineu.lineId,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id) familyCount,
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id) familyCount,
u.schoolTime
FROM
`staff_therapy_enroll` enroll
LEFT JOIN `staff_therapy_user` u on enroll.loginName = u.loginname
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_union un ON un.id = lineu.unionId
LEFT JOIN staff_therapy_travel_agency lxs ON lxs.id = IFNULL(lineu.travelAgencyId, line.travelAgencyId)
LEFT JOIN staff_therapy_enroll_bed bed ON bed.id = enroll.bedInfoId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN `inclusive_therapy_v3_user` u on enroll.loginName = u.loginname
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_union un ON un.id = lineu.unionId
LEFT JOIN inclusive_therapy_v3_travel_agency lxs ON lxs.id = IFNULL(lineu.travelAgencyId, line.travelAgencyId)
LEFT JOIN inclusive_therapy_v3_enroll_bed bed ON bed.id = enroll.bedInfoId
$condition
""");
Cnd lineCnd = commonCnd.clone();
@@ -997,10 +997,10 @@ public class TheRapyRecuperationUserQueryController {
lxs.travelAgencyName,
u.schoolTime
FROM
`staff_therapy_enroll` enroll
LEFT JOIN `staff_therapy_user` u on enroll.loginName = u.loginname
LEFT JOIN staff_therapy_travel_agency lxs ON lxs.id = enroll.takePartInTravelAgencyId
LEFT JOIN staff_therapy_enroll_bed bed ON bed.id = enroll.bedInfoId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN `inclusive_therapy_v3_user` u on enroll.loginName = u.loginname
LEFT JOIN inclusive_therapy_v3_travel_agency lxs ON lxs.id = enroll.takePartInTravelAgencyId
LEFT JOIN inclusive_therapy_v3_enroll_bed bed ON bed.id = enroll.bedInfoId
$condition
""");
Cnd travelCnd = commonCnd.clone();
@@ -1154,10 +1154,10 @@ public class TheRapyRecuperationUserQueryController {
SELECT
enroll.*,
lxs.travelAgencyName,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id AND relation = '亲属' ) isFamily
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id AND relation = '亲属' ) isFamily
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_travel_agency lxs ON lxs.id = enroll.takePartInTravelAgencyId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_travel_agency lxs ON lxs.id = enroll.takePartInTravelAgencyId
$condition
""");
cnd.andEX("enroll.selfUnionId", "=", TherapyContext.getUnionId());
@@ -1178,14 +1178,14 @@ public class TheRapyRecuperationUserQueryController {
lineu.lineId,
lineu.playStartTime,
lineu.playEndTime,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id AND relation = '亲属' ) isFamily
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id AND relation = '亲属' ) isFamily
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_lot lot ON lot.id = line.lotId
LEFT JOIN staff_therapy_base_management ma on ma.id = enroll.takePartInBaseManagementId
LEFT JOIN staff_therapy_travel_agency lxs ON lxs.id = line.travelAgencyId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id=enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_lot lot ON lot.id = line.lotId
LEFT JOIN inclusive_therapy_v3_base_management ma on ma.id = enroll.takePartInBaseManagementId
LEFT JOIN inclusive_therapy_v3_travel_agency lxs ON lxs.id = line.travelAgencyId
$condition
""");
cnd.andEX("YEAR(enroll.signingUptime)", ">=", startYear);
@@ -1197,11 +1197,11 @@ public class TheRapyRecuperationUserQueryController {
cnd.and("enroll.takePartInLineId", "is not", null);
cnd.and("enroll.takePartInLineId", "!=", "");
if (state == 3) {
sql.setVar("lotSql", "(select lotName from staff_therapy_lot where id = ma.lotId) as lotName");
sql.setVar("lotSql", "(select lotName from inclusive_therapy_v3_lot where id = ma.lotId) as lotName");
cnd.and("enroll.takePartInBaseManagementId", "is not", null);
cnd.andEX("enroll.takePartInBaseManagementId", "=", takePartInBaseManagementId);
} else {
sql.setVar("lotSql", "(select lotName from staff_therapy_lot where id = line.lotId) as lotName");
sql.setVar("lotSql", "(select lotName from inclusive_therapy_v3_lot where id = line.lotId) as lotName");
cnd.and("enroll.takePartInLineId", "is not", null);
}
if (StrUtil.isNotBlank(lotId)) {
@@ -51,7 +51,7 @@ import java.util.stream.Collectors;
* @注释 查看报名情况
*/
@IocBean
@At("/platform/staffTherapyRecuperation/statistics")
@At("/platform/inclusiveTherapyV3/statistics")
@Ok("json:full")
@Slf4j
public class TheRapyRecuperationLineStatisticsController {
@@ -67,13 +67,13 @@ public class TheRapyRecuperationLineStatisticsController {
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/statistics/lineStatistics.html")
@SaCheckPermission("staffTherapyRecuperation.statistics")
@SaCheckPermission("inclusiveTherapyV3.statistics")
public void index() {
}
@At("/unionLineNumberStatistics")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/statistics/unionLineNumberStatistics.html")
@SaCheckPermission("staffTherapyRecuperation.unionLineNumberStatistics")
@SaCheckPermission("inclusiveTherapyV3.unionLineNumberStatistics")
public void unionLineNumberStatistics() {
}
@@ -85,7 +85,7 @@ public class TheRapyRecuperationLineStatisticsController {
*/
@At("/unionLineNumberStatistics/pageData")
@ViReturn
@SaCheckPermission("staffTherapyRecuperation.unionLineNumberStatistics")
@SaCheckPermission("inclusiveTherapyV3.unionLineNumberStatistics")
public Object unionLineNumberStatisticsPageData(@Param(value = "unionId", required = false) String unionId) {
TheRapyRecuperationConfig config = dao.fetch(TheRapyRecuperationConfig.class, Cnd.NEW());
List<NutMap> lineNumberConfigs = Optional.ofNullable(config)
@@ -118,8 +118,8 @@ public class TheRapyRecuperationLineStatisticsController {
line.regionalNature,
COUNT(us.id) AS selectedNumber
FROM
staff_therapy_line_union_select us
LEFT JOIN staff_therapy_line line ON line.id = us.lineId
inclusive_therapy_v3_line_union_select us
LEFT JOIN inclusive_therapy_v3_line line ON line.id = us.lineId
WHERE
us.signUpMode = 1
AND YEAR(us.selectTime) = @year
@@ -164,8 +164,8 @@ public class TheRapyRecuperationLineStatisticsController {
* @param startYear 选择线路年度开始年份,按 lineu.selectTime 年份过滤
* @param endYear 选择线路年度结束年份,按 lineu.selectTime 年份过滤
* @param unionId 分工会 ID,管理员可传;普通分工会账号按当前登录人分工会过滤
* @param takePartInLineId 线路 ID,对应 staff_therapy_line.id
* @param lotId 标段 ID,对应 staff_therapy_lot.id
* @param takePartInLineId 线路 ID,对应 inclusive_therapy_v3_line.id
* @param lotId 标段 ID,对应 inclusive_therapy_v3_lot.id
* @param signUpMode 报名模式,1 分工会组织,2 校工会组织
* @param selectId 线路选择记录 ID,保留给旧入口按具体出行时间段精确筛选
* @param playMonth 出行年月,格式 yyyy-MM,按 lineu.playStartTime 所属年月筛选
@@ -175,7 +175,7 @@ public class TheRapyRecuperationLineStatisticsController {
*/
@At
@ViReturn
@SaCheckPermission("staffTherapyRecuperation.statistics")
@SaCheckPermission("inclusiveTherapyV3.statistics")
public Object pageData(PageForm pageForm,
@Param(value = "startYear", required = false) Integer startYear,
@Param(value = "endYear", required = false) Integer endYear,
@@ -215,12 +215,12 @@ public class TheRapyRecuperationLineStatisticsController {
IFNULL(enrollStats.signUpUserFamilyNum, 0) as signUpUserFamilyNum,
IFNULL(enrollStats.adultFamilyNum, 0) as adultFamilyNum
FROM
staff_therapy_line_union_select lineu
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_lot lot ON lot.id = line.lotId
LEFT JOIN staff_therapy_travel_agency usTa ON lineu.travelAgencyId = usTa.id
LEFT JOIN staff_therapy_travel_agency lineTa ON line.travelAgencyId = lineTa.id
LEFT JOIN staff_therapy_union un ON un.id = lineu.unionId
inclusive_therapy_v3_line_union_select lineu
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_lot lot ON lot.id = line.lotId
LEFT JOIN inclusive_therapy_v3_travel_agency usTa ON lineu.travelAgencyId = usTa.id
LEFT JOIN inclusive_therapy_v3_travel_agency lineTa ON line.travelAgencyId = lineTa.id
LEFT JOIN inclusive_therapy_v3_union un ON un.id = lineu.unionId
LEFT JOIN (
SELECT
e.takePartInLineId,
@@ -230,8 +230,8 @@ public class TheRapyRecuperationLineStatisticsController {
COUNT(c.id) AS signUpUserFamilyNum,
SUM(CASE WHEN c.age >= 18 THEN 1 ELSE 0 END) AS adultFamilyNum
FROM
staff_therapy_enroll e
LEFT JOIN staff_therapy_enroll_companion c ON c.trreId = e.id
inclusive_therapy_v3_enroll e
LEFT JOIN inclusive_therapy_v3_enroll_companion c ON c.trreId = e.id
WHERE
e.stateId = 2750
AND e.isNormal = TRUE
@@ -246,9 +246,9 @@ public class TheRapyRecuperationLineStatisticsController {
SELECT
COUNT(1)
FROM
staff_therapy_line_union_select lineu
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_lot lot ON lot.id = line.lotId
inclusive_therapy_v3_line_union_select lineu
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_lot lot ON lot.id = line.lotId
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -315,7 +315,7 @@ public class TheRapyRecuperationLineStatisticsController {
*/
@At
@ViReturn
@SaCheckPermission("staffTherapyRecuperation.statistics")
@SaCheckPermission("inclusiveTherapyV3.statistics")
public Object getUserDateByLine(PageForm pageForm,
@Param(value = "takePartLineId", required = false) String takePartLineId,
@Param(value = "searchKeyword", required = false) String searchKeyword,
@@ -333,13 +333,13 @@ public class TheRapyRecuperationLineStatisticsController {
CONCAT(DATE_FORMAT(rs.playStartTime,'%m月%d日'),'-',DATE_FORMAT(rs.playEndTime,'%m月%d日')) AS linePlayTime,
IF
( enroll.takePartInUnionId != enroll.selfUnionId, TRUE, FALSE ) isTransferIn,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id ) isFamily,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id ) num
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id ) isFamily,
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id ) num
FROM
`staff_therapy_enroll` enroll
LEFT JOIN `staff_therapy_line_union_select` rs ON rs.id = enroll.takePartInLineId
LEFT JOIN `staff_therapy_line` line on line.id=rs.lineId
LEFT JOIN staff_therapy_audit_state state ON state.stateId = enroll.stateId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN `inclusive_therapy_v3_line_union_select` rs ON rs.id = enroll.takePartInLineId
LEFT JOIN `inclusive_therapy_v3_line` line on line.id=rs.lineId
LEFT JOIN inclusive_therapy_v3_audit_state state ON state.stateId = enroll.stateId
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -441,7 +441,7 @@ public class TheRapyRecuperationLineStatisticsController {
* 手动发送所选线路的成团邮件给旅行社。
* 参数 lineUnionSelectIds 为统计页勾选的线路选择记录 ID 数组;返回值为统一 Result,msg 中说明实际发送邮件的旅行社数量。
*
* @param lineUnionSelectIds 线路选择记录 ID,对应 staff_therapy_line_union_select.id
* @param lineUnionSelectIds 线路选择记录 ID,对应 inclusive_therapy_v3_line_union_select.id
* @return Result,code=0 表示触发完成,msg 展示发送结果
*/
@At("/sendGroupMail")
@@ -462,13 +462,13 @@ public class TheRapyRecuperationLineStatisticsController {
/**
* 统计页一键统赋勾选线路的报名、出行和调剂时间。
*
* @param lineUnionSelectIds 统计页勾选的线路选择记录 ID,对应 staff_therapy_line_union_select.id
* @param lineUnionSelectIds 统计页勾选的线路选择记录 ID,对应 inclusive_therapy_v3_line_union_select.id
* @param lineUnionSelects 统赋时间表单数组,当前只取第一项作为批量更新模板
* @return 空数据,前端根据统一返回包装判断是否成功
*/
@At("/setGiveLineTimes")
@ViReturn
@SaCheckPermission("staffTherapyRecuperation.statistics")
@SaCheckPermission("inclusiveTherapyV3.statistics")
@Aop(TransAop.READ_COMMITTED)
public Object setGiveLineTimes(@Param("lineUnionSelectIds") String[] lineUnionSelectIds,
@Param("lineUnionSelects") TheRapyRecuperationLineUnionSelect[] lineUnionSelects) {
@@ -28,7 +28,7 @@ import java.util.List;
* 旅行社月度报名统计。
*/
@IocBean
@At("/platform/staffTherapyRecuperation/travelAgencyMonthlyStatistics")
@At("/platform/inclusiveTherapyV3/travelAgencyMonthlyStatistics")
@Ok("json:full")
public class TheRapyRecuperationTravelAgencyMonthlyStatisticsController {
@@ -37,7 +37,7 @@ public class TheRapyRecuperationTravelAgencyMonthlyStatisticsController {
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/statistics/travelAgencyMonthlyStatistics.html")
@SaCheckPermission("staffTherapyRecuperation.travelAgencyMonthlyStatistics")
@SaCheckPermission("inclusiveTherapyV3.travelAgencyMonthlyStatistics")
public void index() {
}
@@ -51,7 +51,7 @@ public class TheRapyRecuperationTravelAgencyMonthlyStatisticsController {
*/
@At("/getChartData")
@ViReturn
@SaCheckPermission("staffTherapyRecuperation.travelAgencyMonthlyStatistics")
@SaCheckPermission("inclusiveTherapyV3.travelAgencyMonthlyStatistics")
public Object getChartData(@Param(value = "year", required = false) Integer year) {
Integer queryYear = year == null ? DateUtil.thisYear() : year;
return enrollService.getTravelAgencyMonthlyEnrollStatistics(queryYear);
@@ -67,7 +67,7 @@ public class TheRapyRecuperationTravelAgencyMonthlyStatisticsController {
*/
@At("/getUnionChartData")
@ViReturn
@SaCheckPermission("staffTherapyRecuperation.travelAgencyMonthlyStatistics")
@SaCheckPermission("inclusiveTherapyV3.travelAgencyMonthlyStatistics")
public Object getUnionChartData(@Param(value = "year", required = false) Integer year) {
Integer queryYear = year == null ? DateUtil.thisYear() : year;
List<UnionEnrollStatisticsVo> list = enrollService.getUnionEnrollStatistics(queryYear);
@@ -84,7 +84,7 @@ public class TheRapyRecuperationTravelAgencyMonthlyStatisticsController {
*/
@At("/doExportExcel")
@Ok("void")
@SaCheckPermission("staffTherapyRecuperation.travelAgencyMonthlyStatistics")
@SaCheckPermission("inclusiveTherapyV3.travelAgencyMonthlyStatistics")
public void doExportExcel(@Param(value = "year", required = false) Integer year,
HttpServletResponse response) throws IOException {
Integer queryYear = year == null ? DateUtil.thisYear() : year;
@@ -112,7 +112,7 @@ public class TheRapyRecuperationTravelAgencyMonthlyStatisticsController {
*/
@At("/doExportUnionExcel")
@Ok("void")
@SaCheckPermission("staffTherapyRecuperation.travelAgencyMonthlyStatistics")
@SaCheckPermission("inclusiveTherapyV3.travelAgencyMonthlyStatistics")
public void doExportUnionExcel(@Param(value = "year", required = false) Integer year,
HttpServletResponse response) throws IOException {
Integer queryYear = year == null ? DateUtil.thisYear() : year;
@@ -35,7 +35,7 @@ import java.util.stream.Collectors;
* @date 2022/06/01
*/
@IocBean
@At("/platform/staffTherapyRecuperation/TheRapyConfig")
@At("/platform/inclusiveTherapyV3/TheRapyConfig")
@Ok("json:full")
public class TheRapyRecuperationConfigController {
@@ -46,7 +46,7 @@ public class TheRapyRecuperationConfigController {
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/theRapyConfig/TheRapyConfig.html")
@SaCheckPermission("staffTherapyRecuperation.TheRapyConfig")
@SaCheckPermission("inclusiveTherapyV3.TheRapyConfig")
public void index() {
}
@@ -67,16 +67,16 @@ public class SendTakePartInUserByLineJob implements Job {
ta.id as travelId,
ta.travelAgencyName,
concat(s.playStartTime, '至' , s.playEndTime) as playTime,
(select count(1) from staff_therapy_enroll_companion ec where ec.trreId = e.id and ec.age >= 18) as companionCount,
(select GROUP_CONCAT(ec.userName, '(', ec.idcard, '、', ec.mobile, ')') from staff_therapy_enroll_companion ec where ec.trreId = e.id) as companionInfo,
(select count(1) from inclusive_therapy_v3_enroll_companion ec where ec.trreId = e.id and ec.age >= 18) as companionCount,
(select GROUP_CONCAT(ec.userName, '(', ec.idcard, '、', ec.mobile, ')') from inclusive_therapy_v3_enroll_companion ec where ec.trreId = e.id) as companionInfo,
u.schoolTime
FROM
staff_therapy_enroll e
LEFT JOIN `staff_therapy_user` u on e.loginName = u.loginname
LEFT JOIN staff_therapy_line_union_select s ON e.takePartInLineId = s.id
left join staff_therapy_line l on l.id = s.lineId
left join staff_therapy_travel_agency ta on ta.id = s.travelAgencyId
left join staff_therapy_union su on su.id = s.unionId
inclusive_therapy_v3_enroll e
LEFT JOIN `inclusive_therapy_v3_user` u on e.loginName = u.loginname
LEFT JOIN inclusive_therapy_v3_line_union_select s ON e.takePartInLineId = s.id
left join inclusive_therapy_v3_line l on l.id = s.lineId
left join inclusive_therapy_v3_travel_agency ta on ta.id = s.travelAgencyId
left join inclusive_therapy_v3_union su on su.id = s.unionId
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -54,9 +54,9 @@ public class SendTakePartInUserByTravelJob implements Job {
travel.travelAgencyName,
u.schoolTime
FROM
`staff_therapy_enroll` te
LEFT JOIN `staff_therapy_user` u on te.loginName = u.loginname
LEFT JOIN `staff_therapy_travel_agency` travel ON travel.id = te.takePartInTravelAgencyId
`inclusive_therapy_v3_enroll` te
LEFT JOIN `inclusive_therapy_v3_user` u on te.loginName = u.loginname
LEFT JOIN `inclusive_therapy_v3_travel_agency` travel ON travel.id = te.takePartInTravelAgencyId
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -19,7 +19,7 @@ import java.util.List;
**/
@Data
@Table("staff_therapy_base_management")
@Table("inclusive_therapy_v3_base_management")
@Accessors(chain = true)
public class TheRapyRecuperationBaseManagement {
@@ -15,7 +15,7 @@ import java.util.List;
* @Version V1.0
**/
@Data
@Table("staff_therapy_cluster")
@Table("inclusive_therapy_v3_cluster")
@Accessors(chain = true)
public class TheRapyRecuperationCluster {
@@ -13,7 +13,7 @@ import org.nutz.dao.interceptor.annotation.PrevInsert;
* @Version V1.0
**/
@Data
@Table("staff_therapy_cluster_member")
@Table("inclusive_therapy_v3_cluster_member")
@Accessors(chain = true)
public class TheRapyRecuperationClusterMember {
@@ -10,7 +10,7 @@ import java.util.Date;
import java.util.List;
@Data
@Table("staff_therapy_config")
@Table("inclusive_therapy_v3_config")
@Accessors(chain = true)
public class TheRapyRecuperationConfig {
@@ -20,7 +20,7 @@ import java.util.List;
**/
@EqualsAndHashCode(callSuper = true)
@Data
@Table("staff_therapy_enroll")
@Table("inclusive_therapy_v3_enroll")
@Accessors(chain = true)
public class TheRapyRecuperationEnroll extends LegacyBaseModel {
@@ -16,7 +16,7 @@ import org.nutz.dao.interceptor.annotation.PrevInsert;
**/
@EqualsAndHashCode(callSuper = true)
@Data
@Table("staff_therapy_enroll_bed")
@Table("inclusive_therapy_v3_enroll_bed")
@Accessors(chain = true)
public class TheRapyRecuperationEnrollBed extends LegacyBaseModel {
@@ -15,7 +15,7 @@ import java.util.Date;
* @Version V1.0
**/
@Data
@Table("staff_therapy_enroll_change_record")
@Table("inclusive_therapy_v3_enroll_change_record")
@Accessors(chain = true)
public class TheRapyRecuperationEnrollChangeRecord {
@@ -16,7 +16,7 @@ import org.nutz.dao.interceptor.annotation.PrevInsert;
**/
@EqualsAndHashCode(callSuper = true)
@Data
@Table("staff_therapy_enroll_companion")
@Table("inclusive_therapy_v3_enroll_companion")
@Accessors(chain = true)
public class TheRapyRecuperationEnrollCompanion extends LegacyBaseModel {
@@ -20,7 +20,7 @@ import java.util.List;
**/
@EqualsAndHashCode(callSuper = true)
@Data
@Table("staff_therapy_line")
@Table("inclusive_therapy_v3_line")
@Accessors(chain = true)
public class TheRapyRecuperationLine extends LegacyBaseModel {
@@ -120,7 +120,7 @@ public class TheRapyRecuperationLine extends LegacyBaseModel {
private Integer estimatedFamilyNumbers;
@Column
@ColDefine(type = ColType.VARCHAR, width = 30)
@ColDefine(type = ColType.VARCHAR, width = 1000)
@Comment("缩略图")
private String files;
@@ -18,7 +18,7 @@ import java.util.Date;
*/
@EqualsAndHashCode(callSuper = true)
@Data
@Table("staff_therapy_line_union_select")
@Table("inclusive_therapy_v3_line_union_select")
@Accessors(chain = true)
public class TheRapyRecuperationLineUnionSelect extends LegacyBaseModel {
@@ -13,7 +13,7 @@ import org.nutz.dao.interceptor.annotation.PrevInsert;
* @Version V1.0
**/
@Table("staff_therapy_lot")
@Table("inclusive_therapy_v3_lot")
@Data
@Accessors(chain = true)
public class TheRapyRecuperationLot {
@@ -19,7 +19,7 @@ import java.util.List;
**/
@EqualsAndHashCode(callSuper = true)
@Data
@Table("staff_therapy_travel_agency")
@Table("inclusive_therapy_v3_travel_agency")
@Accessors(chain = true)
public class TheRapyRecuperationTravelAgency extends LegacyBaseModel {
@@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
public class LineSelectionOverviewVo {
/**
* 线路 ID,对应 staff_therapy_line.id。
* 线路 ID,对应 inclusive_therapy_v3_line.id。
*/
private String lineId;
@@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
public class TravelAgencyMonthlyEnrollStatisticsVo {
/**
* 旅行社 ID,对应 staff_therapy_travel_agency.id。
* 旅行社 ID,对应 inclusive_therapy_v3_travel_agency.id。
*/
private String travelAgencyId;
@@ -134,7 +134,7 @@ public interface TheRapyRecuperationEnrollService extends TherapyService<TheRapy
/**
* 手动发送所选线路的成团邮件给旅行社。
*
* @param lineUnionSelectIds 统计页勾选的线路选择记录 ID,对应 staff_therapy_line_union_select.id
* @param lineUnionSelectIds 统计页勾选的线路选择记录 ID,对应 inclusive_therapy_v3_line_union_select.id
* @return 实际发送邮件的旅行社数量
*/
int sendTakePartInUserByLineMail(List<String> lineUnionSelectIds);
@@ -44,10 +44,10 @@ public class TheRapyRecuperationAuditServiceImpl extends TherapyServiceImpl<Ther
un.unionname,
DATE_FORMAT(lineu.playStartTime,'%Y-%m-%d') as playStartTime1
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id = enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_union un ON un.id = enroll.takePartInUnionId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id = enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_union un ON un.id = enroll.takePartInUnionId
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -106,13 +106,13 @@ public class TheRapyRecuperationAuditServiceImpl extends TherapyServiceImpl<Ther
enroll.*,
line.lineName,
if(enroll.takePartInUnionId!=enroll.selfUnionId,true,false) isTransferIn,
(SELECT COUNT(1) FROM staff_therapy_enroll_companion WHERE trreId=enroll.id and relation='亲属') isFamily
(SELECT COUNT(1) FROM inclusive_therapy_v3_enroll_companion WHERE trreId=enroll.id and relation='亲属') isFamily
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id = enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_travel_agency lxs ON lxs.id = lineu.travelAgencyId
LEFT JOIN staff_therapy_travel_agency ta ON ta.id = enroll.takePartInTravelAgencyId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id = enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_travel_agency lxs ON lxs.id = lineu.travelAgencyId
LEFT JOIN inclusive_therapy_v3_travel_agency ta ON ta.id = enroll.takePartInTravelAgencyId
where enroll.id=@id
""").setParam("id", id);
@@ -33,14 +33,14 @@ public class TheRapyRecuperationEnrollJoinUserImportServiceImpl extends TherapyS
lineName AS label,
'线路' AS `type`
FROM
staff_therapy_line
inclusive_therapy_v3_line
UNION ALL
SELECT
id,
travelAgencyName AS label,
'旅行社' AS `type`
FROM
staff_therapy_travel_agency
inclusive_therapy_v3_travel_agency
""");
return listMap(sql);
}
@@ -53,7 +53,7 @@ public class TheRapyRecuperationEnrollJoinUserImportServiceImpl extends TherapyS
id,
lineName AS label
FROM
staff_therapy_line
inclusive_therapy_v3_line
WHERE
`year` = @year
AND createUnionId = @unionId
@@ -62,8 +62,8 @@ public class TheRapyRecuperationEnrollJoinUserImportServiceImpl extends TherapyS
line.id,
line.lineName AS label
FROM
staff_therapy_line_union_select lus
LEFT JOIN staff_therapy_line line ON line.id = lus.lineId\s
inclusive_therapy_v3_line_union_select lus
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lus.lineId\s
WHERE
line.`year` = @year
AND lus.unionId = @unionId
@@ -71,7 +71,7 @@ public class TheRapyRecuperationEnrollJoinUserImportServiceImpl extends TherapyS
lineSql.setParam("year", year);
lineSql.setParam("unionId", TherapyContext.getUnionId());
Sql travelSql = Sqls.create("SELECT id,travelAgencyName AS label FROM staff_therapy_travel_agency where year = @year");
Sql travelSql = Sqls.create("SELECT id,travelAgencyName AS label FROM inclusive_therapy_v3_travel_agency where year = @year");
travelSql.setParam("year", year);
return Map.of("lines", listMap(lineSql), "travels", listMap(travelSql));
@@ -132,17 +132,17 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
lot.lotName,
lot.lotValue,
lot.activityCost as lotActivityCost,
(select count(1) from staff_therapy_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as signUpUserNum,
(select count(1) from staff_therapy_enroll_companion where trreId in (select id from staff_therapy_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year)) as signUpUserFamilyNum,
(select count(1) from staff_therapy_enroll_companion where age >= 18 and trreId in (select id from staff_therapy_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year)) as adultFamilyNum,
(select ifnull(sum(familyNumber),0) from staff_therapy_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as familyNumber
(select count(1) from inclusive_therapy_v3_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as signUpUserNum,
(select count(1) from inclusive_therapy_v3_enroll_companion where trreId in (select id from inclusive_therapy_v3_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year)) as signUpUserFamilyNum,
(select count(1) from inclusive_therapy_v3_enroll_companion where age >= 18 and trreId in (select id from inclusive_therapy_v3_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year)) as adultFamilyNum,
(select ifnull(sum(familyNumber),0) from inclusive_therapy_v3_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as familyNumber
FROM
`staff_therapy_line_union_select` us
LEFT JOIN staff_therapy_line line ON line.id = us.lineId
LEFT JOIN staff_therapy_lot lot on lot.id = line.lotId
LEFT JOIN staff_therapy_union usgh ON usgh.id = us.unionId
LEFT JOIN staff_therapy_user u ON u.id = line.opBy
LEFT JOIN staff_therapy_travel_agency ta ON ta.id = us.travelAgencyId
`inclusive_therapy_v3_line_union_select` us
LEFT JOIN inclusive_therapy_v3_line line ON line.id = us.lineId
LEFT JOIN inclusive_therapy_v3_lot lot on lot.id = line.lotId
LEFT JOIN inclusive_therapy_v3_union usgh ON usgh.id = us.unionId
LEFT JOIN inclusive_therapy_v3_user u ON u.id = line.opBy
LEFT JOIN inclusive_therapy_v3_travel_agency ta ON ta.id = us.travelAgencyId
$lineCnd
ORDER BY serialNumber ASC, us.playStartTime ASC
""").setParam("year", DateUtil.thisYear());
@@ -185,11 +185,11 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
select
*,
files as fileId,
(select count(1) from staff_therapy_enroll where takePartInTravelAgencyId=ta.id and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as signUpUserNum,
(select count(1) from staff_therapy_enroll_companion where trreId in (select id from staff_therapy_enroll where takePartInTravelAgencyId = ta.id and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year)) as signUpUserFamilyNum,
(select ifnull(sum(familyNumber),0) from staff_therapy_enroll where takePartInTravelAgencyId=ta.id and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as familyNumber
(select count(1) from inclusive_therapy_v3_enroll where takePartInTravelAgencyId=ta.id and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as signUpUserNum,
(select count(1) from inclusive_therapy_v3_enroll_companion where trreId in (select id from inclusive_therapy_v3_enroll where takePartInTravelAgencyId = ta.id and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year)) as signUpUserFamilyNum,
(select ifnull(sum(familyNumber),0) from inclusive_therapy_v3_enroll where takePartInTravelAgencyId=ta.id and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as familyNumber
from
staff_therapy_travel_agency ta $condition
inclusive_therapy_v3_travel_agency ta $condition
""").setParam("year", DateUtil.thisYear());
taSql.setCondition(cnd);
return listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), taSql);
@@ -203,9 +203,9 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
l.lotName,
t.travelAgencyName
from
staff_therapy_base_management b
left join staff_therapy_lot l on l.id = b.lotId
left join staff_therapy_travel_agency t on t.id = b.travelAgencyId
inclusive_therapy_v3_base_management b
left join inclusive_therapy_v3_lot l on l.id = b.lotId
left join inclusive_therapy_v3_travel_agency t on t.id = b.travelAgencyId
$condition
""");
cnd.asc("sortNumber");
@@ -245,17 +245,17 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
lot.lotName,
lot.lotValue,
lot.activityCost as lotActivityCost,
(select count(1) from staff_therapy_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as signUpUserNum,
(select count(1) from staff_therapy_enroll_companion where trreId in (select id from staff_therapy_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year)) as signUpUserFamilyNum,
(select count(1) from staff_therapy_enroll_companion where age >= 18 and trreId in (select id from staff_therapy_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year)) as adultFamilyNum,
(select ifnull(sum(familyNumber),0) from staff_therapy_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as familyNumber
(select count(1) from inclusive_therapy_v3_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as signUpUserNum,
(select count(1) from inclusive_therapy_v3_enroll_companion where trreId in (select id from inclusive_therapy_v3_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year)) as signUpUserFamilyNum,
(select count(1) from inclusive_therapy_v3_enroll_companion where age >= 18 and trreId in (select id from inclusive_therapy_v3_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year)) as adultFamilyNum,
(select ifnull(sum(familyNumber),0) from inclusive_therapy_v3_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as familyNumber
FROM
`staff_therapy_line_union_select` us
LEFT JOIN staff_therapy_line line ON line.id = us.lineId
LEFT JOIN staff_therapy_lot lot on lot.id = line.lotId
LEFT JOIN staff_therapy_union usgh ON usgh.id = us.unionId
LEFT JOIN staff_therapy_user u ON u.id = line.opBy
LEFT JOIN staff_therapy_travel_agency ta ON ta.id = line.travelAgencyId
`inclusive_therapy_v3_line_union_select` us
LEFT JOIN inclusive_therapy_v3_line line ON line.id = us.lineId
LEFT JOIN inclusive_therapy_v3_lot lot on lot.id = line.lotId
LEFT JOIN inclusive_therapy_v3_union usgh ON usgh.id = us.unionId
LEFT JOIN inclusive_therapy_v3_user u ON u.id = line.opBy
LEFT JOIN inclusive_therapy_v3_travel_agency ta ON ta.id = line.travelAgencyId
$lineCnd
ORDER BY us.lineId, playStartTime ASC
""").setParam("year", DateUtil.thisYear());
@@ -375,9 +375,9 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
un.unionname AS unionName,
CONCAT(u.username, '(', u.loginname, ')-', unit.name) AS label
FROM
staff_therapy_user u
LEFT JOIN staff_therapy_unit unit ON unit.id = u.unitid
LEFT JOIN staff_therapy_union un ON un.id = IFNULL(u.unionid, unit.unionid)
inclusive_therapy_v3_user u
LEFT JOIN inclusive_therapy_v3_unit unit ON unit.id = u.unitid
LEFT JOIN inclusive_therapy_v3_union un ON un.id = IFNULL(u.unionid, unit.unionid)
$condition
LIMIT 20
""");
@@ -412,11 +412,11 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
un.unionname,
ta.travelAgencyName
FROM
staff_therapy_line_union_select rlus
LEFT JOIN staff_therapy_line rl ON rlus.lineId = rl.id
LEFT JOIN staff_therapy_lot lot ON rl.lotId = lot.id
LEFT JOIN staff_therapy_union un ON un.id = rlus.unionId
LEFT JOIN staff_therapy_travel_agency ta ON ta.id = IFNULL(rlus.travelAgencyId, rl.travelAgencyId)
inclusive_therapy_v3_line_union_select rlus
LEFT JOIN inclusive_therapy_v3_line rl ON rlus.lineId = rl.id
LEFT JOIN inclusive_therapy_v3_lot lot ON rl.lotId = lot.id
LEFT JOIN inclusive_therapy_v3_union un ON un.id = rlus.unionId
LEFT JOIN inclusive_therapy_v3_travel_agency ta ON ta.id = IFNULL(rlus.travelAgencyId, rl.travelAgencyId)
$condition
""");
// 代选线路由校工会人工处理,不再要求线路选择记录配置报名开始和结束时间。
@@ -489,16 +489,16 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
ta.id as travelId,
ta.travelAgencyName,
concat(s.playStartTime, '至' , s.playEndTime) as playTime,
(select count(1) from staff_therapy_enroll_companion ec where ec.trreId = e.id and ec.age >= 18) as companionCount,
(select GROUP_CONCAT(ec.userName, '(', ec.idcard, '、', ec.mobile, ')') from staff_therapy_enroll_companion ec where ec.trreId = e.id) as companionInfo,
(select count(1) from inclusive_therapy_v3_enroll_companion ec where ec.trreId = e.id and ec.age >= 18) as companionCount,
(select GROUP_CONCAT(ec.userName, '(', ec.idcard, '、', ec.mobile, ')') from inclusive_therapy_v3_enroll_companion ec where ec.trreId = e.id) as companionInfo,
u.schoolTime
FROM
staff_therapy_enroll e
LEFT JOIN `staff_therapy_user` u on e.loginName = u.loginname
LEFT JOIN staff_therapy_line_union_select s ON e.takePartInLineId = s.id
left join staff_therapy_line l on l.id = s.lineId
left join staff_therapy_travel_agency ta on ta.id = s.travelAgencyId
left join staff_therapy_union su on su.id = s.unionId
inclusive_therapy_v3_enroll e
LEFT JOIN `inclusive_therapy_v3_user` u on e.loginName = u.loginname
LEFT JOIN inclusive_therapy_v3_line_union_select s ON e.takePartInLineId = s.id
left join inclusive_therapy_v3_line l on l.id = s.lineId
left join inclusive_therapy_v3_travel_agency ta on ta.id = s.travelAgencyId
left join inclusive_therapy_v3_union su on su.id = s.unionId
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -961,7 +961,7 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
}
//是否入职满一年
Sql schoolTimeSql = Sqls.create("select date_format(schoolTime,'%Y-%m-%d') schoolTime from staff_therapy_user where loginName = @loginName").setParam("loginName", loginName);
Sql schoolTimeSql = Sqls.create("select date_format(schoolTime,'%Y-%m-%d') schoolTime from inclusive_therapy_v3_user where loginName = @loginName").setParam("loginName", loginName);
String schoolTime = (String) Daos.query(dao(), schoolTimeSql.toString(), Sqls.callback.str());
if (StrUtil.isBlank(schoolTime)) {
return Map.of(false, "请先联系校工会完善您的入校时间后再报名!");
@@ -1136,11 +1136,11 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
SELECT
r.*,
l.regionalNature,
(select activityCost from staff_therapy_lot where id = l.lotId) as activityCost
(select activityCost from inclusive_therapy_v3_lot where id = l.lotId) as activityCost
FROM
staff_therapy_enroll r
LEFT JOIN staff_therapy_line_union_select us on us.id = r.takePartInLineId
LEFT JOIN staff_therapy_line l ON l.id = us.lineId
inclusive_therapy_v3_enroll r
LEFT JOIN inclusive_therapy_v3_line_union_select us on us.id = r.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line l ON l.id = us.lineId
$condition
""");
Sql twoYearInSql = sql;
@@ -1395,11 +1395,11 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
SELECT
r.*,
l.regionalNature,
(select activityCost from staff_therapy_lot where id = l.lotId) as activityCost
(select activityCost from inclusive_therapy_v3_lot where id = l.lotId) as activityCost
FROM
staff_therapy_enroll r
LEFT JOIN staff_therapy_line_union_select us on us.id = r.takePartInLineId
LEFT JOIN staff_therapy_line l ON l.id = us.lineId
inclusive_therapy_v3_enroll r
LEFT JOIN inclusive_therapy_v3_line_union_select us on us.id = r.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line l ON l.id = us.lineId
$condition
""");
Sql threeYearOutSql = sql;
@@ -1688,8 +1688,8 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
select
us.id
from
staff_therapy_line_union_select us
left join staff_therapy_line line on line.id = us.lineId
inclusive_therapy_v3_line_union_select us
left join inclusive_therapy_v3_line line on line.id = us.lineId
where
ifnull(us.travelAgencyId, line.travelAgencyId) = @travelAgencyId
and year(us.selectTime) = @year
@@ -1799,26 +1799,26 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
List<TheRapyRecuperationLine> outList = dao().query(TheRapyRecuperationLine.class, Cnd.where("regionalNature", "=", "省外"));
List<TheRapyRecuperationLineUnionSelect> unionOutSelects = dao().query(TheRapyRecuperationLineUnionSelect.class, Cnd.where("lineId", "in", outList.stream().map(TheRapyRecuperationLine::getId).collect(Collectors.toList())));
//是否选择省外
int inCount = dao().count("staff_therapy_enroll", Cnd.where("loginName", "=", loginName)
int inCount = dao().count("inclusive_therapy_v3_enroll", Cnd.where("loginName", "=", loginName)
.and("takePartInLineId", "in", unionInSelects.stream().map(TheRapyRecuperationLineUnionSelect::getId).collect(Collectors.toList()))
.and("isNormal", "=", true)
.and("stateId", "not in", Lang.array(TheRapyRecuperationState.UNITFAIL, TheRapyRecuperationState.LINEUNITFAIL, TheRapyRecuperationState.SCHOOLFAIL))
.and("YEAR(signingUptime)", "=", com.budwk.app.base.utils.DateUtil.thisYear()));
//是否报省外
int outCount = dao().count("staff_therapy_enroll", Cnd.where("loginName", "=", loginName)
int outCount = dao().count("inclusive_therapy_v3_enroll", Cnd.where("loginName", "=", loginName)
.and("takePartInLineId", "in", unionOutSelects.stream().map(TheRapyRecuperationLineUnionSelect::getId).collect(Collectors.toList()))
.and("isNormal", "=", true)
.and("stateId", "not in", Lang.array(TheRapyRecuperationState.UNITFAIL, TheRapyRecuperationState.LINEUNITFAIL, TheRapyRecuperationState.SCHOOLFAIL))
.and("YEAR(signingUptime)", "=", com.budwk.app.base.utils.DateUtil.thisYear()));
//是否报旅行社
int travelCount = dao().count("staff_therapy_enroll", Cnd.where("loginName", "=", loginName)
int travelCount = dao().count("inclusive_therapy_v3_enroll", Cnd.where("loginName", "=", loginName)
.and(Cnd.exps("takePartInLineId", "is", null).or("takePartInLineId", "=", ""))
.and("isNormal", "=", true)
.and("stateId", "not in", Lang.array(TheRapyRecuperationState.UNITFAIL, TheRapyRecuperationState.LINEUNITFAIL, TheRapyRecuperationState.SCHOOLFAIL))
.and("takePartInTravelAgencyId", "is not", null)
.and("YEAR(signingUptime)", "=", com.budwk.app.base.utils.DateUtil.thisYear()));
//是否报酒店
int hotelCount = dao().count("staff_therapy_enroll", Cnd.where("loginName", "=", loginName)
int hotelCount = dao().count("inclusive_therapy_v3_enroll", Cnd.where("loginName", "=", loginName)
.and("takePartInLineId", "is", null)
.and("isNormal", "=", true)
.and("stateId", "not in", Lang.array(TheRapyRecuperationState.UNITFAIL, TheRapyRecuperationState.LINEUNITFAIL, TheRapyRecuperationState.SCHOOLFAIL))
@@ -1846,8 +1846,8 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
SELECT
count(*)
FROM
staff_therapy_enroll ren
LEFT JOIN staff_therapy_line rl on ren.takePartInLineId = rl.id
inclusive_therapy_v3_enroll ren
LEFT JOIN inclusive_therapy_v3_line rl on ren.takePartInLineId = rl.id
$condition
""");
@@ -1910,20 +1910,20 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
ta.contact,
ta.contactMobileNumber,
ta.officialWebsite,
(select count(1) from staff_therapy_enroll dismissed where dismissed.loginName = e.loginName and dismissed.isNormal = false and dismissed.delFlag = false and YEAR(dismissed.signingUptime) = YEAR(e.signingUptime)) > 0 as isDismissed,
(select count(1) from inclusive_therapy_v3_enroll dismissed where dismissed.loginName = e.loginName and dismissed.isNormal = false and dismissed.delFlag = false and YEAR(dismissed.signingUptime) = YEAR(e.signingUptime)) > 0 as isDismissed,
GROUP_CONCAT(ec.userName) as companionUserNames,
l.lotName,
au.stateName,
au.stateColor
FROM
staff_therapy_enroll e
LEFT JOIN staff_therapy_union gh ON gh.id = e.takePartInUnionId
LEFT JOIN staff_therapy_line_union_select us on us.id = e.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = us.lineId
LEFT JOIN staff_therapy_travel_agency ta ON ta.id = line.travelAgencyId
left join staff_therapy_enroll_companion ec on ec.trreId = e.id
left join staff_therapy_lot l on l.id = line.lotId
left join staff_therapy_audit_state au on e.stateId = au.stateId
inclusive_therapy_v3_enroll e
LEFT JOIN inclusive_therapy_v3_union gh ON gh.id = e.takePartInUnionId
LEFT JOIN inclusive_therapy_v3_line_union_select us on us.id = e.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = us.lineId
LEFT JOIN inclusive_therapy_v3_travel_agency ta ON ta.id = line.travelAgencyId
left join inclusive_therapy_v3_enroll_companion ec on ec.trreId = e.id
left join inclusive_therapy_v3_lot l on l.id = line.lotId
left join inclusive_therapy_v3_audit_state au on e.stateId = au.stateId
$condition
GROUP BY e.id
""");
@@ -1944,12 +1944,12 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
ta.contactMobileNumber,
ta.officialWebsite,
ta.files AS fileId,
(select count(1) from staff_therapy_enroll where takePartInTravelAgencyId=ta.id and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as signUpUserNum,
(select count(1) from staff_therapy_enroll_companion where trreId in (select id from staff_therapy_enroll where takePartInTravelAgencyId = ta.id and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year)) as signUpUserFamilyNum,
(select ifnull(sum(familyNumber),0) from staff_therapy_enroll where takePartInTravelAgencyId=ta.id and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as totalFamilyNumber
(select count(1) from inclusive_therapy_v3_enroll where takePartInTravelAgencyId=ta.id and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as signUpUserNum,
(select count(1) from inclusive_therapy_v3_enroll_companion where trreId in (select id from inclusive_therapy_v3_enroll where takePartInTravelAgencyId = ta.id and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year)) as signUpUserFamilyNum,
(select ifnull(sum(familyNumber),0) from inclusive_therapy_v3_enroll where takePartInTravelAgencyId=ta.id and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as totalFamilyNumber
FROM
staff_therapy_enroll e
LEFT JOIN staff_therapy_travel_agency ta ON ta.id = e.takePartInTravelAgencyId
inclusive_therapy_v3_enroll e
LEFT JOIN inclusive_therapy_v3_travel_agency ta ON ta.id = e.takePartInTravelAgencyId
$condition
""").setParam("year", year == null ? DateUtil.thisYear() : year);
cnd.and("e.takePartInTravelAgencyId", "is not", null);
@@ -1972,10 +1972,10 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
t.travelAgencyName,
ta.changeEndTime
FROM
staff_therapy_enroll e
LEFT JOIN staff_therapy_base_management ta ON ta.id = e.takePartInBaseManagementId
LEFT JOIN staff_therapy_lot l on l.id = ta.lotId
LEFT JOIN staff_therapy_travel_agency t on t.id = ta.travelAgencyId
inclusive_therapy_v3_enroll e
LEFT JOIN inclusive_therapy_v3_base_management ta ON ta.id = e.takePartInBaseManagementId
LEFT JOIN inclusive_therapy_v3_lot l on l.id = ta.lotId
LEFT JOIN inclusive_therapy_v3_travel_agency t on t.id = ta.travelAgencyId
$condition
""");
cnd.and("e.takePartInBaseManagementId", "is not", null);
@@ -2099,21 +2099,21 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
us.estimatedCost,
line.content,
l.lotName,
(select COUNT(1) FROM staff_therapy_enroll en WHERE isNormal=true AND en.loginName=@loginname and YEAR(en.signingUptime)=@year) isNormal,
(select COUNT(1) FROM staff_therapy_enroll en WHERE isNormal=false AND en.loginName=@loginname and YEAR(en.signingUptime)=@year) isNormalFalse,
(select count(1) from staff_therapy_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and YEAR(signingUptime)=@year) as signUpUserNum,
(select count(1) from staff_therapy_enroll_companion where age >= 18 and trreId in (select id from staff_therapy_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and YEAR(signingUptime)=@year)) as signUpUserFamilyNum,
(select ifnull(sum(familyNumber),0) from staff_therapy_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as familyNumber,
(select COUNT(1) FROM inclusive_therapy_v3_enroll en WHERE isNormal=true AND en.loginName=@loginname and YEAR(en.signingUptime)=@year) isNormal,
(select COUNT(1) FROM inclusive_therapy_v3_enroll en WHERE isNormal=false AND en.loginName=@loginname and YEAR(en.signingUptime)=@year) isNormalFalse,
(select count(1) from inclusive_therapy_v3_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and YEAR(signingUptime)=@year) as signUpUserNum,
(select count(1) from inclusive_therapy_v3_enroll_companion where age >= 18 and trreId in (select id from inclusive_therapy_v3_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and YEAR(signingUptime)=@year)) as signUpUserFamilyNum,
(select ifnull(sum(familyNumber),0) from inclusive_therapy_v3_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as familyNumber,
ta.travelAgencyName,
us.contactPhone as contactMobileNumber,
us.principal,
us.principalContact,
line.isFamilySignUp
FROM
`staff_therapy_line_union_select` us
LEFT JOIN staff_therapy_line line ON line.id = us.lineId
LEFT JOIN staff_therapy_travel_agency ta on ta.id = us.travelAgencyId
LEFT JOIN staff_therapy_lot l on l.id = line.lotId
`inclusive_therapy_v3_line_union_select` us
LEFT JOIN inclusive_therapy_v3_line line ON line.id = us.lineId
LEFT JOIN inclusive_therapy_v3_travel_agency ta on ta.id = us.travelAgencyId
LEFT JOIN inclusive_therapy_v3_lot l on l.id = line.lotId
WHERE if(us.signUpMode = 1, us.unionId = @usUnionId, 1=1) AND us.id = @id
""");
usLineSql.setParam("loginname", TherapyContext.getPrincipalProperty("loginname"));
@@ -2162,7 +2162,7 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
SELECT
rr.unionId
FROM
staff_therapy_line_union_select rr left join staff_therapy_line l on rr.lineId = l.id
inclusive_therapy_v3_line_union_select rr left join inclusive_therapy_v3_line l on rr.lineId = l.id
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -2204,10 +2204,10 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
MONTH(lineu.playStartTime) AS month,
COUNT(DISTINCT enroll.id) AS enrollNumber
FROM
staff_therapy_enroll enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id = enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
LEFT JOIN staff_therapy_travel_agency agency
inclusive_therapy_v3_enroll enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id = enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
LEFT JOIN inclusive_therapy_v3_travel_agency agency
ON agency.id = IFNULL(enroll.takePartInTravelAgencyId, IFNULL(lineu.travelAgencyId, line.travelAgencyId))
WHERE
enroll.isNormal = TRUE
@@ -2280,8 +2280,8 @@ public class TheRapyRecuperationEnrollServiceImpl extends TherapyServiceImpl<The
MONTH(lineu.playStartTime) AS month,
COUNT(DISTINCT enroll.id) AS enrollNumber
FROM
staff_therapy_enroll enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id = enroll.takePartInLineId
inclusive_therapy_v3_enroll enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id = enroll.takePartInLineId
WHERE
enroll.isNormal = TRUE
AND enroll.stateId NOT IN (2715, 2725, 2735)
@@ -58,15 +58,15 @@ public class TheRapyRecuperationLineAdjustmentServiceImpl extends TherapyService
ta.travelAgencyName,
us.unionId,
select_gh.unionname AS selectUnionName,
(select count(1) from staff_therapy_enroll where if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) AND takePartInLineId = us.id and isNormal=true) as signUpUserNum,
(select count(1) from staff_therapy_enroll_companion where trreId in (select id from staff_therapy_enroll where if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) AND takePartInLineId = us.id and isNormal=true)) as signUpUserFamilyNum,
(select ifnull(sum(familyNumber),0) from staff_therapy_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as familyNumber
(select count(1) from inclusive_therapy_v3_enroll where if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) AND takePartInLineId = us.id and isNormal=true) as signUpUserNum,
(select count(1) from inclusive_therapy_v3_enroll_companion where trreId in (select id from inclusive_therapy_v3_enroll where if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) AND takePartInLineId = us.id and isNormal=true)) as signUpUserFamilyNum,
(select ifnull(sum(familyNumber),0) from inclusive_therapy_v3_enroll where takePartInLineId = us.id and if(us.signUpMode = 1, takePartInUnionId = us.unionId, 1=1) and isNormal = true and stateId not in (2715,2725,2735) and YEAR(signingUptime)=@year) as familyNumber
FROM
staff_therapy_line_union_select us
LEFT JOIN staff_therapy_line line ON line.id = us.lineId
LEFT JOIN staff_therapy_travel_agency ta ON ta.id = line.travelAgencyId
LEFT JOIN staff_therapy_union create_gh ON create_gh.id = line.createUnionid
LEFT JOIN staff_therapy_union select_gh ON select_gh.id = us.unionId
inclusive_therapy_v3_line_union_select us
LEFT JOIN inclusive_therapy_v3_line line ON line.id = us.lineId
LEFT JOIN inclusive_therapy_v3_travel_agency ta ON ta.id = line.travelAgencyId
LEFT JOIN inclusive_therapy_v3_union create_gh ON create_gh.id = line.createUnionid
LEFT JOIN inclusive_therapy_v3_union select_gh ON select_gh.id = us.unionId
$condition
""");
sql.setParam("signUpSuccessCode", TheRapyRecuperationState.PASS);
@@ -115,9 +115,9 @@ public class TheRapyRecuperationLineAdjustmentServiceImpl extends TherapyService
count(c.id) as companionCount,
e.familyNumber
FROM
staff_therapy_enroll e
LEFT JOIN staff_therapy_enroll_companion c ON c.trreId = e.id
left join staff_therapy_line_union_select us on e.takePartInLineId = us.id
inclusive_therapy_v3_enroll e
LEFT JOIN inclusive_therapy_v3_enroll_companion c ON c.trreId = e.id
left join inclusive_therapy_v3_line_union_select us on e.takePartInLineId = us.id
WHERE
e.takePartInLineId = @lineId
and if(us.signUpMode = 1, e.takePartInUnionId = @unionId, 1=1)
@@ -130,7 +130,7 @@ public class TheRapyRecuperationLineAdjustmentServiceImpl extends TherapyService
sql.setParam("passStateCode", TheRapyRecuperationState.PASS);
List<NutMap> list = listMap(sql);
for (NutMap rowMap : list) {
Sql companionSql = Sqls.create("select loginName,userName,sex,relation,idCard from staff_therapy_enroll_companion where trreId=@trreId");
Sql companionSql = Sqls.create("select loginName,userName,sex,relation,idCard from inclusive_therapy_v3_enroll_companion where trreId=@trreId");
companionSql.setParam("trreId", rowMap.getString("id"));
List companionList = listMap(companionSql);
rowMap.setv("companionList", companionList);
@@ -67,20 +67,20 @@ public class TheRapyRecuperationLineClusterServiceImpl extends TherapyServiceImp
// gh.id AS ascriptionUnionId,
// u.username AS createUserName,
// ta.travelAgencyName,
// ( SELECT count( 1 ) FROM staff_therapy_enroll WHERE takePartInUnionId = us.unionId AND takePartInLineId = line.id AND stateId = 2750 ) AS signUpUserNum,
// ( SELECT count( 1 ) FROM inclusive_therapy_v3_enroll WHERE takePartInUnionId = us.unionId AND takePartInLineId = line.id AND stateId = 2750 ) AS signUpUserNum,
// (
// SELECT
// count( 1 )\s
// FROM
// staff_therapy_enroll_companion\s
// inclusive_therapy_v3_enroll_companion\s
// WHERE
// trreId IN ( SELECT id FROM staff_therapy_enroll WHERE takePartInUnionId = us.unionId AND takePartInLineId = line.id AND stateId = 2750 )) AS signUpUserFamilyNum\s
// trreId IN ( SELECT id FROM inclusive_therapy_v3_enroll WHERE takePartInUnionId = us.unionId AND takePartInLineId = line.id AND stateId = 2750 )) AS signUpUserFamilyNum\s
// FROM
// staff_therapy_line_union_select us
// LEFT JOIN staff_therapy_line line ON line.id = us.lineId
// LEFT JOIN staff_therapy_travel_agency ta ON ta.id = line.travelAgencyId
// LEFT JOIN staff_therapy_union gh ON gh.id = us.unionId
// LEFT JOIN staff_therapy_user u ON u.id = line.opBy
// inclusive_therapy_v3_line_union_select us
// LEFT JOIN inclusive_therapy_v3_line line ON line.id = us.lineId
// LEFT JOIN inclusive_therapy_v3_travel_agency ta ON ta.id = line.travelAgencyId
// LEFT JOIN inclusive_therapy_v3_union gh ON gh.id = us.unionId
// LEFT JOIN inclusive_therapy_v3_user u ON u.id = line.opBy
// $usCnd
// UNION ALL
// (SELECT
@@ -102,19 +102,19 @@ public class TheRapyRecuperationLineClusterServiceImpl extends TherapyServiceImp
// gh.id AS ascriptionUnionId,
// u.username AS createUserName,
// ta.travelAgencyName,
// ( SELECT count( 1 ) FROM staff_therapy_enroll WHERE takePartInUnionId = line.createUnionId AND takePartInLineId = line.id AND stateId = 2750 ) AS signUpUserNum,
// ( SELECT count( 1 ) FROM inclusive_therapy_v3_enroll WHERE takePartInUnionId = line.createUnionId AND takePartInLineId = line.id AND stateId = 2750 ) AS signUpUserNum,
// (
// SELECT
// count( 1 )
// FROM
// staff_therapy_enroll_companion
// inclusive_therapy_v3_enroll_companion
// WHERE
// trreId IN ( SELECT id FROM staff_therapy_enroll WHERE takePartInUnionId = line.createUnionId AND takePartInLineId = line.id AND stateId = 2750 )) AS signUpUserFamilyNum
// trreId IN ( SELECT id FROM inclusive_therapy_v3_enroll WHERE takePartInUnionId = line.createUnionId AND takePartInLineId = line.id AND stateId = 2750 )) AS signUpUserFamilyNum
// FROM
// staff_therapy_line line
// LEFT JOIN staff_therapy_travel_agency ta ON ta.id = line.travelAgencyId
// LEFT JOIN staff_therapy_union gh ON gh.id = line.createUnionid
// LEFT JOIN staff_therapy_user u ON u.id = line.opBy
// inclusive_therapy_v3_line line
// LEFT JOIN inclusive_therapy_v3_travel_agency ta ON ta.id = line.travelAgencyId
// LEFT JOIN inclusive_therapy_v3_union gh ON gh.id = line.createUnionid
// LEFT JOIN inclusive_therapy_v3_user u ON u.id = line.opBy
// $lineCnd)
// """);
// Cnd lineCnd = Cnd.NEW();
@@ -167,14 +167,14 @@ public class TheRapyRecuperationLineClusterServiceImpl extends TherapyServiceImp
gh.id AS ascriptionUnionId,
u.username AS createUserName,
ta.travelAgencyName,
( SELECT count( 1 ) FROM staff_therapy_enroll $summaryCnd ) AS signUpUserNum,
( SELECT count( 1 ) FROM staff_therapy_enroll_companion WHERE trreId IN ( SELECT id FROM staff_therapy_enroll $summaryCnd )) AS signUpUserFamilyNum
( SELECT count( 1 ) FROM inclusive_therapy_v3_enroll $summaryCnd ) AS signUpUserNum,
( SELECT count( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId IN ( SELECT id FROM inclusive_therapy_v3_enroll $summaryCnd )) AS signUpUserFamilyNum
FROM
staff_therapy_line_union_select us
LEFT JOIN staff_therapy_line line ON line.id = us.lineId
LEFT JOIN staff_therapy_travel_agency ta ON ta.id = line.travelAgencyId
LEFT JOIN staff_therapy_union gh ON gh.id = us.unionId
LEFT JOIN staff_therapy_user u ON u.id = line.opBy
inclusive_therapy_v3_line_union_select us
LEFT JOIN inclusive_therapy_v3_line line ON line.id = us.lineId
LEFT JOIN inclusive_therapy_v3_travel_agency ta ON ta.id = line.travelAgencyId
LEFT JOIN inclusive_therapy_v3_union gh ON gh.id = us.unionId
LEFT JOIN inclusive_therapy_v3_user u ON u.id = line.opBy
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -216,9 +216,9 @@ public class TheRapyRecuperationLineClusterServiceImpl extends TherapyServiceImp
userName,
sex,
unionName,
(select count(*) from staff_therapy_enroll_companion c where c.trreId = e.id) as companionCount
(select count(*) from inclusive_therapy_v3_enroll_companion c where c.trreId = e.id) as companionCount
from
staff_therapy_enroll e
inclusive_therapy_v3_enroll e
$condition
""");
Cnd cnd = Cnd.NEW();
@@ -226,7 +226,7 @@ public class TheRapyRecuperationLineClusterServiceImpl extends TherapyServiceImp
cnd.and("takePartInUnionId", "=", usUnionId);
cnd.and("isNormal", "=", 1);
cnd.and(Cnd.exps("stateId", "is", null).or("stateId", "=", TheRapyRecuperationState.PASS));
cnd.and("loginName", "not in", Sqls.create("select loginName from staff_therapy_cluster_member where lineId = @lineId AND loginName is not null").setParam("lineId", lineId));
cnd.and("loginName", "not in", Sqls.create("select loginName from inclusive_therapy_v3_cluster_member where lineId = @lineId AND loginName is not null").setParam("lineId", lineId));
sql.setCondition(cnd);
List<NutMap> unSelectedUsers = listMap(sql);
@@ -541,11 +541,11 @@ public class TheRapyRecuperationLineServiceImpl extends TherapyServiceImpl<TheRa
lot.lotName AS lotName,
lot.lotValue AS lotValue
FROM
staff_therapy_line line
LEFT JOIN staff_therapy_travel_agency ta ON ta.id = line.travelAgencyId
LEFT JOIN staff_therapy_union gh ON gh.id = line.createUnionid
LEFT JOIN staff_therapy_user u ON u.id = line.opBy
LEFT JOIN staff_therapy_lot lot on lot.id = line.lotId
inclusive_therapy_v3_line line
LEFT JOIN inclusive_therapy_v3_travel_agency ta ON ta.id = line.travelAgencyId
LEFT JOIN inclusive_therapy_v3_union gh ON gh.id = line.createUnionid
LEFT JOIN inclusive_therapy_v3_user u ON u.id = line.opBy
LEFT JOIN inclusive_therapy_v3_lot lot on lot.id = line.lotId
$condition
""");
sql.setCondition(cnd);
@@ -580,11 +580,11 @@ public class TheRapyRecuperationLineServiceImpl extends TherapyServiceImpl<TheRa
enroll.userName,
enroll.unionName,
enroll.unitName,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id) isFamily
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id) isFamily
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_line_union_select lineu ON lineu.id = enroll.takePartInLineId
LEFT JOIN staff_therapy_line line ON line.id = lineu.lineId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_line_union_select lineu ON lineu.id = enroll.takePartInLineId
LEFT JOIN inclusive_therapy_v3_line line ON line.id = lineu.lineId
WHERE
enroll.takePartInLineId = @takePartInLineId
and enroll.stateId=@stateId
@@ -634,8 +634,8 @@ public class TheRapyRecuperationLineServiceImpl extends TherapyServiceImpl<TheRa
us.playEndTime,
gh.unionname AS selectUnionName
FROM
`staff_therapy_line_union_select` us
LEFT JOIN staff_therapy_union gh ON gh.id = us.unionId
`inclusive_therapy_v3_line_union_select` us
LEFT JOIN inclusive_therapy_v3_union gh ON gh.id = us.unionId
WHERE us.lineId = @lineId
""");
return listMap(sql);
@@ -83,16 +83,16 @@ public class TheRapyRecuperationLineUnionSelectServiceImpl extends TherapyServic
us.unionId as usUnionId,
us.id as usId,
usUnion.unionname as belongUnionName,
(SELECT COUNT(*) FROM staff_therapy_enroll WHERE takePartInLineId=us.id and isNormal=true) applyCount
(SELECT COUNT(*) FROM inclusive_therapy_v3_enroll WHERE takePartInLineId=us.id and isNormal=true) applyCount
from
staff_therapy_line line
LEFT JOIN staff_therapy_union gh ON gh.id = line.createUnionid
LEFT JOIN staff_therapy_user u ON u.id = line.opBy
LEFT JOIN staff_therapy_line_union_select us on us.lineId = line.id AND year(selectTime) = @year AND us.signUpMode = @mode $us
LEFT JOIN staff_therapy_travel_agency usTa on usTa.id = us.travelAgencyId
LEFT JOIN staff_therapy_travel_agency lineTa on lineTa.id = line.travelAgencyId
LEFT JOIN staff_therapy_union usUnion on usUnion.id = us.unionId
LEFT JOIN staff_therapy_lot lot on lot.id = line.lotId
inclusive_therapy_v3_line line
LEFT JOIN inclusive_therapy_v3_union gh ON gh.id = line.createUnionid
LEFT JOIN inclusive_therapy_v3_user u ON u.id = line.opBy
LEFT JOIN inclusive_therapy_v3_line_union_select us on us.lineId = line.id AND year(selectTime) = @year AND us.signUpMode = @mode $us
LEFT JOIN inclusive_therapy_v3_travel_agency usTa on usTa.id = us.travelAgencyId
LEFT JOIN inclusive_therapy_v3_travel_agency lineTa on lineTa.id = line.travelAgencyId
LEFT JOIN inclusive_therapy_v3_union usUnion on usUnion.id = us.unionId
LEFT JOIN inclusive_therapy_v3_lot lot on lot.id = line.lotId
$condition
""");
if (Integer.valueOf(1).equals(mode)) {
@@ -197,7 +197,7 @@ public class TheRapyRecuperationLineUnionSelectServiceImpl extends TherapyServic
@Override
public List<String> getHasSelectLineIds(Integer year, Integer mode) {
Sql sql = Sqls.create("""
select lineId from staff_therapy_line_union_select
select lineId from inclusive_therapy_v3_line_union_select
where signUpMode = @mode
$userCnd
$unionCnd
@@ -249,8 +249,8 @@ public class TheRapyRecuperationLineUnionSelectServiceImpl extends TherapyServic
enable,
ta.travelAgencyName
from
staff_therapy_line_union_select us
left join staff_therapy_travel_agency ta on ta.id = us.travelAgencyId
inclusive_therapy_v3_line_union_select us
left join inclusive_therapy_v3_travel_agency ta on ta.id = us.travelAgencyId
where unionId = @unionId
and lineId = @lineId
and signUpMode = @mode
@@ -278,7 +278,7 @@ public class TheRapyRecuperationLineUnionSelectServiceImpl extends TherapyServic
// contact,
// contactPhone
// from
// staff_therapy_line_union_select
// inclusive_therapy_v3_line_union_select
// where unionId = @unionId
// and lineId = @lineId
// ORDER BY signUpStartTime ASC
@@ -296,7 +296,7 @@ public class TheRapyRecuperationLineUnionSelectServiceImpl extends TherapyServic
// playStartTime,
// playEndTime
// from
// staff_therapy_line
// inclusive_therapy_v3_line
// where id = @lineId
// """);
// sql.setParam("lineId", lineId);
@@ -84,7 +84,7 @@ public class TheRapyRecuperationTravelAgencyServiceImpl extends TherapyServiceIm
*,
files as fileId
from
staff_therapy_travel_agency $condition
inclusive_therapy_v3_travel_agency $condition
""");
sql.setCondition(cnd);
return listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
@@ -111,10 +111,10 @@ public class TheRapyRecuperationTravelAgencyServiceImpl extends TherapyServiceIm
enroll.userName,
enroll.unionName,
enroll.unitName,
( SELECT COUNT( 1 ) FROM staff_therapy_enroll_companion WHERE trreId = enroll.id AND relation = '亲属' ) isFamily
( SELECT COUNT( 1 ) FROM inclusive_therapy_v3_enroll_companion WHERE trreId = enroll.id AND relation = '亲属' ) isFamily
FROM
`staff_therapy_enroll` enroll
LEFT JOIN staff_therapy_travel_agency agency ON agency.id = enroll.takePartInTravelAgencyId
`inclusive_therapy_v3_enroll` enroll
LEFT JOIN inclusive_therapy_v3_travel_agency agency ON agency.id = enroll.takePartInTravelAgencyId
WHERE
enroll.takePartInTravelAgencyId = @takePartInTravelAgencyId
and enroll.selfUnionId = @unionId
@@ -30,11 +30,11 @@ public class TheRapyRecuperationBaseManagerServiceImpl extends TherapyServiceImp
select
b.*,
l.lotName,
(select COUNT(1) FROM staff_therapy_enroll en WHERE isNormal=true AND en.loginName=@loginname and YEAR(en.signingUptime)=@year ) isNormal,
(select COUNT(1) FROM staff_therapy_enroll en WHERE isNormal=false AND en.loginName=@loginname and YEAR(en.signingUptime)=@year) isNormalFalse
(select COUNT(1) FROM inclusive_therapy_v3_enroll en WHERE isNormal=true AND en.loginName=@loginname and YEAR(en.signingUptime)=@year ) isNormal,
(select COUNT(1) FROM inclusive_therapy_v3_enroll en WHERE isNormal=false AND en.loginName=@loginname and YEAR(en.signingUptime)=@year) isNormalFalse
from
staff_therapy_base_management b
left join staff_therapy_lot l on l.id = b.lotId
inclusive_therapy_v3_base_management b
left join inclusive_therapy_v3_lot l on l.id = b.lotId
$condition
""");
sql.setParam("loginname", TherapyContext.getPrincipalProperty("loginname"));
@@ -8,7 +8,7 @@ import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = true)
@Table("staff_therapy_audit")
@Table("inclusive_therapy_v3_audit")
public class TherapyAudit extends LegacyBaseModel {
@Name
@PrevInsert(uu32 = true)
@@ -4,7 +4,7 @@ import lombok.Data;
import org.nutz.dao.entity.annotation.*;
@Data
@Table("staff_therapy_audit_state")
@Table("inclusive_therapy_v3_audit_state")
public class TherapyAuditState {
@Id(auto = false)
private Integer stateId;
@@ -29,7 +29,7 @@ public class TherapyEmail {
String user = setting("user");
String password = setting("password");
if (host == null || from == null || user == null || password == null) {
throw new IllegalStateException("职工疗休养邮件发送配置不完整");
throw new IllegalStateException("普惠疗休养V3邮件发送配置不完整");
}
String portSetting = setting("port");
int port = portSetting == null ? 465 : Integer.parseInt(portSetting);
@@ -4,7 +4,7 @@ import lombok.Data;
import org.nutz.dao.entity.annotation.*;
@Data
@View("staff_therapy_union")
@View("inclusive_therapy_v3_union")
public class TherapyUnion {
@Name
@Column
@@ -5,7 +5,7 @@ import lombok.Data;
import org.nutz.dao.entity.annotation.*;
@Data
@View("staff_therapy_user")
@View("inclusive_therapy_v3_user")
public class TherapyUser {
@Name
@Column
@@ -0,0 +1,244 @@
"""导出 v3 疗休养数据及实际附件;Python 3.9+ 标准库 + 已有 mysql 客户端。
参数:--database 源库 --output 导出.zip --login-path 已配置的连接名。
不用 login-path 时可传 --host、--port、--user,密码交互输入,不写入文件。
存在附件时 --files-root 指向 v3 FTP/文件存储根目录;不通过脚本安装依赖。
导出期间暂停疗休养业务写入与附件变更;使用一个 InnoDB 一致性快照读取关联数据。
与 import_inclusive_therapy_v3.py 放在同一目录;脚本不启动应用,不修改源数据。
"""
import argparse
import getpass
import hashlib
import json
import os
from pathlib import Path
import re
import subprocess
import sys
import tempfile
from urllib.parse import unquote, urlsplit
import zipfile
FORMAT = "inclusive-therapy-v3/1"
PREFIX = "inclusive_therapy_v3_"
SUFFIXES = (
"config", "lot", "travel_agency", "base_management", "line",
"line_union_select", "cluster", "cluster_member", "enroll_bed",
"enroll", "enroll_companion", "enroll_change_record",
)
AUDIT_FIELDS = ("selfUnionAuditId", "joinLineUnionAuditId", "schoolUnionAuditId")
def identifier(value):
if not re.fullmatch(r"[A-Za-z0-9_]+", value):
raise ValueError("数据库标识符只允许英文字母、数字、下划线")
return "`" + value + "`"
def literal(value):
if value is None:
return "NULL"
encoded = str(value).encode("utf-8").hex()
return "CONVERT(X'" + encoded + "' USING utf8mb4)"
def get(row, key, default=None):
return next((value for name, value in row.items() if name.lower() == key.lower()), default)
def connection_args(parser):
parser.add_argument("--mysql", default="mysql", help="已有 mysql 客户端路径")
parser.add_argument("--login-path")
parser.add_argument("--host", default=None)
parser.add_argument("--port", type=int, default=None)
parser.add_argument("--user", default=None)
parser.add_argument("--database", required=True)
class MySQL:
def __init__(self, args):
identifier(args.database)
self.command = [args.mysql]
if args.login_path:
self.command.append("--login-path=" + args.login_path)
self.command += ["--default-character-set=utf8mb4", "--batch", "--raw",
"--skip-column-names", "--binary-mode=1", "--connect-timeout=15",
"--skip-force", "--max-allowed-packet=1G", "--database=" + args.database]
for key in ("host", "port", "user"):
value = getattr(args, key)
if value is not None:
self.command.append("--" + key + "=" + str(value))
self.env = os.environ.copy()
if not args.login_path and "MYSQL_PWD" not in self.env:
self.env["MYSQL_PWD"] = getpass.getpass("MySQL password: ")
def lines(self, sql):
# 文件管道避免大量数据输出与标准输入相互阻塞,不把密码拼进命令行。
with tempfile.TemporaryFile() as source, tempfile.TemporaryFile() as errors:
source.write(sql.encode("utf-8"))
source.seek(0)
process = subprocess.Popen(self.command, stdin=source, stdout=subprocess.PIPE,
stderr=errors, env=self.env)
try:
for line in process.stdout:
yield line.decode("utf-8", errors="strict").rstrip("\r\n")
if process.wait() != 0:
errors.seek(0)
detail = errors.read().decode("utf-8", errors="replace")
# 不输出可能包含个人数据的 SQL 文本或数据库错误详情。
match = re.search(r"ERROR\s+(\d+).*?at line\s+(\d+)", detail)
location = "(错误号 %s,SQL 第 %s 行)" % match.groups() if match else ""
raise RuntimeError("MySQL 执行失败" + location)
finally:
process.stdout.close()
if process.poll() is None:
process.terminate()
process.wait()
def objects(self, sql):
return [json.loads(line) for line in self.lines(sql) if line]
def schema(self, tables):
selected = ",".join(literal(name) for name in tables)
rows = self.objects("SELECT JSON_OBJECT('table',TABLE_NAME,'name',COLUMN_NAME,"
"'type',DATA_TYPE,'length',CHARACTER_MAXIMUM_LENGTH,"
"'nullable',IS_NULLABLE,'default',COLUMN_DEFAULT,'extra',EXTRA) "
"FROM information_schema.columns WHERE TABLE_SCHEMA=DATABASE() "
"AND TABLE_NAME IN (" + selected + ") ORDER BY TABLE_NAME,ORDINAL_POSITION;")
result = {}
for row in rows:
result.setdefault(row.pop("table"), []).append(row)
return result
def require_innodb(self, tables):
selected = ",".join(literal(name) for name in tables)
rows = self.objects("SELECT JSON_OBJECT('name',TABLE_NAME,'engine',ENGINE) "
"FROM information_schema.tables WHERE TABLE_SCHEMA=DATABASE() "
"AND TABLE_NAME IN (" + selected + ");")
engines = {row["name"]: row["engine"] for row in rows}
missing = [name for name in tables if engines.get(name) != "InnoDB"]
if missing:
raise ValueError("需要存在且使用 InnoDB 的表:" + ", ".join(missing))
def row_query(label, table, columns, where=""):
pairs = []
for column in columns:
name = column["name"]
pairs += [literal(name), "HEX(CAST(t." + identifier(name) + " AS BINARY))"]
return ("SELECT JSON_OBJECT('table'," + literal(label) + ",'row',JSON_OBJECT(" +
",".join(pairs) + ")) FROM " + identifier(table) + " t " + where + ";\n")
def decode_row(record):
return {name: None if value is None else bytes.fromhex(value).decode("utf-8", errors="strict")
for name, value in record["row"].items()}
def main():
parser = argparse.ArgumentParser(description=__doc__)
connection_args(parser)
parser.add_argument("--output", type=Path, required=True)
parser.add_argument("--files-root", type=Path)
parser.add_argument("--audit-table", default="audit", help="v3 公共审核表名")
args = parser.parse_args()
identifier(args.audit_table)
output = args.output.resolve()
if output.exists():
raise ValueError("导出文件已存在,不覆盖:" + str(output))
client = MySQL(args)
tables = {suffix: "the_rapy_recuperation_" + suffix for suffix in SUFFIXES}
schemas = client.schema(list(tables.values()) + [args.audit_table, "activity_user_scope",
"sys_user", "sys_union", "sys_unit", "sys_file", "sys_config"])
required = list(tables.values()) + ["activity_user_scope", "sys_user", "sys_union", "sys_unit", "sys_file", "sys_config"]
absent = [table for table in required if table not in schemas]
if absent:
raise ValueError("源库缺少必要表:" + ", ".join(absent))
client.require_innodb(required + ([args.audit_table] if args.audit_table in schemas else []))
enroll = identifier(tables["enroll"])
audit_ids = " UNION ".join("SELECT " + identifier(field) + " FROM " + enroll +
" WHERE " + identifier(field) + " IS NOT NULL AND " +
identifier(field) + "<>''" for field in AUDIT_FIELDS)
if args.audit_table not in schemas:
references = client.objects("SELECT JSON_OBJECT('n',COUNT(*)) FROM (" + audit_ids + ") refs;")[0]["n"]
if references:
raise ValueError("源库缺少关联审核表,请用 --audit-table 指定实际表名")
plans = [(label, table, schemas[table], "") for label, table in tables.items()]
if args.audit_table in schemas:
plans.append(("_audit", args.audit_table, schemas[args.audit_table], "WHERE t.id IN (" + audit_ids + ")"))
plans.append(("_scope", "activity_user_scope", schemas["activity_user_scope"],
"WHERE t.groupId IN (SELECT activityGroupId FROM " + identifier(tables["config"]) + ")"))
for label, table, wanted in [("_user", "sys_user", {"id", "loginname"}),
("_union", "sys_union", {"id", "unionname", "unioncode"}),
("_unit", "sys_unit", {"id", "name", "unitcode"})]:
plans.append((label, table, [c for c in schemas[table] if c["name"].lower() in wanted], ""))
conditions = []
for suffix, column in [("line", "files"), ("line", "content"), ("travel_agency", "files"),
("base_management", "files"), ("base_management", "content"), ("config", "notice")]:
text = "CAST(b." + identifier(column) + " AS CHAR CHARACTER SET utf8mb4)"
conditions.append("EXISTS (SELECT 1 FROM " + identifier(tables[suffix]) + " b WHERE "
"LOCATE(t.id," + text + ")>0 OR (CHAR_LENGTH(t.filepath)>1 AND LOCATE(t.filepath," + text + ")>0))")
plans.append(("_file", "sys_file", schemas["sys_file"], "WHERE " + " OR ".join(conditions)))
plans.append(("_version", "sys_config", [c for c in schemas["sys_config"] if c["name"] in ("configKey", "configValue")],
"WHERE t.configKey='recuperationVersion'"))
sql = "SET SESSION time_zone='+00:00';\nSET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;\nSTART TRANSACTION WITH CONSISTENT SNAPSHOT;\n"
sql += "".join(row_query(*plan) for plan in plans) + "COMMIT;\n"
output.parent.mkdir(parents=True, exist_ok=True)
file_rows = []
counts = {label: 0 for label, *_ in plans}
digest = hashlib.sha256()
archive = zipfile.ZipFile(output, "x", compression=zipfile.ZIP_DEFLATED, allowZip64=True)
finished = False
try:
with archive.open("data.jsonl", "w", force_zip64=True) as data:
for line in client.lines(sql):
record = json.loads(line)
record["row"] = decode_row(record)
counts[record["table"]] += 1
if record["table"] == "_file":
file_rows.append(record["row"])
encoded = (json.dumps(record, ensure_ascii=False, separators=(",", ":")) + "\n").encode("utf-8")
digest.update(encoded)
data.write(encoded)
assets = {}
if file_rows and args.files_root is None:
raise ValueError("数据包含附件,必须提供 --files-root,不能只导出文件地址")
storage = args.files_root.resolve() if args.files_root else None
for row in file_rows:
old_id, old_path = get(row, "id"), get(row, "filepath")
if not old_id or not old_path:
raise ValueError("关联附件记录缺少 ID 或存储路径")
relative = unquote(urlsplit(old_path.replace("\\", "/")).path).lstrip("/")
source = (storage / relative).resolve()
if not source.is_relative_to(storage) or not source.is_file():
raise ValueError("实际附件不存在或不在文件根目录内,附件 ID:" + old_id)
member = "files/" + hashlib.sha256(old_id.encode("utf-8")).hexdigest()
file_hash = hashlib.sha256()
size = 0
with source.open("rb") as reader, archive.open(member, "w", force_zip64=True) as writer:
for chunk in iter(lambda: reader.read(1024 * 1024), b""):
file_hash.update(chunk)
size += len(chunk)
writer.write(chunk)
assets[old_id] = {"member": member, "sha256": file_hash.hexdigest(), "size": size}
manifest = {"format": FORMAT, "source_database": args.database, "source_prefix": "the_rapy_recuperation_",
"target_prefix": PREFIX, "counts": counts, "data_sha256": digest.hexdigest(), "files": assets}
archive.writestr("manifest.json", json.dumps(manifest, ensure_ascii=False, indent=2).encode("utf-8"))
finished = True
finally:
archive.close()
if not finished:
output.unlink()
print("导出完成:" + str(output))
print("业务记录:%s;审核记录:%s;附件:%s" %
(sum(counts.get(name, 0) for name in SUFFIXES), counts.get("_audit", 0), len(file_rows)))
if __name__ == "__main__":
try:
main()
except (OSError, ValueError, RuntimeError, KeyError) as error:
print("导出失败:" + str(error), file=sys.stderr)
sys.exit(1)
@@ -0,0 +1,353 @@
"""把 export_inclusive_therapy_v3.py 生成的 ZIP 导入 v4 的 inclusive_therapy_v3_*。
两个 Python 脚本应放在同一目录;使用 Python 3.9+ 标准库及已有 mysql 客户端。
参数:--database v4目标库 --input 导出.zip --login-path 连接名。
有附件时 --target-files-dir 必须是 v4 服务器可直接访问的本地/共享存储目录。
先使用本目录初始化 SQL 直接创建 inclusive_therapy_v3_* 表及菜单。
仅支持首次导入:目标子模块必须为空,或仅包含未使用的自动生成默认配置。
可用 --mapping 提供 JSON:{"user":{"旧ID":"新ID"},"unit":{},"union":{}}。
不覆盖 v4 原有疗休养、人员、组织或附件;导入期间不要向目标库写入业务数据。
失败时数据库事务回滚;已复制的附件保留在独立目录,避免提交状态不明时误删文件。
"""
import argparse
from collections import defaultdict
import hashlib
import json
from pathlib import Path
import re
import sys
import uuid
from urllib.parse import parse_qs, unquote, urlsplit
import zipfile
from export_inclusive_therapy_v3 import (
AUDIT_FIELDS, FORMAT, PREFIX, SUFFIXES, MySQL,
connection_args, get, identifier, literal,
)
def rows(client, table, columns):
from export_inclusive_therapy_v3 import row_query, decode_row
return [decode_row(json.loads(line)) for line in client.lines(row_query(table, table, columns))]
def load_bundle(archive):
manifest = json.loads(archive.read("manifest.json"))
if manifest.get("format") != FORMAT or manifest.get("target_prefix") != PREFIX:
raise ValueError("导出文件格式或目标表前缀不匹配")
allowed = set(SUFFIXES) | {"_audit", "_scope", "_user", "_unit", "_union", "_file", "_version"}
records = defaultdict(list)
digest = hashlib.sha256()
with archive.open("data.jsonl") as data:
for line in data:
digest.update(line)
record = json.loads(line)
label, row = record["table"], record["row"]
if label not in allowed or not isinstance(row, dict):
raise ValueError("导出文件包含未知数据类型")
if any(value is not None and not isinstance(value, str) for value in row.values()):
raise ValueError("导出字段格式错误")
records[label].append(row)
if digest.hexdigest() != manifest["data_sha256"]:
raise ValueError("导出数据不完整或已被修改")
for label in allowed:
if len(records[label]) != manifest["counts"].get(label, 0):
raise ValueError("导出记录数量不匹配:" + label)
if not records["config"]:
raise ValueError("源库没有疗休养配置,不能完整导入")
return manifest, records
def check_relations(records):
primary = {}
for label in list(SUFFIXES) + ["_audit", "_file"]:
values = [get(row, "id") for row in records[label]]
if any(not value for value in values) or len(set(values)) != len(values):
raise ValueError("源数据主键为空或重复:" + label)
primary[label] = set(values)
relations = {
"lot": {"configId": "config"},
"line": {"lotId": "lot", "travelAgencyId": "travel_agency"},
"base_management": {"lotId": "lot", "travelAgencyId": "travel_agency"},
"line_union_select": {"lineId": "line", "travelAgencyId": "travel_agency"},
"cluster": {"lineId": "line"},
"cluster_member": {"lineId": "line", "clusterId": "cluster"},
"enroll": {"lotId": "lot", "bedInfoId": "enroll_bed", "takePartInLineId": "line_union_select",
"takePartInTravelAgencyId": "travel_agency", "takePartInBaseManagementId": "base_management",
**{field: "_audit" for field in AUDIT_FIELDS}},
"enroll_companion": {"trreId": "enroll", "bedInfoId": "enroll_bed"},
"enroll_change_record": {"enrollId": "enroll"},
}
for label, references in relations.items():
for row in records[label]:
for column, destination in references.items():
value = get(row, column)
if value and value not in primary[destination]:
raise ValueError("源数据存在断开的关联:%s.%s,记录ID=%s" % (label, column, get(row, "id")))
class IdentityMap:
def __init__(self, source, target, overrides):
self.source = {get(row, "id"): row for row in source}
self.target = {get(row, "id"): row for row in target}
self.overrides = overrides
self.cache = {}
def resolve(self, old_id, kind, required=True):
if not old_id:
return old_id
if old_id in self.overrides:
value = self.overrides[old_id]
if value not in self.target:
raise ValueError("手工映射的目标不存在:%s %s" % (kind, old_id))
return value
if old_id in self.cache:
return self.cache[old_id]
old = self.source.get(old_id)
same_id = self.target.get(old_id)
if same_id and (kind != "user" or old and get(same_id, "loginname") == get(old, "loginname")):
self.cache[old_id] = old_id
return old_id
if old:
keys = ("loginname",) if kind == "user" else (("unitcode", "name") if kind == "unit" else ("unioncode", "unionname"))
for key in keys:
value = get(old, key)
if not value:
continue
target_key = "name" if key == "unionname" else key
matches = [get(row, "id") for row in self.target.values() if get(row, target_key) == value]
if len(matches) > 1:
raise ValueError("存在多个候选,需 --mapping 明确映射:%s %s" % (kind, old_id))
if len(matches) == 1:
self.cache[old_id] = matches[0]
return matches[0]
if not required and same_id is None:
# 已离职/删除的历史操作人保留原 ID,审核快照中的姓名、工号仍原样迁移。
return old_id
raise ValueError("无法对应 v4 数据,需 --mapping 明确映射:%s %s" % (kind, old_id))
def default_config(row):
permitted = {"id": None, "configName": {"智慧工会疗休养配置", "普惠疗休养V3配置"},
"isSnLine": {"0"}, "isSwLine": {"0"}, "travelAudit": {"0"}, "bedInfo": {"1"},
"familyInfo": {"1"}, "outsideQuotaProportion": {"0", "0.00", "0.0"},
"unionLineNumberConfigs": {"[]"}, "lots": {"[]"}}
for name, value in row.items():
key = next((key for key in permitted if key.lower() == name.lower()), None)
if key == "id" or value is None or value == "":
continue
if key is None or value not in permitted[key]:
return False
return True
def main():
parser = argparse.ArgumentParser(description=__doc__)
connection_args(parser)
parser.add_argument("--input", type=Path, required=True)
parser.add_argument("--target-files-dir", type=Path)
parser.add_argument("--mapping", type=Path)
args = parser.parse_args()
overrides = json.loads(args.mapping.read_text(encoding="utf-8-sig")) if args.mapping else {}
copied_directory = None
with zipfile.ZipFile(args.input) as archive:
manifest, records = load_bundle(archive)
check_relations(records)
client = MySQL(args)
tables = {suffix: PREFIX + suffix for suffix in SUFFIXES}
tables["_audit"] = PREFIX + "audit"
shared = ["sys_user", "sys_unit", "sys_union", "sys_file", "sys_config", "activity_user_scope"]
schemas = client.schema(list(tables.values()) + shared)
missing = [table for table in list(tables.values()) + shared if table not in schemas]
if missing:
raise ValueError("请先执行初始化脚本,缺少:" + ", ".join(missing))
client.require_innodb(list(tables.values()) + shared)
identities = {}
for kind, label, table, wanted in [
("user", "_user", "sys_user", {"id", "loginname"}),
("unit", "_unit", "sys_unit", {"id", "name", "unitcode"}),
("union", "_union", "sys_union", {"id", "name", "unioncode"})]:
target = rows(client, table, [c for c in schemas[table] if c["name"].lower() in wanted])
identities[kind] = IdentityMap(records[label], target, overrides.get(kind, {}))
groups = sorted({get(row, "activityGroupId") for row in records["config"] if get(row, "activityGroupId")})
current_group = client.objects("SELECT JSON_OBJECT('n',COALESCE(MAX(groupId),0)) FROM activity_user_scope;")[0]["n"]
group_map = {group: str(int(current_group) + index + 1) for index, group in enumerate(groups)}
if any(int(value) > 2147483647 for value in group_map.values()):
raise ValueError("目标活动分组编号已达到整数上限")
initial = rows(client, tables["config"], schemas[tables["config"]])
if len(initial) > 1 or initial and not default_config(initial[0]):
raise ValueError("目标配置已有业务设置,不覆盖;仅允许空的新子模块首次导入")
file_info = {}
paths = {}
for row in records["_file"]:
old_id = get(row, "id")
asset = manifest["files"].get(old_id)
if not asset or asset["member"] not in archive.namelist():
raise ValueError("附件内容缺失,ID:" + old_id)
new_id = uuid.uuid4().hex
file_info[old_id] = {"id": new_id, "name": get(row, "filename") or old_id,
"engine": "LOCAL", "bucket": "", "downloadPath": "/platform/sys/file/download?id=" + new_id}
path = get(row, "filepath")
if path in paths and paths[path] != old_id:
raise ValueError("源附件路径对应多个文件 ID,请先消除歧义")
paths[path] = old_id
def file_key(value):
value = unquote(value)
return value if value in file_info else paths.get(value)
def rewrite_text(value):
key = file_key(value)
if key:
return file_info[key]["downloadPath"]
def url(match):
address = match[0]
parsed = urlsplit(address.replace("&amp;", "&"))
query_id = parse_qs(parsed.query).get("id", [None])[0]
key = file_key(query_id) if query_id else file_key(parsed.path)
return file_info[key]["downloadPath"] if key else address
return re.sub(r"https?://[^\s\"'<>]+|/file_server/[^\s\"'<>]+", url, value)
def transform_json(value):
if isinstance(value, list):
return [transform_json(item) for item in value]
if isinstance(value, dict):
key = get(value, "id")
key = key if key in file_info else file_key(get(value, "filepath", ""))
if key:
file = dict(file_info[key])
file.update(filename=file["name"], filepath=file["downloadPath"])
return file
result = {}
for key, item in value.items():
kind = "union" if key.lower() in ("unionid", "selfunionid", "takepartinunionid", "createunionid") else "unit" if key.lower() in ("unitid", "selfunitid") else None
result[key] = identities[kind].resolve(item, kind) if kind and item else transform_json(item)
return result
return rewrite_text(value) if isinstance(value, str) else value
prepared = defaultdict(list)
actor_fields = {"createdby", "updatedby", "opby", "selectuserid", "auditor", "creator"}
union_fields = {"selfunionid", "takepartinunionid", "createunionid", "unionid"}
for label, table in tables.items():
allowed = {c["name"].lower(): c for c in schemas[table]}
for original in records[label]:
row = {}
for name, value in original.items():
column = allowed.get(name.lower())
if column is None:
if label != "_audit":
raise ValueError("目标表缺少源字段,不能静默丢弃:%s.%s" % (table, name))
continue
if value:
if name.lower() in union_fields:
value = identities["union"].resolve(value, "union")
elif name.lower() in ("unitid", "selfunitid"):
value = identities["unit"].resolve(value, "unit")
elif name.lower() in actor_fields:
value = identities["user"].resolve(value, "user", required=False)
elif name.lower() == "activitygroupid":
value = group_map[value]
elif column["type"] == "json":
value = json.dumps(transform_json(json.loads(value)), ensure_ascii=False, separators=(",", ":"))
else:
value = rewrite_text(value)
limit = column["length"]
if value is not None and limit and column["type"] in ("varchar", "char") and len(value) > int(limit):
raise ValueError("字段长度不足,不能截断数据:%s.%s,需要至少 %s 字符" % (table, name, len(value)))
row[column["name"]] = value
prepared[table].append(row)
scopes = defaultdict(list)
for row in records["_scope"]:
if get(row, "groupType") == "2":
raise ValueError("源范围是 SQL 条件分组,须先转换为 v3 实际人员结果后导出")
scopes[get(row, "groupId")].append(row)
for old_group, new_group in group_map.items():
source = scopes[old_group] or [{"groupName": "疗休养参加人员", "userId": ""}]
for row in source:
user = get(row, "userId")
prepared["activity_user_scope"].append({
"groupId": new_group, "groupName": "普惠疗休养V3 / " + (get(row, "groupName") or "参加人员"),
"userId": identities["user"].resolve(user, "user") if user else "",
"groupType": "1", "groupSql": None,
"creator": identities["user"].resolve(get(row, "creator"), "user", required=False), "delFlag": "0"})
version = get(records["_version"][0], "configValue") if records["_version"] else "zjnu"
if version not in ("zjnu", "zjxu", "zjiet"):
raise ValueError("无法识别 v3 的疗休养规则版本")
if file_info:
if args.target_files_dir is None:
raise ValueError("有附件时必须提供 --target-files-dir,不能只迁移数据库地址")
storage = args.target_files_dir.resolve()
storage.mkdir(parents=True, exist_ok=True)
copied_directory = storage / ("inclusive_therapy_v3_" + uuid.uuid4().hex)
copied_directory.mkdir()
for old_id, info in file_info.items():
asset = manifest["files"][old_id]
suffix = Path(info["name"]).suffix.lower().lstrip(".")
if not re.fullmatch(r"[a-z0-9]{1,12}", suffix):
suffix = "bin"
path = copied_directory / (info["id"] + "." + suffix)
digest, size = hashlib.sha256(), 0
with archive.open(asset["member"]) as source, path.open("xb") as destination:
for chunk in iter(lambda: source.read(1024 * 1024), b""):
digest.update(chunk)
size += len(chunk)
destination.write(chunk)
if digest.hexdigest() != asset["sha256"] or size != asset["size"]:
raise ValueError("附件内容不完整,ID:" + old_id)
info.update(suffix=suffix, storagePath=str(path), objName=path.name,
sizeKb=str(round(size / 1024, 2)), sizeInfo=str(size) + " B", delFlag="0")
prepared["sys_file"].append(info)
sql = ["SET SESSION time_zone='+00:00';", "SET SESSION sql_mode='STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';",
"CREATE TEMPORARY TABLE inclusive_therapy_v3_import_guard (ok INT NOT NULL, CONSTRAINT inclusive_therapy_v3_import_requirement CHECK(ok=1)) ENGINE=InnoDB;",
"START TRANSACTION;"]
def guard(condition):
sql.append("INSERT INTO inclusive_therapy_v3_import_guard VALUES(IF(" + condition + ",1,0));")
for label, table in tables.items():
sql.append("SELECT id FROM " + identifier(table) + " FOR UPDATE;")
if label != "config":
guard("(SELECT COUNT(*) FROM " + identifier(table) + ")=0")
guard("(SELECT COUNT(*) FROM " + identifier(tables["config"]) + ")=" + str(len(initial)))
if initial:
# 带原字段条件删除已识别的未使用默认配置;并发修改会使断言失败并回滚。
conditions = " AND ".join(identifier(name) + " <=> " + literal(value) for name, value in initial[0].items())
sql.append("DELETE FROM " + identifier(tables["config"]) + " WHERE " + conditions + ";")
guard("ROW_COUNT()=1")
sql.append("SELECT id FROM activity_user_scope FOR UPDATE;")
for group in group_map.values():
guard("(SELECT COUNT(*) FROM activity_user_scope WHERE groupId=" + literal(group) + ")=0")
for table, table_rows in prepared.items():
for row in table_rows:
# 显式列清单;SQL 使用 UTF-8 十六进制字面量保留中文、换行与引号。
sql.append("INSERT INTO " + identifier(table) + " (" + ",".join(identifier(key) for key in row) + ") VALUES (" +
",".join(literal(value) for value in row.values()) + ");")
sql.append("UPDATE sys_config SET configValue=" + literal(version) + " WHERE configKey='staffTherapyRecuperationVersion';")
sql.append("INSERT INTO sys_config(configKey,configValue,note,delFlag) SELECT 'staffTherapyRecuperationVersion'," +
literal(version) + "," + literal("普惠疗休养V3报名规则版本") + ",0 WHERE NOT EXISTS "
"(SELECT 1 FROM sys_config WHERE configKey='staffTherapyRecuperationVersion');")
sql.append("COMMIT;")
try:
# mysql 批处理遇错即停止;连接关闭回滚未提交事务,不启用 --force。
for _ in client.lines("\n".join(sql)):
pass
except (OSError, RuntimeError):
if copied_directory:
print("附件暂存目录保留:" + str(copied_directory), file=sys.stderr)
raise
print("导入完成:普惠疗休养V3,表前缀 " + PREFIX)
print("业务记录:%s;审核记录:%s;附件:%s" %
(sum(len(records[name]) for name in SUFFIXES), len(records["_audit"]), len(file_info)))
if copied_directory:
print("附件目录:" + str(copied_directory))
if __name__ == "__main__":
try:
main()
except (OSError, ValueError, RuntimeError, KeyError, zipfile.BadZipFile) as error:
print("导入失败:" + str(error), file=sys.stderr)
sys.exit(1)
@@ -1,13 +1,13 @@
-- v4 职工福利 / 惠普疗休养v3独立子模块初始化脚本(MySQL 8)。
-- v4 职工福利 / 普惠疗休养V3独立子模块初始化脚本(MySQL 8)。
-- 在 v4 目标数据库中执行;表结构依据 therapyRecuperation 模块实体定义。
-- v3 the_rapy_recuperation_* 对应本模块 staff_therapy_*,不覆盖 v4 其他疗休养表。
-- v3 the_rapy_recuperation_* 对应本模块 inclusive_therapy_v3_*,不覆盖 v4 其他疗休养表。
-- 仅新增表、视图、默认配置、菜单及角色权限关联,不迁移 v3 历史业务数据。
-- 已存在的表、视图、配置和菜单保留原值;脚本不修订已有表结构。
-- 依赖 v4 已有 vw_user、sys_union、sys_unit、sys_config、sys_module、sys_menu、sys_role、sys_role_menu。
-- DDL 存在 MySQL 隐式提交;后续初始化记录使用单独事务。
SET NAMES utf8mb4;
CREATE TABLE IF NOT EXISTS `staff_therapy_base_management` (
CREATE TABLE IF NOT EXISTS `inclusive_therapy_v3_base_management` (
`id` varchar(128) NOT NULL COMMENT 'id',
`year` int NULL DEFAULT NULL COMMENT '年度',
`sortNumber` varchar(50) NULL DEFAULT NULL COMMENT '排序编号',
@@ -33,14 +33,14 @@ CREATE TABLE IF NOT EXISTS `staff_therapy_base_management` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养目的地';
CREATE TABLE IF NOT EXISTS `staff_therapy_cluster` (
CREATE TABLE IF NOT EXISTS `inclusive_therapy_v3_cluster` (
`id` varchar(128) NOT NULL COMMENT 'id',
`lineId` varchar(32) NULL DEFAULT NULL COMMENT '线路id',
`clusterName` varchar(50) NULL DEFAULT NULL COMMENT '团名',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养组团';
CREATE TABLE IF NOT EXISTS `staff_therapy_cluster_member` (
CREATE TABLE IF NOT EXISTS `inclusive_therapy_v3_cluster_member` (
`id` varchar(128) NOT NULL COMMENT 'id',
`lineId` varchar(32) NULL DEFAULT NULL COMMENT '线路id',
`clusterId` varchar(32) NULL DEFAULT NULL COMMENT '团Id',
@@ -52,7 +52,7 @@ CREATE TABLE IF NOT EXISTS `staff_therapy_cluster_member` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养组团成员';
CREATE TABLE IF NOT EXISTS `staff_therapy_config` (
CREATE TABLE IF NOT EXISTS `inclusive_therapy_v3_config` (
`id` varchar(128) NOT NULL COMMENT 'id',
`configName` varchar(30) NULL DEFAULT NULL COMMENT '配置名称',
`activityGroupId` bigint NULL DEFAULT NULL COMMENT '参加人员范围',
@@ -80,7 +80,7 @@ CREATE TABLE IF NOT EXISTS `staff_therapy_config` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养配置';
CREATE TABLE IF NOT EXISTS `staff_therapy_enroll` (
CREATE TABLE IF NOT EXISTS `inclusive_therapy_v3_enroll` (
`id` varchar(128) NOT NULL COMMENT 'id',
`loginName` varchar(32) NULL DEFAULT NULL COMMENT '工号',
`userName` varchar(32) NULL DEFAULT NULL COMMENT '姓名',
@@ -121,7 +121,7 @@ CREATE TABLE IF NOT EXISTS `staff_therapy_enroll` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养报名登记表';
CREATE TABLE IF NOT EXISTS `staff_therapy_enroll_bed` (
CREATE TABLE IF NOT EXISTS `inclusive_therapy_v3_enroll_bed` (
`id` varchar(128) NOT NULL COMMENT 'id',
`bedType` varchar(10) NULL DEFAULT NULL COMMENT '床型',
`bedNum` int NULL DEFAULT NULL COMMENT '床位数',
@@ -137,14 +137,14 @@ CREATE TABLE IF NOT EXISTS `staff_therapy_enroll_bed` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养报名床位';
CREATE TABLE IF NOT EXISTS `staff_therapy_enroll_change_record` (
CREATE TABLE IF NOT EXISTS `inclusive_therapy_v3_enroll_change_record` (
`id` varchar(128) NOT NULL COMMENT 'id',
`enrollId` varchar(32) NULL DEFAULT NULL COMMENT '变更记录id',
`changeTime` datetime NULL DEFAULT NULL COMMENT '变更时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养报名变更记录';
CREATE TABLE IF NOT EXISTS `staff_therapy_enroll_companion` (
CREATE TABLE IF NOT EXISTS `inclusive_therapy_v3_enroll_companion` (
`id` varchar(128) NOT NULL COMMENT 'id',
`trreId` varchar(32) NULL DEFAULT NULL COMMENT '报名记录表Id',
`loginName` varchar(32) NULL DEFAULT NULL COMMENT '工号',
@@ -165,7 +165,7 @@ CREATE TABLE IF NOT EXISTS `staff_therapy_enroll_companion` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养随行人员';
CREATE TABLE IF NOT EXISTS `staff_therapy_line` (
CREATE TABLE IF NOT EXISTS `inclusive_therapy_v3_line` (
`id` varchar(128) NOT NULL COMMENT 'id',
`serialNumber` int NULL DEFAULT NULL COMMENT '编号',
`lineName` varchar(50) NULL DEFAULT NULL COMMENT '线路名称',
@@ -185,7 +185,7 @@ CREATE TABLE IF NOT EXISTS `staff_therapy_line` (
`trafficTools` varchar(50) NULL DEFAULT NULL COMMENT '交通工具',
`estimatedCost` varchar(50) NULL DEFAULT NULL COMMENT '预计费用',
`estimatedFamilyNumbers` int NULL DEFAULT NULL COMMENT '成团人数包括家属',
`files` varchar(30) NULL DEFAULT NULL COMMENT '缩略图',
`files` varchar(1000) NULL DEFAULT NULL COMMENT '缩略图',
`signUpMode` int NULL DEFAULT NULL COMMENT '报名模式(1.分工会 2.自由)',
`createMode` int NULL DEFAULT NULL COMMENT '创建模式(1.分工会 2.校工会)',
`lotId` varchar(128) NULL DEFAULT NULL COMMENT '标段',
@@ -202,7 +202,7 @@ CREATE TABLE IF NOT EXISTS `staff_therapy_line` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养线路';
CREATE TABLE IF NOT EXISTS `staff_therapy_line_union_select` (
CREATE TABLE IF NOT EXISTS `inclusive_therapy_v3_line_union_select` (
`id` varchar(128) NOT NULL COMMENT 'id',
`unionId` varchar(32) NULL DEFAULT NULL COMMENT '分工会id',
`lineId` varchar(32) NULL DEFAULT NULL COMMENT '线路id',
@@ -237,7 +237,7 @@ CREATE TABLE IF NOT EXISTS `staff_therapy_line_union_select` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养工会选线';
CREATE TABLE IF NOT EXISTS `staff_therapy_lot` (
CREATE TABLE IF NOT EXISTS `inclusive_therapy_v3_lot` (
`id` varchar(32) NOT NULL COMMENT 'id',
`lotName` varchar(10) NULL DEFAULT NULL COMMENT '标段',
`lotValue` varchar(10) NULL DEFAULT NULL COMMENT '标段值',
@@ -246,7 +246,7 @@ CREATE TABLE IF NOT EXISTS `staff_therapy_lot` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养标段';
CREATE TABLE IF NOT EXISTS `staff_therapy_travel_agency` (
CREATE TABLE IF NOT EXISTS `inclusive_therapy_v3_travel_agency` (
`id` varchar(128) NOT NULL COMMENT 'id',
`serialNumber` varchar(50) NULL DEFAULT NULL COMMENT '旅行社编号',
`travelAgencyName` varchar(50) NULL DEFAULT NULL COMMENT '旅行社名称',
@@ -270,7 +270,7 @@ CREATE TABLE IF NOT EXISTS `staff_therapy_travel_agency` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养旅行社';
CREATE TABLE IF NOT EXISTS `staff_therapy_audit` (
CREATE TABLE IF NOT EXISTS `inclusive_therapy_v3_audit` (
`id` varchar(128) NOT NULL,
`auditor` varchar(128) NULL DEFAULT NULL,
`auditPass` tinyint(1) NULL DEFAULT NULL,
@@ -288,7 +288,7 @@ CREATE TABLE IF NOT EXISTS `staff_therapy_audit` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养审核记录';
CREATE TABLE IF NOT EXISTS `staff_therapy_audit_state` (
CREATE TABLE IF NOT EXISTS `inclusive_therapy_v3_audit_state` (
`stateId` int NOT NULL,
`stateName` varchar(128) NULL DEFAULT NULL,
`stateColor` varchar(128) NULL DEFAULT NULL,
@@ -296,392 +296,392 @@ CREATE TABLE IF NOT EXISTS `staff_therapy_audit_state` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='疗休养审核状态';
SET @staff_therapy_ddl = IF(
EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema=DATABASE() AND table_name='staff_therapy_user'),
'DO 0', 'CREATE VIEW `staff_therapy_user` AS SELECT u.*, u.arrivalAtSchoolDate AS schoolTime FROM vw_user u'
SET @inclusive_therapy_v3_ddl = IF(
EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema=DATABASE() AND table_name='inclusive_therapy_v3_user'),
'DO 0', 'CREATE VIEW `inclusive_therapy_v3_user` AS SELECT u.*, u.arrivalAtSchoolDate AS schoolTime FROM vw_user u'
);
PREPARE staff_therapy_statement FROM @staff_therapy_ddl;
EXECUTE staff_therapy_statement;
DEALLOCATE PREPARE staff_therapy_statement;
PREPARE inclusive_therapy_v3_statement FROM @inclusive_therapy_v3_ddl;
EXECUTE inclusive_therapy_v3_statement;
DEALLOCATE PREPARE inclusive_therapy_v3_statement;
SET @staff_therapy_ddl = IF(
EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema=DATABASE() AND table_name='staff_therapy_union'),
'DO 0', 'CREATE VIEW `staff_therapy_union` AS SELECT u.*, u.name AS unionname FROM sys_union u'
SET @inclusive_therapy_v3_ddl = IF(
EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema=DATABASE() AND table_name='inclusive_therapy_v3_union'),
'DO 0', 'CREATE VIEW `inclusive_therapy_v3_union` AS SELECT u.*, u.name AS unionname FROM sys_union u'
);
PREPARE staff_therapy_statement FROM @staff_therapy_ddl;
EXECUTE staff_therapy_statement;
DEALLOCATE PREPARE staff_therapy_statement;
PREPARE inclusive_therapy_v3_statement FROM @inclusive_therapy_v3_ddl;
EXECUTE inclusive_therapy_v3_statement;
DEALLOCATE PREPARE inclusive_therapy_v3_statement;
SET @staff_therapy_ddl = IF(
EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema=DATABASE() AND table_name='staff_therapy_unit'),
'DO 0', 'CREATE VIEW `staff_therapy_unit` AS SELECT u.* FROM sys_unit u'
SET @inclusive_therapy_v3_ddl = IF(
EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema=DATABASE() AND table_name='inclusive_therapy_v3_unit'),
'DO 0', 'CREATE VIEW `inclusive_therapy_v3_unit` AS SELECT u.* FROM sys_unit u'
);
PREPARE staff_therapy_statement FROM @staff_therapy_ddl;
EXECUTE staff_therapy_statement;
DEALLOCATE PREPARE staff_therapy_statement;
PREPARE inclusive_therapy_v3_statement FROM @inclusive_therapy_v3_ddl;
EXECUTE inclusive_therapy_v3_statement;
DEALLOCATE PREPARE inclusive_therapy_v3_statement;
START TRANSACTION;
SET @staff_therapy_now = CAST(UNIX_TIMESTAMP(CURRENT_TIMESTAMP(3)) * 1000 AS UNSIGNED);
SET @inclusive_therapy_v3_now = CAST(UNIX_TIMESTAMP(CURRENT_TIMESTAMP(3)) * 1000 AS UNSIGNED);
INSERT INTO `staff_therapy_audit_state` (`stateId`,`stateName`,`stateColor`)
INSERT INTO `inclusive_therapy_v3_audit_state` (`stateId`,`stateName`,`stateColor`)
SELECT 2710,'待分工会审核','#e6a23c'
WHERE NOT EXISTS (SELECT 1 FROM `staff_therapy_audit_state` WHERE `stateId`=2710);
WHERE NOT EXISTS (SELECT 1 FROM `inclusive_therapy_v3_audit_state` WHERE `stateId`=2710);
INSERT INTO `staff_therapy_audit_state` (`stateId`,`stateName`,`stateColor`)
INSERT INTO `inclusive_therapy_v3_audit_state` (`stateId`,`stateName`,`stateColor`)
SELECT 2715,'分工会审核不通过','#f56c6c'
WHERE NOT EXISTS (SELECT 1 FROM `staff_therapy_audit_state` WHERE `stateId`=2715);
WHERE NOT EXISTS (SELECT 1 FROM `inclusive_therapy_v3_audit_state` WHERE `stateId`=2715);
INSERT INTO `staff_therapy_audit_state` (`stateId`,`stateName`,`stateColor`)
INSERT INTO `inclusive_therapy_v3_audit_state` (`stateId`,`stateName`,`stateColor`)
SELECT 2720,'待选择线路分工会审核','#e6a23c'
WHERE NOT EXISTS (SELECT 1 FROM `staff_therapy_audit_state` WHERE `stateId`=2720);
WHERE NOT EXISTS (SELECT 1 FROM `inclusive_therapy_v3_audit_state` WHERE `stateId`=2720);
INSERT INTO `staff_therapy_audit_state` (`stateId`,`stateName`,`stateColor`)
INSERT INTO `inclusive_therapy_v3_audit_state` (`stateId`,`stateName`,`stateColor`)
SELECT 2725,'选择线路分工会不通过','#f56c6c'
WHERE NOT EXISTS (SELECT 1 FROM `staff_therapy_audit_state` WHERE `stateId`=2725);
WHERE NOT EXISTS (SELECT 1 FROM `inclusive_therapy_v3_audit_state` WHERE `stateId`=2725);
INSERT INTO `staff_therapy_audit_state` (`stateId`,`stateName`,`stateColor`)
INSERT INTO `inclusive_therapy_v3_audit_state` (`stateId`,`stateName`,`stateColor`)
SELECT 2730,'待校工会审核','#e6a23c'
WHERE NOT EXISTS (SELECT 1 FROM `staff_therapy_audit_state` WHERE `stateId`=2730);
WHERE NOT EXISTS (SELECT 1 FROM `inclusive_therapy_v3_audit_state` WHERE `stateId`=2730);
INSERT INTO `staff_therapy_audit_state` (`stateId`,`stateName`,`stateColor`)
INSERT INTO `inclusive_therapy_v3_audit_state` (`stateId`,`stateName`,`stateColor`)
SELECT 2735,'校工会审核不通过','#f56c6c'
WHERE NOT EXISTS (SELECT 1 FROM `staff_therapy_audit_state` WHERE `stateId`=2735);
WHERE NOT EXISTS (SELECT 1 FROM `inclusive_therapy_v3_audit_state` WHERE `stateId`=2735);
INSERT INTO `staff_therapy_audit_state` (`stateId`,`stateName`,`stateColor`)
INSERT INTO `inclusive_therapy_v3_audit_state` (`stateId`,`stateName`,`stateColor`)
SELECT 2750,'审核通过','#67c23a'
WHERE NOT EXISTS (SELECT 1 FROM `staff_therapy_audit_state` WHERE `stateId`=2750);
WHERE NOT EXISTS (SELECT 1 FROM `inclusive_therapy_v3_audit_state` WHERE `stateId`=2750);
INSERT INTO `sys_config` (`configKey`,`configValue`,`note`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT 'staffTherapyRecuperationVersion','zjnu','惠普疗休养v3独立子模块报名规则版本','',@staff_therapy_now,'',@staff_therapy_now,0
SELECT 'staffTherapyRecuperationVersion','zjnu','普惠疗休养V3独立子模块报名规则版本','',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_config` WHERE `configKey`='staffTherapyRecuperationVersion');
INSERT INTO `staff_therapy_config`
INSERT INTO `inclusive_therapy_v3_config`
(`id`,`configName`,`isSnLine`,`isSwLine`,`travelAudit`,`bedInfo`,`familyInfo`,`outsideQuotaProportion`,`unionLineNumberConfigs`)
SELECT REPLACE(UUID(),'-',''),'智慧工会疗休养配置',0,0,0,1,1,0,JSON_ARRAY()
WHERE NOT EXISTS (SELECT 1 FROM `staff_therapy_config`);
SELECT REPLACE(UUID(),'-',''),'普惠疗休养V3配置',0,0,0,1,1,0,JSON_ARRAY()
WHERE NOT EXISTS (SELECT 1 FROM `inclusive_therapy_v3_config`);
SET @staff_therapy_pc_module = COALESCE(
SET @inclusive_therapy_v3_pc_module = COALESCE(
(SELECT m.`moduleId` FROM `sys_menu` m INNER JOIN `sys_module` s ON s.`id`=m.`moduleId`
WHERE m.`href` LIKE '/platform/recuperation%' AND m.`platform`='pc' ORDER BY m.`id` LIMIT 1),
(SELECT `id` FROM `sys_module` WHERE `name`='职工福利' AND `platform`='pc' ORDER BY `id` LIMIT 1),
REPLACE(UUID(),'-','')
);
INSERT INTO `sys_module` (`id`,`name`,`platform`,`sortNum`,`faIcon`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_pc_module,'职工福利','pc',50,'fa fa-heart','',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_module` WHERE `id`=@staff_therapy_pc_module);
SET @staff_therapy_module_name = (SELECT `name` FROM `sys_module` WHERE `id`=@staff_therapy_pc_module);
SET @staff_therapy_module_sort = (SELECT `sortNum` FROM `sys_module` WHERE `id`=@staff_therapy_pc_module);
SET @staff_therapy_h5_module = COALESCE(
(SELECT `id` FROM `sys_module` WHERE `name`=@staff_therapy_module_name AND `platform`='h5' ORDER BY `id` LIMIT 1),
SELECT @inclusive_therapy_v3_pc_module,'职工福利','pc',50,'fa fa-heart','',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_module` WHERE `id`=@inclusive_therapy_v3_pc_module);
SET @inclusive_therapy_v3_module_name = (SELECT `name` FROM `sys_module` WHERE `id`=@inclusive_therapy_v3_pc_module);
SET @inclusive_therapy_v3_module_sort = (SELECT `sortNum` FROM `sys_module` WHERE `id`=@inclusive_therapy_v3_pc_module);
SET @inclusive_therapy_v3_h5_module = COALESCE(
(SELECT `id` FROM `sys_module` WHERE `name`=@inclusive_therapy_v3_module_name AND `platform`='h5' ORDER BY `id` LIMIT 1),
REPLACE(UUID(),'-','')
);
INSERT INTO `sys_module` (`id`,`name`,`platform`,`sortNum`,`faIcon`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_h5_module,@staff_therapy_module_name,'h5',@staff_therapy_module_sort,'fa fa-heart','',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_module` WHERE `id`=@staff_therapy_h5_module);
SELECT @inclusive_therapy_v3_h5_module,@inclusive_therapy_v3_module_name,'h5',@inclusive_therapy_v3_module_sort,'fa fa-heart','',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_module` WHERE `id`=@inclusive_therapy_v3_h5_module);
SET @staff_therapy_menu_root = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SET @inclusive_therapy_v3_menu_root = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT('',LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=4
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_root,'',@staff_therapy_next_path,'惠普疗休养V3','menu','/platform/staffTherapyRecuperation','_self','fa fa-heart',1,0,'staffTherapyRecuperation',
@staff_therapy_next_location,1,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation');
SELECT @inclusive_therapy_v3_menu_root,'',@inclusive_therapy_v3_next_path,'普惠疗休养V3','menu','/platform/inclusiveTherapyV3','_self','fa fa-heart',1,0,'inclusiveTherapyV3',
@inclusive_therapy_v3_next_location,1,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3');
SET @staff_therapy_root_path = (SELECT `path` FROM `sys_menu` WHERE `id`=@staff_therapy_menu_root);
SET @inclusive_therapy_v3_root_path = (SELECT `path` FROM `sys_menu` WHERE `id`=@inclusive_therapy_v3_menu_root);
-- 基础设置
SET @staff_therapy_menu_config = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyConfig' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_config = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyConfig' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_config,@staff_therapy_menu_root,@staff_therapy_next_path,'基础设置','menu','/platform/staffTherapyRecuperation?screen=config','_self','fa fa-heart',1,0,'staffTherapyRecuperation.TheRapyConfig',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyConfig');
SELECT @inclusive_therapy_v3_menu_config,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'基础设置','menu','/platform/inclusiveTherapyV3?screen=config','_self','fa fa-heart',1,0,'inclusiveTherapyV3.TheRapyConfig',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyConfig');
-- 旅行社管理
SET @staff_therapy_menu_agency = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.travelAgency' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_agency = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.travelAgency' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_agency,@staff_therapy_menu_root,@staff_therapy_next_path,'旅行社管理','menu','/platform/staffTherapyRecuperation?screen=agency','_self','fa fa-heart',1,0,'staffTherapyRecuperation.travelAgency',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.travelAgency');
SELECT @inclusive_therapy_v3_menu_agency,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'旅行社管理','menu','/platform/inclusiveTherapyV3?screen=agency','_self','fa fa-heart',1,0,'inclusiveTherapyV3.travelAgency',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.travelAgency');
-- 线路管理
SET @staff_therapy_menu_line = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.line' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_line = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.line' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_line,@staff_therapy_menu_root,@staff_therapy_next_path,'线路管理','menu','/platform/staffTherapyRecuperation?screen=line','_self','fa fa-heart',1,0,'staffTherapyRecuperation.line',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.line');
SELECT @inclusive_therapy_v3_menu_line,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'线路管理','menu','/platform/inclusiveTherapyV3?screen=line','_self','fa fa-heart',1,0,'inclusiveTherapyV3.line',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.line');
-- 目的地管理
SET @staff_therapy_menu_base = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheBaseManagement' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_base = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheBaseManagement' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_base,@staff_therapy_menu_root,@staff_therapy_next_path,'目的地管理','menu','/platform/staffTherapyRecuperation?screen=base','_self','fa fa-heart',1,0,'staffTherapyRecuperation.TheBaseManagement',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheBaseManagement');
SELECT @inclusive_therapy_v3_menu_base,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'目的地管理','menu','/platform/inclusiveTherapyV3?screen=base','_self','fa fa-heart',1,0,'inclusiveTherapyV3.TheBaseManagement',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheBaseManagement');
-- 分工会选择线路
SET @staff_therapy_menu_branchSelect = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.lineFghSelect' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_branchSelect = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.lineFghSelect' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_branchSelect,@staff_therapy_menu_root,@staff_therapy_next_path,'分工会选择线路','menu','/platform/staffTherapyRecuperation?screen=branchSelect','_self','fa fa-heart',1,0,'staffTherapyRecuperation.lineFghSelect',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.lineFghSelect');
SELECT @inclusive_therapy_v3_menu_branchSelect,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'分工会选择线路','menu','/platform/inclusiveTherapyV3?screen=branchSelect','_self','fa fa-heart',1,0,'inclusiveTherapyV3.lineFghSelect',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.lineFghSelect');
-- 校工会选择线路
SET @staff_therapy_menu_schoolSelect = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.lineXghSelect' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_schoolSelect = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.lineXghSelect' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_schoolSelect,@staff_therapy_menu_root,@staff_therapy_next_path,'校工会选择线路','menu','/platform/staffTherapyRecuperation?screen=schoolSelect','_self','fa fa-heart',1,0,'staffTherapyRecuperation.lineXghSelect',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.lineXghSelect');
SELECT @inclusive_therapy_v3_menu_schoolSelect,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'校工会选择线路','menu','/platform/inclusiveTherapyV3?screen=schoolSelect','_self','fa fa-heart',1,0,'inclusiveTherapyV3.lineXghSelect',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.lineXghSelect');
-- 线路选择总览
SET @staff_therapy_menu_overview = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.lineSelectionOverview' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_overview = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.lineSelectionOverview' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_overview,@staff_therapy_menu_root,@staff_therapy_next_path,'线路选择总览','menu','/platform/staffTherapyRecuperation?screen=overview','_self','fa fa-heart',1,0,'staffTherapyRecuperation.lineSelectionOverview',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.lineSelectionOverview');
SELECT @inclusive_therapy_v3_menu_overview,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'线路选择总览','menu','/platform/inclusiveTherapyV3?screen=overview','_self','fa fa-heart',1,0,'inclusiveTherapyV3.lineSelectionOverview',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.lineSelectionOverview');
-- 线路组团
SET @staff_therapy_menu_cluster = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.lineCluster' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_cluster = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.lineCluster' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_cluster,@staff_therapy_menu_root,@staff_therapy_next_path,'线路组团','menu','/platform/staffTherapyRecuperation?screen=cluster','_self','fa fa-heart',1,0,'staffTherapyRecuperation.lineCluster',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.lineCluster');
SELECT @inclusive_therapy_v3_menu_cluster,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'线路组团','menu','/platform/inclusiveTherapyV3?screen=cluster','_self','fa fa-heart',1,0,'inclusiveTherapyV3.lineCluster',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.lineCluster');
-- 线路调剂
SET @staff_therapy_menu_adjustment = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.line.adjustment' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_adjustment = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.line.adjustment' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_adjustment,@staff_therapy_menu_root,@staff_therapy_next_path,'线路调剂','menu','/platform/staffTherapyRecuperation?screen=adjustment','_self','fa fa-heart',1,0,'staffTherapyRecuperation.line.adjustment',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.line.adjustment');
SELECT @inclusive_therapy_v3_menu_adjustment,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'线路调剂','menu','/platform/inclusiveTherapyV3?screen=adjustment','_self','fa fa-heart',1,0,'inclusiveTherapyV3.line.adjustment',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.line.adjustment');
-- 参加人员导入
SET @staff_therapy_menu_import = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.joinUser.import' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_import = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.joinUser.import' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_import,@staff_therapy_menu_root,@staff_therapy_next_path,'参加人员导入','menu','/platform/staffTherapyRecuperation?screen=import','_self','fa fa-heart',1,0,'staffTherapyRecuperation.joinUser.import',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.joinUser.import');
SELECT @inclusive_therapy_v3_menu_import,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'参加人员导入','menu','/platform/inclusiveTherapyV3?screen=import','_self','fa fa-heart',1,0,'inclusiveTherapyV3.joinUser.import',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.joinUser.import');
-- 分工会审核
SET @staff_therapy_menu_branchAudit = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyAudit' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_branchAudit = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyAudit' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_branchAudit,@staff_therapy_menu_root,@staff_therapy_next_path,'分工会审核','menu','/platform/staffTherapyRecuperation?screen=branchAudit','_self','fa fa-heart',1,0,'staffTherapyRecuperation.TheRapyAudit',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyAudit');
SELECT @inclusive_therapy_v3_menu_branchAudit,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'分工会审核','menu','/platform/inclusiveTherapyV3?screen=branchAudit','_self','fa fa-heart',1,0,'inclusiveTherapyV3.TheRapyAudit',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyAudit');
-- 自由组团审核
SET @staff_therapy_menu_travelAudit = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyTravelAudit' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_travelAudit = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyTravelAudit' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_travelAudit,@staff_therapy_menu_root,@staff_therapy_next_path,'自由组团审核','menu','/platform/staffTherapyRecuperation?screen=travelAudit','_self','fa fa-heart',1,0,'staffTherapyRecuperation.TheRapyTravelAudit',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyTravelAudit');
SELECT @inclusive_therapy_v3_menu_travelAudit,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'自由组团审核','menu','/platform/inclusiveTherapyV3?screen=travelAudit','_self','fa fa-heart',1,0,'inclusiveTherapyV3.TheRapyTravelAudit',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyTravelAudit');
-- 校工会审核
SET @staff_therapy_menu_schoolAudit = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyXghAudit' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_schoolAudit = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyXghAudit' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_schoolAudit,@staff_therapy_menu_root,@staff_therapy_next_path,'校工会审核','menu','/platform/staffTherapyRecuperation?screen=schoolAudit','_self','fa fa-heart',1,0,'staffTherapyRecuperation.TheRapyXghAudit',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyXghAudit');
SELECT @inclusive_therapy_v3_menu_schoolAudit,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'校工会审核','menu','/platform/inclusiveTherapyV3?screen=schoolAudit','_self','fa fa-heart',1,0,'inclusiveTherapyV3.TheRapyXghAudit',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyXghAudit');
-- 分工会查询
SET @staff_therapy_menu_branchQuery = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyQuery' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_branchQuery = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyQuery' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_branchQuery,@staff_therapy_menu_root,@staff_therapy_next_path,'分工会查询','menu','/platform/staffTherapyRecuperation?screen=branchQuery','_self','fa fa-heart',1,0,'staffTherapyRecuperation.TheRapyQuery',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyQuery');
SELECT @inclusive_therapy_v3_menu_branchQuery,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'分工会查询','menu','/platform/inclusiveTherapyV3?screen=branchQuery','_self','fa fa-heart',1,0,'inclusiveTherapyV3.TheRapyQuery',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyQuery');
-- 报名人员查询
SET @staff_therapy_menu_userQuery = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyUserQuery' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_userQuery = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyUserQuery' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_userQuery,@staff_therapy_menu_root,@staff_therapy_next_path,'报名人员查询','menu','/platform/staffTherapyRecuperation?screen=userQuery','_self','fa fa-heart',1,0,'staffTherapyRecuperation.TheRapyUserQuery',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.TheRapyUserQuery');
SELECT @inclusive_therapy_v3_menu_userQuery,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'报名人员查询','menu','/platform/inclusiveTherapyV3?screen=userQuery','_self','fa fa-heart',1,0,'inclusiveTherapyV3.TheRapyUserQuery',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyUserQuery');
-- 查询统计
SET @staff_therapy_menu_queryStatistics = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.queryStatics' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_queryStatistics = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.queryStatics' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_queryStatistics,@staff_therapy_menu_root,@staff_therapy_next_path,'查询统计','menu','/platform/staffTherapyRecuperation?screen=queryStatistics','_self','fa fa-heart',1,0,'staffTherapyRecuperation.queryStatics',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.queryStatics');
SELECT @inclusive_therapy_v3_menu_queryStatistics,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'查询统计','menu','/platform/inclusiveTherapyV3?screen=queryStatistics','_self','fa fa-heart',1,0,'inclusiveTherapyV3.queryStatics',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.queryStatics');
-- 线路统计
SET @staff_therapy_menu_lineStatistics = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.statistics' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_lineStatistics = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.statistics' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_lineStatistics,@staff_therapy_menu_root,@staff_therapy_next_path,'线路统计','menu','/platform/staffTherapyRecuperation?screen=lineStatistics','_self','fa fa-heart',1,0,'staffTherapyRecuperation.statistics',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.statistics');
SELECT @inclusive_therapy_v3_menu_lineStatistics,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'线路统计','menu','/platform/inclusiveTherapyV3?screen=lineStatistics','_self','fa fa-heart',1,0,'inclusiveTherapyV3.statistics',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.statistics');
-- 旅行社月度统计
SET @staff_therapy_menu_agencyStatistics = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.travelAgencyMonthlyStatistics' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_agencyStatistics = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.travelAgencyMonthlyStatistics' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_agencyStatistics,@staff_therapy_menu_root,@staff_therapy_next_path,'旅行社月度统计','menu','/platform/staffTherapyRecuperation?screen=agencyStatistics','_self','fa fa-heart',1,0,'staffTherapyRecuperation.travelAgencyMonthlyStatistics',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.travelAgencyMonthlyStatistics');
SELECT @inclusive_therapy_v3_menu_agencyStatistics,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'旅行社月度统计','menu','/platform/inclusiveTherapyV3?screen=agencyStatistics','_self','fa fa-heart',1,0,'inclusiveTherapyV3.travelAgencyMonthlyStatistics',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.travelAgencyMonthlyStatistics');
-- 分工会线路数量统计
SET @staff_therapy_menu_unionStatistics = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.unionLineNumberStatistics' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_unionStatistics = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.unionLineNumberStatistics' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_unionStatistics,@staff_therapy_menu_root,@staff_therapy_next_path,'分工会线路数量统计','menu','/platform/staffTherapyRecuperation?screen=unionStatistics','_self','fa fa-heart',1,0,'staffTherapyRecuperation.unionLineNumberStatistics',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.unionLineNumberStatistics');
SELECT @inclusive_therapy_v3_menu_unionStatistics,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'分工会线路数量统计','menu','/platform/inclusiveTherapyV3?screen=unionStatistics','_self','fa fa-heart',1,0,'inclusiveTherapyV3.unionLineNumberStatistics',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.unionLineNumberStatistics');
SET @staff_therapy_menu_signup = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.signup' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SELECT CONCAT(@staff_therapy_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@staff_therapy_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@staff_therapy_root_path))=@staff_therapy_root_path
SET @inclusive_therapy_v3_menu_signup = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.signup' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_signup,@staff_therapy_menu_root,@staff_therapy_next_path,'疗休养报名','menu','/platform/staffTherapyRecuperation?screen=signup','_self','fa fa-heart',1,0,'staffTherapyRecuperation.signup',
@staff_therapy_next_location,0,'pc',@staff_therapy_pc_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.signup');
SELECT @inclusive_therapy_v3_menu_signup,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'疗休养报名','menu','/platform/inclusiveTherapyV3?screen=signup','_self','fa fa-heart',1,0,'inclusiveTherapyV3.signup',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.signup');
SET @staff_therapy_menu_mobile = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.mobile' LIMIT 1),REPLACE(UUID(),'-',''));
SET @staff_therapy_next_path = (
SET @inclusive_therapy_v3_menu_mobile = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.mobile' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT('',LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=4
);
SET @staff_therapy_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @staff_therapy_menu_mobile,'',@staff_therapy_next_path,'惠普疗休养V3','menu','/platform/staffTherapyRecuperation/mobile/index','_self','fa fa-heart',1,0,'staffTherapyRecuperation.mobile',
@staff_therapy_next_location,0,'h5',@staff_therapy_h5_module,'',@staff_therapy_now,'',@staff_therapy_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='staffTherapyRecuperation.mobile');
SELECT @inclusive_therapy_v3_menu_mobile,'',@inclusive_therapy_v3_next_path,'普惠疗休养V3','menu','/platform/inclusiveTherapyV3/mobile/index','_self','fa fa-heart',1,0,'inclusiveTherapyV3.mobile',
@inclusive_therapy_v3_next_location,0,'h5',@inclusive_therapy_v3_h5_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.mobile');
INSERT INTO `sys_role_menu` (`roleId`,`menuId`)
SELECT r.`id`,m.`id` FROM `sys_role` r CROSS JOIN `sys_menu` m
WHERE r.`disabled`=0 AND r.`code` IN ('sysadmin','superadmin','A06','SchoolUnionMemberAdmin','SYSADMIN','SCHOOL_UNION_ADMIN','SCHOOL_UNION_WELFARE_ADMIN','SCHOOL_UNION_MEMBER_ADMIN')
AND m.`permission` IN ('staffTherapyRecuperation','staffTherapyRecuperation.TheRapyConfig','staffTherapyRecuperation.travelAgency','staffTherapyRecuperation.line','staffTherapyRecuperation.TheBaseManagement','staffTherapyRecuperation.lineFghSelect','staffTherapyRecuperation.lineXghSelect','staffTherapyRecuperation.lineSelectionOverview','staffTherapyRecuperation.lineCluster','staffTherapyRecuperation.line.adjustment','staffTherapyRecuperation.joinUser.import','staffTherapyRecuperation.TheRapyAudit','staffTherapyRecuperation.TheRapyTravelAudit','staffTherapyRecuperation.TheRapyXghAudit','staffTherapyRecuperation.TheRapyQuery','staffTherapyRecuperation.TheRapyUserQuery','staffTherapyRecuperation.queryStatics','staffTherapyRecuperation.statistics','staffTherapyRecuperation.travelAgencyMonthlyStatistics','staffTherapyRecuperation.unionLineNumberStatistics')
AND m.`permission` IN ('inclusiveTherapyV3','inclusiveTherapyV3.TheRapyConfig','inclusiveTherapyV3.travelAgency','inclusiveTherapyV3.line','inclusiveTherapyV3.TheBaseManagement','inclusiveTherapyV3.lineFghSelect','inclusiveTherapyV3.lineXghSelect','inclusiveTherapyV3.lineSelectionOverview','inclusiveTherapyV3.lineCluster','inclusiveTherapyV3.line.adjustment','inclusiveTherapyV3.joinUser.import','inclusiveTherapyV3.TheRapyAudit','inclusiveTherapyV3.TheRapyTravelAudit','inclusiveTherapyV3.TheRapyXghAudit','inclusiveTherapyV3.TheRapyQuery','inclusiveTherapyV3.TheRapyUserQuery','inclusiveTherapyV3.queryStatics','inclusiveTherapyV3.statistics','inclusiveTherapyV3.travelAgencyMonthlyStatistics','inclusiveTherapyV3.unionLineNumberStatistics')
AND NOT EXISTS (SELECT 1 FROM `sys_role_menu` rel WHERE rel.`roleId`=r.`id` AND rel.`menuId`=m.`id`);
INSERT INTO `sys_role_menu` (`roleId`,`menuId`)
SELECT r.`id`,m.`id` FROM `sys_role` r CROSS JOIN `sys_menu` m
WHERE r.`disabled`=0 AND r.`code` IN ('H03','H04','H06','BRANCH_UNION_ADMIN','BRANCH_UNION_CHAIRMAN')
AND m.`permission` IN ('staffTherapyRecuperation','staffTherapyRecuperation.line','staffTherapyRecuperation.TheBaseManagement','staffTherapyRecuperation.lineFghSelect','staffTherapyRecuperation.lineSelectionOverview','staffTherapyRecuperation.lineCluster','staffTherapyRecuperation.line.adjustment','staffTherapyRecuperation.TheRapyAudit','staffTherapyRecuperation.TheRapyTravelAudit','staffTherapyRecuperation.TheRapyQuery')
AND m.`permission` IN ('inclusiveTherapyV3','inclusiveTherapyV3.line','inclusiveTherapyV3.TheBaseManagement','inclusiveTherapyV3.lineFghSelect','inclusiveTherapyV3.lineSelectionOverview','inclusiveTherapyV3.lineCluster','inclusiveTherapyV3.line.adjustment','inclusiveTherapyV3.TheRapyAudit','inclusiveTherapyV3.TheRapyTravelAudit','inclusiveTherapyV3.TheRapyQuery')
AND NOT EXISTS (SELECT 1 FROM `sys_role_menu` rel WHERE rel.`roleId`=r.`id` AND rel.`menuId`=m.`id`);
INSERT INTO `sys_role_menu` (`roleId`,`menuId`)
SELECT r.`id`,m.`id` FROM `sys_role` r CROSS JOIN `sys_menu` m
WHERE r.`disabled`=0 AND r.`code` IN ('public','PUBLIC','MEMBER','sysadmin','superadmin','SYSADMIN')
AND m.`permission` IN ('staffTherapyRecuperation','staffTherapyRecuperation.signup','staffTherapyRecuperation.mobile')
AND m.`permission` IN ('inclusiveTherapyV3','inclusiveTherapyV3.signup','inclusiveTherapyV3.mobile')
AND NOT EXISTS (SELECT 1 FROM `sys_role_menu` rel WHERE rel.`roleId`=r.`id` AND rel.`menuId`=m.`id`);
COMMIT;
@@ -65,9 +65,9 @@ const nation = [
const uploadFileType = ['jpg', 'png', 'doc', 'docx', 'xls', 'xlsx', 'pdf']
const docType = ['doc', 'docx', 'xls', 'xlsx', 'pdf']
const FILE_UPLOAD_ADDRESS = '/platform/staffTherapyRecuperation/common/uploadFile'
const FILE_DELETE_ADDRESS = '/platform/staffTherapyRecuperation/common/deleteFile'
const FILE_STREAM_PREVIEW_ADDRESS = '/platform/staffTherapyRecuperation/common/preview'
const FILE_UPLOAD_ADDRESS = '/platform/inclusiveTherapyV3/common/uploadFile'
const FILE_DELETE_ADDRESS = '/platform/inclusiveTherapyV3/common/deleteFile'
const FILE_STREAM_PREVIEW_ADDRESS = '/platform/inclusiveTherapyV3/common/preview'
Vue.component('m-page-loading', httpVueLoader('/components/staffbenefit/therapyRecuperation/mobile/MLoading.vue'))
Vue.component('m-table-loading', httpVueLoader('/components/staffbenefit/therapyRecuperation/mobile/MTableLoading.vue'))
@@ -1,10 +1,10 @@
const uploadFileType = ['jpg', 'png', 'doc', 'docx', 'xls', 'xlsx', 'pdf']
const docType = ['doc', 'docx', 'xls', 'xlsx', 'pdf']
const FILE_UPLOAD_ADDRESS = '/platform/staffTherapyRecuperation/common/uploadFile'
const FILE_DELETE_ADDRESS = '/platform/staffTherapyRecuperation/common/deleteFile'
const FILE_STREAM_PREVIEW_ADDRESS = '/platform/staffTherapyRecuperation/common/preview'
const FILE_STREAM_DOWNLOAD_ADDRESS = '/platform/staffTherapyRecuperation/common/download'
const FILE_UPLOAD_ADDRESS = '/platform/inclusiveTherapyV3/common/uploadFile'
const FILE_DELETE_ADDRESS = '/platform/inclusiveTherapyV3/common/deleteFile'
const FILE_STREAM_PREVIEW_ADDRESS = '/platform/inclusiveTherapyV3/common/preview'
const FILE_STREAM_DOWNLOAD_ADDRESS = '/platform/inclusiveTherapyV3/common/download'
const preview = async (filename, id) => {
const suffix = filename.substring(filename.lastIndexOf('.') + 1)
@@ -38,5 +38,5 @@ window.viewImage = Vue.prototype.$viewImage;
window.therapyPreview = function(value) {
if (!value) return '';
return /^(https?:|data:|blob:|\/)/.test(value) ? value :
'/platform/staffTherapyRecuperation/common/preview?id=' + encodeURIComponent(value);
'/platform/inclusiveTherapyV3/common/preview?id=' + encodeURIComponent(value);
};
@@ -3,7 +3,7 @@
* @returns {Promise<*>}
*/
const getEnumOptions = async (enumName) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/enumOptions", {enumName})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/enumOptions", {enumName})
return data
}
@@ -12,7 +12,7 @@ const getEnumOptions = async (enumName) => {
* @returns {Promise<*>}
*/
const getDictOptions = async (code) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/dictOptions", {code})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/dictOptions", {code})
return data
}
@@ -21,7 +21,7 @@ const getDictOptions = async (code) => {
* @returns {Promise<*>}
*/
const getDictState = async (code) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/dictState", {code})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/dictState", {code})
return data
}
@@ -30,7 +30,7 @@ const getDictState = async (code) => {
* @returns {Promise<*>}
*/
const getCampus = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getCampus")
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getCampus")
return data
}
@@ -40,19 +40,19 @@ const getCampus = async () => {
* @returns {Promise<*>}
*/
const getDbt = async (jdhId) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getDbt", {jdhId})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getDbt", {jdhId})
return data
}
//查询当前用户管理的院级工会
const getUnion = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getUnion")
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getUnion")
return data
}
//查询当前用户管理的院级工会下的单位
const getUnit = async (unionid) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getUnit", {unionid: unionid})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getUnit", {unionid: unionid})
return data
}
@@ -61,7 +61,7 @@ const getUnit = async (unionid) => {
* @returns {Promise<*>}
*/
const getGroup = async (jdhId) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getGroup", {jdhId})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getGroup", {jdhId})
return data
}
@@ -76,7 +76,7 @@ const getOpenJdh = async () => {
* @returns {Promise<*>}
*/
const getUnions = async (delegationId = null, isPermission = false) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/unions", {delegationId, isPermission})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/unions", {delegationId, isPermission})
return data
}
@@ -94,12 +94,12 @@ const getActivityUnions = async () => {
* @returns {Promise<*>}
*/
const getUnits = async (unionId = null) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/units", {unionId})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/units", {unionId})
return data
}
const getClubUnits = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getClubUnits", {})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getClubUnits", {})
return data
}
@@ -118,7 +118,7 @@ const getActivityUnits = async (unionId) => {
* @returns {Promise<*>}
*/
const getUnionUnits = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/unionUnits")
const {data} = await $.get("/platform/inclusiveTherapyV3/common/unionUnits")
return data
}
@@ -127,7 +127,7 @@ const getUnionUnits = async () => {
* @returns {Promise<*>}
*/
const getWelfareUnits = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/welfareUnits")
const {data} = await $.get("/platform/inclusiveTherapyV3/common/welfareUnits")
return data
}
@@ -136,7 +136,7 @@ const getWelfareUnits = async () => {
* @returns {Promise<*>}
*/
const getUnitsByWelfareUnit = async (welfareUnitId) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/unitsByWelfareUnit", {welfareUnitId})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/unitsByWelfareUnit", {welfareUnitId})
return data
}
@@ -145,7 +145,7 @@ const getUnitsByWelfareUnit = async (welfareUnitId) => {
* @returns {Promise<*>}
*/
const getClubs = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/clubs", {})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/clubs", {})
return data
}
@@ -154,7 +154,7 @@ const getClubs = async () => {
* @returns {Promise<*>}
*/
const getJc = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getJcByDict")
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getJcByDict")
return data
}
@@ -163,7 +163,7 @@ const getJc = async () => {
* @returns {Promise<*>}
*/
const getClubsByRole = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getClubsByRole", {})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getClubsByRole", {})
return data
}
/**
@@ -171,7 +171,7 @@ const getClubsByRole = async () => {
* @returns {Promise<*>}
*/
const getClubsByUser = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getClubsByUser", {})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getClubsByUser", {})
return data
}
@@ -180,7 +180,7 @@ const getClubsByUser = async () => {
* @returns {Promise<*>}
*/
const getFileType = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getFileTypeByDict")
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getFileTypeByDict")
return data
}
@@ -189,7 +189,7 @@ const getFileType = async () => {
* @returns {Promise<*>}
*/
const getJcgbJs = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getJcgbJsByDict")
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getJcgbJsByDict")
return data
}
@@ -198,7 +198,7 @@ const getJcgbJs = async () => {
* @returns {Promise<*>}
*/
const getSpyJs = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getSpyJsByDict")
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getSpyJsByDict")
return data
}
@@ -207,7 +207,7 @@ const getSpyJs = async () => {
* @returns {Promise<*>}
*/
const getClubType = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getClubTypeByDict")
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getClubTypeByDict")
return data
}
@@ -216,7 +216,7 @@ const getClubType = async () => {
* @returns {Promise<*>}
*/
const getSystemName = async () => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getSystemNameByDict")
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getSystemNameByDict")
return data
}
@@ -225,7 +225,7 @@ const getSystemName = async () => {
* @returns {Promise<*>}
*/
const getGdh = async (open = true) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getGdh", {open})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getGdh", {open})
return data
}
@@ -243,7 +243,7 @@ const getGdhDbt = async (jdhId) => {
* @returns {Promise<*>}
*/
const queryUserByIds = async (ids) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/queryUserByIds", {ids: JSON.stringify(ids)})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/queryUserByIds", {ids: JSON.stringify(ids)})
return data
}
@@ -252,7 +252,7 @@ const queryUserByIds = async (ids) => {
* @returns {Promise<*>}
*/
const queryUserById = async (id) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/queryUserById", {id: id})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/queryUserById", {id: id})
return data
}
@@ -266,7 +266,7 @@ const queryUserById = async (id) => {
* @returns {Promise<*>}
*/
const searchUser = async (query, unionId = null, unitId = null, sex = null, member = null) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/searchUser", {
const {data} = await $.get("/platform/inclusiveTherapyV3/common/searchUser", {
query,
unionId,
unitId,
@@ -326,11 +326,11 @@ const getNowLxyHd = async () => {
* @returns {Promise<*>}
*/
const getUnionList = async (unionId) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/unionList", {unionId})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/unionList", {unionId})
return data
}
const threeUnitsByUnionGroupOrUnitId = async (unitId, groupId) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/threeUnitsByUnionGroupOrUnitId", {
const {data} = await $.get("/platform/inclusiveTherapyV3/common/threeUnitsByUnionGroupOrUnitId", {
unitId,
groupId
})
@@ -338,7 +338,7 @@ const threeUnitsByUnionGroupOrUnitId = async (unitId, groupId) => {
}
const unionGroupsByUnionId = async (unionId) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/unionGroupsByUnionId", {unionId})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/unionGroupsByUnionId", {unionId})
return data
}
@@ -388,7 +388,7 @@ const getLocationVariable = (variable) => {
}
const getConfigKey = async (key) => {
const {data} = await $.get('/platform/staffTherapyRecuperation/common/getValue', {key})
const {data} = await $.get('/platform/inclusiveTherapyV3/common/getValue', {key})
return data
}
@@ -397,7 +397,7 @@ const getConfigKey = async (key) => {
* @returns {Promise<*>}
*/
const getUnitByUnions = async (unionId = null) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getUnitsByUnions", {unionId})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getUnitsByUnions", {unionId})
return data
}
@@ -408,7 +408,7 @@ const getUnitByUnions = async (unionId = null) => {
* @returns {Promise<*>}
*/
const getThreeUnitsByUnionGroupsOrUnitIds = async (unitId, groupId) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getThreeUnitsByUnionGroupsOrUnitIds", {
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getThreeUnitsByUnionGroupsOrUnitIds", {
unitId,
groupId
})
@@ -421,6 +421,6 @@ const getThreeUnitsByUnionGroupsOrUnitIds = async (unitId, groupId) => {
* @returns {Promise<*>}
*/
const getUnionGroupsByUnions = async (unionId) => {
const {data} = await $.get("/platform/staffTherapyRecuperation/common/getUnionGroupsByUnions", {unionId})
const {data} = await $.get("/platform/inclusiveTherapyV3/common/getUnionGroupsByUnions", {unionId})
return data
}
@@ -84,7 +84,7 @@ module.exports = {
this.findOne(id)
},
async findOne(id) {
const res = await $.get('/platform/staffTherapyRecuperation/baseManagement/selectBaseManageById/' + id)
const res = await $.get('/platform/inclusiveTherapyV3/baseManagement/selectBaseManageById/' + id)
if (res.code === 0) {
this.viewData = res.data
}
@@ -160,7 +160,7 @@ module.exports = {
methods: {
async findOne(id) {
this.loading = true
const resp = await $.get("/platform/staffTherapyRecuperation/TheRapyAudit/findOne", {id})
const resp = await $.get("/platform/inclusiveTherapyV3/TheRapyAudit/findOne", {id})
this.loading = false
if (resp.code === 0) {
this.viewData = resp.data.viewData
@@ -179,7 +179,7 @@ module.exports = {
this.activeName = activeName
},
async getConfigData() {
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const resp = await $.get('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
this.configData = resp.data
},
},
@@ -3,7 +3,7 @@
<div v-if="view">
<a v-for="file in files" :key="file.id || file.filepath" :href="file.filepath || preview(file.id)" target="_blank" style="display:block">{{ file.filename || file.name }}</a>
</div>
<el-upload v-else action="/platform/staffTherapyRecuperation/common/uploadFile" name="file"
<el-upload v-else action="/platform/inclusiveTherapyV3/common/uploadFile" name="file"
:limit="max" :multiple="max > 1" :file-list="fileList" :drag="card"
:before-upload="beforeUpload" :on-success="success" :on-remove="remove" :on-preview="open">
<el-button size="small" type="primary">选择文件</el-button>
@@ -1,5 +1,5 @@
<template>
<el-upload action="/platform/staffTherapyRecuperation/common/uploadFile" name="file" list-type="picture-card"
<el-upload action="/platform/inclusiveTherapyV3/common/uploadFile" name="file" list-type="picture-card"
:file-list="fileList" :limit="limit" :before-upload="beforeUpload"
:on-success="success" :on-remove="remove" :on-preview="open"
:style="{'--therapy-width': width + 'px', '--therapy-height': height + 'px'}">
@@ -107,7 +107,7 @@ module.exports = {
this.findOne(lineId, usUnionId, mode, year)
},
async findOne(id, unionId, mode, year) {
const resp = await $.get('/platform/staffTherapyRecuperation/line/selectLineInfoById/' + id)
const resp = await $.get('/platform/inclusiveTherapyV3/line/selectLineInfoById/' + id)
if (resp.code === 0) {
this.viewData = resp.data
//校工会创建 分工会选择 所以每个分工会的活动时间会不一样
@@ -120,7 +120,7 @@ module.exports = {
}
},
async findUnionSelectLineData(lineId, unionId, mode, year) {
const resp = await $.post('/platform/staffTherapyRecuperation/lineFghSelect/selectLineInfo', {
const resp = await $.post('/platform/inclusiveTherapyV3/lineFghSelect/selectLineInfo', {
lineId: lineId,
unionId: unionId,
mode: mode,
@@ -134,7 +134,7 @@ module.exports = {
methods: {
async findOne(id) {
this.loading = true
const resp = await $.get("/platform/staffTherapyRecuperation/TheRapyAudit/findOne", {id})
const resp = await $.get("/platform/inclusiveTherapyV3/TheRapyAudit/findOne", {id})
this.loading = false
if (resp.code === 0) {
this.viewData = resp.data.viewData
@@ -650,7 +650,7 @@ module.exports = {
this.fileList = val.map(v => {
let url = ''
if (this.resolvingShowByFileName(v.filename) == 1) {
url = APP_DOMAIN + '/platform/staffTherapyRecuperation/common/preview?id=' + v.id
url = APP_DOMAIN + '/platform/inclusiveTherapyV3/common/preview?id=' + v.id
console.log(url)
return {data: v, url, isImage: true, file: {name: v.filename}, status: 'success'}
}
@@ -625,7 +625,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
},
methods: {
async validateLine() {
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/validSignUpInfo'
const resp = await $.post('/platform/inclusiveTherapyV3/line/enroll/validSignUpInfo'
, {enroll: JSON.stringify(this.editFormData)})
if (resp.code !== 0) {
this.$message.warning(resp.msg)
@@ -654,7 +654,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
type: 'warning',
callback: async (a, b) => {
if ("confirm" === a) {//确认后再执行
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/doDeleteMyEnrollInfoById/' + row.id)
const resp = await $.post('/platform/inclusiveTherapyV3/line/enroll/doDeleteMyEnrollInfoById/' + row.id)
if (resp.code === 0) {
await this.doSearch()
this.$message.success('删除成功')
@@ -669,7 +669,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
async openModify(row) {
this.getUnionSelectLine(row.takePartInLineId)
this.editFormData = {};
const resp = await $.get("/platform/staffTherapyRecuperation/TheRapyAudit/findOne", {id: row.id})
const resp = await $.get("/platform/inclusiveTherapyV3/TheRapyAudit/findOne", {id: row.id})
if (resp.code === 0) {
this.editFormData = {...resp.data.viewData}
if (this.modifyConfig.familyInfo == 2) {
@@ -700,7 +700,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.$message.warning('请选择线路')
return
}
const resp = await $.post('/platform/staffTherapyRecuperation/user/query/doEdit', this.editFormData)
const resp = await $.post('/platform/inclusiveTherapyV3/user/query/doEdit', this.editFormData)
if (resp.code === 0) {
this.$notify.success(resp.msg)
this.editVisible = false
@@ -717,7 +717,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
if (!data) {
return
}
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyXghAudit/getLinePlayTimeByLineId', {
const resp = await $.get('/platform/inclusiveTherapyV3/TheRapyXghAudit/getLinePlayTimeByLineId', {
lineId: data.id,
year: this.pageForm.year,
signUpMode: 1,
@@ -946,13 +946,13 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.takePartInLines = await this.getXlByUnion()
},
async getModifyConfig() {
const res = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const res = await $.post('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
if (res.code === 0) {
this.modifyConfig = res.data
}
},
async getUnionSelectLine(disPlayUnionSelectId = null) {
const resp = await $.post('/platform/staffTherapyRecuperation/user/query/getUnionSelectLine', {
const resp = await $.post('/platform/inclusiveTherapyV3/user/query/getUnionSelectLine', {
startYear: this.pageForm.year,
signUpMode: 1,
disPlayUnionSelectId: disPlayUnionSelectId
@@ -499,7 +499,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
},
methods: {
async getAgencyList() {
const {data} = await $.post("/platform/staffTherapyRecuperation/travelAgency/selectTravelAgencyByYears", {
const {data} = await $.post("/platform/inclusiveTherapyV3/travelAgency/selectTravelAgencyByYears", {
startYear: this.pageForm.startYear,
endYear: this.pageForm.endYear
})
@@ -527,7 +527,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
type: 'warning',
callback: async (a, b) => {
if ("confirm" === a) {//确认后再执行
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/doDeleteMyEnrollInfoById/' + row.id)
const resp = await $.post('/platform/inclusiveTherapyV3/line/enroll/doDeleteMyEnrollInfoById/' + row.id)
if (resp.code === 0) {
await this.doSearch()
this.$message.success('删除成功')
@@ -541,7 +541,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
},
async openModify(row) {
this.editFormData = {};
const resp = await $.get("/platform/staffTherapyRecuperation/TheRapyAudit/findOne", {id: row.id})
const resp = await $.get("/platform/inclusiveTherapyV3/TheRapyAudit/findOne", {id: row.id})
if (resp.code === 0) {
this.editFormData = {...resp.data.viewData}
if (this.modifyConfig.familyInfo == 2) {
@@ -572,7 +572,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.$message.warning('请选择线路')
return
}
const resp = await $.post('/platform/staffTherapyRecuperation/user/query/doEdit', this.editFormData)
const resp = await $.post('/platform/inclusiveTherapyV3/user/query/doEdit', this.editFormData)
if (resp.code === 0) {
this.$notify.success(resp.msg)
this.editVisible = false
@@ -785,7 +785,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
await this.getApplyNumAudit()
},
async getModifyConfig() {
const res = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const res = await $.post('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
if (res.code === 0) {
this.modifyConfig = res.data
}
@@ -621,7 +621,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
},
methods: {
async validateLine() {
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/validSignUpInfo'
const resp = await $.post('/platform/inclusiveTherapyV3/line/enroll/validSignUpInfo'
, {enroll: JSON.stringify(this.editFormData)})
if (resp.code !== 0) {
this.$message.warning(resp.msg)
@@ -650,7 +650,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
type: 'warning',
callback: async (a, b) => {
if ("confirm" === a) {//确认后再执行
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/doDeleteMyEnrollInfoById/' + row.id)
const resp = await $.post('/platform/inclusiveTherapyV3/line/enroll/doDeleteMyEnrollInfoById/' + row.id)
if (resp.code === 0) {
await this.doSearch()
this.$message.success('删除成功')
@@ -665,7 +665,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
async openModify(row) {
this.getUnionSelectLine(row.takePartInLineId)
this.editFormData = {};
const resp = await $.get("/platform/staffTherapyRecuperation/TheRapyAudit/findOne", {id: row.id})
const resp = await $.get("/platform/inclusiveTherapyV3/TheRapyAudit/findOne", {id: row.id})
if (resp.code === 0) {
this.editFormData = {...resp.data.viewData}
if (this.modifyConfig.familyInfo == 2) {
@@ -696,7 +696,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.$message.warning('请选择线路')
return
}
const resp = await $.post('/platform/staffTherapyRecuperation/user/query/doEdit', this.editFormData)
const resp = await $.post('/platform/inclusiveTherapyV3/user/query/doEdit', this.editFormData)
if (resp.code === 0) {
this.$notify.success(resp.msg)
this.editVisible = false
@@ -735,7 +735,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async getLineSignNumber() {
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyXghAudit/getLineNumber', this.pageForm)
const resp = await $.get('/platform/inclusiveTherapyV3/TheRapyXghAudit/getLineNumber', this.pageForm)
this.lineSignNumber = resp.data
},
async doOnekeyAudit(flag, adjustment) {
@@ -897,7 +897,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
* @returns {Promise<void>}
*/
async getBmUserUnion() {
const {data} = await $.post("/platform/staffTherapyRecuperation/TheRapyAudit/getBmUserUnion")
const {data} = await $.post("/platform/inclusiveTherapyV3/TheRapyAudit/getBmUserUnion")
this.unionOptions = data
},
async getXlByUnion() {
@@ -942,13 +942,13 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.takePartInLines = await this.getXlByUnion()
},
async getModifyConfig() {
const res = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const res = await $.post('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
if (res.code === 0) {
this.modifyConfig = res.data
}
},
async getUnionSelectLine(disPlayUnionSelectId = null) {
const resp = await $.post('/platform/staffTherapyRecuperation/user/query/getUnionSelectLine', {
const resp = await $.post('/platform/inclusiveTherapyV3/user/query/getUnionSelectLine', {
startYear: this.pageForm.year,
//signUpMode: 1,
disPlayUnionSelectId: disPlayUnionSelectId
@@ -356,7 +356,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-timeline-item timestamp="下载模板" placement="top">
<el-card>
<el-button size="medium" type=""
@click="location.href='/platform/staffTherapyRecuperation/baseManagement/exportTemplate'"
@click="location.href='/platform/inclusiveTherapyV3/baseManagement/exportTemplate'"
icon="el-icon-download">下载模板
</el-button>
@@ -529,7 +529,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
await this.pageData();
},
async selectTravelAgencyList() {
const resp = await $.post('/platform/staffTherapyRecuperation/travelAgency/selectTravelAgency', {year: this.formData.year})
const resp = await $.post('/platform/inclusiveTherapyV3/travelAgency/selectTravelAgency', {year: this.formData.year})
this.travelAgencyList = resp.data
},
async openAdd() {
@@ -623,7 +623,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
await this.selectTravelAgencyList()
},
async getModifyBd() {
const res = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const res = await $.post('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
if (res.code === 0) {
this.modifyBdList = res.data.lots
// this.modifyBdList.forEach((v, i) => {
@@ -502,7 +502,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-timeline-item timestamp="下载模板" placement="top">
<el-card>
<el-button size="medium" type=""
@click="location.href='/platform/staffTherapyRecuperation/line/exportTemplate'"
@click="location.href='/platform/inclusiveTherapyV3/line/exportTemplate'"
icon="el-icon-download">下载模板
</el-button>
@@ -551,7 +551,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-timeline-item timestamp="下载模板" placement="top">
<el-card>
<el-button size="medium" type=""
@click="location.href='/platform/staffTherapyRecuperation/line/exportPageFieldsTemplate'"
@click="location.href='/platform/inclusiveTherapyV3/line/exportPageFieldsTemplate'"
icon="el-icon-download">下载模板
</el-button>
</el-card>
@@ -830,9 +830,9 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
type: 'warning'
}).then(async () => {
if ("${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('sysadmin')||@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('A06')}" === 'true') {
sublime.jumpPagePjax('/platform/staffTherapyRecuperation/lineXghSelect?mode=2')
sublime.jumpPagePjax('/platform/inclusiveTherapyV3/lineXghSelect?mode=2')
} else {
sublime.jumpPagePjax('/platform/staffTherapyRecuperation/lineFghSelect?mode=1')
sublime.jumpPagePjax('/platform/inclusiveTherapyV3/lineFghSelect?mode=1')
}
}).catch(() => {
this.$refs.guava.index()
@@ -874,7 +874,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.$set(this.formData, "content", content || "")
},
async selectTravelAgencyList() {
const resp = await $.post('/platform/staffTherapyRecuperation/travelAgency/selectTravelAgency', {year: this.formData.year})
const resp = await $.post('/platform/inclusiveTherapyV3/travelAgency/selectTravelAgency', {year: this.formData.year})
this.travelAgencyList = resp.data
},
yearChange() {
@@ -913,7 +913,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async getConfig() {
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const resp = await $.get('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
if (resp.code === 0) {
this.config = resp.data
} else {
@@ -925,7 +925,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.travelAgencyOptions = data
},
async getLotList() {
const {data} = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const {data} = await $.post('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
this.lotList = data.lots
},
openImport() {
@@ -1023,7 +1023,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async getModifyConfig() {
const res = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const res = await $.post('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
if (res.code === 0) {
this.modifyConfig = res.data
}
@@ -234,7 +234,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-timeline-item timestamp="下载模板" placement="top">
<el-card>
<el-button size="medium" type=""
@click="location.href='/platform/staffTherapyRecuperation/common/downloadTemplate?filePath=travel/TravelAgencyImport.xlsx&fileName=旅行社导入模板.xls'"
@click="location.href='/platform/inclusiveTherapyV3/common/downloadTemplate?filePath=travel/TravelAgencyImport.xlsx&fileName=旅行社导入模板.xls'"
icon="el-icon-download">下载模板
</el-button>
@@ -1,5 +1,5 @@
<!--#
layout("/layouts/platform.html"){
#-->
<iframe src="${therapyPageUrl,escape}" title="职工疗休养" style="width:100%;height:calc(100vh - 100px);border:0;background:#fff"></iframe>
<iframe src="${therapyPageUrl,escape}" title="普惠疗休养V3" style="width:100%;height:calc(100vh - 100px);border:0;background:#fff"></iframe>
<!--# } #-->
@@ -283,15 +283,15 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<!--# if(@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('H04')){ #-->
<template>
<el-button icon="el-icon-s-promotion"
@click="location.href='/platform/staffTherapyRecuperation/query/exportDeclareForm'"
@click="location.href='/platform/inclusiveTherapyV3/query/exportDeclareForm'"
size="small" type="primary">申报表导出
</el-button>
<el-button icon="el-icon-s-promotion"
@click="location.href='/platform/staffTherapyRecuperation/query/exportTravelers?year=' + pageForm.year"
@click="location.href='/platform/inclusiveTherapyV3/query/exportTravelers?year=' + pageForm.year"
size="small" type="primary">出行人员导出
</el-button>
<el-button icon="el-icon-s-promotion"
@click="location.href='/platform/staffTherapyRecuperation/query/exportSignUser?year=' + pageForm.year"
@click="location.href='/platform/inclusiveTherapyV3/query/exportSignUser?year=' + pageForm.year"
size="small" type="primary">本分工会报名人员导出
</el-button>
</template>
@@ -706,7 +706,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-timeline-item timestamp="下载模板" placement="top">
<el-card>
<el-button size="small" type=""
@click="location.href='/platform/staffTherapyRecuperation/common/downloadTemplate?filePath=travel/TravelEnrollImport.xlsx&fileName=参加人员导入模板.xls'"
@click="location.href='/platform/inclusiveTherapyV3/common/downloadTemplate?filePath=travel/TravelEnrollImport.xlsx&fileName=参加人员导入模板.xls'"
icon="el-icon-download">下载模板
</el-button>
</el-card>
@@ -1020,7 +1020,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
type: 'warning',
callback: async (a, b) => {
if ("confirm" === a) {//确认后再执行
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/doModify/' + row.id)
const resp = await $.post('/platform/inclusiveTherapyV3/line/enroll/doModify/' + row.id)
if (resp.code === 0) {
await this.doSearch()
this.$message.success('调整成功')
@@ -1054,7 +1054,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
callback: async (a, b) => {
debugger
if ("confirm" === a) {//确认后再执行
const resp = await $.post('/platform/staffTherapyRecuperation/user/query/doReimbursement',{data:JSON.stringify(enrollIds)})
const resp = await $.post('/platform/inclusiveTherapyV3/user/query/doReimbursement',{data:JSON.stringify(enrollIds)})
if (resp.code === 0) {
await this.doSearch()
this.$refs.table.clearSelection();
@@ -1079,7 +1079,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
if (!data) {
return
}
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyXghAudit/getLinePlayTimeByLineId', {
const resp = await $.get('/platform/inclusiveTherapyV3/TheRapyXghAudit/getLinePlayTimeByLineId', {
lineId: data.id,
year: this.pageForm.year,
signUpMode: 1,
@@ -1089,7 +1089,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async validateLine() {
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/validSignUpInfo'
const resp = await $.post('/platform/inclusiveTherapyV3/line/enroll/validSignUpInfo'
, {enroll: JSON.stringify(this.editFormData)})
if (resp.code !== 0) {
this.$message.warning(resp.msg)
@@ -1104,7 +1104,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
type: 'warning',
callback: async (a, b) => {
if ("confirm" === a) {//确认后再执行
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/doDeleteMyEnrollInfoById/' + row.id)
const resp = await $.post('/platform/inclusiveTherapyV3/line/enroll/doDeleteMyEnrollInfoById/' + row.id)
if (resp.code === 0) {
await this.doSearch()
this.$message.success('删除成功')
@@ -1134,7 +1134,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.$message.warning('请选择线路')
return
}
const resp = await $.post('/platform/staffTherapyRecuperation/user/query/doEdit', this.editFormData)
const resp = await $.post('/platform/inclusiveTherapyV3/user/query/doEdit', this.editFormData)
if (resp.code === 0) {
this.$notify.success(resp.msg)
this.editVisible = false
@@ -1147,7 +1147,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
},
async openEdit(row) {
this.editFormData = {};
const resp = await $.get("/platform/staffTherapyRecuperation/TheRapyAudit/findOne", {id: row.id})
const resp = await $.get("/platform/inclusiveTherapyV3/TheRapyAudit/findOne", {id: row.id})
if (resp.code === 0) {
this.editFormData = {...resp.data.viewData}
if (this.modifyConfig.familyInfo == 2) {
@@ -1312,7 +1312,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
linePlayTime,
} = this.pageForm
let types = this.pageForm.state == 1 ? JSON.stringify(['line']) : JSON.stringify(['travel'])
window.open("/platform/staffTherapyRecuperation/user/query/doExport?" +
window.open("/platform/inclusiveTherapyV3/user/query/doExport?" +
"searchName=" + searchName +
"&searchKeyword=" + searchKeyword +
"&startYear=" + year +
@@ -1341,7 +1341,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
linePlayTime,
} = this.pageForm
let types = this.pageForm.state == 1 ? JSON.stringify(['line']) : JSON.stringify(['travel'])
window.open("/platform/staffTherapyRecuperation/user/query/doExportExcel?" +
window.open("/platform/inclusiveTherapyV3/user/query/doExportExcel?" +
"searchName=" + searchName +
"&searchKeyword=" + searchKeyword +
"&startYear=" + year +
@@ -1415,7 +1415,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
const pageForm = clone(this.pageFormUser)
pageForm.id = this.applyUserRow.id
pageForm.unionId = this.unionId
let url = this.pageForm.state === '1' ? '/platform/staffTherapyRecuperation/line/selectLineUser' : '/platform/staffTherapyRecuperation/query/selectAgencyUser'
let url = this.pageForm.state === '1' ? '/platform/inclusiveTherapyV3/line/selectLineUser' : '/platform/inclusiveTherapyV3/query/selectAgencyUser'
$.post(url, pageForm)
.then((data) => {
if (data.code == 0) {
@@ -1579,7 +1579,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
await this.doSearch()
},
async getXlByUnion() {
const {data} = await $.post("/platform/staffTherapyRecuperation/TheRapyAudit/getXlByUnion", {
const {data} = await $.post("/platform/inclusiveTherapyV3/TheRapyAudit/getXlByUnion", {
unionId: this.pageForm.unionId,
year: this.pageForm.year,
state: this.pageForm.state2
@@ -1587,13 +1587,13 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.takePartInLines = data
},
async getAgencyList() {
const {data} = await $.post("/platform/staffTherapyRecuperation/travelAgency/selectTravelAgency", {
const {data} = await $.post("/platform/inclusiveTherapyV3/travelAgency/selectTravelAgency", {
year: this.pageForm.year
})
this.agencyLists = data
},
async getJdList() {
const {data} = await $.post("/platform/staffTherapyRecuperation/baseManagement/listAllBase", this.pageForm.year)
const {data} = await $.post("/platform/inclusiveTherapyV3/baseManagement/listAllBase", this.pageForm.year)
this.jdList = data
},
getLxsData() {
@@ -1657,7 +1657,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
* @returns {Promise<void>}
*/
async getBmUserUnion() {
const {data} = await $.post("/platform/staffTherapyRecuperation/TheRapyAudit/getBmUserUnion")
const {data} = await $.post("/platform/inclusiveTherapyV3/TheRapyAudit/getBmUserUnion")
this.unionOptions = data
},
/**
@@ -1682,7 +1682,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
return d ? d.label : null
},
async getApplyNumAudit() {
const {data} = await $.post("/platform/staffTherapyRecuperation/TheRapyAudit/getApplyNumAudit", this.pageForm)
const {data} = await $.post("/platform/inclusiveTherapyV3/TheRapyAudit/getApplyNumAudit", this.pageForm)
this.options2 = [
{label: "本工会人员(自己线路)" + data.count1 + "人", value: "1"},
{label: "本工会人员(其他路线)" + data.count2 + "人", value: "2"},
@@ -1691,7 +1691,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
]
},
async getModifyConfig() {
const res = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const res = await $.post('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
if (res.code === 0) {
this.modifyConfig = res.data
}
@@ -1714,7 +1714,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
});
this.importLoading = true
const resp = await $.post('/platform/staffTherapyRecuperation/user/query/enrollImport', data)
const resp = await $.post('/platform/inclusiveTherapyV3/user/query/enrollImport', data)
if (resp.code === 0) {
await this.pageData();
this.importVisible = false
@@ -1728,7 +1728,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.pageData();
},
async getUnionSelectLine() {
const resp = await $.post('/platform/staffTherapyRecuperation/user/query/getUnionSelectLine', {
const resp = await $.post('/platform/inclusiveTherapyV3/user/query/getUnionSelectLine', {
year: this.pageForm.year,
signUpMode: 1,
})
@@ -392,7 +392,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-timeline-item timestamp="下载模板" placement="top">
<el-card>
<el-button size="medium" type=""
@click="location.href='/platform/staffTherapyRecuperation/common/downloadTemplate?filePath=travel/TravelEnrollImport.xlsx&fileName=参加人员导入模板.xls'"
@click="location.href='/platform/inclusiveTherapyV3/common/downloadTemplate?filePath=travel/TravelEnrollImport.xlsx&fileName=参加人员导入模板.xls'"
icon="el-icon-download">下载模板
</el-button>
</el-card>
@@ -1020,7 +1020,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
type: 'warning',
callback: async (a, b) => {
if ("confirm" === a) {//确认后再执行
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/doModify/' + row.id)
const resp = await $.post('/platform/inclusiveTherapyV3/line/enroll/doModify/' + row.id)
if (resp.code === 0) {
await this.doSearch()
this.$message.success('调整成功')
@@ -1101,7 +1101,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
"&linePlayTime=" + linePlayTime)
},
async validateLine() {
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/validSignUpInfo'
const resp = await $.post('/platform/inclusiveTherapyV3/line/enroll/validSignUpInfo'
, {enroll: JSON.stringify(this.editFormData)})
if (resp.code !== 0) {
this.$message.warning(resp.msg)
@@ -1120,7 +1120,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.$message.warning('请选择线路')
return
}
const resp = await $.post('/platform/staffTherapyRecuperation/user/query/doEdit', this.editFormData)
const resp = await $.post('/platform/inclusiveTherapyV3/user/query/doEdit', this.editFormData)
if (resp.code === 0) {
this.$notify.success(resp.msg)
this.editVisible = false
@@ -1134,7 +1134,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
async openEdit(row) {
this.getUnionSelectLine(row.takePartInLineId)
this.editFormData = {};
const resp = await $.get("/platform/staffTherapyRecuperation/TheRapyAudit/findOne", {id: row.id})
const resp = await $.get("/platform/inclusiveTherapyV3/TheRapyAudit/findOne", {id: row.id})
if (resp.code === 0) {
this.editFormData = {...resp.data.viewData}
if (this.modifyConfig.familyInfo == 2) {
@@ -1173,7 +1173,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
type: 'warning',
callback: async (a, b) => {
if ("confirm" === a) {//确认后再执行
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/doDeleteMyEnrollInfoById/' + row.id)
const resp = await $.post('/platform/inclusiveTherapyV3/line/enroll/doDeleteMyEnrollInfoById/' + row.id)
if (resp.code === 0) {
await this.doSearch()
this.$message.success('删除成功')
@@ -1240,7 +1240,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.notifyWarning("请检查【" + arr.toString() + "】条数据后在提交")
return
}
const refs = await $.post("/platform/staffTherapyRecuperation/query/doAttend", {data: JSON.stringify(this.multipleSelection)})
const refs = await $.post("/platform/inclusiveTherapyV3/query/doAttend", {data: JSON.stringify(this.multipleSelection)})
if (refs.code === 0) {
this.notifySuccess(refs.msg);
await this.doSearch()
@@ -1263,7 +1263,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
},
async getJdList() {
const {data} = await $.post("/platform/staffTherapyRecuperation/baseManagement/listAllBase", this.pageForm)
const {data} = await $.post("/platform/inclusiveTherapyV3/baseManagement/listAllBase", this.pageForm)
this.jdList = data
},
async checkState(type) {
@@ -1340,7 +1340,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async getLines() {
const {data} = await $.post("/platform/staffTherapyRecuperation/travelAgency/selectLineByAgencyId", {
const {data} = await $.post("/platform/inclusiveTherapyV3/travelAgency/selectLineByAgencyId", {
agencyId: this.pageForm.agencyId
})
this.takePartInLines = data
@@ -1360,7 +1360,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
getXlByUnion() {
return $.post("/platform/staffTherapyRecuperation/TheRapyAudit/getXlByUnion", {
return $.post("/platform/inclusiveTherapyV3/TheRapyAudit/getXlByUnion", {
unionId: this.pageForm.unionId,
year: this.pageForm.startYear,
endYear: this.pageForm.endYear,
@@ -1378,7 +1378,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
})
},
getAgencyList() {
return $.post("/platform/staffTherapyRecuperation/travelAgency/selectTravelAgencyByYears", {
return $.post("/platform/inclusiveTherapyV3/travelAgency/selectTravelAgencyByYears", {
startYear: this.pageForm.startYear,
endYear: this.pageForm.endYear
}).then((res) => {
@@ -1398,7 +1398,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
await this.doSearch()
},
async getXlLxsUserCount() {
const {data} = await $.post("/platform/staffTherapyRecuperation/user/query/getXlLxsUserCount", {
const {data} = await $.post("/platform/inclusiveTherapyV3/user/query/getXlLxsUserCount", {
unionId: this.pageForm.unionId,
startYear: this.pageForm.startYear,
endYear: this.pageForm.endYear,
@@ -1417,7 +1417,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
},
async getModifyConfig() {
const res = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const res = await $.post('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
if (res.code === 0) {
this.modifyConfig = res.data
}
@@ -1464,7 +1464,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.pageData();
},
async getUnionSelectLine(disPlayUnionSelectId = null) {
const resp = await $.post('/platform/staffTherapyRecuperation/user/query/getUnionSelectLine', {
const resp = await $.post('/platform/inclusiveTherapyV3/user/query/getUnionSelectLine', {
startYear: this.pageForm.startYear,
endYear: this.pageForm.endYear,
disPlayUnionSelectId: disPlayUnionSelectId
@@ -286,7 +286,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
},
methods: {
async getLotList() {
const {data} = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const {data} = await $.post('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
this.lotList = data.lots
},
getRowClassName({row, rowIndex}) {
@@ -420,7 +420,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async lineStatusChange(id) {
const resp = await $.post('/platform/staffTherapyRecuperation/line/openClosedLine/' + id)
const resp = await $.post('/platform/inclusiveTherapyV3/line/openClosedLine/' + id)
if (resp.code === 0) {
this.notifySuccess(resp.msg)
} else {
@@ -428,7 +428,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async getConfigData() {
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const resp = await $.get('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
this.configData = resp.data
},
},
@@ -787,7 +787,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.doSearch()
},
async getLotList() {
const {data} = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const {data} = await $.post('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
this.$set(this, 'configData', data || {})
this.lotList = data && data.lots ? data.lots : []
},
@@ -853,7 +853,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.multipleSelection = val;
},
async selectTravelAgencyList() {
const resp = await $.post('/platform/staffTherapyRecuperation/travelAgency/selectTravelAgency', {year: this.pageForm.year})
const resp = await $.post('/platform/inclusiveTherapyV3/travelAgency/selectTravelAgency', {year: this.pageForm.year})
this.travelAgencyList = resp.data
},
async doEditOpen(row) {
@@ -517,7 +517,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
callback()
return
}
$.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
$.post('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
.then((resp) => {
if (resp.code === 0) {
this.$set(this, 'therapyConfig', resp.data || {})
@@ -570,7 +570,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.$message.warning('未找到可统赋时间的线路记录!')
return
}
$.post('/platform/staffTherapyRecuperation/statistics/setGiveLineTimes', {
$.post('/platform/inclusiveTherapyV3/statistics/setGiveLineTimes', {
lineUnionSelectIds: JSON.stringify(lineUnionSelectIds),
lineUnionSelects: JSON.stringify(this.giveLineTimesData.times)
}).then((resp) => {
@@ -599,7 +599,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
regionalNature,
travelAgencyId,
} = this.pageForm
window.open("/platform/staffTherapyRecuperation/user/query/doExport?" +
window.open("/platform/inclusiveTherapyV3/user/query/doExport?" +
"startYear=" + startYear +
"&endYear=" + endYear +
"&unionId=" + unionId +
@@ -638,7 +638,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
type: 'warning',
dangerouslyUseHTMLString: true
}).then(async () => {
const resp = await $.post('/platform/staffTherapyRecuperation/statistics/sendSuccess', {id: row.lineUId})
const resp = await $.post('/platform/inclusiveTherapyV3/statistics/sendSuccess', {id: row.lineUId})
if (resp.code === 0) {
this.$message.success(resp.msg)
} else {
@@ -653,7 +653,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
type: 'warning',
dangerouslyUseHTMLString: true
}).then(async () => {
const resp = await $.post('/platform/staffTherapyRecuperation/statistics/sendFail', {id: row.lineUId})
const resp = await $.post('/platform/inclusiveTherapyV3/statistics/sendFail', {id: row.lineUId})
if (resp.code === 0) {
this.$message.success(resp.msg)
} else {
@@ -684,7 +684,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
return
}
this.tableLoading = true
$.post('/platform/staffTherapyRecuperation/statistics/sendGroupMail', {
$.post('/platform/inclusiveTherapyV3/statistics/sendGroupMail', {
lineUnionSelectIds: JSON.stringify(lineUnionSelectIds)
}).then((resp) => {
if (resp.code === 0) {
@@ -706,7 +706,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
$.post('/platform/staffTherapyRecuperation/statistics/resendFailNotice')
$.post('/platform/inclusiveTherapyV3/statistics/resendFailNotice')
.then((resp) => {
if (resp.code === 0) {
this.$message.success(resp.msg)
@@ -733,7 +733,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.getUserDataByLineId(row)
},
getUnionSelectLine() {
return $.post('/platform/staffTherapyRecuperation/user/query/getUnionSelectLine', {
return $.post('/platform/inclusiveTherapyV3/user/query/getUnionSelectLine', {
startYear: this.pageForm.startYear,
endYear: this.pageForm.endYear,
signUpMode: this.pageForm.signUpMode,
@@ -748,7 +748,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
})
},
getAgencyList() {
return $.post('/platform/staffTherapyRecuperation/travelAgency/selectTravelAgencyByYears', {
return $.post('/platform/inclusiveTherapyV3/travelAgency/selectTravelAgencyByYears', {
startYear: this.pageForm.startYear,
endYear: this.pageForm.endYear
}).then((res) => {
@@ -759,7 +759,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
})
},
async getModifyConfig() {
const res = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const res = await $.post('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
if (res.code === 0) {
this.modifyConfig = res.data
}
@@ -339,7 +339,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
travelAudit: 0,
lots: [],
unionLineNumberConfigs: [],
configName: '智慧工会疗休养配置',
configName: '普惠疗休养V3配置',
// 报名时间范围对应后台 signUpStartTime/signUpEndTime 两个字段。
signUpStartTime: null,
signUpEndTime: null,
@@ -200,7 +200,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="职工疗休养-酒店介绍"></van-nav-bar>
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="普惠疗休养V3-酒店介绍"></van-nav-bar>
</van-sticky>
<!--线路详情-->
@@ -513,7 +513,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
cloneData.companionList.splice(index, 1)
}
})
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/doSignUpForBaseManagement', {
const resp = await $.post('/platform/inclusiveTherapyV3/line/enroll/doSignUpForBaseManagement', {
enroll: JSON.stringify(cloneData),
})
setTimeout(() => {
@@ -528,7 +528,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
toast.clear()
}, resp.code === 0 ? 500 : 3000)
if (resp.code === 0) {
location.href = '/platform/staffTherapyRecuperation/mobile/myRecuperation?index=' + this.index
location.href = '/platform/inclusiveTherapyV3/mobile/myRecuperation?index=' + this.index
}
}, 1000)
},
@@ -539,7 +539,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
this.formData.companionList.splice(this.active, 1)
},
async join() {
const re = await $.post('/platform/staffTherapyRecuperation/line/enroll/validSignUpInfo', {
const re = await $.post('/platform/inclusiveTherapyV3/line/enroll/validSignUpInfo', {
enroll: JSON.stringify({
takePartInBaseManagementId: this.baseData.id,
isNormal: this.baseData.isNormal,
@@ -570,7 +570,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
this.joinPopup = true
},
async getData() {
const res = await $.get('/platform/staffTherapyRecuperation/baseManagement/selectBaseAllInfo', {
const res = await $.get('/platform/inclusiveTherapyV3/baseManagement/selectBaseAllInfo', {
id: this.id
})
if (res.code === 0) {
@@ -598,7 +598,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
},
//修改时查询报名信息,进行回显
async findSignUpInfoById() {
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/findSignUpInfoById/' + this.enrollId)
const res = await $.post('/platform/inclusiveTherapyV3/line/enroll/findSignUpInfoById/' + this.enrollId)
if (res.code === 0) {
this.formData = res.data
if (this.formData.bedInfo === null) {
@@ -615,7 +615,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
}
},
async getConfigData() {
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const resp = await $.get('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
this.configData = resp.data
},
},
@@ -40,7 +40,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="职工疗休养"></van-nav-bar>
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="普惠疗休养V3"></van-nav-bar>
</van-sticky>
<!--顶部轮播图-->
@@ -95,10 +95,10 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
return
}*/
localStorage.setItem("clickIndex", JSON.stringify({clickIndex: index}))
location.href = '/platform/staffTherapyRecuperation/mobile/mobileLineListPage'
location.href = '/platform/inclusiveTherapyV3/mobile/mobileLineListPage'
},
async getConfigData() {
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const resp = await $.get('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
this.configData = resp.data
},
},
@@ -222,7 +222,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
<van-sticky>
<van-nav-bar @click-left="history.go(-1)" fixed left-arrow placeholder
title="职工疗休养-线路介绍"></van-nav-bar>
title="普惠疗休养V3-线路介绍"></van-nav-bar>
</van-sticky>
<template v-if="isLoad">
@@ -617,9 +617,9 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
let url = ''
if(this.signType == '2') {
cloneData.takePartInTravelAgencyId = this.takePartInTravelAgencyId
url = '/platform/staffTherapyRecuperation/line/enroll/doSignUpForTravelAgency'
url = '/platform/inclusiveTherapyV3/line/enroll/doSignUpForTravelAgency'
} else {
url = '/platform/staffTherapyRecuperation/line/enroll/doSignUpForLine'
url = '/platform/inclusiveTherapyV3/line/enroll/doSignUpForLine'
}
const resp = await $.post(url, {
enroll: JSON.stringify(cloneData),
@@ -631,7 +631,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
setTimeout(() => {
toast.clear()
}, 500)
location.replace('/platform/staffTherapyRecuperation/mobile/myRecuperation?index=' + this.index)
location.replace('/platform/inclusiveTherapyV3/mobile/myRecuperation?index=' + this.index)
} else {
toast.clear()
vant.Dialog.alert({
@@ -695,7 +695,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
this.formData.companionList.splice(this.active, 1)
},
async join() {
const re = await $.post('/platform/staffTherapyRecuperation/line/enroll/validSignUpInfo', {
const re = await $.post('/platform/inclusiveTherapyV3/line/enroll/validSignUpInfo', {
enroll: JSON.stringify({
id: this.enrollId,
isNormal: this.lineData.isNormal,
@@ -710,7 +710,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
message: re.msg,
confirmButtonText: '跳转页面',
}).then(() => {
location.href = '/platform/staffTherapyRecuperation/mobile/myRecuperation?index=' + this.index
location.href = '/platform/inclusiveTherapyV3/mobile/myRecuperation?index=' + this.index
}).catch(() => {
});
} else {
@@ -750,7 +750,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
this.joinPopup = true
},
async getData() {
const res = await $.get('/platform/staffTherapyRecuperation/line/enroll/selectLineAllInfo', {
const res = await $.get('/platform/inclusiveTherapyV3/line/enroll/selectLineAllInfo', {
usId: this.id,
usUnionId: this.takePartInUnionId,
year: this.queryYear
@@ -781,7 +781,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
},
//修改时查询报名信息,进行回显
async findSignUpInfoById() {
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/findSignUpInfoById/' + this.enrollId)
const res = await $.post('/platform/inclusiveTherapyV3/line/enroll/findSignUpInfoById/' + this.enrollId)
if (res.code === 0) {
this.formData = res.data
if (this.formData.bedInfo === null) {
@@ -798,7 +798,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
}
},
async getConfigData() {
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const resp = await $.get('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
this.configData = resp.data
},
},
@@ -633,7 +633,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
methods: {
async openSignUser(row, type) {
const id = type === 'line' ? row.usId : row.id
location.href = '/platform/staffTherapyRecuperation/mobile/userSignInfo?type=' + type + '&id=' + id
location.href = '/platform/inclusiveTherapyV3/mobile/userSignInfo?type=' + type + '&id=' + id
},
isValidDate(value) {
// 报名截止时间为空或格式无效时不展示,避免页面出现 Invalid date。
@@ -645,7 +645,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
await this.findOne(o)
return
}
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/getSelectLineById',
const resp = await $.post('/platform/inclusiveTherapyV3/line/enroll/getSelectLineById',
{
lineId: o.lineId,
usId: o.usId,
@@ -752,7 +752,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
this.getData()
},
async join(o) {
const re = await $.post('/platform/staffTherapyRecuperation/line/enroll/validSignUpInfo', {
const re = await $.post('/platform/inclusiveTherapyV3/line/enroll/validSignUpInfo', {
enroll: JSON.stringify({
takePartInTravelAgencyId: o.id,
}),
@@ -773,7 +773,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
const sendData = {
takePartInTravelAgencyId: o.id,
}
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/doSignUpForTravelAgency', {
const resp = await $.post('/platform/inclusiveTherapyV3/line/enroll/doSignUpForTravelAgency', {
enroll: JSON.stringify(sendData),
})
setTimeout(() => {
@@ -788,7 +788,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
toast.clear()
}, resp.code === 0 ? 500 : 3000)
if (resp.code === 0) {
location.href = '/platform/staffTherapyRecuperation/mobile/myRecuperation?index=' + this.pageForm.theRapyRecuperationType
location.href = '/platform/inclusiveTherapyV3/mobile/myRecuperation?index=' + this.pageForm.theRapyRecuperationType
}
}, 1000)
},
@@ -809,12 +809,12 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
const type = Number(this.pageForm.theRapyRecuperationType)
localStorage.setItem("clickIndex", JSON.stringify({clickIndex: type}))
if (type !== 2 && type !== 3) {
location.href = '/platform/staffTherapyRecuperation/mobile/lineInfo?id=' + o.usId + '&index=' + this.pageForm.theRapyRecuperationType
location.href = '/platform/inclusiveTherapyV3/mobile/lineInfo?id=' + o.usId + '&index=' + this.pageForm.theRapyRecuperationType
+ '&takePartInUnionId=' + o.takePartInUnionId
} else if (type === 3) {
location.href = '/platform/staffTherapyRecuperation/mobile/baseInfo?id=' + o.usId + '&index=' + this.pageForm.theRapyRecuperationType
location.href = '/platform/inclusiveTherapyV3/mobile/baseInfo?id=' + o.usId + '&index=' + this.pageForm.theRapyRecuperationType
} else if (type === 2) {
const re = await $.post('/platform/staffTherapyRecuperation/line/enroll/validSignUpInfo', {
const re = await $.post('/platform/inclusiveTherapyV3/line/enroll/validSignUpInfo', {
enroll: JSON.stringify({
takePartInTravelAgencyId: o.id,
}),
@@ -826,7 +826,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
})
return
}
location.href = '/platform/staffTherapyRecuperation/mobile/lineInfo?id=' + o.usId + '&index=' + this.pageForm.theRapyRecuperationType
location.href = '/platform/inclusiveTherapyV3/mobile/lineInfo?id=' + o.usId + '&index=' + this.pageForm.theRapyRecuperationType
+ '&takePartInUnionId=' + o.takePartInUnionId + '&signType=2' + '&takePartInTravelAgencyId=' + o.id
}
},
@@ -842,7 +842,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
},
async onLoad() {
// van-list 触底时按 pageNumber/pageSize 查询下一页,并追加到当前列表。
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/pageData', this.pageForm)
const res = await $.post('/platform/inclusiveTherapyV3/line/enroll/pageData', this.pageForm)
if (res.code === 0 && res.data) {
const list = res.data.list || []
@@ -864,20 +864,20 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
this.yearArray.unshift({value: null, text: '全部'})
},
async getTheRapyUnions() {
const resp = await $.get('/platform/staffTherapyRecuperation/line/enroll/getTheRapyUnions', {
const resp = await $.get('/platform/inclusiveTherapyV3/line/enroll/getTheRapyUnions', {
year: this.pageForm.year,
theRapyRecuperationType: this.pageForm.theRapyRecuperationType
})
return resp.data
},
async getModifyConfig() {
const res = await $.post('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const res = await $.post('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
if (res.code === 0) {
this.modifyConfig = res.data
}
},
async getSchoolTime() {
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/getSchoolTime')
const res = await $.post('/platform/inclusiveTherapyV3/line/enroll/getSchoolTime')
this.schoolTime = res.data
},
},
@@ -469,7 +469,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
return
}
}
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/doFeedBack', this.satisfactionForm)
const res = await $.post('/platform/inclusiveTherapyV3/line/enroll/doFeedBack', this.satisfactionForm)
if(res.code === 0) {
this.popVisible = false
vant.Toast('操作成功')
@@ -480,7 +480,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
},
async edit(o) {
if (this.pageForm.theRapyRecuperationType != '2' && this.pageForm.theRapyRecuperationType != '3') {
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/validSignUpInfo', {
const res = await $.post('/platform/inclusiveTherapyV3/line/enroll/validSignUpInfo', {
enroll: JSON.stringify({
takePartInLineId: o.takePartInLineId,
id: o.id,
@@ -489,17 +489,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
}),
})
if (res.code === 0) {
location.href = '/platform/staffTherapyRecuperation/mobile/lineInfo?id=' + o.takePartInLineId +
location.href = '/platform/inclusiveTherapyV3/mobile/lineInfo?id=' + o.takePartInLineId +
'&index=' + this.pageForm.theRapyRecuperationType + '&enrollId=' + o.id + '&fromUrlByMy=editDo' +
'&takePartInUnionId=' + o.takePartInUnionId
} else {
vant.Toast(res.msg)
}
} else if (this.pageForm.theRapyRecuperationType == '3') {
location.href = '/platform/staffTherapyRecuperation/mobile/baseInfo?id=' + o.takePartInBaseManagementId +
location.href = '/platform/inclusiveTherapyV3/mobile/baseInfo?id=' + o.takePartInBaseManagementId +
'&index=' + this.pageForm.theRapyRecuperationType + '&enrollId=' + o.id + '&fromUrlByMy=editDo'
} else if (this.pageForm.theRapyRecuperationType == '2') {
location.href = '/platform/staffTherapyRecuperation/mobile/lineInfo?enrollId=' + o.id + '&index=' + this.pageForm.theRapyRecuperationType
location.href = '/platform/inclusiveTherapyV3/mobile/lineInfo?enrollId=' + o.id + '&index=' + this.pageForm.theRapyRecuperationType
+ '&takePartInUnionId=' + o.takePartInUnionId + '&signType=2' + '&takePartInTravelAgencyId=' + o.takePartInTravelAgencyId
}
},
@@ -509,7 +509,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
return
}
if(this.pageForm.theRapyRecuperationType != '2') {
const re = await $.post('/platform/staffTherapyRecuperation/line/enroll/canDelete/' + o.id)
const re = await $.post('/platform/inclusiveTherapyV3/line/enroll/canDelete/' + o.id)
if(re.code !== 0) {
vant.Toast(re.msg)
return
@@ -519,7 +519,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
title: '温馨提醒',
message: '您确定要取消此报名吗?',
}).then(async () => {
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/doDeleteMyEnrollInfoById/' + o.id)
const res = await $.post('/platform/inclusiveTherapyV3/line/enroll/doDeleteMyEnrollInfoById/' + o.id)
if(res.code === 0) {
vant.Toast('取消成功')
this.getData()
@@ -530,7 +530,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
},
async findOne(o) {
if(this.pageForm.theRapyRecuperationType != '2') {
location.href = '/platform/staffTherapyRecuperation/mobile/lineInfo?id=' + o.takePartInLineId + '&fromUrlByMy=edit&takePartInUnionId=' + o.takePartInUnionId + '&queryYear=' + this.pageForm.year
location.href = '/platform/inclusiveTherapyV3/mobile/lineInfo?id=' + o.takePartInLineId + '&fromUrlByMy=edit&takePartInUnionId=' + o.takePartInUnionId + '&queryYear=' + this.pageForm.year
}
},
getData() {
@@ -540,7 +540,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
this.onLoad()
},
async onLoad() {
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/mySignUpPageData', this.pageForm)
const res = await $.post('/platform/inclusiveTherapyV3/line/enroll/mySignUpPageData', this.pageForm)
if (res.code === 0 && res.data) {
this.tableData = this.tableData.concat(res.data.list)
@@ -553,7 +553,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
this.loading = false
},
async getType() {
const res = await $.post('/platform/staffTherapyRecuperation/line/enroll/getType')
const res = await $.post('/platform/inclusiveTherapyV3/line/enroll/getType')
return res.data
},
createYear() {
@@ -562,7 +562,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
}
},
async getConfigData() {
const resp = await $.get('/platform/staffTherapyRecuperation/TheRapyConfig/findOne')
const resp = await $.get('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
this.configData = resp.data
},
},
@@ -66,7 +66,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/mobile.html"){
overlay: true,
message: '努力查询中',
})
const resp = await $.post('/platform/staffTherapyRecuperation/line/enroll/openSignUser', params)
const resp = await $.post('/platform/inclusiveTherapyV3/line/enroll/openSignUser', params)
this.signUserData = resp.data
toast.close()
},