Compare commits
2 Commits
e45372c335
...
9929d5ce80
Author | SHA1 | Date |
---|---|---|
|
9929d5ce80 | |
|
48543190cb |
|
@ -188,4 +188,4 @@ public class PasswordUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,6 @@ import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.modules.kc.grab.exports.entity.TBks;
|
|
||||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbbks;
|
import org.jeecg.modules.kc.grab.imports.entity.Xxhbbks;
|
||||||
import org.jeecg.modules.kc.grab.imports.service.IXxhbbksService;
|
import org.jeecg.modules.kc.grab.imports.service.IXxhbbksService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -22,126 +21,127 @@ import org.springframework.web.servlet.ModelAndView;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 同步数据表(bks)
|
* @Description: 同步数据表(bks)
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
* @Date: 2023-04-10
|
* @Date: 2023-04-10
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Api(tags="同步数据表(bks)")
|
@Api(tags = "同步数据表(bks)")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/grab/xxhbbks")
|
@RequestMapping("/grab/xxhbbks")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class XxhbbksController extends JeecgController<Xxhbbks, IXxhbbksService> {
|
public class XxhbbksController extends JeecgController<Xxhbbks, IXxhbbksService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IXxhbbksService xxhbbksService;
|
private IXxhbbksService xxhbbksService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页列表查询
|
|
||||||
*
|
|
||||||
* @param xxhbbks
|
|
||||||
* @param pageNo
|
|
||||||
* @param pageSize
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
//@AutoLog(value = "同步数据表(bks)-分页列表查询")
|
|
||||||
@ApiOperation(value="同步数据表(bks)-分页列表查询", notes="同步数据表(bks)-分页列表查询")
|
|
||||||
@GetMapping(value = "/list")
|
|
||||||
public Result<IPage<Xxhbbks>> queryPageList(Xxhbbks xxhbbks,
|
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
||||||
HttpServletRequest req) {
|
|
||||||
QueryWrapper<Xxhbbks> queryWrapper = QueryGenerator.initQueryWrapper(xxhbbks, req.getParameterMap());
|
|
||||||
Page<Xxhbbks> page = new Page<Xxhbbks>(pageNo, pageSize);
|
|
||||||
IPage<Xxhbbks> pageList = xxhbbksService.page(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加
|
|
||||||
*
|
|
||||||
* @param xxhbbks
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "同步数据表(bks)-添加")
|
|
||||||
@ApiOperation(value="同步数据表(bks)-添加", notes="同步数据表(bks)-添加")
|
|
||||||
@RequiresPermissions("grab:xxhbbks:add")
|
|
||||||
@PostMapping(value = "/add")
|
|
||||||
public Result<String> add(@RequestBody Xxhbbks xxhbbks) {
|
|
||||||
xxhbbksService.save(xxhbbks);
|
|
||||||
return Result.OK("添加成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
*
|
|
||||||
* @param xxhbbks
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "同步数据表(bks)-编辑")
|
|
||||||
@ApiOperation(value="同步数据表(bks)-编辑", notes="同步数据表(bks)-编辑")
|
|
||||||
@RequiresPermissions("grab:xxhbbks:edit")
|
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
|
||||||
public Result<String> edit(@RequestBody Xxhbbks xxhbbks) {
|
|
||||||
xxhbbksService.updateById(xxhbbks);
|
|
||||||
return Result.OK("编辑成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过id删除
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "同步数据表(bks)-通过id删除")
|
|
||||||
@ApiOperation(value="同步数据表(bks)-通过id删除", notes="同步数据表(bks)-通过id删除")
|
|
||||||
@RequiresPermissions("grab:xxhbbks:delete")
|
|
||||||
@DeleteMapping(value = "/delete")
|
|
||||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
|
||||||
xxhbbksService.removeById(id);
|
|
||||||
return Result.OK("删除成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
*
|
|
||||||
* @param ids
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "同步数据表(bks)-批量删除")
|
|
||||||
@ApiOperation(value="同步数据表(bks)-批量删除", notes="同步数据表(bks)-批量删除")
|
|
||||||
@RequiresPermissions("grab:xxhbbks:deleteBatch")
|
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
|
||||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
|
||||||
this.xxhbbksService.removeByIds(Arrays.asList(ids.split(",")));
|
|
||||||
return Result.OK("批量删除成功!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过id查询
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
//@AutoLog(value = "同步数据表(bks)-通过id查询")
|
|
||||||
@ApiOperation(value="同步数据表(bks)-通过id查询", notes="同步数据表(bks)-通过id查询")
|
|
||||||
@GetMapping(value = "/queryById")
|
|
||||||
public Result<Xxhbbks> queryById(@RequestParam(name="id",required=true) String id) {
|
|
||||||
Xxhbbks xxhbbks = xxhbbksService.getById(id);
|
|
||||||
if(xxhbbks==null) {
|
|
||||||
return Result.error("未找到对应数据");
|
|
||||||
}
|
|
||||||
return Result.OK(xxhbbks);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @param request
|
* @param xxhbbks
|
||||||
* @param xxhbbks
|
* @param pageNo
|
||||||
*/
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "同步数据表(bks)-分页列表查询")
|
||||||
|
@ApiOperation(value = "同步数据表(bks)-分页列表查询", notes = "同步数据表(bks)-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<Xxhbbks>> queryPageList(Xxhbbks xxhbbks,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<Xxhbbks> queryWrapper = QueryGenerator.initQueryWrapper(xxhbbks, req.getParameterMap());
|
||||||
|
Page<Xxhbbks> page = new Page<Xxhbbks>(pageNo, pageSize);
|
||||||
|
IPage<Xxhbbks> pageList = xxhbbksService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param xxhbbks
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "同步数据表(bks)-添加")
|
||||||
|
@ApiOperation(value = "同步数据表(bks)-添加", notes = "同步数据表(bks)-添加")
|
||||||
|
@RequiresPermissions("grab:xxhbbks:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody Xxhbbks xxhbbks) {
|
||||||
|
xxhbbksService.save(xxhbbks);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param xxhbbks
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "同步数据表(bks)-编辑")
|
||||||
|
@ApiOperation(value = "同步数据表(bks)-编辑", notes = "同步数据表(bks)-编辑")
|
||||||
|
@RequiresPermissions("grab:xxhbbks:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody Xxhbbks xxhbbks) {
|
||||||
|
xxhbbksService.updateById(xxhbbks);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "同步数据表(bks)-通过id删除")
|
||||||
|
@ApiOperation(value = "同步数据表(bks)-通过id删除", notes = "同步数据表(bks)-通过id删除")
|
||||||
|
@RequiresPermissions("grab:xxhbbks:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
|
xxhbbksService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "同步数据表(bks)-批量删除")
|
||||||
|
@ApiOperation(value = "同步数据表(bks)-批量删除", notes = "同步数据表(bks)-批量删除")
|
||||||
|
@RequiresPermissions("grab:xxhbbks:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
|
this.xxhbbksService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "同步数据表(bks)-通过id查询")
|
||||||
|
@ApiOperation(value = "同步数据表(bks)-通过id查询", notes = "同步数据表(bks)-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<Xxhbbks> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
|
Xxhbbks xxhbbks = xxhbbksService.getById(id);
|
||||||
|
if (xxhbbks == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(xxhbbks);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param xxhbbks
|
||||||
|
*/
|
||||||
@RequiresPermissions("grab:xxhbbks:exportXls")
|
@RequiresPermissions("grab:xxhbbks:exportXls")
|
||||||
@RequestMapping(value = "/exportXls")
|
@RequestMapping(value = "/exportXls")
|
||||||
public ModelAndView exportXls(HttpServletRequest request, Xxhbbks xxhbbks) {
|
public ModelAndView exportXls(HttpServletRequest request, Xxhbbks xxhbbks) {
|
||||||
|
@ -149,12 +149,12 @@ public class XxhbbksController extends JeecgController<Xxhbbks, IXxhbbksService>
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过excel导入数据
|
* 通过excel导入数据
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @param response
|
* @param response
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("grab:xxhbbks:importExcel")
|
@RequiresPermissions("grab:xxhbbks:importExcel")
|
||||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
@ -162,20 +162,30 @@ public class XxhbbksController extends JeecgController<Xxhbbks, IXxhbbksService>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@AutoLog(value = "获取本科生选课人员信息")
|
||||||
|
@ApiOperation(value = "获取本科生选课人员信息", notes = "获取本科生选课人员信息")
|
||||||
|
@GetMapping(value = "/getXsxkbList")
|
||||||
|
public Result<?> getXsxkbList(Xxhbbks xxhbbks,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<Xxhbbks> queryWrapper = QueryGenerator.initQueryWrapper(xxhbbks, req.getParameterMap());
|
||||||
|
queryWrapper.apply("a.xh = b.xh");
|
||||||
|
queryWrapper.eq(StringUtils.isNotBlank(xxhbbks.getRwbh()), "b.KCAPZBBH", xxhbbks.getRwbh());
|
||||||
|
Page<Xxhbbks> page = new Page<Xxhbbks>(pageNo, pageSize);
|
||||||
|
IPage<Xxhbbks> pageList = xxhbbksService.getXsxkbList(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
@AutoLog(value = "获取本科生选课人员信息")
|
/**
|
||||||
@ApiOperation(value="获取本科生选课人员信息", notes="获取本科生选课人员信息")
|
* 获取选课人员
|
||||||
@GetMapping(value = "/getXsxkbList")
|
* @param rwbh 任务编号
|
||||||
public Result<?> getXsxkbList(Xxhbbks xxhbbks,
|
*
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
* 获取任务编号下的所有选课人员
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
* @return
|
||||||
HttpServletRequest req) {
|
*/
|
||||||
QueryWrapper<Xxhbbks> queryWrapper = QueryGenerator.initQueryWrapper(xxhbbks, req.getParameterMap());
|
@PostMapping(value = "/getXKRY")
|
||||||
queryWrapper.apply("a.xh = b.xh");
|
public Result<List<Xxhbbks>> getXKRY(@RequestBody String rwbh) {
|
||||||
queryWrapper.eq(StringUtils.isNotBlank(xxhbbks.getRwbh()),"b.KCAPZBBH",xxhbbks.getRwbh());
|
return Result.OK(xxhbbksService.getXKRY(rwbh));
|
||||||
Page<Xxhbbks> page = new Page<Xxhbbks>(pageNo, pageSize);
|
}
|
||||||
IPage<Xxhbbks> pageList = xxhbbksService.getXsxkbList(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,4 +23,6 @@ public interface XxhbbksMapper extends BaseMapper<Xxhbbks> {
|
||||||
IPage<Xxhbbks> getXsxkbList(Page<Xxhbbks> page,@Param(Constants.WRAPPER) QueryWrapper<Xxhbbks> queryWrapper);
|
IPage<Xxhbbks> getXsxkbList(Page<Xxhbbks> page,@Param(Constants.WRAPPER) QueryWrapper<Xxhbbks> queryWrapper);
|
||||||
|
|
||||||
List<Xxhbbks> getXsxkbAllList(@Param(Constants.WRAPPER) QueryWrapper<Xxhbbks> queryWrapper);
|
List<Xxhbbks> getXsxkbAllList(@Param(Constants.WRAPPER) QueryWrapper<Xxhbbks> queryWrapper);
|
||||||
|
|
||||||
|
List<Xxhbbks> getXKRY(@Param("rwbh") String rwbh);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,4 +18,11 @@
|
||||||
select a.* from xxhbbks a ,xxhbxsxkb b
|
select a.* from xxhbbks a ,xxhbxsxkb b
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
|
||||||
|
<select id="getXKRY" resultType="org.jeecg.modules.kc.grab.imports.entity.Xxhbbks">
|
||||||
|
select bks.xh,bks.xm
|
||||||
|
from xxhbxsxkb xkb
|
||||||
|
left join xxhbbks bks on xkb.xh = bks.xh
|
||||||
|
where xkb.KCAPZBBH = #{rwbh}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -37,4 +37,6 @@ public interface IXxhbbksService extends IService<Xxhbbks> {
|
||||||
IPage<Xxhbbks> getXsxkbList(Page<Xxhbbks> page, QueryWrapper<Xxhbbks> queryWrapper);
|
IPage<Xxhbbks> getXsxkbList(Page<Xxhbbks> page, QueryWrapper<Xxhbbks> queryWrapper);
|
||||||
|
|
||||||
List<Xxhbbks> getXsxkbAllList(QueryWrapper<Xxhbbks> queryWrapper);
|
List<Xxhbbks> getXsxkbAllList(QueryWrapper<Xxhbbks> queryWrapper);
|
||||||
|
|
||||||
|
List<Xxhbbks> getXKRY(String rwbh);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,4 +52,9 @@ public class XxhbbksServiceImpl extends ServiceImpl<XxhbbksMapper, Xxhbbks> impl
|
||||||
public List<Xxhbbks> getXsxkbAllList(QueryWrapper<Xxhbbks> queryWrapper) {
|
public List<Xxhbbks> getXsxkbAllList(QueryWrapper<Xxhbbks> queryWrapper) {
|
||||||
return baseMapper.getXsxkbAllList(queryWrapper);
|
return baseMapper.getXsxkbAllList(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Xxhbbks> getXKRY(String rwbh) {
|
||||||
|
return baseMapper.getXKRY(rwbh);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -353,4 +353,9 @@ public class WjxDjxxController extends JeecgController<WjxDjxx, IWjxDjxxService>
|
||||||
return Result.OK(res);
|
return Result.OK(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/upZbcs")
|
||||||
|
public Result<Integer> upZbcs(@RequestBody WjxDjxx wjxDjxx) {
|
||||||
|
return Result.OK(wjxDjxxService.upZbcs(wjxDjxx));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,4 +130,6 @@ public class WjxDjxx {
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String isFinished;
|
private String isFinished;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "作弊次数(单次考试作弊行为发生总次数)")
|
||||||
|
private int zbcs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,4 +72,6 @@ public interface WjxDjxxMapper extends BaseMapper<WjxDjxx> {
|
||||||
|
|
||||||
|
|
||||||
void updateDjxxTmxxFwqpath(WjxDjxxTmxx wjxDjxxTmxx);
|
void updateDjxxTmxxFwqpath(WjxDjxxTmxx wjxDjxxTmxx);
|
||||||
|
|
||||||
|
int upZbcs(@Param("dto") WjxDjxx wjxDjxx);
|
||||||
}
|
}
|
||||||
|
|
|
@ -439,6 +439,12 @@
|
||||||
where jid = #{jid}
|
where jid = #{jid}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="upZbcs">
|
||||||
|
update wjx_djxx
|
||||||
|
set zbcs = (select count(id) from wjx_djxx_fzbtj where type in (1,2,3) and vid = #{dto.vid} and create_by = #{dto.createBy} )
|
||||||
|
where vid = #{dto.vid} and create_by = #{dto.createBy}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<select id="getSfysj" resultType="org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmxx">
|
<select id="getSfysj" resultType="org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmxx">
|
||||||
select * from wjx_djxx_tmxx where vid = #{wjxDjxxTmxx.vid} and jid = #{wjxDjxxTmxx.jid} and wj_index = #{wjxDjxxTmxx.wjIndex} and item_index = #{wjxDjxxTmxx.itemIndex}
|
select * from wjx_djxx_tmxx where vid = #{wjxDjxxTmxx.vid} and jid = #{wjxDjxxTmxx.jid} and wj_index = #{wjxDjxxTmxx.wjIndex} and item_index = #{wjxDjxxTmxx.itemIndex}
|
||||||
|
@ -447,4 +453,4 @@
|
||||||
<select id="getDjxxTmxxWjt" resultType="org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmxx">
|
<select id="getDjxxTmxxWjt" resultType="org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmxx">
|
||||||
select * from wjx_djxx_tmxx where jid = #{jid} and answer_text like concat('%','temp/','%')
|
select * from wjx_djxx_tmxx where jid = #{jid} and answer_text like concat('%','temp/','%')
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -47,4 +47,6 @@ public interface IWjxDjxxService extends IService<WjxDjxx> {
|
||||||
String updateDjjg(WjxDjxx wjxDjxx);
|
String updateDjjg(WjxDjxx wjxDjxx);
|
||||||
|
|
||||||
String getDjjg(WjxDjxx wjxDjxx);
|
String getDjjg(WjxDjxx wjxDjxx);
|
||||||
|
|
||||||
|
int upZbcs(WjxDjxx wjxDjxx);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
/**
|
/**
|
||||||
* @Description: 答卷信息
|
* @Description: 答卷信息
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
* @Date: 2024-05-07
|
* @Date: 2024-05-07
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@ -55,23 +55,24 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提交问卷,并查询答卷
|
* 提交问卷,并查询答卷
|
||||||
|
*
|
||||||
* @param list
|
* @param list
|
||||||
*/
|
*/
|
||||||
public String djtj(List<WjxDjxxTmlbPage> list){
|
public String djtj(List<WjxDjxxTmlbPage> list) {
|
||||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
String vid = list.get(0).getVid();
|
String vid = list.get(0).getVid();
|
||||||
if(vid==null || vid.equals("")){
|
if (vid == null || vid.equals("")) {
|
||||||
String mainId = list.get(0).getMainId();
|
String mainId = list.get(0).getMainId();
|
||||||
vid = baseMapper.findVid(mainId);
|
vid = baseMapper.findVid(mainId);
|
||||||
}
|
}
|
||||||
if(vid ==null || vid.equals("")){
|
if (vid == null || vid.equals("")) {
|
||||||
return "此试卷错误,无法提交!";
|
return "此试卷错误,无法提交!";
|
||||||
}
|
}
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
Date openTime = list.get(0).getOpenTime();
|
Date openTime = list.get(0).getOpenTime();
|
||||||
if(openTime == null){
|
if (openTime == null) {
|
||||||
Calendar c = Calendar.getInstance();
|
Calendar c = Calendar.getInstance();
|
||||||
c.add(Calendar.MINUTE,-2);
|
c.add(Calendar.MINUTE, -2);
|
||||||
openTime = c.getTime();
|
openTime = c.getTime();
|
||||||
}
|
}
|
||||||
WjxDjxx wds = new WjxDjxx();
|
WjxDjxx wds = new WjxDjxx();
|
||||||
|
@ -83,29 +84,29 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
wds.setCreateBy(user.getUsername());
|
wds.setCreateBy(user.getUsername());
|
||||||
wds.setCreateTime(date);
|
wds.setCreateTime(date);
|
||||||
StringBuffer submitDataSb = new StringBuffer();
|
StringBuffer submitDataSb = new StringBuffer();
|
||||||
for(WjxDjxxTmlbPage wjxDjxxTmlbPage:list){
|
for (WjxDjxxTmlbPage wjxDjxxTmlbPage : list) {
|
||||||
Integer WjIndex = wjxDjxxTmlbPage.getWjIndex();
|
Integer WjIndex = wjxDjxxTmlbPage.getWjIndex();
|
||||||
Integer wjType = wjxDjxxTmlbPage.getWjType();
|
Integer wjType = wjxDjxxTmlbPage.getWjType();
|
||||||
Integer wjSubtype = wjxDjxxTmlbPage.getWjSubtype();
|
Integer wjSubtype = wjxDjxxTmlbPage.getWjSubtype();
|
||||||
String itemSelected = "";
|
String itemSelected = "";
|
||||||
if(wjType == 3 || wjType == 4){
|
if (wjType == 3 || wjType == 4) {
|
||||||
itemSelected = wjxDjxxTmlbPage.getItemSelected().replaceAll(",","|").trim();
|
itemSelected = wjxDjxxTmlbPage.getItemSelected().replaceAll(",", "|").trim();
|
||||||
if(itemSelected == null || itemSelected.equals("null") || itemSelected.equals("")){
|
if (itemSelected == null || itemSelected.equals("null") || itemSelected.equals("")) {
|
||||||
itemSelected = "-3";
|
itemSelected = "-3";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(wjType == 5){
|
if (wjType == 5) {
|
||||||
itemSelected = wjxDjxxTmlbPage.getWjAnswer();
|
itemSelected = wjxDjxxTmlbPage.getWjAnswer();
|
||||||
if(itemSelected == null || itemSelected.equals("null") || itemSelected.equals("")){
|
if (itemSelected == null || itemSelected.equals("null") || itemSelected.equals("")) {
|
||||||
itemSelected = "(跳过)";
|
itemSelected = "(跳过)";
|
||||||
}
|
}
|
||||||
if(wjSubtype!= null ){
|
if (wjSubtype != null) {
|
||||||
if(wjSubtype==5){
|
if (wjSubtype == 5) {
|
||||||
itemSelected = "(跳过)";
|
itemSelected = "(跳过)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(wjType == 8){
|
if (wjType == 8) {
|
||||||
itemSelected = "-3";
|
itemSelected = "-3";
|
||||||
}
|
}
|
||||||
submitDataSb.append(WjIndex);
|
submitDataSb.append(WjIndex);
|
||||||
|
@ -114,49 +115,49 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
submitDataSb.append("}");
|
submitDataSb.append("}");
|
||||||
}
|
}
|
||||||
String submitData = submitDataSb.toString();
|
String submitData = submitDataSb.toString();
|
||||||
if(StringUtils.isNotEmpty(submitData)){
|
if (StringUtils.isNotEmpty(submitData)) {
|
||||||
submitData = submitData.substring(0,submitData.length()-1);
|
submitData = submitData.substring(0, submitData.length() - 1);
|
||||||
}
|
}
|
||||||
wds.setSubmitData(submitData);
|
wds.setSubmitData(submitData);
|
||||||
baseMapper.deleteDj(wds);
|
baseMapper.deleteDj(wds);
|
||||||
this.save(wds);
|
this.save(wds);
|
||||||
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("vid",Integer.valueOf(vid));
|
map.put("vid", Integer.valueOf(vid));
|
||||||
Long djys = ChronoUnit.SECONDS.between(wds.getOpenTime().toInstant(),wds.getCommitTime().toInstant());
|
Long djys = ChronoUnit.SECONDS.between(wds.getOpenTime().toInstant(), wds.getCommitTime().toInstant());
|
||||||
if(djys<3){
|
if (djys < 3) {
|
||||||
djys = 10L;
|
djys = 10L;
|
||||||
}
|
}
|
||||||
System.out.println("--------------------------------------------------");
|
System.out.println("--------------------------------------------------");
|
||||||
System.out.println("---------------djys--"+djys+"---------------------------");
|
System.out.println("---------------djys--" + djys + "---------------------------");
|
||||||
System.out.println("--------------------------------------------------");
|
System.out.println("--------------------------------------------------");
|
||||||
map.put("inputcosttime", djys);
|
map.put("inputcosttime", djys);
|
||||||
map.put("submitdata",submitData);
|
map.put("submitdata", submitData);
|
||||||
map.put("sojumpparm",user.getUsername());//自定义链接参数,用来透传用户ID
|
map.put("sojumpparm", user.getUsername());//自定义链接参数,用来透传用户ID
|
||||||
//调用接口,提交
|
//调用接口,提交
|
||||||
String result = wjxUtil.openapi(map,"1001001");
|
String result = wjxUtil.openapi(map, "1001001");
|
||||||
String jidRes = "";
|
String jidRes = "";
|
||||||
if(!result.equals("")){
|
if (!result.equals("")) {
|
||||||
JSONObject jsonResult = JSONObject.parseObject(result);
|
JSONObject jsonResult = JSONObject.parseObject(result);
|
||||||
if(jsonResult.getBoolean("result")){
|
if (jsonResult.getBoolean("result")) {
|
||||||
JSONObject dataJson = jsonResult.getJSONObject("data");
|
JSONObject dataJson = jsonResult.getJSONObject("data");
|
||||||
String vidRes = dataJson.getString("vid");
|
String vidRes = dataJson.getString("vid");
|
||||||
jidRes = dataJson.getString("jid");
|
jidRes = dataJson.getString("jid");
|
||||||
String sojumpparmRes = dataJson.getString("sojumpparm");
|
String sojumpparmRes = dataJson.getString("sojumpparm");
|
||||||
baseMapper.updateJid(sojumpparmRes,vidRes,jidRes);
|
baseMapper.updateJid(sojumpparmRes, vidRes, jidRes);
|
||||||
//调用接口,答卷查询
|
//调用接口,答卷查询
|
||||||
Map<String,Object> selMap = new HashMap<>();
|
Map<String, Object> selMap = new HashMap<>();
|
||||||
selMap.put("vid",Integer.valueOf(vid));
|
selMap.put("vid", Integer.valueOf(vid));
|
||||||
selMap.put("jid",Long.valueOf(jidRes));
|
selMap.put("jid", Long.valueOf(jidRes));
|
||||||
//调用接口,查询答卷结果
|
//调用接口,查询答卷结果
|
||||||
String answerStr = wjxUtil.openapi(selMap,"1001002");
|
String answerStr = wjxUtil.openapi(selMap, "1001002");
|
||||||
if(!answerStr.equals("")){
|
if (!answerStr.equals("")) {
|
||||||
JSONObject ansJsonResult = JSONObject.parseObject(answerStr);
|
JSONObject ansJsonResult = JSONObject.parseObject(answerStr);
|
||||||
if(ansJsonResult.getBoolean("result")){
|
if (ansJsonResult.getBoolean("result")) {
|
||||||
JSONObject ansDataJson = ansJsonResult.getJSONObject("data");
|
JSONObject ansDataJson = ansJsonResult.getJSONObject("data");
|
||||||
String answerVid = ansDataJson.getString("vid");
|
String answerVid = ansDataJson.getString("vid");
|
||||||
JSONObject answerJsonArray = ansDataJson.getJSONObject("answers");
|
JSONObject answerJsonArray = ansDataJson.getJSONObject("answers");
|
||||||
for(String key1 : answerJsonArray.keySet()){
|
for (String key1 : answerJsonArray.keySet()) {
|
||||||
JSONObject answer = answerJsonArray.getJSONObject(key1);
|
JSONObject answer = answerJsonArray.getJSONObject(key1);
|
||||||
String jidAns = answer.getString("jid");
|
String jidAns = answer.getString("jid");
|
||||||
Integer answerSeconds = answer.getInteger("answer_seconds");
|
Integer answerSeconds = answer.getInteger("answer_seconds");
|
||||||
|
@ -172,7 +173,7 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
baseMapper.deleteDjItem(wjxDjxx);
|
baseMapper.deleteDjItem(wjxDjxx);
|
||||||
//处理选项
|
//处理选项
|
||||||
JSONObject answerItemJson = answer.getJSONObject("answer_items");
|
JSONObject answerItemJson = answer.getJSONObject("answer_items");
|
||||||
if(answerItemJson!=null) {
|
if (answerItemJson != null) {
|
||||||
for (String key2 : answerItemJson.keySet()) {
|
for (String key2 : answerItemJson.keySet()) {
|
||||||
JSONObject answerItem = answerItemJson.getJSONObject(key2);
|
JSONObject answerItem = answerItemJson.getJSONObject(key2);
|
||||||
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
||||||
|
@ -272,27 +273,25 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
//修改答卷信息
|
//修改答卷信息
|
||||||
baseMapper.updateAnswer(wjxDjxx);
|
baseMapper.updateAnswer(wjxDjxx);
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
baseMapper.updateErrMsg(user.getUsername(),vid,ansJsonResult.getString("errormsg"));
|
baseMapper.updateErrMsg(user.getUsername(), vid, ansJsonResult.getString("errormsg"));
|
||||||
return ansJsonResult.getString("errormsg");
|
return ansJsonResult.getString("errormsg");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
baseMapper.updateErrMsg(user.getUsername(),vid,jsonResult.getString("errormsg"));
|
baseMapper.updateErrMsg(user.getUsername(), vid, jsonResult.getString("errormsg"));
|
||||||
return jsonResult.getString("errormsg");
|
return jsonResult.getString("errormsg");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String sfxgdjscore = "0";//是否修改答卷分数
|
String sfxgdjscore = "0";//是否修改答卷分数
|
||||||
if(StringUtils.isNotBlank(jidRes)){
|
if (StringUtils.isNotBlank(jidRes)) {
|
||||||
for(WjxDjxxTmlbPage wjxDjxxTmlbPage:list){
|
for (WjxDjxxTmlbPage wjxDjxxTmlbPage : list) {
|
||||||
Integer WjIndex = wjxDjxxTmlbPage.getWjIndex();
|
Integer WjIndex = wjxDjxxTmlbPage.getWjIndex();
|
||||||
Integer wjType = wjxDjxxTmlbPage.getWjType();
|
Integer wjType = wjxDjxxTmlbPage.getWjType();
|
||||||
Integer wjSubtype = wjxDjxxTmlbPage.getWjSubtype();
|
Integer wjSubtype = wjxDjxxTmlbPage.getWjSubtype();
|
||||||
if(wjType == 8){
|
if (wjType == 8) {
|
||||||
sfxgdjscore = "1";
|
sfxgdjscore = "1";
|
||||||
String id = new DefaultIdentifierGenerator().nextId(new WjxDjxxTmxx()).toString();
|
String id = new DefaultIdentifierGenerator().nextId(new WjxDjxxTmxx()).toString();
|
||||||
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
||||||
|
@ -308,7 +307,7 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
// wjxDjxxTmxx.setItemScore(wjxDjxxTmlbPage.getWjScore());
|
// wjxDjxxTmxx.setItemScore(wjxDjxxTmlbPage.getWjScore());
|
||||||
wjxDjxxTmxx.setPicPath(wjxDjxxTmlbPage.getPicPath());
|
wjxDjxxTmxx.setPicPath(wjxDjxxTmlbPage.getPicPath());
|
||||||
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
||||||
}else if(wjType==5&&wjSubtype!=null && wjSubtype == 5){
|
} else if (wjType == 5 && wjSubtype != null && wjSubtype == 5) {
|
||||||
sfxgdjscore = "1";
|
sfxgdjscore = "1";
|
||||||
String id = new DefaultIdentifierGenerator().nextId(new WjxDjxxTmxx()).toString();
|
String id = new DefaultIdentifierGenerator().nextId(new WjxDjxxTmxx()).toString();
|
||||||
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
||||||
|
@ -329,7 +328,7 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
}
|
}
|
||||||
|
|
||||||
//修改答卷信息的总分
|
//修改答卷信息的总分
|
||||||
if(StringUtils.equals(sfxgdjscore,"1")){
|
if (StringUtils.equals(sfxgdjscore, "1")) {
|
||||||
try {
|
try {
|
||||||
WjxDjxx wjxDjxx = new WjxDjxx();
|
WjxDjxx wjxDjxx = new WjxDjxx();
|
||||||
wjxDjxx.setVid(vid);
|
wjxDjxx.setVid(vid);
|
||||||
|
@ -346,29 +345,29 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
//修改问卷状态
|
//修改问卷状态
|
||||||
|
|
||||||
QueryWrapper<WjxWjxx> wjxWjxxQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<WjxWjxx> wjxWjxxQueryWrapper = new QueryWrapper<>();
|
||||||
wjxWjxxQueryWrapper.eq("vid",vid);
|
wjxWjxxQueryWrapper.eq("vid", vid);
|
||||||
wjxWjxxQueryWrapper.last("limit 1");
|
wjxWjxxQueryWrapper.last("limit 1");
|
||||||
WjxWjxx wjxWjxx = wjxWjxxMapper.selectOne(wjxWjxxQueryWrapper);
|
WjxWjxx wjxWjxx = wjxWjxxMapper.selectOne(wjxWjxxQueryWrapper);
|
||||||
int xkrs = Integer.parseInt(wjxWjxx.getXkrs());
|
int xkrs = Integer.parseInt(wjxWjxx.getXkrs());
|
||||||
|
|
||||||
QueryWrapper<WjxDjxx> djxxQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<WjxDjxx> djxxQueryWrapper = new QueryWrapper<>();
|
||||||
djxxQueryWrapper.eq("vid",vid);
|
djxxQueryWrapper.eq("vid", vid);
|
||||||
List<WjxDjxx> listNum = baseMapper.selectList(djxxQueryWrapper);
|
List<WjxDjxx> listNum = baseMapper.selectList(djxxQueryWrapper);
|
||||||
int djsl = listNum.size();
|
int djsl = listNum.size();
|
||||||
System.out.println(xkrs+"------------------------"+djsl);
|
System.out.println(xkrs + "------------------------" + djsl);
|
||||||
if(xkrs == djsl){
|
if (xkrs == djsl) {
|
||||||
wjxWjxx.setQpublish("2");
|
wjxWjxx.setQpublish("2");
|
||||||
wjxWjxxMapper.updateById(wjxWjxx);
|
wjxWjxxMapper.updateById(wjxWjxx);
|
||||||
}
|
}
|
||||||
String type = "";
|
String type = "";
|
||||||
String content = "";
|
String content = "";
|
||||||
if(StringUtils.equals("6",wjxWjxx.getAtype())){
|
if (StringUtils.equals("6", wjxWjxx.getAtype())) {
|
||||||
type = "6";
|
type = "6";
|
||||||
content = user.getRealname()+"学生提交了["+wjxWjxx.getKcmc()+"]课程“"+wjxWjxx.getTitle()+"”测验,该测验完成时间为:"+ DateUtils.formatDate(wjxWjxx.getStartTime(),"yyyy-MM-dd HH:mm")+" ~ "+DateUtils.formatDate(wjxWjxx.getEndTime(),"yyyy-MM-dd HH:mm")+",请及时查看。学生提交时间:"+DateUtils.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss");
|
content = user.getRealname() + "学生提交了[" + wjxWjxx.getKcmc() + "]课程“" + wjxWjxx.getTitle() + "”测验,该测验完成时间为:" + DateUtils.formatDate(wjxWjxx.getStartTime(), "yyyy-MM-dd HH:mm") + " ~ " + DateUtils.formatDate(wjxWjxx.getEndTime(), "yyyy-MM-dd HH:mm") + ",请及时查看。学生提交时间:" + DateUtils.formatDate(new Date(), "yyyy-MM-dd HH:mm:ss");
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
type = "7";
|
type = "7";
|
||||||
content = user.getRealname()+"学生提交了["+wjxWjxx.getKcmc()+"]课程“"+wjxWjxx.getTitle()+"”问卷,该问卷完成时间为:"+ DateUtils.formatDate(wjxWjxx.getStartTime(),"yyyy-MM-dd HH:mm")+" ~ "+DateUtils.formatDate(wjxWjxx.getEndTime(),"yyyy-MM-dd HH:mm")+",请及时查看。学生提交时间:"+DateUtils.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss");
|
content = user.getRealname() + "学生提交了[" + wjxWjxx.getKcmc() + "]课程“" + wjxWjxx.getTitle() + "”问卷,该问卷完成时间为:" + DateUtils.formatDate(wjxWjxx.getStartTime(), "yyyy-MM-dd HH:mm") + " ~ " + DateUtils.formatDate(wjxWjxx.getEndTime(), "yyyy-MM-dd HH:mm") + ",请及时查看。学生提交时间:" + DateUtils.formatDate(new Date(), "yyyy-MM-dd HH:mm:ss");
|
||||||
}
|
}
|
||||||
//作业代办提醒
|
//作业代办提醒
|
||||||
ZyDbtx zyDbtx = new ZyDbtx();
|
ZyDbtx zyDbtx = new ZyDbtx();
|
||||||
|
@ -382,74 +381,72 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
zyDbtxService.save(zyDbtx);
|
zyDbtxService.save(zyDbtx);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UpdateWrapper<ZyDbtx> zyDbtxQx = new UpdateWrapper<>();
|
UpdateWrapper<ZyDbtx> zyDbtxQx = new UpdateWrapper<>();
|
||||||
zyDbtxQx.set("flag","1");
|
zyDbtxQx.set("flag", "1");
|
||||||
zyDbtxQx.eq("main_id",wjxWjxx.getId());
|
zyDbtxQx.eq("main_id", wjxWjxx.getId());
|
||||||
zyDbtxQx.eq("create_by",user.getUsername());
|
zyDbtxQx.eq("create_by", user.getUsername());
|
||||||
zyDbtxQx.eq("type","2");
|
zyDbtxQx.eq("type", "2");
|
||||||
zyDbtxService.update(zyDbtxQx);
|
zyDbtxService.update(zyDbtxQx);
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(StringUtils.isNotBlank(jidRes)){
|
if (StringUtils.isNotBlank(jidRes)) {
|
||||||
jsscore(jidRes);
|
jsscore(jidRes);
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return "提交成功!";
|
return "提交成功!";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取未进行答卷查询操作的数据,如数据未提交问卷操作则先提交问卷,再查询答卷
|
* 获取未进行答卷查询操作的数据,如数据未提交问卷操作则先提交问卷,再查询答卷
|
||||||
*/
|
*/
|
||||||
public void doDjSelect(){
|
public void doDjSelect() {
|
||||||
List<WjxDjxx> list = baseMapper.findUnSelect();
|
List<WjxDjxx> list = baseMapper.findUnSelect();
|
||||||
for(int i=0;i<list.size();i++){
|
for (int i = 0; i < list.size(); i++) {
|
||||||
WjxDjxx wjxDjxx = list.get(i);
|
WjxDjxx wjxDjxx = list.get(i);
|
||||||
String jid = wjxDjxx.getJid();
|
String jid = wjxDjxx.getJid();
|
||||||
String vid = wjxDjxx.getVid();
|
String vid = wjxDjxx.getVid();
|
||||||
String userId = wjxDjxx.getUserId();
|
String userId = wjxDjxx.getUserId();
|
||||||
if(jid== null || jid.equals("")){
|
if (jid == null || jid.equals("")) {
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("vid",Integer.valueOf(wjxDjxx.getVid()));
|
map.put("vid", Integer.valueOf(wjxDjxx.getVid()));
|
||||||
map.put("inputcosttime",ChronoUnit.SECONDS.between(wjxDjxx.getOpenTime().toInstant(),wjxDjxx.getCommitTime().toInstant()));
|
map.put("inputcosttime", ChronoUnit.SECONDS.between(wjxDjxx.getOpenTime().toInstant(), wjxDjxx.getCommitTime().toInstant()));
|
||||||
map.put("submitdata",wjxDjxx.getSubmitData());
|
map.put("submitdata", wjxDjxx.getSubmitData());
|
||||||
map.put("sojumpparm",wjxDjxx.getUserId());//自定义链接参数,用来透传用户ID
|
map.put("sojumpparm", wjxDjxx.getUserId());//自定义链接参数,用来透传用户ID
|
||||||
//调用接口,提交
|
//调用接口,提交
|
||||||
String result = wjxUtil.openapi(map,"1001001");
|
String result = wjxUtil.openapi(map, "1001001");
|
||||||
if(!result.equals("")) {
|
if (!result.equals("")) {
|
||||||
JSONObject jsonResult = JSONObject.parseObject(result);
|
JSONObject jsonResult = JSONObject.parseObject(result);
|
||||||
if (jsonResult.getBoolean("result")) {
|
if (jsonResult.getBoolean("result")) {
|
||||||
JSONObject dataJson = jsonResult.getJSONObject("data");
|
JSONObject dataJson = jsonResult.getJSONObject("data");
|
||||||
String vidRes = dataJson.getString("vid");
|
String vidRes = dataJson.getString("vid");
|
||||||
jid = dataJson.getString("jid");
|
jid = dataJson.getString("jid");
|
||||||
String sojumpparmRes = dataJson.getString("sojumpparm");
|
String sojumpparmRes = dataJson.getString("sojumpparm");
|
||||||
baseMapper.updateJid(sojumpparmRes,vidRes,jid);
|
baseMapper.updateJid(sojumpparmRes, vidRes, jid);
|
||||||
wjxDjxx.setJid(jid);
|
wjxDjxx.setJid(jid);
|
||||||
}else{
|
} else {
|
||||||
baseMapper.updateErrMsg(wjxDjxx.getUserId(),wjxDjxx.getVid(),jsonResult.getString("errormsg"));
|
baseMapper.updateErrMsg(wjxDjxx.getUserId(), wjxDjxx.getVid(), jsonResult.getString("errormsg"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//调用接口,答卷查询
|
//调用接口,答卷查询
|
||||||
Map<String,Object> selMap = new HashMap<>();
|
Map<String, Object> selMap = new HashMap<>();
|
||||||
selMap.put("vid",Integer.valueOf(vid));
|
selMap.put("vid", Integer.valueOf(vid));
|
||||||
selMap.put("jid",Long.valueOf(jid));
|
selMap.put("jid", Long.valueOf(jid));
|
||||||
//调用接口,提交
|
//调用接口,提交
|
||||||
String answerStr = wjxUtil.openapi(selMap,"1001002");
|
String answerStr = wjxUtil.openapi(selMap, "1001002");
|
||||||
if(!answerStr.equals("")){
|
if (!answerStr.equals("")) {
|
||||||
JSONObject ansJsonResult = JSONObject.parseObject(answerStr);
|
JSONObject ansJsonResult = JSONObject.parseObject(answerStr);
|
||||||
if(ansJsonResult.getBoolean("result")){
|
if (ansJsonResult.getBoolean("result")) {
|
||||||
JSONObject ansDataJson = ansJsonResult.getJSONObject("data");
|
JSONObject ansDataJson = ansJsonResult.getJSONObject("data");
|
||||||
String answerVid = ansDataJson.getString("vid");
|
String answerVid = ansDataJson.getString("vid");
|
||||||
JSONObject answerJsonArray = ansDataJson.getJSONObject("answers");
|
JSONObject answerJsonArray = ansDataJson.getJSONObject("answers");
|
||||||
for(String key1 : answerJsonArray.keySet()){
|
for (String key1 : answerJsonArray.keySet()) {
|
||||||
JSONObject answer = answerJsonArray.getJSONObject(key1);
|
JSONObject answer = answerJsonArray.getJSONObject(key1);
|
||||||
String jidAns = answer.getString("jid");
|
String jidAns = answer.getString("jid");
|
||||||
Integer answerSeconds = answer.getInteger("answer_seconds");
|
Integer answerSeconds = answer.getInteger("answer_seconds");
|
||||||
|
@ -465,7 +462,7 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
baseMapper.deleteDjItem(wjxDjxx2);
|
baseMapper.deleteDjItem(wjxDjxx2);
|
||||||
//处理选项
|
//处理选项
|
||||||
JSONObject answerItemJson = answer.getJSONObject("answer_items");
|
JSONObject answerItemJson = answer.getJSONObject("answer_items");
|
||||||
if(answerItemJson!=null) {
|
if (answerItemJson != null) {
|
||||||
for (String key2 : answerItemJson.keySet()) {
|
for (String key2 : answerItemJson.keySet()) {
|
||||||
JSONObject answerItem = answerItemJson.getJSONObject(key2);
|
JSONObject answerItem = answerItemJson.getJSONObject(key2);
|
||||||
Integer wjIndex = answerItem.getInteger("q_index");
|
Integer wjIndex = answerItem.getInteger("q_index");
|
||||||
|
@ -495,8 +492,8 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
//修改答卷信息
|
//修改答卷信息
|
||||||
baseMapper.updateAnswer(wjxDjxx2);
|
baseMapper.updateAnswer(wjxDjxx2);
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
baseMapper.updateErrMsg(wjxDjxx.getUserId(),wjxDjxx.getVid(),ansJsonResult.getString("errormsg"));
|
baseMapper.updateErrMsg(wjxDjxx.getUserId(), wjxDjxx.getVid(), ansJsonResult.getString("errormsg"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -506,12 +503,12 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
@Override
|
@Override
|
||||||
public WjxDjxx queryByMainId(String id) {
|
public WjxDjxx queryByMainId(String id) {
|
||||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
WjxDjxx djxx = baseMapper.findDjxx(id,user.getUsername());
|
WjxDjxx djxx = baseMapper.findDjxx(id, user.getUsername());
|
||||||
if(djxx != null){
|
if (djxx != null) {
|
||||||
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
||||||
List<WjxDjxxTmxx> list = baseMapper.findDjtmxx(djxx.getVid(),djxx.getJid());
|
List<WjxDjxxTmxx> list = baseMapper.findDjtmxx(djxx.getVid(), djxx.getJid());
|
||||||
for(WjxDjxxTmxx wjxDjxxTmxx:list){
|
for (WjxDjxxTmxx wjxDjxxTmxx : list) {
|
||||||
List<WjxWjxxTmxx> list2= wjxWjxxTmxxMapper.selectByMainId(wjxDjxxTmxx.getId());
|
List<WjxWjxxTmxx> list2 = wjxWjxxTmxxMapper.selectByMainId(wjxDjxxTmxx.getId());
|
||||||
wjxDjxxTmxx.setWjxWjxxTmxxList(list2);
|
wjxDjxxTmxx.setWjxWjxxTmxxList(list2);
|
||||||
//获取填空题答案
|
//获取填空题答案
|
||||||
WjxWjxxTmlb tmlb = wjxWjxxTmlbMapper.selectById(wjxDjxxTmxx.getId());
|
WjxWjxxTmlb tmlb = wjxWjxxTmlbMapper.selectById(wjxDjxxTmxx.getId());
|
||||||
|
@ -525,6 +522,7 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 秒数转时分秒
|
* 秒数转时分秒
|
||||||
|
*
|
||||||
* @param seconds
|
* @param seconds
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -537,23 +535,23 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<WjxDjxx> findDjjgsPage(WjxDjxx wjxDjxx, Page<WjxDjxx> page){
|
public Page<WjxDjxx> findDjjgsPage(WjxDjxx wjxDjxx, Page<WjxDjxx> page) {
|
||||||
if(StringUtils.equals("1",wjxDjxx.getIsFinished())){
|
if (StringUtils.equals("1", wjxDjxx.getIsFinished())) {
|
||||||
//完成答卷的
|
//完成答卷的
|
||||||
List<WjxDjxx> list = baseMapper.findDjjgsPage(page,wjxDjxx);
|
List<WjxDjxx> list = baseMapper.findDjjgsPage(page, wjxDjxx);
|
||||||
for(WjxDjxx djxx:list){
|
for (WjxDjxx djxx : list) {
|
||||||
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
||||||
}
|
}
|
||||||
page.setRecords(list);
|
page.setRecords(list);
|
||||||
}else if(StringUtils.equals("0",wjxDjxx.getIsFinished())){
|
} else if (StringUtils.equals("0", wjxDjxx.getIsFinished())) {
|
||||||
//未完成答卷的
|
//未完成答卷的
|
||||||
List<WjxDjxx> list = baseMapper.findUnDjjgsPage(page,wjxDjxx);
|
List<WjxDjxx> list = baseMapper.findUnDjjgsPage(page, wjxDjxx);
|
||||||
page.setRecords(list);
|
page.setRecords(list);
|
||||||
}else{
|
} else {
|
||||||
//全部
|
//全部
|
||||||
List<WjxDjxx> list = baseMapper.findAllDjjgsPage(page,wjxDjxx);
|
List<WjxDjxx> list = baseMapper.findAllDjjgsPage(page, wjxDjxx);
|
||||||
for(WjxDjxx djxx:list){
|
for (WjxDjxx djxx : list) {
|
||||||
if(djxx.getAnswerSeconds()!=-1){
|
if (djxx.getAnswerSeconds() != -1) {
|
||||||
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -566,20 +564,20 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
@Override
|
@Override
|
||||||
public List<WjxDjxx> exportList(WjxDjxx wjxDjxx) {
|
public List<WjxDjxx> exportList(WjxDjxx wjxDjxx) {
|
||||||
List<WjxDjxx> list = new ArrayList<>();
|
List<WjxDjxx> list = new ArrayList<>();
|
||||||
if(StringUtils.equals("1",wjxDjxx.getIsFinished())){
|
if (StringUtils.equals("1", wjxDjxx.getIsFinished())) {
|
||||||
//完成答卷的
|
//完成答卷的
|
||||||
list = baseMapper.findDjjgsPage(null,wjxDjxx);
|
list = baseMapper.findDjjgsPage(null, wjxDjxx);
|
||||||
for(WjxDjxx djxx:list){
|
for (WjxDjxx djxx : list) {
|
||||||
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
||||||
}
|
}
|
||||||
}else if(StringUtils.equals("0",wjxDjxx.getIsFinished())){
|
} else if (StringUtils.equals("0", wjxDjxx.getIsFinished())) {
|
||||||
//未完成答卷的
|
//未完成答卷的
|
||||||
list = baseMapper.findUnDjjgsPage(null,wjxDjxx);
|
list = baseMapper.findUnDjjgsPage(null, wjxDjxx);
|
||||||
}else{
|
} else {
|
||||||
//全部
|
//全部
|
||||||
list = baseMapper.findAllDjjgsPage(null,wjxDjxx);
|
list = baseMapper.findAllDjjgsPage(null, wjxDjxx);
|
||||||
for(WjxDjxx djxx:list){
|
for (WjxDjxx djxx : list) {
|
||||||
if(djxx.getAnswerSeconds()!=-1){
|
if (djxx.getAnswerSeconds() != -1) {
|
||||||
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -590,20 +588,20 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
@Override
|
@Override
|
||||||
public List<WjxDjxxDj> exportDjXls(WjxDjxxDj wjxDjxxdj) {
|
public List<WjxDjxxDj> exportDjXls(WjxDjxxDj wjxDjxxdj) {
|
||||||
List<WjxDjxxDj> list = new ArrayList<>();
|
List<WjxDjxxDj> list = new ArrayList<>();
|
||||||
if(StringUtils.equals("1",wjxDjxxdj.getIsFinished())){
|
if (StringUtils.equals("1", wjxDjxxdj.getIsFinished())) {
|
||||||
//完成答卷的
|
//完成答卷的
|
||||||
list = baseMapper.findDjjgsDjPage(wjxDjxxdj);
|
list = baseMapper.findDjjgsDjPage(wjxDjxxdj);
|
||||||
for(WjxDjxxDj djxx:list){
|
for (WjxDjxxDj djxx : list) {
|
||||||
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
||||||
}
|
}
|
||||||
}else if(StringUtils.equals("0",wjxDjxxdj.getIsFinished())){
|
} else if (StringUtils.equals("0", wjxDjxxdj.getIsFinished())) {
|
||||||
//未完成答卷的
|
//未完成答卷的
|
||||||
list = baseMapper.findUnDjjgsDJPage(wjxDjxxdj);
|
list = baseMapper.findUnDjjgsDJPage(wjxDjxxdj);
|
||||||
}else{
|
} else {
|
||||||
//全部
|
//全部
|
||||||
list = baseMapper.findAllDjjgsDjPage(wjxDjxxdj);
|
list = baseMapper.findAllDjjgsDjPage(wjxDjxxdj);
|
||||||
for(WjxDjxxDj djxx:list){
|
for (WjxDjxxDj djxx : list) {
|
||||||
if(djxx.getAnswerSeconds()!=-1){
|
if (djxx.getAnswerSeconds() != -1) {
|
||||||
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -634,12 +632,12 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
@Override
|
@Override
|
||||||
public WjxDjxx querySdpfById(String id) {
|
public WjxDjxx querySdpfById(String id) {
|
||||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
WjxDjxx djxx = baseMapper.findDjxx(id,user.getUsername());
|
WjxDjxx djxx = baseMapper.findDjxx(id, user.getUsername());
|
||||||
if(djxx != null){
|
if (djxx != null) {
|
||||||
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
||||||
List<WjxDjxxTmxx> list = baseMapper.findDjtmxx2(djxx.getVid(),djxx.getJid());
|
List<WjxDjxxTmxx> list = baseMapper.findDjtmxx2(djxx.getVid(), djxx.getJid());
|
||||||
for(WjxDjxxTmxx wjxDjxxTmxx:list){
|
for (WjxDjxxTmxx wjxDjxxTmxx : list) {
|
||||||
List<WjxWjxxTmxx> list2= wjxWjxxTmxxMapper.selectByMainId(wjxDjxxTmxx.getId());
|
List<WjxWjxxTmxx> list2 = wjxWjxxTmxxMapper.selectByMainId(wjxDjxxTmxx.getId());
|
||||||
wjxDjxxTmxx.setWjxWjxxTmxxList(list2);
|
wjxDjxxTmxx.setWjxWjxxTmxxList(list2);
|
||||||
//获取填空题答案
|
//获取填空题答案
|
||||||
WjxWjxxTmlb tmlb = wjxWjxxTmlbMapper.selectById(wjxDjxxTmxx.getId());
|
WjxWjxxTmlb tmlb = wjxWjxxTmlbMapper.selectById(wjxDjxxTmxx.getId());
|
||||||
|
@ -674,9 +672,9 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
@Override
|
@Override
|
||||||
public void cxjcWjxScore(String vid) {
|
public void cxjcWjxScore(String vid) {
|
||||||
QueryWrapper<WjxDjxx> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<WjxDjxx> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("vid",vid);
|
queryWrapper.eq("vid", vid);
|
||||||
List<WjxDjxx> list = baseMapper.selectList(queryWrapper);
|
List<WjxDjxx> list = baseMapper.selectList(queryWrapper);
|
||||||
for(WjxDjxx par : list){
|
for (WjxDjxx par : list) {
|
||||||
jsscore(par.getJid());
|
jsscore(par.getJid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -685,7 +683,7 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
public String updateDjjg(WjxDjxx wjxDjxxPar) {
|
public String updateDjjg(WjxDjxx wjxDjxxPar) {
|
||||||
// LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
// LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
String vid = wjxDjxxPar.getVid();
|
String vid = wjxDjxxPar.getVid();
|
||||||
if(vid ==null || vid.equals("")){
|
if (vid == null || vid.equals("")) {
|
||||||
return "此试卷错误,无法提交!";
|
return "此试卷错误,无法提交!";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -694,42 +692,42 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
|
|
||||||
|
|
||||||
String submitData = wjxDjxx2.getSubmitData();
|
String submitData = wjxDjxx2.getSubmitData();
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("vid",Integer.valueOf(vid));
|
map.put("vid", Integer.valueOf(vid));
|
||||||
Long djys = ChronoUnit.SECONDS.between(wjxDjxx2.getOpenTime().toInstant(),wjxDjxx2.getCommitTime().toInstant());
|
Long djys = ChronoUnit.SECONDS.between(wjxDjxx2.getOpenTime().toInstant(), wjxDjxx2.getCommitTime().toInstant());
|
||||||
if(djys<3){
|
if (djys < 3) {
|
||||||
djys = 10L;
|
djys = 10L;
|
||||||
}
|
}
|
||||||
System.out.println("--------------------------------------------------");
|
System.out.println("--------------------------------------------------");
|
||||||
System.out.println("---------------djys--"+djys+"---------------------------");
|
System.out.println("---------------djys--" + djys + "---------------------------");
|
||||||
System.out.println("--------------------------------------------------");
|
System.out.println("--------------------------------------------------");
|
||||||
map.put("inputcosttime", djys);
|
map.put("inputcosttime", djys);
|
||||||
map.put("submitdata",submitData);
|
map.put("submitdata", submitData);
|
||||||
map.put("sojumpparm",wjxDjxx2.getUserId());//自定义链接参数,用来透传用户ID
|
map.put("sojumpparm", wjxDjxx2.getUserId());//自定义链接参数,用来透传用户ID
|
||||||
//调用接口,提交
|
//调用接口,提交
|
||||||
String result = wjxUtil.openapi(map,"1001001");
|
String result = wjxUtil.openapi(map, "1001001");
|
||||||
String jidRes = "";
|
String jidRes = "";
|
||||||
if(!result.equals("")){
|
if (!result.equals("")) {
|
||||||
JSONObject jsonResult = JSONObject.parseObject(result);
|
JSONObject jsonResult = JSONObject.parseObject(result);
|
||||||
if(jsonResult.getBoolean("result")){
|
if (jsonResult.getBoolean("result")) {
|
||||||
JSONObject dataJson = jsonResult.getJSONObject("data");
|
JSONObject dataJson = jsonResult.getJSONObject("data");
|
||||||
String vidRes = dataJson.getString("vid");
|
String vidRes = dataJson.getString("vid");
|
||||||
jidRes = dataJson.getString("jid");
|
jidRes = dataJson.getString("jid");
|
||||||
String sojumpparmRes = dataJson.getString("sojumpparm");
|
String sojumpparmRes = dataJson.getString("sojumpparm");
|
||||||
baseMapper.updateJid(sojumpparmRes,vidRes,jidRes);
|
baseMapper.updateJid(sojumpparmRes, vidRes, jidRes);
|
||||||
//调用接口,答卷查询
|
//调用接口,答卷查询
|
||||||
Map<String,Object> selMap = new HashMap<>();
|
Map<String, Object> selMap = new HashMap<>();
|
||||||
selMap.put("vid",Integer.valueOf(vid));
|
selMap.put("vid", Integer.valueOf(vid));
|
||||||
selMap.put("jid",Long.valueOf(jidRes));
|
selMap.put("jid", Long.valueOf(jidRes));
|
||||||
//调用接口,查询答卷结果
|
//调用接口,查询答卷结果
|
||||||
String answerStr = wjxUtil.openapi(selMap,"1001002");
|
String answerStr = wjxUtil.openapi(selMap, "1001002");
|
||||||
if(!answerStr.equals("")){
|
if (!answerStr.equals("")) {
|
||||||
JSONObject ansJsonResult = JSONObject.parseObject(answerStr);
|
JSONObject ansJsonResult = JSONObject.parseObject(answerStr);
|
||||||
if(ansJsonResult.getBoolean("result")){
|
if (ansJsonResult.getBoolean("result")) {
|
||||||
JSONObject ansDataJson = ansJsonResult.getJSONObject("data");
|
JSONObject ansDataJson = ansJsonResult.getJSONObject("data");
|
||||||
String answerVid = ansDataJson.getString("vid");
|
String answerVid = ansDataJson.getString("vid");
|
||||||
JSONObject answerJsonArray = ansDataJson.getJSONObject("answers");
|
JSONObject answerJsonArray = ansDataJson.getJSONObject("answers");
|
||||||
for(String key1 : answerJsonArray.keySet()){
|
for (String key1 : answerJsonArray.keySet()) {
|
||||||
JSONObject answer = answerJsonArray.getJSONObject(key1);
|
JSONObject answer = answerJsonArray.getJSONObject(key1);
|
||||||
String jidAns = answer.getString("jid");
|
String jidAns = answer.getString("jid");
|
||||||
Integer answerSeconds = answer.getInteger("answer_seconds");
|
Integer answerSeconds = answer.getInteger("answer_seconds");
|
||||||
|
@ -745,7 +743,7 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
baseMapper.deleteDjItem(wjxDjxx);
|
baseMapper.deleteDjItem(wjxDjxx);
|
||||||
//处理选项
|
//处理选项
|
||||||
JSONObject answerItemJson = answer.getJSONObject("answer_items");
|
JSONObject answerItemJson = answer.getJSONObject("answer_items");
|
||||||
if(answerItemJson!=null) {
|
if (answerItemJson != null) {
|
||||||
for (String key2 : answerItemJson.keySet()) {
|
for (String key2 : answerItemJson.keySet()) {
|
||||||
JSONObject answerItem = answerItemJson.getJSONObject(key2);
|
JSONObject answerItem = answerItemJson.getJSONObject(key2);
|
||||||
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
||||||
|
@ -845,28 +843,27 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
//修改答卷信息
|
//修改答卷信息
|
||||||
baseMapper.updateAnswer(wjxDjxx);
|
baseMapper.updateAnswer(wjxDjxx);
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
baseMapper.updateErrMsg(wjxDjxx2.getUserId(),vid,ansJsonResult.getString("errormsg"));
|
baseMapper.updateErrMsg(wjxDjxx2.getUserId(), vid, ansJsonResult.getString("errormsg"));
|
||||||
return ansJsonResult.getString("errormsg");
|
return ansJsonResult.getString("errormsg");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
baseMapper.updateErrMsg(wjxDjxx2.getUserId(),vid,jsonResult.getString("errormsg"));
|
baseMapper.updateErrMsg(wjxDjxx2.getUserId(), vid, jsonResult.getString("errormsg"));
|
||||||
return jsonResult.getString("errormsg");
|
return jsonResult.getString("errormsg");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(StringUtils.isNotBlank(jidRes)){
|
if (StringUtils.isNotBlank(jidRes)) {
|
||||||
jsscore(jidRes);
|
jsscore(jidRes);
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return "提交成功!";
|
return "提交成功!";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -874,129 +871,86 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
public String getDjjg(WjxDjxx wjxDjxxPar) {
|
public String getDjjg(WjxDjxx wjxDjxxPar) {
|
||||||
// LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
// LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
String vid = wjxDjxxPar.getVid();
|
String vid = wjxDjxxPar.getVid();
|
||||||
if(vid ==null || vid.equals("")){
|
if (vid == null || vid.equals("")) {
|
||||||
return "此试卷错误,无法提交!";
|
return "此试卷错误,无法提交!";
|
||||||
}
|
}
|
||||||
|
|
||||||
//调用接口,提交
|
//调用接口,提交
|
||||||
String jidRes = wjxDjxxPar.getJid();
|
String jidRes = wjxDjxxPar.getJid();
|
||||||
//调用接口,答卷查询
|
//调用接口,答卷查询
|
||||||
Map<String,Object> selMap = new HashMap<>();
|
Map<String, Object> selMap = new HashMap<>();
|
||||||
selMap.put("vid",Integer.valueOf(vid));
|
selMap.put("vid", Integer.valueOf(vid));
|
||||||
selMap.put("jid",Long.valueOf(jidRes));
|
selMap.put("jid", Long.valueOf(jidRes));
|
||||||
//调用接口,查询答卷结果
|
//调用接口,查询答卷结果
|
||||||
String answerStr = wjxUtil.openapi(selMap,"1001002");
|
String answerStr = wjxUtil.openapi(selMap, "1001002");
|
||||||
if(!answerStr.equals("")) {
|
if (!answerStr.equals("")) {
|
||||||
JSONObject ansJsonResult = JSONObject.parseObject(answerStr);
|
JSONObject ansJsonResult = JSONObject.parseObject(answerStr);
|
||||||
if (ansJsonResult.getBoolean("result")) {
|
if (ansJsonResult.getBoolean("result")) {
|
||||||
JSONObject ansDataJson = ansJsonResult.getJSONObject("data");
|
JSONObject ansDataJson = ansJsonResult.getJSONObject("data");
|
||||||
String answerVid = ansDataJson.getString("vid");
|
String answerVid = ansDataJson.getString("vid");
|
||||||
JSONObject answerJsonArray = ansDataJson.getJSONObject("answers");
|
JSONObject answerJsonArray = ansDataJson.getJSONObject("answers");
|
||||||
for (String key1 : answerJsonArray.keySet()) {
|
for (String key1 : answerJsonArray.keySet()) {
|
||||||
JSONObject answer = answerJsonArray.getJSONObject(key1);
|
JSONObject answer = answerJsonArray.getJSONObject(key1);
|
||||||
String jidAns = answer.getString("jid");
|
String jidAns = answer.getString("jid");
|
||||||
Integer answerSeconds = answer.getInteger("answer_seconds");
|
Integer answerSeconds = answer.getInteger("answer_seconds");
|
||||||
Double score = answer.getDouble("score");
|
Double score = answer.getDouble("score");
|
||||||
Double totalScore = answer.getDouble("total_score");
|
Double totalScore = answer.getDouble("total_score");
|
||||||
WjxDjxx wjxDjxx = new WjxDjxx();
|
WjxDjxx wjxDjxx = new WjxDjxx();
|
||||||
wjxDjxx.setVid(answerVid);
|
wjxDjxx.setVid(answerVid);
|
||||||
wjxDjxx.setJid(jidAns);
|
wjxDjxx.setJid(jidAns);
|
||||||
wjxDjxx.setAnswerSeconds(answerSeconds);
|
wjxDjxx.setAnswerSeconds(answerSeconds);
|
||||||
wjxDjxx.setScore(score);
|
wjxDjxx.setScore(score);
|
||||||
wjxDjxx.setTotalScore(totalScore);
|
wjxDjxx.setTotalScore(totalScore);
|
||||||
//删除选项信息
|
//删除选项信息
|
||||||
// baseMapper.deleteDjItem(wjxDjxx);
|
// baseMapper.deleteDjItem(wjxDjxx);
|
||||||
//处理选项
|
//处理选项
|
||||||
JSONObject answerItemJson = answer.getJSONObject("answer_items");
|
JSONObject answerItemJson = answer.getJSONObject("answer_items");
|
||||||
if(answerItemJson!=null){
|
if (answerItemJson != null) {
|
||||||
for (String key2 : answerItemJson.keySet()) {
|
for (String key2 : answerItemJson.keySet()) {
|
||||||
JSONObject answerItem = answerItemJson.getJSONObject(key2);
|
JSONObject answerItem = answerItemJson.getJSONObject(key2);
|
||||||
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
||||||
wjxDjxxTmxx.setVid(answerVid);
|
wjxDjxxTmxx.setVid(answerVid);
|
||||||
wjxDjxxTmxx.setJid(jidAns);
|
wjxDjxxTmxx.setJid(jidAns);
|
||||||
wjxDjxxTmxx.setUserId(wjxDjxxPar.getUserId());
|
wjxDjxxTmxx.setUserId(wjxDjxxPar.getUserId());
|
||||||
wjxDjxxTmxx.setCreateBy(wjxDjxxPar.getUserId());
|
wjxDjxxTmxx.setCreateBy(wjxDjxxPar.getUserId());
|
||||||
wjxDjxxTmxx.setCreateTime(new Date());
|
wjxDjxxTmxx.setCreateTime(new Date());
|
||||||
|
|
||||||
if (answerItem.get("q_index") != null) {
|
if (answerItem.get("q_index") != null) {
|
||||||
Integer wjIndex = answerItem.getInteger("q_index");
|
Integer wjIndex = answerItem.getInteger("q_index");
|
||||||
wjxDjxxTmxx.setWjIndex(wjIndex);
|
wjxDjxxTmxx.setWjIndex(wjIndex);
|
||||||
}
|
}
|
||||||
if (answerItem.get("title") != null) {
|
if (answerItem.get("title") != null) {
|
||||||
String wjTitle = answerItem.getString("title");
|
String wjTitle = answerItem.getString("title");
|
||||||
wjxDjxxTmxx.setWjTitle(wjTitle);
|
wjxDjxxTmxx.setWjTitle(wjTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (answerItem.get("item_value") != null) {
|
if (answerItem.get("item_value") != null) {
|
||||||
Double itemScore = answerItem.getDouble("item_value");
|
Double itemScore = answerItem.getDouble("item_value");
|
||||||
wjxDjxxTmxx.setItemScore(itemScore);
|
wjxDjxxTmxx.setItemScore(itemScore);
|
||||||
}
|
}
|
||||||
if (answerItem.get("answer_text") != null) {
|
if (answerItem.get("answer_text") != null) {
|
||||||
String answerText = answerItem.getString("answer_text");
|
String answerText = answerItem.getString("answer_text");
|
||||||
wjxDjxxTmxx.setAnswerText(answerText);
|
wjxDjxxTmxx.setAnswerText(answerText);
|
||||||
}
|
}
|
||||||
if (answerItem.get("item_index") != null) {
|
if (answerItem.get("item_index") != null) {
|
||||||
JSONArray itemIndex = answerItem.getJSONArray("item_index");
|
JSONArray itemIndex = answerItem.getJSONArray("item_index");
|
||||||
|
|
||||||
QueryWrapper<WjxWjxx> wjxWjxxQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<WjxWjxx> wjxWjxxQueryWrapper = new QueryWrapper<>();
|
||||||
wjxWjxxQueryWrapper.eq("vid", vid);
|
wjxWjxxQueryWrapper.eq("vid", vid);
|
||||||
wjxWjxxQueryWrapper.last("limit 1");
|
wjxWjxxQueryWrapper.last("limit 1");
|
||||||
WjxWjxx wjxxPar = wjxWjxxMapper.selectOne(wjxWjxxQueryWrapper);
|
WjxWjxx wjxxPar = wjxWjxxMapper.selectOne(wjxWjxxQueryWrapper);
|
||||||
|
|
||||||
|
|
||||||
if (itemIndex.size() > 0) {
|
if (itemIndex.size() > 0) {
|
||||||
for (Object index : itemIndex) {
|
for (Object index : itemIndex) {
|
||||||
Integer ti = (Integer) index;
|
Integer ti = (Integer) index;
|
||||||
|
|
||||||
|
|
||||||
wjxDjxxTmxx.setItemIndex(ti);
|
wjxDjxxTmxx.setItemIndex(ti);
|
||||||
String id = new DefaultIdentifierGenerator().nextId(new WjxDjxxTmxx()).toString();
|
|
||||||
wjxDjxxTmxx.setId(id);
|
|
||||||
|
|
||||||
try {
|
|
||||||
QueryWrapper<WjxWjxxTmlb> wjxWjxxTmlbQueryWrapper = new QueryWrapper<>();
|
|
||||||
wjxWjxxTmlbQueryWrapper.eq("main_id", wjxxPar.getId());
|
|
||||||
wjxWjxxTmlbQueryWrapper.eq("wj_index", wjxDjxxTmxx.getWjIndex());
|
|
||||||
wjxWjxxTmlbQueryWrapper.last("limit 1");
|
|
||||||
WjxWjxxTmlb tmlb = wjxWjxxTmlbMapper.selectOne(wjxWjxxTmlbQueryWrapper);
|
|
||||||
wjxDjxxTmxx.setPicPath(tmlb.getPicPath());
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
WjxDjxxTmxx djxxTmxx = baseMapper.getSfysj(wjxDjxxTmxx);
|
|
||||||
if(djxxTmxx==null){
|
|
||||||
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
String id = new DefaultIdentifierGenerator().nextId(new WjxDjxxTmxx()).toString();
|
|
||||||
|
|
||||||
try {
|
|
||||||
QueryWrapper<WjxWjxxTmlb> wjxWjxxTmlbQueryWrapper = new QueryWrapper<>();
|
|
||||||
wjxWjxxTmlbQueryWrapper.eq("main_id", wjxxPar.getId());
|
|
||||||
wjxWjxxTmlbQueryWrapper.eq("wj_index", wjxDjxxTmxx.getWjIndex());
|
|
||||||
wjxWjxxTmlbQueryWrapper.last("limit 1");
|
|
||||||
WjxWjxxTmlb tmlb = wjxWjxxTmlbMapper.selectOne(wjxWjxxTmlbQueryWrapper);
|
|
||||||
wjxDjxxTmxx.setPicPath(tmlb.getPicPath());
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
wjxDjxxTmxx.setId(id);
|
|
||||||
WjxDjxxTmxx djxxTmxx = baseMapper.getSfysj(wjxDjxxTmxx);
|
|
||||||
if(djxxTmxx==null){
|
|
||||||
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
String id = new DefaultIdentifierGenerator().nextId(new WjxDjxxTmxx()).toString();
|
String id = new DefaultIdentifierGenerator().nextId(new WjxDjxxTmxx()).toString();
|
||||||
|
wjxDjxxTmxx.setId(id);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
QueryWrapper<WjxWjxx> wjxWjxxQueryWrapper = new QueryWrapper<>();
|
|
||||||
wjxWjxxQueryWrapper.eq("vid", vid);
|
|
||||||
wjxWjxxQueryWrapper.last("limit 1");
|
|
||||||
WjxWjxx wjxxPar = wjxWjxxMapper.selectOne(wjxWjxxQueryWrapper);
|
|
||||||
QueryWrapper<WjxWjxxTmlb> wjxWjxxTmlbQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<WjxWjxxTmlb> wjxWjxxTmlbQueryWrapper = new QueryWrapper<>();
|
||||||
wjxWjxxTmlbQueryWrapper.eq("main_id", wjxxPar.getId());
|
wjxWjxxTmlbQueryWrapper.eq("main_id", wjxxPar.getId());
|
||||||
wjxWjxxTmlbQueryWrapper.eq("wj_index", wjxDjxxTmxx.getWjIndex());
|
wjxWjxxTmlbQueryWrapper.eq("wj_index", wjxDjxxTmxx.getWjIndex());
|
||||||
|
@ -1006,47 +960,96 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
wjxDjxxTmxx.setId(id);
|
|
||||||
WjxDjxxTmxx djxxTmxx = baseMapper.getSfysj(wjxDjxxTmxx);
|
WjxDjxxTmxx djxxTmxx = baseMapper.getSfysj(wjxDjxxTmxx);
|
||||||
if(djxxTmxx==null){
|
if (djxxTmxx == null) {
|
||||||
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
String id = new DefaultIdentifierGenerator().nextId(new WjxDjxxTmxx()).toString();
|
||||||
|
|
||||||
|
try {
|
||||||
|
QueryWrapper<WjxWjxxTmlb> wjxWjxxTmlbQueryWrapper = new QueryWrapper<>();
|
||||||
|
wjxWjxxTmlbQueryWrapper.eq("main_id", wjxxPar.getId());
|
||||||
|
wjxWjxxTmlbQueryWrapper.eq("wj_index", wjxDjxxTmxx.getWjIndex());
|
||||||
|
wjxWjxxTmlbQueryWrapper.last("limit 1");
|
||||||
|
WjxWjxxTmlb tmlb = wjxWjxxTmlbMapper.selectOne(wjxWjxxTmlbQueryWrapper);
|
||||||
|
wjxDjxxTmxx.setPicPath(tmlb.getPicPath());
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
wjxDjxxTmxx.setId(id);
|
||||||
|
WjxDjxxTmxx djxxTmxx = baseMapper.getSfysj(wjxDjxxTmxx);
|
||||||
|
if (djxxTmxx == null) {
|
||||||
|
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
String id = new DefaultIdentifierGenerator().nextId(new WjxDjxxTmxx()).toString();
|
||||||
|
|
||||||
|
try {
|
||||||
|
QueryWrapper<WjxWjxx> wjxWjxxQueryWrapper = new QueryWrapper<>();
|
||||||
|
wjxWjxxQueryWrapper.eq("vid", vid);
|
||||||
|
wjxWjxxQueryWrapper.last("limit 1");
|
||||||
|
WjxWjxx wjxxPar = wjxWjxxMapper.selectOne(wjxWjxxQueryWrapper);
|
||||||
|
QueryWrapper<WjxWjxxTmlb> wjxWjxxTmlbQueryWrapper = new QueryWrapper<>();
|
||||||
|
wjxWjxxTmlbQueryWrapper.eq("main_id", wjxxPar.getId());
|
||||||
|
wjxWjxxTmlbQueryWrapper.eq("wj_index", wjxDjxxTmxx.getWjIndex());
|
||||||
|
wjxWjxxTmlbQueryWrapper.last("limit 1");
|
||||||
|
WjxWjxxTmlb tmlb = wjxWjxxTmlbMapper.selectOne(wjxWjxxTmlbQueryWrapper);
|
||||||
|
wjxDjxxTmxx.setPicPath(tmlb.getPicPath());
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
wjxDjxxTmxx.setId(id);
|
||||||
|
WjxDjxxTmxx djxxTmxx = baseMapper.getSfysj(wjxDjxxTmxx);
|
||||||
|
if (djxxTmxx == null) {
|
||||||
|
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//修改答卷信息
|
|
||||||
baseMapper.updateAnswer(wjxDjxx);
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
baseMapper.updateErrMsg(wjxDjxxPar.getUserId(), vid, ansJsonResult.getString("errormsg"));
|
|
||||||
return ansJsonResult.getString("errormsg");
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
//修改答卷信息
|
||||||
if(StringUtils.isNotBlank(jidRes)){
|
baseMapper.updateAnswer(wjxDjxx);
|
||||||
jsscore(jidRes);
|
}
|
||||||
|
} else {
|
||||||
|
baseMapper.updateErrMsg(wjxDjxxPar.getUserId(), vid, ansJsonResult.getString("errormsg"));
|
||||||
|
return ansJsonResult.getString("errormsg");
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (StringUtils.isNotBlank(jidRes)) {
|
||||||
|
jsscore(jidRes);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return "获取成功!";
|
return "获取成功!";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void jsscore(String jid){
|
@Override
|
||||||
|
public int upZbcs(WjxDjxx wjxDjxx) {
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
wjxDjxx.setCreateBy(sysUser.getUsername());
|
||||||
|
return baseMapper.upZbcs(wjxDjxx);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void jsscore(String jid) {
|
||||||
try {
|
try {
|
||||||
if(StringUtils.equals(jid,"122233965812")){
|
if (StringUtils.equals(jid, "122233965812")) {
|
||||||
System.out.println("jid");
|
System.out.println("jid");
|
||||||
}
|
}
|
||||||
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
||||||
wjxDjxxTmxx.setJid(jid);
|
wjxDjxxTmxx.setJid(jid);
|
||||||
wjxDjxxTmxx = baseMapper.getSumScore(wjxDjxxTmxx);
|
wjxDjxxTmxx = baseMapper.getSumScore(wjxDjxxTmxx);
|
||||||
WjxDjxx par2 = new WjxDjxx();
|
WjxDjxx par2 = new WjxDjxx();
|
||||||
if(wjxDjxxTmxx.getItemScore() != null && wjxDjxxTmxx.getItemScore()>0){
|
if (wjxDjxxTmxx.getItemScore() != null && wjxDjxxTmxx.getItemScore() > 0) {
|
||||||
par2.setScore(wjxDjxxTmxx.getItemScore());
|
par2.setScore(wjxDjxxTmxx.getItemScore());
|
||||||
par2.setJid(jid);
|
par2.setJid(jid);
|
||||||
baseMapper.updateScoreByJid(par2);
|
baseMapper.updateScoreByJid(par2);
|
||||||
|
|
|
@ -0,0 +1,165 @@
|
||||||
|
package org.jeecg.modules.kc.wjxDjxxFzbtj.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.modules.kc.wjxDjxxFzbtj.entity.WjxDjxxFzbtj;
|
||||||
|
import org.jeecg.modules.kc.wjxDjxxFzbtj.service.IWjxDjxxFzbtjService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: wjx_djxx_fzbtj
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-01-07
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags = "wjx_djxx_fzbtj")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wjxDjxxFzbtj/wjxDjxxFzbtj")
|
||||||
|
@Slf4j
|
||||||
|
public class WjxDjxxFzbtjController extends JeecgController<WjxDjxxFzbtj, IWjxDjxxFzbtjService> {
|
||||||
|
@Autowired
|
||||||
|
private IWjxDjxxFzbtjService wjxDjxxFzbtjService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param wjxDjxxFzbtj
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "wjx_djxx_fzbtj-分页列表查询")
|
||||||
|
@ApiOperation(value = "wjx_djxx_fzbtj-分页列表查询", notes = "wjx_djxx_fzbtj-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<WjxDjxxFzbtj>> queryPageList(WjxDjxxFzbtj wjxDjxxFzbtj,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<WjxDjxxFzbtj> queryWrapper = QueryGenerator.initQueryWrapper(wjxDjxxFzbtj, req.getParameterMap());
|
||||||
|
Page<WjxDjxxFzbtj> page = new Page<WjxDjxxFzbtj>(pageNo, pageSize);
|
||||||
|
IPage<WjxDjxxFzbtj> pageList = wjxDjxxFzbtjService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param wjxDjxxFzbtj
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "wjx_djxx_fzbtj-添加")
|
||||||
|
@ApiOperation(value = "wjx_djxx_fzbtj-添加", notes = "wjx_djxx_fzbtj-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<Map<String, Object>> add(@RequestBody WjxDjxxFzbtj wjxDjxxFzbtj) {
|
||||||
|
return Result.OK(wjxDjxxFzbtjService.saveData(wjxDjxxFzbtj));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param wjxDjxxFzbtj
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "wjx_djxx_fzbtj-编辑")
|
||||||
|
@ApiOperation(value = "wjx_djxx_fzbtj-编辑", notes = "wjx_djxx_fzbtj-编辑")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody WjxDjxxFzbtj wjxDjxxFzbtj) {
|
||||||
|
wjxDjxxFzbtjService.updateById(wjxDjxxFzbtj);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "wjx_djxx_fzbtj-通过id删除")
|
||||||
|
@ApiOperation(value = "wjx_djxx_fzbtj-通过id删除", notes = "wjx_djxx_fzbtj-通过id删除")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
|
wjxDjxxFzbtjService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "wjx_djxx_fzbtj-批量删除")
|
||||||
|
@ApiOperation(value = "wjx_djxx_fzbtj-批量删除", notes = "wjx_djxx_fzbtj-批量删除")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
|
this.wjxDjxxFzbtjService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "wjx_djxx_fzbtj-通过id查询")
|
||||||
|
@ApiOperation(value = "wjx_djxx_fzbtj-通过id查询", notes = "wjx_djxx_fzbtj-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<WjxDjxxFzbtj> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
|
WjxDjxxFzbtj wjxDjxxFzbtj = wjxDjxxFzbtjService.getById(id);
|
||||||
|
if (wjxDjxxFzbtj == null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(wjxDjxxFzbtj);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param wjxDjxxFzbtj
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, WjxDjxxFzbtj wjxDjxxFzbtj) {
|
||||||
|
return super.exportXls(request, wjxDjxxFzbtj, WjxDjxxFzbtj.class, "wjx_djxx_fzbtj");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, WjxDjxxFzbtj.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取考试剩余时间
|
||||||
|
*
|
||||||
|
* @param redisKey
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/getExamTime")
|
||||||
|
public Result<String> getExamTime(@RequestBody String redisKey) {
|
||||||
|
return Result.OK(wjxDjxxFzbtjService.getExamTime(redisKey));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,105 @@
|
||||||
|
package org.jeecg.modules.kc.wjxDjxxFzbtj.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: wjx_djxx_fzbtj
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-01-07
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("wjx_djxx_fzbtj")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "wjx_djxx_fzbtj对象", description = "wjx_djxx_fzbtj")
|
||||||
|
public class WjxDjxxFzbtj implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
/**
|
||||||
|
* wjx_djxx表id
|
||||||
|
*/
|
||||||
|
@Excel(name = "wjx_djxx表id", width = 15)
|
||||||
|
@ApiModelProperty(value = "wjx_djxx表id")
|
||||||
|
private String djxxId;
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private String createBy;
|
||||||
|
/**
|
||||||
|
* 学生姓名
|
||||||
|
*/
|
||||||
|
@Excel(name = "学生姓名", width = 15)
|
||||||
|
@ApiModelProperty(value = "学生姓名")
|
||||||
|
private String studentName;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Date updateTime;
|
||||||
|
/**
|
||||||
|
* 问卷编号(提交问卷、查询问卷会用到)
|
||||||
|
*/
|
||||||
|
@Excel(name = "问卷编号(提交问卷、查询问卷会用到)", width = 15)
|
||||||
|
@ApiModelProperty(value = "问卷编号(提交问卷、查询问卷会用到)")
|
||||||
|
private String vid;
|
||||||
|
/**
|
||||||
|
* 答卷编号
|
||||||
|
*/
|
||||||
|
@Excel(name = "答卷编号", width = 15)
|
||||||
|
@ApiModelProperty(value = "答卷编号")
|
||||||
|
private String jid;
|
||||||
|
/**
|
||||||
|
* 作弊类型
|
||||||
|
* 1、退出全屏
|
||||||
|
* 2、切屏
|
||||||
|
* 3、考试超时
|
||||||
|
*/
|
||||||
|
@Excel(name = "作弊类型1、退出全屏2、切屏3、考试超时4、开始答题", width = 15)
|
||||||
|
@ApiModelProperty(value = "作弊类型1、退出全屏2、切屏3、考试超时4、开始答题")
|
||||||
|
private int type;
|
||||||
|
/**
|
||||||
|
* 作弊内容:XX时间,XX操作;
|
||||||
|
*/
|
||||||
|
@Excel(name = "作弊内容:XX时间,XX操作;", width = 15)
|
||||||
|
@ApiModelProperty(value = "作弊内容:XX时间,XX操作;")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
//作答时限(分钟)
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer zdsx;
|
||||||
|
|
||||||
|
//结束时间
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String endTime;
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package org.jeecg.modules.kc.wjxDjxxFzbtj.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.jeecg.modules.kc.wjxDjxxFzbtj.entity.WjxDjxxFzbtj;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: wjx_djxx_fzbtj
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-01-07
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface WjxDjxxFzbtjMapper extends BaseMapper<WjxDjxxFzbtj> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.jeecg.modules.kc.wjxDjxxFzbtj.mapper.WjxDjxxFzbtjMapper">
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,19 @@
|
||||||
|
package org.jeecg.modules.kc.wjxDjxxFzbtj.service;
|
||||||
|
|
||||||
|
import org.jeecg.modules.kc.wjxDjxxFzbtj.entity.WjxDjxxFzbtj;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: wjx_djxx_fzbtj
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-01-07
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IWjxDjxxFzbtjService extends IService<WjxDjxxFzbtj> {
|
||||||
|
Map<String, Object> saveData(WjxDjxxFzbtj wjxDjxxFzbtj);
|
||||||
|
|
||||||
|
String getExamTime(String redisKey);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,137 @@
|
||||||
|
package org.jeecg.modules.kc.wjxDjxxFzbtj.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.jeecg.common.system.vo.LoginUser;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import org.jeecg.modules.kc.wjxDjxxFzbtj.entity.WjxDjxxFzbtj;
|
||||||
|
import org.jeecg.modules.kc.wjxDjxxFzbtj.mapper.WjxDjxxFzbtjMapper;
|
||||||
|
import org.jeecg.modules.kc.wjxDjxxFzbtj.service.IWjxDjxxFzbtjService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.Duration;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.time.format.DateTimeParseException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: wjx_djxx_fzbtj
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-01-07
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WjxDjxxFzbtjServiceImpl extends ServiceImpl<WjxDjxxFzbtjMapper, WjxDjxxFzbtj> implements IWjxDjxxFzbtjService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public RedisTemplate redisTemplate;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> saveData(WjxDjxxFzbtj wjxDjxxFzbtj) {
|
||||||
|
// 创建返回的Map
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
wjxDjxxFzbtj.setId(IdUtil.simpleUUID());
|
||||||
|
wjxDjxxFzbtj.setStudentName(sysUser.getRealname());
|
||||||
|
|
||||||
|
// 设置内容
|
||||||
|
switch (wjxDjxxFzbtj.getType()) {
|
||||||
|
case 1:
|
||||||
|
wjxDjxxFzbtj.setContent(sysUser.getRealname() + "在" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy年MM月dd日 HH:mm:ss")) + "退出全屏;");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
wjxDjxxFzbtj.setContent(sysUser.getRealname() + "在" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy年MM月dd日 HH:mm:ss")) + "切屏;");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
wjxDjxxFzbtj.setContent(sysUser.getRealname() + "在" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy年MM月dd日 HH:mm:ss")) + "提交超时;");
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
if (wjxDjxxFzbtj.getZdsx() != null) {
|
||||||
|
String finishTime = oConvertUtils.getString(redisTemplate.opsForValue().get("ktcy" + ":" + wjxDjxxFzbtj.getVid() + ":" + sysUser.getUsername()));
|
||||||
|
resultMap.put("finishTime", finishTime);//考试结束时间
|
||||||
|
if (StringUtils.isBlank(finishTime)) {
|
||||||
|
//计算考试剩余时间
|
||||||
|
String endTimeStr = wjxDjxxFzbtj.getEndTime();
|
||||||
|
LocalDateTime endTime = LocalDateTime.parse(endTimeStr, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
Duration duration = Duration.between(now, endTime);
|
||||||
|
finishTime = LocalDateTime.now().plus(Duration.ofMinutes(wjxDjxxFzbtj.getZdsx())).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||||
|
redisTemplate.opsForValue().set(
|
||||||
|
"ktcy" + ":" + wjxDjxxFzbtj.getVid() + ":" + sysUser.getUsername(),
|
||||||
|
finishTime,
|
||||||
|
duration.getSeconds(),
|
||||||
|
TimeUnit.SECONDS);
|
||||||
|
resultMap.put("finishTime", finishTime);//考试结束时间
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
// 解析结束时间并检查是否过期
|
||||||
|
LocalDateTime finishDateTime = LocalDateTime.parse(finishTime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
boolean isExpired = !finishDateTime.isAfter(now);
|
||||||
|
|
||||||
|
resultMap.put("expired", isExpired);//是否超时
|
||||||
|
|
||||||
|
//未超时返回剩余时间格式化后的字符串
|
||||||
|
if (!isExpired) {
|
||||||
|
Duration duration = Duration.between(now, finishDateTime);
|
||||||
|
|
||||||
|
long hoursLeft = duration.toHours();
|
||||||
|
long minutesLeft = duration.toMinutes() % 60;
|
||||||
|
long secondsLeft = duration.getSeconds() % 60;
|
||||||
|
|
||||||
|
StringBuilder timeLeftBuilder = new StringBuilder();
|
||||||
|
|
||||||
|
if (hoursLeft > 0) {
|
||||||
|
timeLeftBuilder.append(hoursLeft).append("小时");
|
||||||
|
}
|
||||||
|
if (minutesLeft > 0 || hoursLeft == 0) { // 如果没有小时或有分钟,则显示分钟
|
||||||
|
if (timeLeftBuilder.length() > 0) {
|
||||||
|
timeLeftBuilder.append(" ");
|
||||||
|
}
|
||||||
|
timeLeftBuilder.append(minutesLeft).append("分钟");
|
||||||
|
}
|
||||||
|
if (secondsLeft > 0 || (hoursLeft == 0 && minutesLeft == 0)) { // 如果没有小时和分钟或者有秒,则显示秒
|
||||||
|
if (timeLeftBuilder.length() > 0) {
|
||||||
|
timeLeftBuilder.append(" ");
|
||||||
|
}
|
||||||
|
timeLeftBuilder.append(secondsLeft).append("秒");
|
||||||
|
}
|
||||||
|
|
||||||
|
resultMap.put("timeLeft", timeLeftBuilder.toString());
|
||||||
|
}
|
||||||
|
} catch (DateTimeParseException e) {
|
||||||
|
// 如果解析失败,可以在这里处理异常
|
||||||
|
// Map<String, Object> errorResult = new HashMap<>();
|
||||||
|
// errorResult.put("error", "时间格式错误");
|
||||||
|
// return errorResult;
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
wjxDjxxFzbtj.setContent(sysUser.getRealname() + "在" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy年MM月dd日 HH:mm:ss")) + "开始作答;");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// 处理其他类型
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
baseMapper.insert(wjxDjxxFzbtj);
|
||||||
|
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getExamTime(String redisKey) {
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
String string = oConvertUtils.getString(redisTemplate.opsForValue().get(redisKey + ":" + sysUser.getUsername()));
|
||||||
|
return string;
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -105,6 +105,10 @@ public class WjxWjxx implements Serializable {
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
|
||||||
private Date endTime;
|
private Date endTime;
|
||||||
|
@ApiModelProperty(value = "防作弊模式:Y-开启 N-关闭")
|
||||||
|
private String fzbms;
|
||||||
|
@ApiModelProperty(value = "作答时限(答题时间限制)")
|
||||||
|
private Integer zdsx;
|
||||||
|
|
||||||
private String sort;//排序
|
private String sort;//排序
|
||||||
private String score;//占比
|
private String score;//占比
|
||||||
|
@ -158,4 +162,6 @@ public class WjxWjxx implements Serializable {
|
||||||
private String yuanTeacherNo;
|
private String yuanTeacherNo;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String yuanTeacherName;
|
private String yuanTeacherName;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String ts;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package org.jeecg.modules.kc.wjxWjxx.mapper;
|
package org.jeecg.modules.kc.wjxWjxx.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.jeecg.modules.kc.wjxWjxx.entity.KccyglSys;
|
import org.jeecg.modules.kc.wjxWjxx.entity.KccyglSys;
|
||||||
import org.jeecg.modules.kc.wjxWjxx.entity.WjxWjxx;
|
import org.jeecg.modules.kc.wjxWjxx.entity.WjxWjxx;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 问卷信息
|
* @Description: 问卷信息
|
||||||
|
|
|
@ -40,6 +40,8 @@
|
||||||
a.kcmc,
|
a.kcmc,
|
||||||
a.start_time,
|
a.start_time,
|
||||||
a.end_time,
|
a.end_time,
|
||||||
|
a.fzbms,
|
||||||
|
a.zdsx,
|
||||||
ifnull(b.flag,'-1') as flag,
|
ifnull(b.flag,'-1') as flag,
|
||||||
b.id as djId
|
b.id as djId
|
||||||
from wjx_wjxx a
|
from wjx_wjxx a
|
||||||
|
|
|
@ -3,13 +3,12 @@ package org.jeecg.modules.kc.wjxWjxx.service;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.jeecg.modules.kc.wjxWjxx.entity.KccyglSys;
|
import org.jeecg.modules.kc.wjxWjxx.entity.KccyglSys;
|
||||||
import org.jeecg.modules.kc.wjxWjxx.entity.WjxWjxx;
|
import org.jeecg.modules.kc.wjxWjxx.entity.WjxWjxx;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 问卷信息
|
* @Description: 问卷信息
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
package org.jeecg.modules.kc.wjxWjxx.service.impl;
|
package org.jeecg.modules.kc.wjxWjxx.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.xkcoding.http.HttpUtil;
|
import com.xkcoding.http.HttpUtil;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.jeecg.common.system.vo.LoginUser;
|
import org.jeecg.common.system.vo.LoginUser;
|
||||||
|
@ -36,25 +34,21 @@ import org.jeecg.modules.kc.wjxWjxxTmlb.mapper.WjxWjxxTmlbMapper;
|
||||||
import org.jeecg.modules.kc.wjxWjxxTmlb.mapper.WjxWjxxTmxxMapper;
|
import org.jeecg.modules.kc.wjxWjxxTmlb.mapper.WjxWjxxTmxxMapper;
|
||||||
import org.jeecg.modules.kc.zyDbtx.entity.ZyDbtx;
|
import org.jeecg.modules.kc.zyDbtx.entity.ZyDbtx;
|
||||||
import org.jeecg.modules.kc.zyDbtx.service.IZyDbtxService;
|
import org.jeecg.modules.kc.zyDbtx.service.IZyDbtxService;
|
||||||
import org.jeecg.modules.kc.zyInfo.entity.ZyInfo;
|
|
||||||
import org.jeecg.modules.kc.zyInfoScjl.entity.ZyInfoScjl;
|
import org.jeecg.modules.kc.zyInfoScjl.entity.ZyInfoScjl;
|
||||||
import org.jeecg.modules.kc.zyInfoScjl.service.IZyInfoScjlService;
|
import org.jeecg.modules.kc.zyInfoScjl.service.IZyInfoScjlService;
|
||||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
|
|
||||||
import org.jeecg.modules.tools.dbsdkfzpt.RestTemplateUtils;
|
import org.jeecg.modules.tools.dbsdkfzpt.RestTemplateUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.http.*;
|
import org.springframework.http.*;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
import java.time.temporal.ChronoUnit;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 问卷信息
|
* @Description: 问卷信息
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
* @Date: 2024-04-26
|
* @Date: 2024-04-26
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@ -97,7 +91,7 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
this.uploadpath = uploadPath;
|
this.uploadpath = uploadPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Value(value="${jeecg.uploadType}")
|
@Value(value = "${jeecg.uploadType}")
|
||||||
private String uploadType;
|
private String uploadType;
|
||||||
@Value(value = "${jeecg.path.webapp}")
|
@Value(value = "${jeecg.path.webapp}")
|
||||||
private String downloadpath;
|
private String downloadpath;
|
||||||
|
@ -107,17 +101,17 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
private String upLoadPath;
|
private String upLoadPath;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<WjxWjxx> findPage(WjxWjxx wjxWjxx, Page<WjxWjxx> page){
|
public Page<WjxWjxx> findPage(WjxWjxx wjxWjxx, Page<WjxWjxx> page) {
|
||||||
List<WjxWjxx> list = baseMapper.findPage(page,wjxWjxx);
|
List<WjxWjxx> list = baseMapper.findPage(page, wjxWjxx);
|
||||||
page.setRecords(list);
|
page.setRecords(list);
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<WjxWjxx> findStuPage(WjxWjxx wjxWjxx, Page<WjxWjxx> page){
|
public Page<WjxWjxx> findStuPage(WjxWjxx wjxWjxx, Page<WjxWjxx> page) {
|
||||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
wjxWjxx.setUserId(user.getUsername());
|
wjxWjxx.setUserId(user.getUsername());
|
||||||
List<WjxWjxx> list = baseMapper.findStuPage(page,wjxWjxx);
|
List<WjxWjxx> list = baseMapper.findStuPage(page, wjxWjxx);
|
||||||
page.setRecords(list);
|
page.setRecords(list);
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
@ -284,92 +278,92 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WjxWjxx kcxx(String rwbh,String xqxn){
|
public WjxWjxx kcxx(String rwbh, String xqxn) {
|
||||||
return baseMapper.kcxx(rwbh,xqxn);
|
return baseMapper.kcxx(rwbh, xqxn);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String fbwj(String id,String wjlx) {
|
public String fbwj(String id, String wjlx) {
|
||||||
|
|
||||||
WjxWjxx wjxWjxx = baseMapper.selectById(id);
|
WjxWjxx wjxWjxx = baseMapper.selectById(id);
|
||||||
|
|
||||||
QueryWrapper<WjxWjxxTmlb> wjxWjxxTmlbQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<WjxWjxxTmlb> wjxWjxxTmlbQueryWrapper = new QueryWrapper<>();
|
||||||
wjxWjxxTmlbQueryWrapper.eq("main_id", id);
|
wjxWjxxTmlbQueryWrapper.eq("main_id", id);
|
||||||
wjxWjxxTmlbQueryWrapper.orderByAsc("wj_index");
|
wjxWjxxTmlbQueryWrapper.orderByAsc("wj_index");
|
||||||
List<WjxWjxxTmlb> wjxWjxxTmlbList =wjxWjxxTmlbMapper.selectList(wjxWjxxTmlbQueryWrapper);
|
List<WjxWjxxTmlb> wjxWjxxTmlbList = wjxWjxxTmlbMapper.selectList(wjxWjxxTmlbQueryWrapper);
|
||||||
|
|
||||||
List<Map<String,Object>> questionsList = new ArrayList<>();
|
List<Map<String, Object>> questionsList = new ArrayList<>();
|
||||||
for(WjxWjxxTmlb wWjxWjxxTmlb:wjxWjxxTmlbList){
|
for (WjxWjxxTmlb wWjxWjxxTmlb : wjxWjxxTmlbList) {
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("q_index",wWjxWjxxTmlb.getWjIndex());
|
map.put("q_index", wWjxWjxxTmlb.getWjIndex());
|
||||||
map.put("q_type",wWjxWjxxTmlb.getWjType());
|
map.put("q_type", wWjxWjxxTmlb.getWjType());
|
||||||
map.put("q_title",wWjxWjxxTmlb.getWjTitle());
|
map.put("q_title", wWjxWjxxTmlb.getWjTitle());
|
||||||
if(wWjxWjxxTmlb.getWjSubtype() != null){
|
if (wWjxWjxxTmlb.getWjSubtype() != null) {
|
||||||
map.put("q_subtype",wWjxWjxxTmlb.getWjSubtype());
|
map.put("q_subtype", wWjxWjxxTmlb.getWjSubtype());
|
||||||
}
|
}
|
||||||
if(wjlx.equals("6")){
|
if (wjlx.equals("6")) {
|
||||||
if(wWjxWjxxTmlb.getWjType() != 8){
|
if (wWjxWjxxTmlb.getWjType() != 8) {
|
||||||
if(wWjxWjxxTmlb.getWjScore()!=null){
|
if (wWjxWjxxTmlb.getWjScore() != null) {
|
||||||
map.put("q_score",wWjxWjxxTmlb.getWjScore());
|
map.put("q_score", wWjxWjxxTmlb.getWjScore());
|
||||||
}
|
}
|
||||||
map.put("is_requir",false);
|
map.put("is_requir", false);
|
||||||
map.put("q_ceshi",true);
|
map.put("q_ceshi", true);
|
||||||
map.put("is_toupiao",3);
|
map.put("is_toupiao", 3);
|
||||||
}else{
|
} else {
|
||||||
map.put("is_requir",false);
|
map.put("is_requir", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(wWjxWjxxTmlb.getWjType() == 3 || wWjxWjxxTmlb.getWjType() == 4){
|
if (wWjxWjxxTmlb.getWjType() == 3 || wWjxWjxxTmlb.getWjType() == 4) {
|
||||||
//单选和多选
|
//单选和多选
|
||||||
List<Map<String,Object>> itemsList = new ArrayList<>();
|
List<Map<String, Object>> itemsList = new ArrayList<>();
|
||||||
List<WjxWjxxTmxx> tmxxList = wjxWjxxTmxxMapper.selectByMainId(wWjxWjxxTmlb.getId());
|
List<WjxWjxxTmxx> tmxxList = wjxWjxxTmxxMapper.selectByMainId(wWjxWjxxTmlb.getId());
|
||||||
for(WjxWjxxTmxx wjxWjxxTmxx:tmxxList){
|
for (WjxWjxxTmxx wjxWjxxTmxx : tmxxList) {
|
||||||
Map<String,Object> tmxxMap = new HashMap<>();
|
Map<String, Object> tmxxMap = new HashMap<>();
|
||||||
tmxxMap.put("q_index",wjxWjxxTmxx.getWjIndex());
|
tmxxMap.put("q_index", wjxWjxxTmxx.getWjIndex());
|
||||||
tmxxMap.put("item_index",wjxWjxxTmxx.getItemIndex());
|
tmxxMap.put("item_index", wjxWjxxTmxx.getItemIndex());
|
||||||
tmxxMap.put("item_title",wjxWjxxTmxx.getItemTitle());
|
tmxxMap.put("item_title", wjxWjxxTmxx.getItemTitle());
|
||||||
tmxxMap.put("item_selected",Boolean.parseBoolean(wjxWjxxTmxx.getItemSelected()));
|
tmxxMap.put("item_selected", Boolean.parseBoolean(wjxWjxxTmxx.getItemSelected()));
|
||||||
tmxxMap.put("item_score",0);
|
tmxxMap.put("item_score", 0);
|
||||||
JSONObject json = new JSONObject(tmxxMap);
|
JSONObject json = new JSONObject(tmxxMap);
|
||||||
itemsList.add(json);
|
itemsList.add(json);
|
||||||
}
|
}
|
||||||
map.put("items",itemsList);
|
map.put("items", itemsList);
|
||||||
}else if(wWjxWjxxTmlb.getWjType() == 5){
|
} else if (wWjxWjxxTmlb.getWjType() == 5) {
|
||||||
//填空
|
//填空
|
||||||
if(wWjxWjxxTmlb.getWjAnswer()!=null){
|
if (wWjxWjxxTmlb.getWjAnswer() != null) {
|
||||||
map.put("answer",wWjxWjxxTmlb.getWjAnswer());
|
map.put("answer", wWjxWjxxTmlb.getWjAnswer());
|
||||||
}else{
|
} else {
|
||||||
map.put("answer","跳过");
|
map.put("answer", "跳过");
|
||||||
}
|
}
|
||||||
}else if(wWjxWjxxTmlb.getWjType() == 6){
|
} else if (wWjxWjxxTmlb.getWjType() == 6) {
|
||||||
//多项填空,预留,之后有需求再开发
|
//多项填空,预留,之后有需求再开发
|
||||||
}else if(wWjxWjxxTmlb.getWjType() == 8){
|
} else if (wWjxWjxxTmlb.getWjType() == 8) {
|
||||||
//文件题目
|
//文件题目
|
||||||
map.put("q_subtype",8);
|
map.put("q_subtype", 8);
|
||||||
}
|
}
|
||||||
JSONObject json = new JSONObject(map);
|
JSONObject json = new JSONObject(map);
|
||||||
questionsList.add(json);
|
questionsList.add(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
//-----------题目必穿参数-------------
|
//-----------题目必穿参数-------------
|
||||||
map.put("creater","jwctest");
|
map.put("creater", "jwctest");
|
||||||
map.put("atype",wjxWjxx.getAtype());
|
map.put("atype", wjxWjxx.getAtype());
|
||||||
map.put("title",wjxWjxx.getTitle());
|
map.put("title", wjxWjxx.getTitle());
|
||||||
if(StringUtils.isNotEmpty(wjxWjxx.getContent())){
|
if (StringUtils.isNotEmpty(wjxWjxx.getContent())) {
|
||||||
map.put("desc",wjxWjxx.getContent());
|
map.put("desc", wjxWjxx.getContent());
|
||||||
}
|
}
|
||||||
map.put("publish",true);
|
map.put("publish", true);
|
||||||
map.put("questions",questionsList.toString());
|
map.put("questions", questionsList.toString());
|
||||||
String result = wjxUtil.openapi(map,"1000101");
|
String result = wjxUtil.openapi(map, "1000101");
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
if(!result.equals("")){
|
if (!result.equals("")) {
|
||||||
JSONObject jsonResult = JSONObject.parseObject(result);
|
JSONObject jsonResult = JSONObject.parseObject(result);
|
||||||
if(jsonResult.getBoolean("result")){
|
if (jsonResult.getBoolean("result")) {
|
||||||
JSONObject dataJson = jsonResult.getJSONObject("data");
|
JSONObject dataJson = jsonResult.getJSONObject("data");
|
||||||
String vid = dataJson.getString("vid");
|
String vid = dataJson.getString("vid");
|
||||||
baseMapper.updateVid(id,vid);
|
baseMapper.updateVid(id, vid);
|
||||||
}else{
|
} else {
|
||||||
return jsonResult.getString("errormsg");
|
return jsonResult.getString("errormsg");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -381,10 +375,10 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
|
|
||||||
WjxWjxx wjxWjxx = baseMapper.selectById(id);
|
WjxWjxx wjxWjxx = baseMapper.selectById(id);
|
||||||
String vid = wjxWjxx.getVid();
|
String vid = wjxWjxx.getVid();
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("vid",Integer.valueOf(vid));
|
map.put("vid", Integer.valueOf(vid));
|
||||||
//调用接口,提交
|
//调用接口,提交
|
||||||
String result = wjxUtil.openapi(map,"1001101");
|
String result = wjxUtil.openapi(map, "1001101");
|
||||||
JSONObject jsonResult = JSONObject.parseObject(result);
|
JSONObject jsonResult = JSONObject.parseObject(result);
|
||||||
return jsonResult;
|
return jsonResult;
|
||||||
}
|
}
|
||||||
|
@ -393,13 +387,13 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
public JSONObject wjxxDownLoad(String id) {
|
public JSONObject wjxxDownLoad(String id) {
|
||||||
WjxWjxx wjxWjxx = baseMapper.selectById(id);
|
WjxWjxx wjxWjxx = baseMapper.selectById(id);
|
||||||
String vid = wjxWjxx.getVid();
|
String vid = wjxWjxx.getVid();
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("vid",Integer.valueOf(vid));
|
map.put("vid", Integer.valueOf(vid));
|
||||||
map.put("suffix",0);
|
map.put("suffix", 0);
|
||||||
//调用接口,提交
|
//调用接口,提交
|
||||||
String result = wjxUtil.openapi(map,"1001004");
|
String result = wjxUtil.openapi(map, "1001004");
|
||||||
JSONObject jsonResult = JSONObject.parseObject(result);
|
JSONObject jsonResult = JSONObject.parseObject(result);
|
||||||
System.out.println("1----------->"+jsonResult.toString());
|
System.out.println("1----------->" + jsonResult.toString());
|
||||||
// if(StringUtils.equals("true",jsonResult.getString("result"))){
|
// if(StringUtils.equals("true",jsonResult.getString("result"))){
|
||||||
// JSONObject data = jsonResult.getJSONObject("data");
|
// JSONObject data = jsonResult.getJSONObject("data");
|
||||||
// String taskid = data.getString("taskid");
|
// String taskid = data.getString("taskid");
|
||||||
|
@ -432,13 +426,13 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<KccyglSys> sysList(Page<KccyglSys> page, QueryWrapper<KccyglSys> queryWrapper,KccyglSys kccyglSys) {
|
public IPage<KccyglSys> sysList(Page<KccyglSys> page, QueryWrapper<KccyglSys> queryWrapper, KccyglSys kccyglSys) {
|
||||||
return baseMapper.sysList(page,queryWrapper,kccyglSys);
|
return baseMapper.sysList(page, queryWrapper, kccyglSys);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<KccyglSys> exportSysXls(QueryWrapper<KccyglSys> queryWrapper,KccyglSys kccyglSys) {
|
public List<KccyglSys> exportSysXls(QueryWrapper<KccyglSys> queryWrapper, KccyglSys kccyglSys) {
|
||||||
return baseMapper.exportSysXls(queryWrapper,kccyglSys);
|
return baseMapper.exportSysXls(queryWrapper, kccyglSys);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -448,7 +442,7 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String querySfdtById(String id, String username) {
|
public String querySfdtById(String id, String username) {
|
||||||
return baseMapper.querySfdtById(id,username);
|
return baseMapper.querySfdtById(id, username);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -457,37 +451,36 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
WjxWjxx wjxWjxx = baseMapper.queryCyjgById(id);
|
WjxWjxx wjxWjxx = baseMapper.queryCyjgById(id);
|
||||||
|
|
||||||
QueryWrapper<WjxWjxxTmlb> wjxWjxxTmlbQueryWrapper = new QueryWrapper<WjxWjxxTmlb>();
|
QueryWrapper<WjxWjxxTmlb> wjxWjxxTmlbQueryWrapper = new QueryWrapper<WjxWjxxTmlb>();
|
||||||
wjxWjxxTmlbQueryWrapper.eq("main_id",id);
|
wjxWjxxTmlbQueryWrapper.eq("main_id", id);
|
||||||
wjxWjxxTmlbQueryWrapper.orderByAsc("wj_index");
|
wjxWjxxTmlbQueryWrapper.orderByAsc("wj_index");
|
||||||
List<WjxWjxxTmlb> list = wjxWjxxTmlbMapper.selectList(wjxWjxxTmlbQueryWrapper);
|
List<WjxWjxxTmlb> list = wjxWjxxTmlbMapper.selectList(wjxWjxxTmlbQueryWrapper);
|
||||||
|
|
||||||
|
|
||||||
|
for (WjxWjxxTmlb WjxWjxxTmlb : list) {
|
||||||
for(WjxWjxxTmlb WjxWjxxTmlb:list){
|
|
||||||
String num = "0";
|
String num = "0";
|
||||||
String num2 = "0";
|
String num2 = "0";
|
||||||
// if(org.apache.commons.lang3.StringUtils.equals("5",WjxWjxxTmlb.getWjType()+"")){
|
// if(org.apache.commons.lang3.StringUtils.equals("5",WjxWjxxTmlb.getWjType()+"")){
|
||||||
num= wjxDjxxMapper.getDjnumType(wjxWjxx.getVid(),WjxWjxxTmlb.getWjIndex(),null,"1");
|
num = wjxDjxxMapper.getDjnumType(wjxWjxx.getVid(), WjxWjxxTmlb.getWjIndex(), null, "1");
|
||||||
num2= wjxDjxxMapper.getDjnumType(wjxWjxx.getVid(),WjxWjxxTmlb.getWjIndex(),null,"2");
|
num2 = wjxDjxxMapper.getDjnumType(wjxWjxx.getVid(), WjxWjxxTmlb.getWjIndex(), null, "2");
|
||||||
WjxWjxxTmlb.setNum(num);
|
WjxWjxxTmlb.setNum(num);
|
||||||
WjxWjxxTmlb.setNum2(num2);
|
WjxWjxxTmlb.setNum2(num2);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
int yzd = Integer.parseInt(num) + Integer.parseInt(num2);
|
int yzd = Integer.parseInt(num) + Integer.parseInt(num2);
|
||||||
int ddrs = Integer.parseInt(num);
|
int ddrs = Integer.parseInt(num);
|
||||||
int dcrs = Integer.parseInt(num2);
|
int dcrs = Integer.parseInt(num2);
|
||||||
List<WjxWjxxTmxx> list2= wjxWjxxTmxxMapper.selectByMainId(WjxWjxxTmlb.getId());
|
List<WjxWjxxTmxx> list2 = wjxWjxxTmxxMapper.selectByMainId(WjxWjxxTmlb.getId());
|
||||||
String itemSelected = "";
|
String itemSelected = "";
|
||||||
for(WjxWjxxTmxx WjxWjxxTmxx:list2){
|
for (WjxWjxxTmxx WjxWjxxTmxx : list2) {
|
||||||
String num3= wjxDjxxMapper.getDjnum(wjxWjxx.getVid(),WjxWjxxTmxx.getWjIndex(),WjxWjxxTmxx.getItemIndex());
|
String num3 = wjxDjxxMapper.getDjnum(wjxWjxx.getVid(), WjxWjxxTmxx.getWjIndex(), WjxWjxxTmxx.getItemIndex());
|
||||||
if(org.apache.commons.lang3.StringUtils.equals(WjxWjxxTmxx.getItemSelected(),"true")){
|
if (org.apache.commons.lang3.StringUtils.equals(WjxWjxxTmxx.getItemSelected(), "true")) {
|
||||||
itemSelected = itemSelected+WjxWjxxTmxx.getItemIndex()+",";
|
itemSelected = itemSelected + WjxWjxxTmxx.getItemIndex() + ",";
|
||||||
|
|
||||||
}
|
}
|
||||||
WjxWjxxTmxx.setNum(num3);
|
WjxWjxxTmxx.setNum(num3);
|
||||||
}
|
}
|
||||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(itemSelected)){
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(itemSelected)) {
|
||||||
itemSelected = itemSelected.substring(0, itemSelected.length()-1);
|
itemSelected = itemSelected.substring(0, itemSelected.length() - 1);
|
||||||
}
|
}
|
||||||
WjxWjxxTmlb.setItemSelected(itemSelected);
|
WjxWjxxTmlb.setItemSelected(itemSelected);
|
||||||
WjxWjxxTmlb.setWjxWjxxTmxxList(list2);
|
WjxWjxxTmlb.setWjxWjxxTmxxList(list2);
|
||||||
|
@ -505,29 +498,27 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
|
|
||||||
|
|
||||||
QueryWrapper<WjxWjxx> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<WjxWjxx> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.le("start_time",new Date());
|
queryWrapper.le("start_time", new Date());
|
||||||
queryWrapper.eq("qpublish","0");
|
queryWrapper.eq("qpublish", "0");
|
||||||
List<WjxWjxx> list = baseMapper.selectList(queryWrapper);
|
List<WjxWjxx> list = baseMapper.selectList(queryWrapper);
|
||||||
for(WjxWjxx wjxWjxx : list){
|
for (WjxWjxx wjxWjxx : list) {
|
||||||
fbwj(wjxWjxx.getId(),wjxWjxx.getAtype());
|
fbwj(wjxWjxx.getId(), wjxWjxx.getAtype());
|
||||||
|
|
||||||
QueryWrapper<Xxhbbks> queryWrapper2 = new QueryWrapper<>();
|
QueryWrapper<Xxhbbks> queryWrapper2 = new QueryWrapper<>();
|
||||||
queryWrapper2.apply("a.xh = b.xh");
|
queryWrapper2.apply("a.xh = b.xh");
|
||||||
queryWrapper2.eq("b.KCAPZBBH",wjxWjxx.getRwbh());
|
queryWrapper2.eq("b.KCAPZBBH", wjxWjxx.getRwbh());
|
||||||
List<Xxhbbks> list2 = xxhbbksService.getXsxkbAllList(queryWrapper2);
|
List<Xxhbbks> list2 = xxhbbksService.getXsxkbAllList(queryWrapper2);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QueryWrapper<KcKechengbiao> kcKechengbiaoQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<KcKechengbiao> kcKechengbiaoQueryWrapper = new QueryWrapper<>();
|
||||||
kcKechengbiaoQueryWrapper.eq("rwbh",wjxWjxx.getRwbh());
|
kcKechengbiaoQueryWrapper.eq("rwbh", wjxWjxx.getRwbh());
|
||||||
kcKechengbiaoQueryWrapper.eq("jgh",wjxWjxx.getCreateBy());
|
kcKechengbiaoQueryWrapper.eq("jgh", wjxWjxx.getCreateBy());
|
||||||
kcKechengbiaoQueryWrapper.eq("xqxn",wjxWjxx.getXqxn());
|
kcKechengbiaoQueryWrapper.eq("xqxn", wjxWjxx.getXqxn());
|
||||||
kcKechengbiaoQueryWrapper.last("limit 1");
|
kcKechengbiaoQueryWrapper.last("limit 1");
|
||||||
KcKechengbiao kcKechengbiao = kcKechengbiaoService.getOne(kcKechengbiaoQueryWrapper);
|
KcKechengbiao kcKechengbiao = kcKechengbiaoService.getOne(kcKechengbiaoQueryWrapper);
|
||||||
|
|
||||||
String content = kcKechengbiao.getSkjs()+"教师发起了["+wjxWjxx.getKcmc()+"]课程“"+wjxWjxx.getTitle()+"”测验,该测验完成时间: "+DateUtils.formatDate(wjxWjxx.getStartTime(),"yyyy-MM-dd")+" ~ "+DateUtils.formatDate(wjxWjxx.getEndTime(),"yyyy-MM-dd")+",请及时完成";
|
String content = kcKechengbiao.getSkjs() + "教师发起了[" + wjxWjxx.getKcmc() + "]课程“" + wjxWjxx.getTitle() + "”测验,该测验完成时间: " + DateUtils.formatDate(wjxWjxx.getStartTime(), "yyyy-MM-dd") + " ~ " + DateUtils.formatDate(wjxWjxx.getEndTime(), "yyyy-MM-dd") + ",请及时完成";
|
||||||
for(Xxhbbks xxhbbks:list2){
|
for (Xxhbbks xxhbbks : list2) {
|
||||||
try {
|
try {
|
||||||
//作业代办提醒
|
//作业代办提醒
|
||||||
ZyDbtx zyDbtx = new ZyDbtx();
|
ZyDbtx zyDbtx = new ZyDbtx();
|
||||||
|
@ -540,7 +531,7 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
zyDbtx.setFbr(wjxWjxx.getCreateBy());
|
zyDbtx.setFbr(wjxWjxx.getCreateBy());
|
||||||
zyDbtxService.save(zyDbtx);
|
zyDbtxService.save(zyDbtx);
|
||||||
|
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -552,7 +543,7 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<WjxWjxx> listOther(WjxWjxx wjxWjxx, Page<Object> objectPage) {
|
public Page<WjxWjxx> listOther(WjxWjxx wjxWjxx, Page<Object> objectPage) {
|
||||||
return baseMapper.listOther(wjxWjxx,objectPage);
|
return baseMapper.listOther(wjxWjxx, objectPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -561,72 +552,71 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
|
|
||||||
String token = getAccessToken();//获取东北师大开放平台token
|
String token = getAccessToken();//获取东北师大开放平台token
|
||||||
System.out.println("=======================================");
|
System.out.println("=======================================");
|
||||||
System.out.println("token:"+token);
|
System.out.println("token:" + token);
|
||||||
System.out.println("=======================================");
|
System.out.println("=======================================");
|
||||||
if(StringUtils.isNotEmpty(token)){//判断如果token不为空则继续操作
|
if (StringUtils.isNotEmpty(token)) {//判断如果token不为空则继续操作
|
||||||
|
|
||||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||||
String idsList[] = ids.split(",");
|
String idsList[] = ids.split(",");
|
||||||
if(idsList.length>0){
|
if (idsList.length > 0) {
|
||||||
String yyyy = DateUtils.formatDate(new Date(),"yyyy");
|
String yyyy = DateUtils.formatDate(new Date(), "yyyy");
|
||||||
String mm = DateUtils.formatDate(new Date(),"MM");
|
String mm = DateUtils.formatDate(new Date(), "MM");
|
||||||
for(String zyId:idsList){
|
for (String zyId : idsList) {
|
||||||
|
|
||||||
|
|
||||||
WjxWjxx wjxWjxx = baseMapper.selectById(zyId);
|
WjxWjxx wjxWjxx = baseMapper.selectById(zyId);
|
||||||
//判断没有上传考核材料的数据,才进行上传,否则不上传
|
//判断没有上传考核材料的数据,才进行上传,否则不上传
|
||||||
if(wjxWjxx!=null && !StringUtils.equals("1",wjxWjxx.getSfsckhcl())){
|
if (wjxWjxx != null && !StringUtils.equals("1", wjxWjxx.getSfsckhcl())) {
|
||||||
QueryWrapper<KcKechengbiao> kcKechengbiaoQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<KcKechengbiao> kcKechengbiaoQueryWrapper = new QueryWrapper<>();
|
||||||
kcKechengbiaoQueryWrapper.eq("xqxn",kcSysConfig.getFlag1());
|
kcKechengbiaoQueryWrapper.eq("xqxn", kcSysConfig.getFlag1());
|
||||||
kcKechengbiaoQueryWrapper.eq("rwbh",wjxWjxx.getRwbh());
|
kcKechengbiaoQueryWrapper.eq("rwbh", wjxWjxx.getRwbh());
|
||||||
kcKechengbiaoQueryWrapper.eq("jgh",wjxWjxx.getCreateBy());
|
kcKechengbiaoQueryWrapper.eq("jgh", wjxWjxx.getCreateBy());
|
||||||
kcKechengbiaoQueryWrapper.last("limit 1");
|
kcKechengbiaoQueryWrapper.last("limit 1");
|
||||||
KcKechengbiao kcKechengbiao = kcKechengbiaoService.getOne(kcKechengbiaoQueryWrapper);
|
KcKechengbiao kcKechengbiao = kcKechengbiaoService.getOne(kcKechengbiaoQueryWrapper);
|
||||||
|
|
||||||
|
|
||||||
//调用师大接口将数据上传
|
//调用师大接口将数据上传
|
||||||
String interfaceUrl = "https://intf.nenu.edu.cn/api/bd-api/post/JW_FXCJXMB";
|
String interfaceUrl = "https://intf.nenu.edu.cn/api/bd-api/post/JW_FXCJXMB";
|
||||||
List<Map<String, String>> paramsList =new ArrayList<>();
|
List<Map<String, String>> paramsList = new ArrayList<>();
|
||||||
Map<String, String> paramMap = new HashMap<>();
|
Map<String, String> paramMap = new HashMap<>();
|
||||||
paramMap.put("CJR",wjxWjxx.getCreateBy());//创建人
|
paramMap.put("CJR", wjxWjxx.getCreateBy());//创建人
|
||||||
paramMap.put("TEABH",wjxWjxx.getCreateBy());//教工号
|
paramMap.put("TEABH", wjxWjxx.getCreateBy());//教工号
|
||||||
paramMap.put("FXCJMC","课程测验"+wjxWjxx.getSort());//分项成绩名称
|
paramMap.put("FXCJMC", "课程测验" + wjxWjxx.getSort());//分项成绩名称
|
||||||
paramMap.put("TEADM",wjxWjxx.getCreateBy());//教工代码
|
paramMap.put("TEADM", wjxWjxx.getCreateBy());//教工代码
|
||||||
paramMap.put("TEAXM",kcKechengbiao.getSkjs());//教师姓名
|
paramMap.put("TEAXM", kcKechengbiao.getSkjs());//教师姓名
|
||||||
paramMap.put("FXCJBH",wjxWjxx.getId());//分项成绩编号
|
paramMap.put("FXCJBH", wjxWjxx.getId());//分项成绩编号
|
||||||
paramMap.put("XNXQMC",kcKechengbiao.getXnxq());//学年学期
|
paramMap.put("XNXQMC", kcKechengbiao.getXnxq());//学年学期
|
||||||
paramMap.put("ZYYQ",null);//作业要求
|
paramMap.put("ZYYQ", null);//作业要求
|
||||||
paramMap.put("CJSJ",DateUtils.formatDate(wjxWjxx.getCreateTime(),"yyyy-MM-dd"));//创建时间
|
paramMap.put("CJSJ", DateUtils.formatDate(wjxWjxx.getCreateTime(), "yyyy-MM-dd"));//创建时间
|
||||||
paramMap.put("FXCJBL",wjxWjxx.getScore());//比例,成绩占比
|
paramMap.put("FXCJBL", wjxWjxx.getScore());//比例,成绩占比
|
||||||
paramMap.put("FXCJLXMC","3");//分项成绩类型
|
paramMap.put("FXCJLXMC", "3");//分项成绩类型
|
||||||
paramMap.put("KCMC",kcKechengbiao.getKcmc());//课程名称
|
paramMap.put("KCMC", kcKechengbiao.getKcmc());//课程名称
|
||||||
paramMap.put("KCRWDM",wjxWjxx.getRwbh());//开课任务编号
|
paramMap.put("KCRWDM", wjxWjxx.getRwbh());//开课任务编号
|
||||||
paramMap.put("PFBZ",null);//评分标准
|
paramMap.put("PFBZ", null);//评分标准
|
||||||
paramMap.put("FXCJDM",wjxWjxx.getId());//主键
|
paramMap.put("FXCJDM", wjxWjxx.getId());//主键
|
||||||
// paramMap.put("OPERATE_STATUS","i");//操作状态
|
// paramMap.put("OPERATE_STATUS","i");//操作状态
|
||||||
paramsList.add(paramMap);
|
paramsList.add(paramMap);
|
||||||
String data = RestTemplateUtils.post(interfaceUrl,token, paramsList, MediaType.APPLICATION_JSON_UTF8, String.class);
|
String data = RestTemplateUtils.post(interfaceUrl, token, paramsList, MediaType.APPLICATION_JSON_UTF8, String.class);
|
||||||
System.out.println("=======================================");
|
System.out.println("=======================================");
|
||||||
System.out.println("data:"+data);
|
System.out.println("data:" + data);
|
||||||
System.out.println("=======================================");
|
System.out.println("=======================================");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QueryWrapper<WjxDjxx> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<WjxDjxx> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("vid",wjxWjxx.getVid());
|
queryWrapper.eq("vid", wjxWjxx.getVid());
|
||||||
queryWrapper.eq("sfsckhcl","0");
|
queryWrapper.eq("sfsckhcl", "0");
|
||||||
List<WjxDjxx> list = wjxDjxxMapper.selectList(queryWrapper);
|
List<WjxDjxx> list = wjxDjxxMapper.selectList(queryWrapper);
|
||||||
|
|
||||||
List<Map<String, String>> paramsList2 =new ArrayList<>();
|
List<Map<String, String>> paramsList2 = new ArrayList<>();
|
||||||
for(WjxDjxx wjxDjxx:list){
|
for (WjxDjxx wjxDjxx : list) {
|
||||||
|
|
||||||
|
|
||||||
List<WjxDjxxTmxx> djxxTmxxList = wjxDjxxMapper.getDjxxTmxxWjt(wjxDjxx.getJid());
|
List<WjxDjxxTmxx> djxxTmxxList = wjxDjxxMapper.getDjxxTmxxWjt(wjxDjxx.getJid());
|
||||||
if(djxxTmxxList!=null){
|
if (djxxTmxxList != null) {
|
||||||
for(WjxDjxxTmxx djxxTmxx:djxxTmxxList){
|
for (WjxDjxxTmxx djxxTmxx : djxxTmxxList) {
|
||||||
//上传作业文件
|
//上传作业文件
|
||||||
Map<String,String> uploadMap = SFTPUtil.upload(sftpConfig,upLoadPath+"/"+djxxTmxx.getAnswerText(),yyyy+"/"+mm+"/"+wjxWjxx.getVid()+"/"+djxxTmxx.getAnswerText().replace("temp/","/"));
|
Map<String, String> uploadMap = SFTPUtil.upload(sftpConfig, upLoadPath + "/" + djxxTmxx.getAnswerText(), yyyy + "/" + mm + "/" + wjxWjxx.getVid() + "/" + djxxTmxx.getAnswerText().replace("temp/", "/"));
|
||||||
if(org.apache.commons.lang3.StringUtils.equals(uploadMap.get("code"),"0")){
|
if (org.apache.commons.lang3.StringUtils.equals(uploadMap.get("code"), "0")) {
|
||||||
djxxTmxx.setFwqPath(uploadMap.get("data"));
|
djxxTmxx.setFwqPath(uploadMap.get("data"));
|
||||||
wjxDjxxMapper.updateDjxxTmxxFwqpath(djxxTmxx);
|
wjxDjxxMapper.updateDjxxTmxxFwqpath(djxxTmxx);
|
||||||
}
|
}
|
||||||
|
@ -652,32 +642,32 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
zyInfoScjlService.save(zyInfoScjl);
|
zyInfoScjlService.save(zyInfoScjl);
|
||||||
|
|
||||||
Map<String, String> paramMap2 = new HashMap<>();
|
Map<String, String> paramMap2 = new HashMap<>();
|
||||||
paramMap2.put("CJ",wjxDjxx.getScore()+"");//成绩
|
paramMap2.put("CJ", wjxDjxx.getScore() + "");//成绩
|
||||||
paramMap2.put("CJR",wjxDjxx.getCreateBy());//创建人
|
paramMap2.put("CJR", wjxDjxx.getCreateBy());//创建人
|
||||||
paramMap2.put("CJSJ",DateUtils.formatDate(wjxDjxx.getCreateTime(),"yyyy-MM-dd"));//创建时间
|
paramMap2.put("CJSJ", DateUtils.formatDate(wjxDjxx.getCreateTime(), "yyyy-MM-dd"));//创建时间
|
||||||
paramMap2.put("KCRWDM",wjxWjxx.getRwbh());//开课任务编号
|
paramMap2.put("KCRWDM", wjxWjxx.getRwbh());//开课任务编号
|
||||||
paramMap2.put("KCMC",kcKechengbiao.getKcmc());//课程名称
|
paramMap2.put("KCMC", kcKechengbiao.getKcmc());//课程名称
|
||||||
paramMap2.put("FXCJMC","课程测验"+wjxWjxx.getSort());//分项成绩名称
|
paramMap2.put("FXCJMC", "课程测验" + wjxWjxx.getSort());//分项成绩名称
|
||||||
paramMap2.put("TEAXM",kcKechengbiao.getSkjs());//教师姓名
|
paramMap2.put("TEAXM", kcKechengbiao.getSkjs());//教师姓名
|
||||||
paramMap2.put("XSXM",wjxDjxx.getUserName());//学生姓名
|
paramMap2.put("XSXM", wjxDjxx.getUserName());//学生姓名
|
||||||
paramMap2.put("KID",wjxDjxx.getId());//主键
|
paramMap2.put("KID", wjxDjxx.getId());//主键
|
||||||
paramMap2.put("XSBH",wjxDjxx.getCreateBy());//学号
|
paramMap2.put("XSBH", wjxDjxx.getCreateBy());//学号
|
||||||
paramMap2.put("FXCJBH",wjxWjxx.getId());//分项成绩编号
|
paramMap2.put("FXCJBH", wjxWjxx.getId());//分项成绩编号
|
||||||
paramMap2.put("PATH","");//附件路径
|
paramMap2.put("PATH", "");//附件路径
|
||||||
paramMap2.put("TEABH",wjxWjxx.getCreateBy());//教工号
|
paramMap2.put("TEABH", wjxWjxx.getCreateBy());//教工号
|
||||||
// paramMap2.put("OPERATE_STATUS","i");//操作状态
|
// paramMap2.put("OPERATE_STATUS","i");//操作状态
|
||||||
paramsList2.add(paramMap2);
|
paramsList2.add(paramMap2);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("=======================================");
|
System.out.println("=======================================");
|
||||||
System.out.println("paramsList2:"+paramsList2);
|
System.out.println("paramsList2:" + paramsList2);
|
||||||
System.out.println("=======================================");
|
System.out.println("=======================================");
|
||||||
//调用师大接口进行上传
|
//调用师大接口进行上传
|
||||||
String interfaceUrl2 = "https://intf.nenu.edu.cn/api/bd-api/post/JW_FXXSCJMX";
|
String interfaceUrl2 = "https://intf.nenu.edu.cn/api/bd-api/post/JW_FXXSCJMX";
|
||||||
String data2 = RestTemplateUtils.post(interfaceUrl2,token, paramsList2, MediaType.APPLICATION_JSON_UTF8, String.class);
|
String data2 = RestTemplateUtils.post(interfaceUrl2, token, paramsList2, MediaType.APPLICATION_JSON_UTF8, String.class);
|
||||||
System.out.println("=======================================");
|
System.out.println("=======================================");
|
||||||
System.out.println("data2:"+data2);
|
System.out.println("data2:" + data2);
|
||||||
System.out.println("=======================================");
|
System.out.println("=======================================");
|
||||||
|
|
||||||
wjxWjxx.setSfsckhcl("1");
|
wjxWjxx.setSfsckhcl("1");
|
||||||
|
@ -690,14 +680,14 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAccessToken(){
|
public String getAccessToken() {
|
||||||
String token="";
|
String token = "";
|
||||||
try {
|
try {
|
||||||
// 获取令牌URL前缀
|
// 获取令牌URL前缀
|
||||||
String prefixUrl = "https://intf.nenu.edu.cn/api/bd-api";
|
String prefixUrl = "https://intf.nenu.edu.cn/api/bd-api";
|
||||||
|
@ -719,14 +709,15 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
|
|
||||||
// userName=DesUtil.encrypt(userName);
|
// userName=DesUtil.encrypt(userName);
|
||||||
// password=DesUtil.encrypt(password);
|
// password=DesUtil.encrypt(password);
|
||||||
String url= prefixUrl+"/oauth/token?grant_type=password&scope=read&username="+userName+"&password="+password;
|
String url = prefixUrl + "/oauth/token?grant_type=password&scope=read&username=" + userName + "&password=" + password;
|
||||||
|
|
||||||
ResponseEntity<Object> response = restTemplate.exchange(url, HttpMethod.POST, request, Object.class);;
|
ResponseEntity<Object> response = restTemplate.exchange(url, HttpMethod.POST, request, Object.class);
|
||||||
|
;
|
||||||
|
|
||||||
LinkedHashMap<String, Object> map = (LinkedHashMap<String, Object>)response.getBody();
|
LinkedHashMap<String, Object> map = (LinkedHashMap<String, Object>) response.getBody();
|
||||||
|
|
||||||
//从返回结果中获取 access_token
|
//从返回结果中获取 access_token
|
||||||
token = (String)map.get("access_token");
|
token = (String) map.get("access_token");
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -747,16 +738,16 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
|
|
||||||
public void sendWxmessage(KcWechatSendLog kcWechatSendLog) {
|
public void sendWxmessage(KcWechatSendLog kcWechatSendLog) {
|
||||||
String openId = kcWechatSendLog.getOpenid();//曹老师账号
|
String openId = kcWechatSendLog.getOpenid();//曹老师账号
|
||||||
System.out.println("openId:"+openId+"");
|
System.out.println("openId:" + openId + "");
|
||||||
if(org.apache.commons.lang3.StringUtils.isNotEmpty(openId)){
|
if (org.apache.commons.lang3.StringUtils.isNotEmpty(openId)) {
|
||||||
try {
|
try {
|
||||||
String urlToken = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid="+ appId +"&corpsecret=" + appIdSecret;
|
String urlToken = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" + appId + "&corpsecret=" + appIdSecret;
|
||||||
System.out.println("urlToken: "+ urlToken);
|
System.out.println("urlToken: " + urlToken);
|
||||||
String res = HttpUtil.get(urlToken);
|
String res = HttpUtil.get(urlToken);
|
||||||
JSONObject jsonObjectToken = JSONObject.parseObject(res);
|
JSONObject jsonObjectToken = JSONObject.parseObject(res);
|
||||||
System.out.println("jsonObjectToken:{}"+ jsonObjectToken);
|
System.out.println("jsonObjectToken:{}" + jsonObjectToken);
|
||||||
String accessToken = jsonObjectToken.getString("access_token");
|
String accessToken = jsonObjectToken.getString("access_token");
|
||||||
System.out.println("accessToken:{}"+ accessToken);
|
System.out.println("accessToken:{}" + accessToken);
|
||||||
|
|
||||||
// 微信的基础accessToken
|
// 微信的基础accessToken
|
||||||
String url = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=" + accessToken;
|
String url = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=" + accessToken;
|
||||||
|
@ -764,7 +755,7 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
|
|
||||||
// 1、xx老师,你好,您本学期(2023秋)听课要求为:5次,当前实际听课次数:3次,请尽快完成本学期的听课任务。
|
// 1、xx老师,你好,您本学期(2023秋)听课要求为:5次,当前实际听课次数:3次,请尽快完成本学期的听课任务。
|
||||||
String html = kcWechatSendLog.getYtkcs();
|
String html = kcWechatSendLog.getYtkcs();
|
||||||
html = html + "\n<a href=\""+domainTo+"\">查看</a>";
|
html = html + "\n<a href=\"" + domainTo + "\">查看</a>";
|
||||||
sendMag.put("content", html);//授课老师推送内容
|
sendMag.put("content", html);//授课老师推送内容
|
||||||
RestTemplate restTemplate = new RestTemplate();
|
RestTemplate restTemplate = new RestTemplate();
|
||||||
//拼接base参数
|
//拼接base参数
|
||||||
|
@ -772,17 +763,17 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
sendBody.put("touser", openId); // openId
|
sendBody.put("touser", openId); // openId
|
||||||
sendBody.put("msgtype", "text"); // 消息类型,此时固定为:text
|
sendBody.put("msgtype", "text"); // 消息类型,此时固定为:text
|
||||||
sendBody.put("agentid", agentid); // 企业id
|
sendBody.put("agentid", agentid); // 企业id
|
||||||
sendBody.put("text",sendMag); //发送内容
|
sendBody.put("text", sendMag); //发送内容
|
||||||
ResponseEntity<String> forEntity = restTemplate.postForEntity(url, sendBody, String.class);
|
ResponseEntity<String> forEntity = restTemplate.postForEntity(url, sendBody, String.class);
|
||||||
JSONObject jsonObject2 = JSONObject.parseObject(forEntity.getBody());
|
JSONObject jsonObject2 = JSONObject.parseObject(forEntity.getBody());
|
||||||
System.out.println("jsonObject2 : " + jsonObject2);
|
System.out.println("jsonObject2 : " + jsonObject2);
|
||||||
String messageCode = jsonObject2.getString("errcode");
|
String messageCode = jsonObject2.getString("errcode");
|
||||||
String msgId = jsonObject2.getString("msgid");
|
String msgId = jsonObject2.getString("msgid");
|
||||||
System.out.println("messageCode : " + messageCode + ", msgId: " +msgId);
|
System.out.println("messageCode : " + messageCode + ", msgId: " + msgId);
|
||||||
}catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -120,6 +120,16 @@ public class ZyInfo implements Serializable {
|
||||||
@Excel(name = "校内通过率", width = 15)
|
@Excel(name = "校内通过率", width = 15)
|
||||||
@ApiModelProperty(value = "校内通过率")
|
@ApiModelProperty(value = "校内通过率")
|
||||||
private java.lang.Double xntgl;
|
private java.lang.Double xntgl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否以小组形式提交作业 Y N")
|
||||||
|
private String xzxstjzy;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "小组人数")
|
||||||
|
private Integer xzrs;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否配置过小组信息 Y N")
|
||||||
|
private String sfpzgxzxx;
|
||||||
|
|
||||||
//作业分值
|
//作业分值
|
||||||
private String score;
|
private String score;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
package org.jeecg.modules.kc.zyInfo.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: zy_xz_info
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-01-13
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@ApiModel(value="zy_xz_info对象", description="zy_xz_info")
|
||||||
|
@Data
|
||||||
|
@TableName("zy_xz_info")
|
||||||
|
public class ZyXzInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
List<ZyXzryInfo> students;
|
||||||
|
|
||||||
|
/**id*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
/**zy_info表id*/
|
||||||
|
@Excel(name = "zy_info表id", width = 15)
|
||||||
|
@ApiModelProperty(value = "zy_info表id")
|
||||||
|
private String zyinfoId;
|
||||||
|
/**createBy*/
|
||||||
|
@ApiModelProperty(value = "createBy")
|
||||||
|
private String createBy;
|
||||||
|
/**createTime*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "createTime")
|
||||||
|
private Date createTime;
|
||||||
|
/**小组名称*/
|
||||||
|
@Excel(name = "小组名称", width = 15)
|
||||||
|
@ApiModelProperty(value = "小组名称")
|
||||||
|
private String xzmc;
|
||||||
|
/**小组排序*/
|
||||||
|
@Excel(name = "小组排序", width = 15)
|
||||||
|
@ApiModelProperty(value = "小组排序")
|
||||||
|
private Integer sort;
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
package org.jeecg.modules.kc.zyInfo.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: zy_xzry_info
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-01-13
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("zy_xzry_info")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="zy_xzry_info对象", description="zy_xzry_info")
|
||||||
|
public class ZyXzryInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**id*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
/**zy_info表id*/
|
||||||
|
@Excel(name = "zy_info表id", width = 15)
|
||||||
|
@ApiModelProperty(value = "zy_info表id")
|
||||||
|
private String zyinfoId;
|
||||||
|
/**zy_xz_info表id*/
|
||||||
|
@Excel(name = "zy_xz_info表id", width = 15)
|
||||||
|
@ApiModelProperty(value = "zy_xz_info表id")
|
||||||
|
private String zyxzinfoId;
|
||||||
|
/**姓名*/
|
||||||
|
@Excel(name = "姓名", width = 15)
|
||||||
|
@ApiModelProperty(value = "姓名")
|
||||||
|
private String xm;
|
||||||
|
/**学号*/
|
||||||
|
@Excel(name = "学号", width = 15)
|
||||||
|
@ApiModelProperty(value = "学号")
|
||||||
|
private String xh;
|
||||||
|
/**是否是组长 Y N*/
|
||||||
|
@Excel(name = "是否是组长 Y N", width = 15)
|
||||||
|
@ApiModelProperty(value = "是否是组长 Y N")
|
||||||
|
private String sfzz;
|
||||||
|
}
|
|
@ -7,20 +7,18 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.jeecg.modules.kc.zyInfo.entity.CyInfoSys;
|
import org.jeecg.modules.kc.zyInfo.entity.*;
|
||||||
import org.jeecg.modules.kc.zyInfo.entity.ZyInfo;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 作业发布
|
* @Description: 作业发布
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
* @Date: 2024-05-06
|
* @Date: 2024-05-06
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
public interface ZyInfoMapper extends BaseMapper<ZyInfo> {
|
public interface ZyInfoMapper extends BaseMapper<ZyInfo> {
|
||||||
|
|
||||||
IPage<ZyInfo> stuList(Page<ZyInfo> page,@Param(Constants.WRAPPER) QueryWrapper<ZyInfo> queryWrapper);
|
IPage<ZyInfo> stuList(Page<ZyInfo> page, @Param(Constants.WRAPPER) QueryWrapper<ZyInfo> queryWrapper);
|
||||||
|
|
||||||
IPage<ZyInfoSys> sysList(Page<ZyInfoSys> page, @Param(Constants.WRAPPER) QueryWrapper<ZyInfoSys> queryWrapper);
|
IPage<ZyInfoSys> sysList(Page<ZyInfoSys> page, @Param(Constants.WRAPPER) QueryWrapper<ZyInfoSys> queryWrapper);
|
||||||
|
|
||||||
|
@ -28,11 +26,11 @@ public interface ZyInfoMapper extends BaseMapper<ZyInfo> {
|
||||||
|
|
||||||
ZyInfo getKechengById(@Param("id") String id);
|
ZyInfo getKechengById(@Param("id") String id);
|
||||||
|
|
||||||
List<ZyInfo> zyzb(@Param("rwbh")String rwbh, @Param("xqxn")String xqxn, @Param("teano")String teano, @Param("zyLeixing")String zyLeixing);
|
List<ZyInfo> zyzb(@Param("rwbh") String rwbh, @Param("xqxn") String xqxn, @Param("teano") String teano, @Param("zyLeixing") String zyLeixing);
|
||||||
|
|
||||||
IPage<ZyInfoSys> sysStaticList(Page<ZyInfoSys> page,@Param("zyInfoSys") ZyInfoSys zyInfoSys);
|
IPage<ZyInfoSys> sysStaticList(Page<ZyInfoSys> page, @Param("zyInfoSys") ZyInfoSys zyInfoSys);
|
||||||
|
|
||||||
IPage<ZyInfo> listOther(Page<ZyInfo> page,@Param("zyInfo") ZyInfo zyInfo);
|
IPage<ZyInfo> listOther(Page<ZyInfo> page, @Param("zyInfo") ZyInfo zyInfo);
|
||||||
|
|
||||||
List<ZyInfoSys> getZyStaticNo(@Param("zyInfoSys") ZyInfoSys zyInfoSys);
|
List<ZyInfoSys> getZyStaticNo(@Param("zyInfoSys") ZyInfoSys zyInfoSys);
|
||||||
|
|
||||||
|
@ -56,11 +54,21 @@ public interface ZyInfoMapper extends BaseMapper<ZyInfo> {
|
||||||
|
|
||||||
List<ZyInfoSys> getXnJsList(@Param("zyInfoSys") ZyInfoSys zyInfoSys);
|
List<ZyInfoSys> getXnJsList(@Param("zyInfoSys") ZyInfoSys zyInfoSys);
|
||||||
|
|
||||||
IPage<ZyInfoSys> sysStaticZyList(Page<ZyInfoSys> page,@Param("zyInfoSys") ZyInfoSys zyInfoSys);
|
IPage<ZyInfoSys> sysStaticZyList(Page<ZyInfoSys> page, @Param("zyInfoSys") ZyInfoSys zyInfoSys);
|
||||||
|
|
||||||
IPage<CyInfoSys> sysStaticCyList(Page<CyInfoSys> page, @Param("zyInfoSys") CyInfoSys cyInfoSys);
|
IPage<CyInfoSys> sysStaticCyList(Page<CyInfoSys> page, @Param("zyInfoSys") CyInfoSys cyInfoSys);
|
||||||
|
|
||||||
List<CyInfoSys> getStaticCyExportUrl( @Param("zyInfoSys") CyInfoSys cyInfoSys);
|
List<CyInfoSys> getStaticCyExportUrl(@Param("zyInfoSys") CyInfoSys cyInfoSys);
|
||||||
|
|
||||||
IPage<ZyInfo> listKhcl(Page<ZyInfo> page, @Param(Constants.WRAPPER) QueryWrapper<ZyInfo> queryWrapper);
|
IPage<ZyInfo> listKhcl(Page<ZyInfo> page, @Param(Constants.WRAPPER) QueryWrapper<ZyInfo> queryWrapper);
|
||||||
|
|
||||||
|
List<ZyXzInfo> getxzxx(@Param("dto") ZyInfo zyInfo);
|
||||||
|
|
||||||
|
int insertBatchzyxz(@Param("list") List<ZyXzInfo> list);
|
||||||
|
|
||||||
|
int insertBatchzyxzry(@Param("list") List<ZyXzryInfo> list);
|
||||||
|
|
||||||
|
int deleteXzxx(@Param("zyinfoId") String zyinfoId);
|
||||||
|
|
||||||
|
int deleteXzryxx(@Param("zyinfoId") String zyinfoId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,98 +2,190 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.jeecg.modules.kc.zyInfo.mapper.ZyInfoMapper">
|
<mapper namespace="org.jeecg.modules.kc.zyInfo.mapper.ZyInfoMapper">
|
||||||
|
|
||||||
|
<resultMap id="ZyXzInfoResultMap" type="org.jeecg.modules.kc.zyInfo.entity.ZyXzInfo">
|
||||||
|
<id property="id" column="zxi_id"/>
|
||||||
|
<result property="zyinfoId" column="zyinfo_id"/>
|
||||||
|
<result property="xzmc" column="xzmc"/>
|
||||||
|
<result property="sort" column="sort"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
|
||||||
|
<collection property="students" ofType="org.jeecg.modules.kc.zyInfo.entity.ZyXzryInfo"
|
||||||
|
column="{zyxzinfo_id=zxi_id}">
|
||||||
|
<id property="id" column="ry_id"/>
|
||||||
|
<result property="zyinfoId" column="ryzyinfoid"/>
|
||||||
|
<result property="zyxzinfoId" column="zyxzinfo_id"/>
|
||||||
|
<result property="xm" column="xm"/>
|
||||||
|
<result property="xh" column="xh"/>
|
||||||
|
<result property="sfzz" column="sfzz"/>
|
||||||
|
</collection>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
<select id="stuList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
|
<select id="stuList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
|
||||||
select
|
select distinct a.*,
|
||||||
distinct
|
b.id as stuId,
|
||||||
a.*,b.id as stuId ,b.file_path as stuFilePath,b.score as stuscore,b.wwxsl,b.nwxsl,b.aigcxsl,b.xnxsl,b.pdf_path as stuPdfPath,b.zzdf,b.xshpfs,
|
b.file_path as stuFilePath,
|
||||||
b.wwsftg,b.nwsftg,b.aigcsftg,b.xnsftg,round(ifnull(b.jxfs,'0') + ifnull(b.jxfs2,'0'),1) as jxfs, GREATEST(ifnull(b.wwxsl,0),ifnull(b.nwxsl,0),ifnull(b.aigcxsl,0),ifnull(b.xnxsl,0)) as zgccl,a.score as zyzb,b.score_fabu,b.py_content,b.py_file_path
|
b.score as stuscore,
|
||||||
|
b.wwxsl,
|
||||||
|
b.nwxsl,
|
||||||
|
b.aigcxsl,
|
||||||
|
b.xnxsl,
|
||||||
|
b.pdf_path as stuPdfPath,
|
||||||
|
b.zzdf,
|
||||||
|
b.xshpfs,
|
||||||
|
b.wwsftg,
|
||||||
|
b.nwsftg,
|
||||||
|
b.aigcsftg,
|
||||||
|
b.xnsftg,
|
||||||
|
round(ifnull(b.jxfs, '0') + ifnull(b.jxfs2, '0'), 1) as jxfs,
|
||||||
|
GREATEST(ifnull(b.wwxsl, 0), ifnull(b.nwxsl, 0), ifnull(b.aigcxsl, 0),
|
||||||
|
ifnull(b.xnxsl, 0)) as zgccl,
|
||||||
|
a.score as zyzb,
|
||||||
|
b.score_fabu,
|
||||||
|
b.py_content,
|
||||||
|
b.py_file_path
|
||||||
from zy_info a
|
from zy_info a
|
||||||
LEFT JOIN xxhbxsxkb c on a.rwbh = c.KCAPZBBH
|
LEFT JOIN xxhbxsxkb c on a.rwbh = c.KCAPZBBH
|
||||||
left join zy_info_student b on a.id = b.main_id and b.create_by = c.xh
|
left join zy_info_student b on a.id = b.main_id and b.create_by = c.xh
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="selectPage" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
|
<select id="selectPage" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
|
||||||
SELECT
|
SELECT a.*,
|
||||||
a.*,
|
ifnull(b.num, 0) as wtjnum,
|
||||||
ifnull(b.num,0) as wtjnum,ifnull(c.num,0) as ytjnum,ifnull(d.num,0) as wpynum,ifnull(e.num,0) as ypynum,ifnull(f.num,0) as dpynum
|
ifnull(c.num, 0) as ytjnum,
|
||||||
FROM
|
ifnull(d.num, 0) as wpynum,
|
||||||
zy_info a
|
ifnull(e.num, 0) as ypynum,
|
||||||
left join (select count(*) as num,main_id from zy_info_student where file_path is null GROUP BY main_id ) b on a.id = b.main_id
|
ifnull(f.num, 0) as dpynum
|
||||||
left join (select count(*) as num,main_id from zy_info_student where file_path is not null GROUP BY main_id) c on a.id = c.main_id
|
FROM zy_info a
|
||||||
left join (select count(*) as num,main_id from zy_info_student where score is null GROUP BY main_id ) d on a.id = d.main_id
|
left join (select count(*) as num, main_id
|
||||||
left join (select count(*) as num,main_id from zy_info_student where score is not null GROUP BY main_id) e on a.id = e.main_id
|
from zy_info_student
|
||||||
left join (select count(*) as num,main_id from zy_info_student where score is null and file_path is not null GROUP BY main_id) f on a.id = f.main_id
|
where file_path is null
|
||||||
${ew.customSqlSegment}
|
GROUP BY main_id) b on a.id = b.main_id
|
||||||
|
left join (select count(*) as num, main_id
|
||||||
|
from zy_info_student
|
||||||
|
where file_path is not null
|
||||||
|
GROUP BY main_id) c on a.id = c.main_id
|
||||||
|
left join (select count(*) as num, main_id from zy_info_student where score is null GROUP BY main_id) d
|
||||||
|
on a.id = d.main_id
|
||||||
|
left join (select count(*) as num, main_id
|
||||||
|
from zy_info_student
|
||||||
|
where score is not null
|
||||||
|
GROUP BY main_id) e on a.id = e.main_id
|
||||||
|
left join (select count(*) as num, main_id
|
||||||
|
from zy_info_student
|
||||||
|
where score is null and file_path is not null
|
||||||
|
GROUP BY main_id) f on a.id = f.main_id
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="sysList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
<select id="sysList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||||
SELECT t.kcbh, t.kcmc, t.kkdw, t.kcxz, t.szkc, t.xqxn, t.rwbh, t.xkrs, t.jgh,t.jzglb zc, t.skjs,b.num,
|
SELECT t.kcbh,
|
||||||
b.fbzycs, -- 发布作业次数
|
t.kcmc,
|
||||||
b.zywccs, -- 作业完成次数
|
t.kkdw,
|
||||||
b.cccs, -- 查重次数
|
t.kcxz,
|
||||||
b.hpcs, -- 互评次数
|
t.szkc,
|
||||||
b.cswwccs -- 超时未完成次数
|
t.xqxn,
|
||||||
FROM (
|
t.rwbh,
|
||||||
select xnxq,rwbh,create_by,count(*) as num,
|
t.xkrs,
|
||||||
SUM(CASE WHEN zy_status IN ('1', '2') THEN 1 ELSE 0 END) AS fbzycs,
|
t.jgh,
|
||||||
SUM(CASE WHEN zy_status = '2' THEN 1 ELSE 0 END) AS zywccs,
|
t.jzglb zc,
|
||||||
SUM(CASE WHEN zy_status in ('1','2') and sfcc IN ('1', '2') THEN 1 ELSE 0 END) AS cccs,
|
t.skjs,
|
||||||
SUM(CASE WHEN zy_status in ('1','2') and xshpkg = '1' THEN 1 ELSE 0 END) AS hpcs,
|
b.num,
|
||||||
SUM(
|
b.fbzycs, -- 发布作业次数
|
||||||
CASE
|
b.zywccs, -- 作业完成次数
|
||||||
WHEN zy_status = '1' AND end_time < NOW() THEN 1
|
b.cccs, -- 查重次数
|
||||||
ELSE 0
|
b.hpcs, -- 互评次数
|
||||||
END
|
b.cswwccs -- 超时未完成次数
|
||||||
) AS cswwccs
|
FROM (select xnxq,
|
||||||
from zy_info GROUP BY xnxq,rwbh,create_by
|
rwbh,
|
||||||
) b
|
create_by,
|
||||||
inner join (
|
count(*) as num,
|
||||||
SELECT DISTINCT
|
SUM(CASE WHEN zy_status IN ('1', '2') THEN 1 ELSE 0 END) AS fbzycs,
|
||||||
kcbh,kcmc,kkdw,kcxz,szkc,xqxn, rwbh, xkrs,jzglb, jgh,skjs
|
SUM(CASE WHEN zy_status = '2' THEN 1 ELSE 0 END) AS zywccs,
|
||||||
FROM
|
SUM(CASE WHEN zy_status in ('1', '2') and sfcc IN ('1', '2') THEN 1 ELSE 0 END) AS cccs,
|
||||||
kc_kechengbiao
|
SUM(CASE WHEN zy_status in ('1', '2') and xshpkg = '1' THEN 1 ELSE 0 END) AS hpcs,
|
||||||
${ew.customSqlSegment}
|
SUM(
|
||||||
) t on t.jgh = b.create_by and t.rwbh = b.rwbh and t.xqxn = b.xnxq
|
CASE
|
||||||
GROUP BY kcbh,kcmc,kkdw,kcxz,szkc,xqxn,rwbh,skjs,xkrs,jgh,zc
|
WHEN zy_status = '1' AND end_time < NOW() THEN 1
|
||||||
|
ELSE 0
|
||||||
|
END
|
||||||
|
) AS cswwccs
|
||||||
|
from zy_info
|
||||||
|
GROUP BY xnxq, rwbh, create_by) b
|
||||||
|
inner join (SELECT DISTINCT kcbh,
|
||||||
|
kcmc,
|
||||||
|
kkdw,
|
||||||
|
kcxz,
|
||||||
|
szkc,
|
||||||
|
xqxn,
|
||||||
|
rwbh,
|
||||||
|
xkrs,
|
||||||
|
jzglb,
|
||||||
|
jgh,
|
||||||
|
skjs
|
||||||
|
FROM kc_kechengbiao ${ew.customSqlSegment}) t
|
||||||
|
on t.jgh = b.create_by and t.rwbh = b.rwbh and t.xqxn = b.xnxq
|
||||||
|
GROUP BY kcbh, kcmc, kkdw, kcxz, szkc, xqxn, rwbh, skjs, xkrs, jgh, zc
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="exportSysXls" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
<select id="exportSysXls" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||||
SELECT t.kcbh, t.kcmc, t.kkdw, t.kcxz, t.szkc, t.xqxn, t.rwbh, t.xkrs, t.jgh,t.jzglb zc, t.skjs,b.num,
|
SELECT t.kcbh,
|
||||||
b.fbzycs, -- 发布作业次数
|
t.kcmc,
|
||||||
b.zywccs, -- 作业完成次数
|
t.kkdw,
|
||||||
b.cccs, -- 查重次数
|
t.kcxz,
|
||||||
b.hpcs, -- 互评次数
|
t.szkc,
|
||||||
b.cswwccs -- 超时未完成次数
|
t.xqxn,
|
||||||
FROM (
|
t.rwbh,
|
||||||
select xnxq,rwbh,create_by,count(*) as num,
|
t.xkrs,
|
||||||
SUM(CASE WHEN zy_status IN ('1', '2') THEN 1 ELSE 0 END) AS fbzycs,
|
t.jgh,
|
||||||
SUM(CASE WHEN zy_status = '2' THEN 1 ELSE 0 END) AS zywccs,
|
t.jzglb zc,
|
||||||
SUM(CASE WHEN zy_status in ('1','2') and sfcc IN ('1', '2') THEN 1 ELSE 0 END) AS cccs,
|
t.skjs,
|
||||||
SUM(CASE WHEN zy_status in ('1','2') and xshpkg = '1' THEN 1 ELSE 0 END) AS hpcs,
|
b.num,
|
||||||
SUM(
|
b.fbzycs, -- 发布作业次数
|
||||||
CASE
|
b.zywccs, -- 作业完成次数
|
||||||
WHEN zy_status = '1' AND end_time < NOW() THEN 1
|
b.cccs, -- 查重次数
|
||||||
ELSE 0
|
b.hpcs, -- 互评次数
|
||||||
END
|
b.cswwccs -- 超时未完成次数
|
||||||
) AS cswwccs
|
FROM (select xnxq,
|
||||||
from zy_info GROUP BY xnxq,rwbh,create_by
|
rwbh,
|
||||||
) b
|
create_by,
|
||||||
inner join (
|
count(*) as num,
|
||||||
SELECT DISTINCT
|
SUM(CASE WHEN zy_status IN ('1', '2') THEN 1 ELSE 0 END) AS fbzycs,
|
||||||
kcbh,kcmc,kkdw,kcxz,szkc,xqxn, rwbh, xkrs, jgh,jzglb,skjs
|
SUM(CASE WHEN zy_status = '2' THEN 1 ELSE 0 END) AS zywccs,
|
||||||
FROM
|
SUM(CASE WHEN zy_status in ('1', '2') and sfcc IN ('1', '2') THEN 1 ELSE 0 END) AS cccs,
|
||||||
kc_kechengbiao
|
SUM(CASE WHEN zy_status in ('1', '2') and xshpkg = '1' THEN 1 ELSE 0 END) AS hpcs,
|
||||||
${ew.customSqlSegment}
|
SUM(
|
||||||
) t on t.jgh = b.create_by and t.rwbh = b.rwbh and t.xqxn = b.xnxq
|
CASE
|
||||||
GROUP BY kcbh,kcmc,kkdw,kcxz,szkc,xqxn,rwbh,skjs,xkrs,jgh,jzglb
|
WHEN zy_status = '1' AND end_time < NOW() THEN 1
|
||||||
|
ELSE 0
|
||||||
|
END
|
||||||
|
) AS cswwccs
|
||||||
|
from zy_info
|
||||||
|
GROUP BY xnxq, rwbh, create_by) b
|
||||||
|
inner join (SELECT DISTINCT kcbh,
|
||||||
|
kcmc,
|
||||||
|
kkdw,
|
||||||
|
kcxz,
|
||||||
|
szkc,
|
||||||
|
xqxn,
|
||||||
|
rwbh,
|
||||||
|
xkrs,
|
||||||
|
jgh,
|
||||||
|
jzglb,
|
||||||
|
skjs
|
||||||
|
FROM kc_kechengbiao ${ew.customSqlSegment}) t
|
||||||
|
on t.jgh = b.create_by and t.rwbh = b.rwbh and t.xqxn = b.xnxq
|
||||||
|
GROUP BY kcbh, kcmc, kkdw, kcxz, szkc, xqxn, rwbh, skjs, xkrs, jgh, jzglb
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="exportSysXls2" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
<select id="exportSysXls2" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||||
select a.id,a.create_by,a.create_time,a.update_by,a.update_time,a.title,a.zy_type,a.content,a.start_time,a.end_time,a.zy_status,a.xnxq,a.wwcc,a.wwtgl,a.nwcc,a.nwtgl,a.aigccc,a.aigctgl,a.rwbh,a.file_path,a.xkxs,a.xncc,a.xntgl,a.score,a.kcnr,a.pfbz,a.sturead,a.sort,a.xshpkg,a.xshprsq,a.xshpkssj,a.xshpjssj,a.sfzzcj,a.xssfck,a.hpsfwcone,a.hpsfwctwo,a.zy_leixing,a.sfcc,a.sfsckhcl,a.sfsckhcl_time,b.skjs,b.jgh,b.kcmc,b.kcbh,b.xkrs,b.kkdw,b.kcxz,b.zc,a.xnxq as xqxn,
|
select
|
||||||
|
a.id,a.create_by,a.create_time,a.update_by,a.update_time,a.title,a.zy_type,a.content,a.start_time,a.end_time,a.zy_status,a.xnxq,a.wwcc,a.wwtgl,a.nwcc,a.nwtgl,a.aigccc,a.aigctgl,a.rwbh,a.file_path,a.xkxs,a.xncc,a.xntgl,a.score,a.kcnr,a.pfbz,a.sturead,a.sort,a.xshpkg,a.xshprsq,a.xshpkssj,a.xshpjssj,a.sfzzcj,a.xssfck,a.hpsfwcone,a.hpsfwctwo,a.zy_leixing,a.sfcc,a.sfsckhcl,a.sfsckhcl_time,b.skjs,b.jgh,b.kcmc,b.kcbh,b.xkrs,b.kkdw,b.kcxz,b.zc,a.xnxq
|
||||||
|
as xqxn,
|
||||||
IF( a.zy_status = '2', '全部完成', '未全部完成' ) as sfwc,
|
IF( a.zy_status = '2', '全部完成', '未全部完成' ) as sfwc,
|
||||||
IF( a.zy_status = '0', '未发布', '已发布' ) as sffb,
|
IF( a.zy_status = '0', '未发布', '已发布' ) as sffb,
|
||||||
IF( a.xshpkg = '1', '是', '否' ) as sfhp,
|
IF( a.xshpkg = '1', '是', '否' ) as sfhp,
|
||||||
|
@ -108,8 +200,9 @@
|
||||||
END
|
END
|
||||||
) AS cswwccs
|
) AS cswwccs
|
||||||
from zy_info a,
|
from zy_info a,
|
||||||
(select skjs,jgh,kcmc,kcbh,xkrs,kkdw,rwbh,kcxz,zc from kc_kechengbiao where xqxn = #{zyInfoSys.xqxn} and flag = '0' GROUP BY skjs,jgh,kcmc,kcbh,xkrs,kkdw, rwbh,kcxz,zc) b
|
(select skjs,jgh,kcmc,kcbh,xkrs,kkdw,rwbh,kcxz,zc from kc_kechengbiao where xqxn = #{zyInfoSys.xqxn} and flag =
|
||||||
where a.rwbh = b.rwbh and a.create_by = b.jgh and a.xnxq = #{zyInfoSys.xqxn} and a.zy_status in (1,2)
|
'0' GROUP BY skjs,jgh,kcmc,kcbh,xkrs,kkdw, rwbh,kcxz,zc) b
|
||||||
|
where a.rwbh = b.rwbh and a.create_by = b.jgh and a.xnxq = #{zyInfoSys.xqxn} and a.zy_status in (1,2)
|
||||||
<if test="zyInfoSys.kcmc != null and zyInfoSys.kcmc != ''">
|
<if test="zyInfoSys.kcmc != null and zyInfoSys.kcmc != ''">
|
||||||
and a.kcmc like concat('%',#{zyInfoSys.kcmc},'%')
|
and a.kcmc like concat('%',#{zyInfoSys.kcmc},'%')
|
||||||
</if>
|
</if>
|
||||||
|
@ -138,40 +231,37 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getKechengById" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
|
<select id="getKechengById" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
|
||||||
select a.*,b.kcmc,b.skjs from zy_info a ,kc_kechengbiao b
|
select a.*, b.kcmc, b.skjs
|
||||||
where a.rwbh = b.rwbh and a.create_by = b.jgh and a.xnxq = b.xqxn and a.id = #{id}
|
from zy_info a,
|
||||||
limit 1
|
kc_kechengbiao b
|
||||||
|
where a.rwbh = b.rwbh
|
||||||
|
and a.create_by = b.jgh
|
||||||
|
and a.xnxq = b.xqxn
|
||||||
|
and a.id = #{id} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="zyzb" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
|
<select id="zyzb" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
|
||||||
SELECT
|
SELECT sum(ifnull(score, '0')) AS score,
|
||||||
sum( ifnull( score, '0' ) ) AS score,
|
zy_leixing
|
||||||
zy_leixing
|
FROM zy_info
|
||||||
FROM
|
WHERE xnxq = #{xqxn}
|
||||||
zy_info
|
AND rwbh = #{rwbh}
|
||||||
WHERE
|
GROUP BY zy_leixing
|
||||||
xnxq = #{xqxn}
|
UNION ALL
|
||||||
AND rwbh = #{rwbh}
|
SELECT sum(ifnull(score, '0')) AS score,
|
||||||
GROUP BY
|
CASE
|
||||||
zy_leixing UNION ALL
|
atype
|
||||||
SELECT
|
WHEN '1' THEN
|
||||||
sum( ifnull( score, '0' ) ) AS score,
|
'2'
|
||||||
CASE
|
ELSE '3'
|
||||||
atype
|
END zy_leixing
|
||||||
WHEN '1' THEN
|
FROM wjx_wjxx
|
||||||
'2' ELSE '3'
|
WHERE xqxn = #{xqxn}
|
||||||
END zy_leixing
|
AND rwbh = #{rwbh}
|
||||||
FROM
|
GROUP BY atype
|
||||||
wjx_wjxx
|
|
||||||
WHERE
|
|
||||||
xqxn = #{xqxn}
|
|
||||||
AND rwbh = #{rwbh}
|
|
||||||
GROUP BY
|
|
||||||
atype
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="sysStaticList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
<select id="sysStaticList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||||
SELECT
|
SELECT
|
||||||
distinct a.id,
|
distinct a.id,
|
||||||
|
@ -179,13 +269,15 @@
|
||||||
IF( a.zy_status = '2', '全部完成', '未全部完成' ) as sfwc,
|
IF( a.zy_status = '2', '全部完成', '未全部完成' ) as sfwc,
|
||||||
IF( a.zy_status = '0', '未发布', '已发布' ) as sffb,
|
IF( a.zy_status = '0', '未发布', '已发布' ) as sffb,
|
||||||
IF( a.xshpkg = '1', '是', '否' ) as sfhp,
|
IF( a.xshpkg = '1', '是', '否' ) as sfhp,
|
||||||
a.create_by as jgh,c.xm as skjs, c.dwmc as kkdw ,
|
a.create_by as jgh,c.xm as skjs, c.dwmc as kkdw ,
|
||||||
if(a.sfcc = 1,'查重','不查重') as sfcc,
|
if(a.sfcc = 1,'查重','不查重') as sfcc,
|
||||||
a.start_time,
|
a.start_time,
|
||||||
a.end_time
|
a.end_time
|
||||||
FROM
|
FROM
|
||||||
zy_info a, xxhbuser c,(select kcmc,rwbh,skjs,jgh from kc_kechengbiao where xqxn = #{zyInfoSys.xqxn} GROUP BY kcmc,rwbh,skjs,jgh) d
|
zy_info a, xxhbuser c,(select kcmc,rwbh,skjs,jgh from kc_kechengbiao where xqxn = #{zyInfoSys.xqxn} GROUP BY
|
||||||
WHERE a.create_by = c.gh and d.rwbh = a.rwbh and a.create_by = d.jgh and a.xnxq = #{zyInfoSys.xqxn} and a.title is not null
|
kcmc,rwbh,skjs,jgh) d
|
||||||
|
WHERE a.create_by = c.gh and d.rwbh = a.rwbh and a.create_by = d.jgh and a.xnxq = #{zyInfoSys.xqxn} and a.title
|
||||||
|
is not null
|
||||||
<if test="zyInfoSys.kcmc != null and zyInfoSys.kcmc != ''">
|
<if test="zyInfoSys.kcmc != null and zyInfoSys.kcmc != ''">
|
||||||
and a.kcmc like concat('%',#{zyInfoSys.kcmc},'%')
|
and a.kcmc like concat('%',#{zyInfoSys.kcmc},'%')
|
||||||
</if>
|
</if>
|
||||||
|
@ -212,7 +304,6 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="listOther" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
|
<select id="listOther" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
|
||||||
select b.*,a.teacher_no,a.yuan_teacher_no,a.yuan_teacher_name from zy_cy_fenxiang a ,zy_info b
|
select b.*,a.teacher_no,a.yuan_teacher_no,a.yuan_teacher_name from zy_cy_fenxiang a ,zy_info b
|
||||||
where a.main_id = b.id
|
where a.main_id = b.id
|
||||||
|
@ -223,217 +314,300 @@
|
||||||
|
|
||||||
|
|
||||||
<select id="getZyStaticNo" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
<select id="getZyStaticNo" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||||
select count(distinct zi.id) as count,'1' as type from zy_info zi join kc_kechengbiao kk on kk.jgh = zi.create_by AND kk.rwbh = zi.rwbh AND kk.xqxn = zi.xnxq where zi.zy_status in ('1','2') and zi.xnxq = #{zyInfoSys.xqxn} and kk.flag = 0
|
select count(distinct zi.id) as count,'1' as type
|
||||||
|
from zy_info zi join kc_kechengbiao kk
|
||||||
|
on kk.jgh = zi.create_by AND kk.rwbh = zi.rwbh AND kk.xqxn = zi.xnxq
|
||||||
|
where zi.zy_status in ('1', '2') and zi.xnxq = #{zyInfoSys.xqxn} and kk.flag = 0
|
||||||
union all
|
union all
|
||||||
select count(distinct zi.id) as count,'2' as type from zy_info zi join kc_kechengbiao kk on kk.jgh = zi.create_by AND kk.rwbh = zi.rwbh AND kk.xqxn = zi.xnxq where zi.zy_status in ('1','2') and zi.xnxq = #{zyInfoSys.xqxn} and kk.flag = 0 and zi.xshpkg = '1'
|
select count(distinct zi.id) as count,'2' as type
|
||||||
|
from zy_info zi join kc_kechengbiao kk
|
||||||
|
on kk.jgh = zi.create_by AND kk.rwbh = zi.rwbh AND kk.xqxn = zi.xnxq
|
||||||
|
where zi.zy_status in ('1', '2') and zi.xnxq = #{zyInfoSys.xqxn} and kk.flag = 0 and zi.xshpkg = '1'
|
||||||
union all
|
union all
|
||||||
select count(distinct zi.id) as count,'3' as type from zy_info zi join kc_kechengbiao kk on kk.jgh = zi.create_by AND kk.rwbh = zi.rwbh AND kk.xqxn = zi.xnxq where zi.zy_status in ('2') and zi.xnxq = #{zyInfoSys.xqxn} and kk.flag = 0
|
select count(distinct zi.id) as count,'3' as type
|
||||||
|
from zy_info zi join kc_kechengbiao kk
|
||||||
|
on kk.jgh = zi.create_by AND kk.rwbh = zi.rwbh AND kk.xqxn = zi.xnxq
|
||||||
|
where zi.zy_status in ('2') and zi.xnxq = #{zyInfoSys.xqxn} and kk.flag = 0
|
||||||
union all
|
union all
|
||||||
select count(distinct zi.id) as count,'4' as type from zy_info zi join kc_kechengbiao kk on kk.jgh = zi.create_by AND kk.rwbh = zi.rwbh AND kk.xqxn = zi.xnxq where zi.zy_status in ('1','2') and (zi.update_time = DATE_FORMAT(NOW(),'%Y-%m-%d') or zi.create_time = DATE_FORMAT(NOW(),'%Y-%m-%d') ) and kk.flag = 0
|
select count(distinct zi.id) as count,'4' as type
|
||||||
|
from zy_info zi join kc_kechengbiao kk
|
||||||
|
on kk.jgh = zi.create_by AND kk.rwbh = zi.rwbh AND kk.xqxn = zi.xnxq
|
||||||
|
where zi.zy_status in ('1'
|
||||||
|
, '2')
|
||||||
|
and (zi.update_time = DATE_FORMAT(NOW()
|
||||||
|
, '%Y-%m-%d')
|
||||||
|
or zi.create_time = DATE_FORMAT(NOW()
|
||||||
|
, '%Y-%m-%d') )
|
||||||
|
and kk.flag = 0
|
||||||
union all
|
union all
|
||||||
select count(distinct zi.id) as count,'5' as type from zy_info zi join kc_kechengbiao kk on kk.jgh = zi.create_by AND kk.rwbh = zi.rwbh AND kk.xqxn = zi.xnxq where zi.zy_status in ('1','2') and (zi.update_time = DATE_FORMAT(NOW(),'%Y-%m-%d') or zi.create_time = DATE_FORMAT(NOW(),'%Y-%m-%d') ) and zi.xshpkg = '1' and kk.flag = 0
|
select count(distinct zi.id) as count,'5' as type
|
||||||
|
from zy_info zi join kc_kechengbiao kk
|
||||||
|
on kk.jgh = zi.create_by AND kk.rwbh = zi.rwbh AND kk.xqxn = zi.xnxq
|
||||||
|
where zi.zy_status in ('1'
|
||||||
|
, '2')
|
||||||
|
and (zi.update_time = DATE_FORMAT(NOW()
|
||||||
|
, '%Y-%m-%d')
|
||||||
|
or zi.create_time = DATE_FORMAT(NOW()
|
||||||
|
, '%Y-%m-%d') )
|
||||||
|
and zi.xshpkg = '1'
|
||||||
|
and kk.flag = 0
|
||||||
union all
|
union all
|
||||||
select count(distinct zi.id) as count,'6' as type from zy_info zi join kc_kechengbiao kk on kk.jgh = zi.create_by AND kk.rwbh = zi.rwbh AND kk.xqxn = zi.xnxq where zi.zy_status in ('2') and (zi.update_time = DATE_FORMAT(NOW(),'%Y-%m-%d') or zi.create_time = DATE_FORMAT(NOW(),'%Y-%m-%d') ) and kk.flag = 0
|
select count(distinct zi.id) as count,'6' as type
|
||||||
|
from zy_info zi join kc_kechengbiao kk
|
||||||
|
on kk.jgh = zi.create_by AND kk.rwbh = zi.rwbh AND kk.xqxn = zi.xnxq
|
||||||
|
where zi.zy_status in ('2')
|
||||||
|
and (zi.update_time = DATE_FORMAT(NOW()
|
||||||
|
, '%Y-%m-%d')
|
||||||
|
or zi.create_time = DATE_FORMAT(NOW()
|
||||||
|
, '%Y-%m-%d') )
|
||||||
|
and kk.flag = 0
|
||||||
union all
|
union all
|
||||||
select count(distinct ww.id) as count,'7' as type from wjx_wjxx ww join kc_kechengbiao kk on kk.jgh = ww.create_by AND kk.rwbh = ww.rwbh AND kk.xqxn = ww.xqxn where ww.xqxn = #{zyInfoSys.xqxn} and ww.qpublish in (1,2)
|
select count(distinct ww.id) as count,'7' as type
|
||||||
|
from wjx_wjxx ww join kc_kechengbiao kk
|
||||||
|
on kk.jgh = ww.create_by AND kk.rwbh = ww.rwbh AND kk.xqxn = ww.xqxn
|
||||||
|
where ww.xqxn = #{zyInfoSys.xqxn} and ww.qpublish in (1, 2)
|
||||||
union all
|
union all
|
||||||
select count(distinct ww.id) as count,'8' as type from wjx_wjxx ww join kc_kechengbiao kk on kk.jgh = ww.create_by AND kk.rwbh = ww.rwbh AND kk.xqxn = ww.xqxn where ww.xqxn = #{zyInfoSys.xqxn} and ww.qpublish in (2)
|
select count(distinct ww.id) as count,'8' as type
|
||||||
|
from wjx_wjxx ww join kc_kechengbiao kk
|
||||||
|
on kk.jgh = ww.create_by AND kk.rwbh = ww.rwbh AND kk.xqxn = ww.xqxn
|
||||||
|
where ww.xqxn = #{zyInfoSys.xqxn} and ww.qpublish in (2)
|
||||||
union all
|
union all
|
||||||
select count(distinct ww.id) as count,'9' as type from wjx_wjxx ww join kc_kechengbiao kk on kk.jgh = ww.create_by AND kk.rwbh = ww.rwbh AND kk.xqxn = ww.xqxn where (ww.update_time = DATE_FORMAT(NOW(),'%Y-%m-%d') or ww.create_time = DATE_FORMAT(NOW(),'%Y-%m-%d') ) and ww.qpublish in (1,2)
|
select count(distinct ww.id) as count,'9' as type
|
||||||
|
from wjx_wjxx ww join kc_kechengbiao kk
|
||||||
|
on kk.jgh = ww.create_by AND kk.rwbh = ww.rwbh AND kk.xqxn = ww.xqxn
|
||||||
|
where (ww.update_time = DATE_FORMAT(NOW()
|
||||||
|
, '%Y-%m-%d')
|
||||||
|
or ww.create_time = DATE_FORMAT(NOW()
|
||||||
|
, '%Y-%m-%d') )
|
||||||
|
and ww.qpublish in (1
|
||||||
|
, 2)
|
||||||
union all
|
union all
|
||||||
select count(distinct ww.id) as count,'10' as type from wjx_wjxx ww join kc_kechengbiao kk on kk.jgh = ww.create_by AND kk.rwbh = ww.rwbh AND kk.xqxn = ww.xqxn where (ww.update_time = DATE_FORMAT(NOW(),'%Y-%m-%d') or ww.create_time = DATE_FORMAT(NOW(),'%Y-%m-%d') ) and ww.qpublish in (2)
|
select count(distinct ww.id) as count,'10' as type
|
||||||
|
from wjx_wjxx ww join kc_kechengbiao kk
|
||||||
|
on kk.jgh = ww.create_by AND kk.rwbh = ww.rwbh AND kk.xqxn = ww.xqxn
|
||||||
|
where (ww.update_time = DATE_FORMAT(NOW()
|
||||||
|
, '%Y-%m-%d')
|
||||||
|
or ww.create_time = DATE_FORMAT(NOW()
|
||||||
|
, '%Y-%m-%d') )
|
||||||
|
and ww.qpublish in (2)
|
||||||
union all
|
union all
|
||||||
select count(distinct zi.id) as count,'11' as type from zy_info zi join kc_kechengbiao kk on kk.jgh = zi.create_by AND kk.rwbh = zi.rwbh AND kk.xqxn = zi.xnxq where zi.zy_status in ('1','2') and zi.xnxq = #{zyInfoSys.xqxn} and zi.sfcc in ('1','2') and kk.flag = 0
|
select count(distinct zi.id) as count,'11' as type
|
||||||
|
from zy_info zi join kc_kechengbiao kk
|
||||||
|
on kk.jgh = zi.create_by AND kk.rwbh = zi.rwbh AND kk.xqxn = zi.xnxq
|
||||||
|
where zi.zy_status in ('1', '2') and zi.xnxq = #{zyInfoSys.xqxn} and zi.sfcc in ('1', '2') and kk.flag = 0
|
||||||
union all
|
union all
|
||||||
select count(*) as count,'12' as type from zy_info where file_path is not null and xnxq = #{zyInfoSys.xqxn}
|
select count(*) as count,'12' as type
|
||||||
|
from zy_info
|
||||||
|
where file_path is not null and xnxq = #{zyInfoSys.xqxn}
|
||||||
union all
|
union all
|
||||||
select count(*) as count,'13' as type from zy_info where file_path is not null and xnxq = #{zyInfoSys.xqxn} and xshpkg = '1'
|
select count(*) as count,'13' as type
|
||||||
|
from zy_info
|
||||||
|
where file_path is not null and xnxq = #{zyInfoSys.xqxn} and xshpkg = '1'
|
||||||
union all
|
union all
|
||||||
select count(*) as count,'14' as type from zy_info where file_path is not null and xnxq = #{zyInfoSys.xqxn} and sfcc = '1'
|
select count(*) as count,'14' as type
|
||||||
|
from zy_info
|
||||||
|
where file_path is not null and xnxq = #{zyInfoSys.xqxn} and sfcc = '1'
|
||||||
union all
|
union all
|
||||||
SELECT COUNT(*) as count,'16' as type FROM wjx_djxx WHERE create_time BETWEEN (SELECT bxqkssj FROM kc_sys_config WHERE flag1=#{zyInfoSys.xqxn} LIMIT 1) AND (SELECT bxqjssj FROM kc_sys_config WHERE flag1=#{zyInfoSys.xqxn} LIMIT 1);
|
SELECT COUNT(*) as count,'16' as type
|
||||||
|
FROM wjx_djxx
|
||||||
|
WHERE create_time BETWEEN (SELECT bxqkssj FROM kc_sys_config WHERE flag1=#{zyInfoSys.xqxn} LIMIT 1)
|
||||||
|
AND (SELECT bxqjssj FROM kc_sys_config WHERE flag1=#{zyInfoSys.xqxn} LIMIT 1);
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getXyZyList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
<select id="getXyZyList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||||
select (@rownum:=@rownum + 1) AS rownum,t.* from (
|
select (@rownum:=@rownum + 1) AS rownum, t.*
|
||||||
select count(*) as count,b.dwmc as kkdw from zy_info a,xxhbuser b where a.create_by = b.gh and xnxq = #{zyInfoSys.xqxn} and zy_status in (1,2) GROUP BY b.dwmc
|
from (select count(*) as count,b.dwmc as kkdw
|
||||||
) t , (SELECT @rownum:=0) AS r ORDER BY count-0 desc
|
from zy_info a, xxhbuser b
|
||||||
|
where a.create_by = b.gh and xnxq = #{zyInfoSys.xqxn} and zy_status in (1, 2)
|
||||||
|
GROUP BY b.dwmc) t,
|
||||||
|
(SELECT @rownum:=0) AS r
|
||||||
|
ORDER BY count - 0 desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getZyList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
<select id="getZyList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||||
select (@rownum:=@rownum + 1) AS rownum,t.* from (
|
select (@rownum:=@rownum + 1) AS rownum, t.*
|
||||||
select a.create_by,count(*) as count,b.xm as skjs,b.dwmc as kkdw from zy_info a,xxhbuser b where a.create_by = b.gh and xnxq = #{zyInfoSys.xqxn} and zy_status in (1,2) GROUP BY a.create_by ,b.xm,b.dwmc
|
from (select a.create_by, count(*) as count,b.xm as skjs,b.dwmc as kkdw
|
||||||
) t , (SELECT @rownum:=0) AS r ORDER BY count-0 desc
|
from zy_info a, xxhbuser b
|
||||||
|
where a.create_by = b.gh and xnxq = #{zyInfoSys.xqxn} and zy_status in (1, 2)
|
||||||
|
GROUP BY a.create_by, b.xm, b.dwmc) t,
|
||||||
|
(SELECT @rownum:=0) AS r
|
||||||
|
ORDER BY count - 0 desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getZyTopList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
<select id="getZyTopList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||||
select (@rownum:=@rownum + 1) AS rownum,t.* from (
|
select (@rownum:=@rownum + 1) AS rownum, t.*
|
||||||
select a.create_by,count(*) as count,b.xm as skjs,b.dwmc as kkdw from zy_info a,xxhbuser b where a.create_by = b.gh and xnxq = #{zyInfoSys.xqxn} and zy_status in (1,2) GROUP BY a.create_by ,b.xm,b.dwmc
|
from (select a.create_by, count(*) as count,b.xm as skjs,b.dwmc as kkdw
|
||||||
) t , (SELECT @rownum:=0) AS r ORDER BY count-0 desc limit 10
|
from zy_info a, xxhbuser b
|
||||||
|
where a.create_by = b.gh and xnxq = #{zyInfoSys.xqxn} and zy_status in (1, 2)
|
||||||
|
GROUP BY a.create_by, b.xm, b.dwmc) t,
|
||||||
|
(SELECT @rownum:=0) AS r
|
||||||
|
ORDER BY count - 0 desc limit 10
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getCyList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
<select id="getCyList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||||
select (@rownum:=@rownum + 1) AS rownum,t.* from (
|
select (@rownum:=@rownum + 1) AS rownum, t.*
|
||||||
select a.create_by,count(*) as count,b.xm as skjs,b.dwmc as kkdw from wjx_wjxx a,xxhbuser b where a.create_by = b.gh and xqxn = #{zyInfoSys.xqxn} and qpublish in (1,2) GROUP BY a.create_by ,b.xm,b.dwmc
|
from (select a.create_by, count(*) as count,b.xm as skjs,b.dwmc as kkdw
|
||||||
) t , (SELECT @rownum:=0) AS r ORDER BY count-0 desc
|
from wjx_wjxx a, xxhbuser b
|
||||||
|
where a.create_by = b.gh and xqxn = #{zyInfoSys.xqxn} and qpublish in (1, 2)
|
||||||
|
GROUP BY a.create_by, b.xm, b.dwmc) t,
|
||||||
|
(SELECT @rownum:=0) AS r
|
||||||
|
ORDER BY count - 0 desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getCyTopList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
<select id="getCyTopList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||||
select (@rownum:=@rownum + 1) AS rownum,t.* from (
|
select (@rownum:=@rownum + 1) AS rownum, t.*
|
||||||
select a.create_by,count(*) as count,b.xm as skjs,b.dwmc as kkdw from wjx_wjxx a,xxhbuser b where a.create_by = b.gh and xqxn = #{zyInfoSys.xqxn} and qpublish in (1,2) GROUP BY a.create_by ,b.xm,b.dwmc
|
from (select a.create_by, count(*) as count,b.xm as skjs,b.dwmc as kkdw
|
||||||
) t , (SELECT @rownum:=0) AS r ORDER BY count-0 desc limit 10
|
from wjx_wjxx a, xxhbuser b
|
||||||
|
where a.create_by = b.gh and xqxn = #{zyInfoSys.xqxn} and qpublish in (1, 2)
|
||||||
|
GROUP BY a.create_by, b.xm, b.dwmc) t,
|
||||||
|
(SELECT @rownum:=0) AS r
|
||||||
|
ORDER BY count - 0 desc limit 10
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getXYCyList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
<select id="getXYCyList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||||
select (@rownum:=@rownum + 1) AS rownum,t.* from (
|
select (@rownum:=@rownum + 1) AS rownum, t.*
|
||||||
select count(*) as count,b.dwmc as kkdw from wjx_wjxx a,xxhbuser b where a.create_by = b.gh and xqxn = #{zyInfoSys.xqxn} and qpublish in (1,2) GROUP BY b.dwmc
|
from (select count(*) as count,b.dwmc as kkdw
|
||||||
) t , (SELECT @rownum:=0) AS r ORDER BY count-0 desc
|
from wjx_wjxx a, xxhbuser b
|
||||||
|
where a.create_by = b.gh and xqxn = #{zyInfoSys.xqxn} and qpublish in (1, 2)
|
||||||
|
GROUP BY b.dwmc) t,
|
||||||
|
(SELECT @rownum:=0) AS r
|
||||||
|
ORDER BY count - 0 desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getKcTopList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
<select id="getKcTopList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||||
SELECT
|
SELECT (@rownum := @rownum + 1) AS rownum,
|
||||||
( @rownum := @rownum + 1 ) AS rownum,
|
t.*
|
||||||
t.*
|
FROM (SELECT b.kcmc,
|
||||||
FROM
|
count(*) AS count,
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
b.kcmc,
|
|
||||||
count(*) AS count,
|
|
||||||
b.kkdw
|
b.kkdw
|
||||||
FROM
|
FROM
|
||||||
zy_info a,
|
zy_info a,
|
||||||
kc_kechengbiao b
|
kc_kechengbiao b
|
||||||
WHERE
|
WHERE
|
||||||
a.rwbh = b.rwbh
|
a.rwbh = b.rwbh
|
||||||
AND a.xnxq = #{zyInfoSys.xqxn} GROUP BY b.kcmc,b.kkdw
|
AND a.xnxq = #{zyInfoSys.xqxn}
|
||||||
|
GROUP BY b.kcmc, b.kkdw
|
||||||
|
|
||||||
union all
|
union all
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
b.kcmc,
|
b.kcmc,
|
||||||
count(*) AS count,
|
count (*) AS count,
|
||||||
b.kkdw
|
b.kkdw
|
||||||
FROM
|
FROM
|
||||||
wjx_wjxx a,
|
wjx_wjxx a,
|
||||||
kc_kechengbiao b
|
kc_kechengbiao b
|
||||||
WHERE
|
WHERE
|
||||||
a.rwbh = b.rwbh
|
a.rwbh = b.rwbh
|
||||||
AND a.xqxn = #{zyInfoSys.xqxn} GROUP BY b.kcmc,b.kkdw
|
AND a.xqxn = #{zyInfoSys.xqxn}
|
||||||
) t,
|
GROUP BY b.kcmc, b.kkdw) t,
|
||||||
( SELECT @rownum := 0 ) AS r
|
(SELECT @rownum := 0) AS r
|
||||||
ORDER BY
|
ORDER BY count - 0 DESC LIMIT 10
|
||||||
count - 0 DESC
|
|
||||||
LIMIT 10
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getXnKcList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
<select id="getXnKcList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||||
SELECT
|
SELECT (@rownum := @rownum + 1) AS rownum,
|
||||||
( @rownum := @rownum + 1 ) AS rownum,
|
t.*
|
||||||
t.*
|
FROM (SELECT b.kcmc,
|
||||||
FROM
|
count(*) AS count,
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
b.kcmc,
|
|
||||||
count(*) AS count,
|
|
||||||
b.kkdw
|
b.kkdw
|
||||||
FROM
|
FROM
|
||||||
zy_info a,
|
zy_info a,
|
||||||
kc_kechengbiao b
|
kc_kechengbiao b
|
||||||
WHERE
|
WHERE
|
||||||
a.rwbh = b.rwbh
|
a.rwbh = b.rwbh
|
||||||
AND a.xnxq = #{zyInfoSys.xqxn} GROUP BY b.kcmc,b.kkdw
|
AND a.xnxq = #{zyInfoSys.xqxn}
|
||||||
|
GROUP BY b.kcmc, b.kkdw
|
||||||
|
|
||||||
union all
|
union all
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
b.kcmc,
|
b.kcmc,
|
||||||
count(*) AS count,
|
count (*) AS count,
|
||||||
b.kkdw
|
b.kkdw
|
||||||
FROM
|
FROM
|
||||||
wjx_wjxx a,
|
wjx_wjxx a,
|
||||||
kc_kechengbiao b
|
kc_kechengbiao b
|
||||||
WHERE
|
WHERE
|
||||||
a.rwbh = b.rwbh
|
a.rwbh = b.rwbh
|
||||||
AND a.xqxn = #{zyInfoSys.xqxn} GROUP BY b.kcmc,b.kkdw
|
AND a.xqxn = #{zyInfoSys.xqxn}
|
||||||
) t,
|
GROUP BY b.kcmc, b.kkdw) t,
|
||||||
( SELECT @rownum := 0 ) AS r
|
(SELECT @rownum := 0) AS r
|
||||||
ORDER BY
|
ORDER BY count - 0 DESC
|
||||||
count - 0 DESC
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getJsTopList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
<select id="getJsTopList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||||
SELECT
|
SELECT (@rownum := @rownum + 1) AS rownum,
|
||||||
( @rownum := @rownum + 1 ) AS rownum,
|
t.*
|
||||||
t.*
|
FROM (SELECT a.create_by,
|
||||||
FROM
|
count(*) AS count,
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
a.create_by,
|
|
||||||
count(*) AS count,
|
|
||||||
b.xm AS skjs,
|
b.xm AS skjs,
|
||||||
b.dwmc AS kkdw
|
b.dwmc AS kkdw
|
||||||
FROM
|
FROM
|
||||||
zy_info a,
|
zy_info a,
|
||||||
xxhbuser b
|
xxhbuser b
|
||||||
WHERE
|
WHERE
|
||||||
a.create_by = b.gh
|
a.create_by = b.gh
|
||||||
AND xnxq = #{zyInfoSys.xqxn} and zy_status in (1,2) GROUP BY a.create_by ,b.xm,b.dwmc
|
AND xnxq = #{zyInfoSys.xqxn}
|
||||||
|
and zy_status in (1
|
||||||
|
, 2)
|
||||||
|
GROUP BY a.create_by, b.xm, b.dwmc
|
||||||
|
|
||||||
union all
|
union all
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
a.create_by,
|
a.create_by,
|
||||||
count(*) AS count,
|
count (*) AS count,
|
||||||
b.xm AS skjs,
|
b.xm AS skjs,
|
||||||
b.dwmc AS kkdw
|
b.dwmc AS kkdw
|
||||||
FROM
|
FROM
|
||||||
wjx_wjxx a,
|
wjx_wjxx a,
|
||||||
xxhbuser b
|
xxhbuser b
|
||||||
WHERE
|
WHERE
|
||||||
a.create_by = b.gh
|
a.create_by = b.gh
|
||||||
AND xqxn = #{zyInfoSys.xqxn} and qpublish in (1,2) GROUP BY a.create_by ,b.xm,b.dwmc
|
AND xqxn = #{zyInfoSys.xqxn}
|
||||||
) t,
|
and qpublish in (1
|
||||||
( SELECT @rownum := 0 ) AS r
|
, 2)
|
||||||
ORDER BY
|
GROUP BY a.create_by, b.xm, b.dwmc) t,
|
||||||
count - 0 DESC
|
(SELECT @rownum := 0) AS r
|
||||||
LIMIT 10
|
ORDER BY count - 0 DESC LIMIT 10
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getXnJsList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
<select id="getXnJsList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||||
SELECT
|
SELECT (@rownum := @rownum + 1) AS rownum,
|
||||||
( @rownum := @rownum + 1 ) AS rownum,
|
t.*
|
||||||
t.*
|
FROM (SELECT a.create_by,
|
||||||
FROM
|
count(*) AS count,
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
a.create_by,
|
|
||||||
count(*) AS count,
|
|
||||||
b.xm AS skjs,
|
b.xm AS skjs,
|
||||||
b.dwmc AS kkdw
|
b.dwmc AS kkdw
|
||||||
FROM
|
FROM
|
||||||
zy_info a,
|
zy_info a,
|
||||||
xxhbuser b
|
xxhbuser b
|
||||||
WHERE
|
WHERE
|
||||||
a.create_by = b.gh
|
a.create_by = b.gh
|
||||||
AND xnxq = #{zyInfoSys.xqxn} and zy_status in (1,2) GROUP BY a.create_by ,b.xm,b.dwmc
|
AND xnxq = #{zyInfoSys.xqxn}
|
||||||
|
and zy_status in (1
|
||||||
|
, 2)
|
||||||
|
GROUP BY a.create_by, b.xm, b.dwmc
|
||||||
|
|
||||||
union all
|
union all
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
a.create_by,
|
a.create_by,
|
||||||
count(*) AS count,
|
count (*) AS count,
|
||||||
b.xm AS skjs,
|
b.xm AS skjs,
|
||||||
b.dwmc AS kkdw
|
b.dwmc AS kkdw
|
||||||
FROM
|
FROM
|
||||||
wjx_wjxx a,
|
wjx_wjxx a,
|
||||||
xxhbuser b
|
xxhbuser b
|
||||||
WHERE
|
WHERE
|
||||||
a.create_by = b.gh
|
a.create_by = b.gh
|
||||||
AND xqxn = #{zyInfoSys.xqxn} and qpublish in (1,2) GROUP BY a.create_by ,b.xm,b.dwmc
|
AND xqxn = #{zyInfoSys.xqxn}
|
||||||
) t,
|
and qpublish in (1
|
||||||
( SELECT @rownum := 0 ) AS r
|
, 2)
|
||||||
ORDER BY
|
GROUP BY a.create_by, b.xm, b.dwmc) t,
|
||||||
count - 0 DESC
|
(SELECT @rownum := 0) AS r
|
||||||
|
ORDER BY count - 0 DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="sysStaticZyList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
<select id="sysStaticZyList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||||
|
@ -442,8 +616,9 @@
|
||||||
IF( a.zy_status = '0', '未发布', '已发布' ) as sffb,
|
IF( a.zy_status = '0', '未发布', '已发布' ) as sffb,
|
||||||
IF( a.xshpkg = '1', '是', '否' ) as sfhp
|
IF( a.xshpkg = '1', '是', '否' ) as sfhp
|
||||||
from zy_info a,
|
from zy_info a,
|
||||||
(select skjs,jgh,kcmc,kcbh,xkrs,kkdw,rwbh,kcxz,zc from kc_kechengbiao where xqxn = #{zyInfoSys.xqxn} and flag = '0' GROUP BY skjs,jgh,kcmc,kcbh,xkrs,kkdw, rwbh,kcxz,zc) b
|
(select skjs,jgh,kcmc,kcbh,xkrs,kkdw,rwbh,kcxz,zc from kc_kechengbiao where xqxn = #{zyInfoSys.xqxn} and flag =
|
||||||
where a.rwbh = b.rwbh and a.create_by = b.jgh and a.xnxq = #{zyInfoSys.xqxn} and a.zy_status in (1,2)
|
'0' GROUP BY skjs,jgh,kcmc,kcbh,xkrs,kkdw, rwbh,kcxz,zc) b
|
||||||
|
where a.rwbh = b.rwbh and a.create_by = b.jgh and a.xnxq = #{zyInfoSys.xqxn} and a.zy_status in (1,2)
|
||||||
<if test="zyInfoSys.kcmc != null and zyInfoSys.kcmc != ''">
|
<if test="zyInfoSys.kcmc != null and zyInfoSys.kcmc != ''">
|
||||||
and a.kcmc like concat('%',#{zyInfoSys.kcmc},'%')
|
and a.kcmc like concat('%',#{zyInfoSys.kcmc},'%')
|
||||||
</if>
|
</if>
|
||||||
|
@ -465,8 +640,9 @@
|
||||||
IF( a.qpublish = '2', '全部完成', '未全部完成' ) as sfwc,
|
IF( a.qpublish = '2', '全部完成', '未全部完成' ) as sfwc,
|
||||||
IF( a.qpublish = '0', '未发布', '已发布' ) as sffb
|
IF( a.qpublish = '0', '未发布', '已发布' ) as sffb
|
||||||
from wjx_wjxx a,
|
from wjx_wjxx a,
|
||||||
(select skjs,jgh,kcmc,kcbh,xkrs,kkdw,rwbh,kcxz,zc from kc_kechengbiao where xqxn = #{zyInfoSys.xqxn} and flag = '0' GROUP BY skjs,jgh,kcmc,kcbh,xkrs,kkdw, rwbh,kcxz,zc) b
|
(select skjs,jgh,kcmc,kcbh,xkrs,kkdw,rwbh,kcxz,zc from kc_kechengbiao where xqxn = #{zyInfoSys.xqxn} and flag =
|
||||||
where a.rwbh = b.rwbh and a.create_by = b.jgh and a.xqxn = #{zyInfoSys.xqxn} and a.qpublish in (1,2)
|
'0' GROUP BY skjs,jgh,kcmc,kcbh,xkrs,kkdw, rwbh,kcxz,zc) b
|
||||||
|
where a.rwbh = b.rwbh and a.create_by = b.jgh and a.xqxn = #{zyInfoSys.xqxn} and a.qpublish in (1,2)
|
||||||
<if test="zyInfoSys.kcmc != null and zyInfoSys.kcmc != ''">
|
<if test="zyInfoSys.kcmc != null and zyInfoSys.kcmc != ''">
|
||||||
and a.kcmc like concat('%',#{zyInfoSys.kcmc},'%')
|
and a.kcmc like concat('%',#{zyInfoSys.kcmc},'%')
|
||||||
</if>
|
</if>
|
||||||
|
@ -485,8 +661,9 @@
|
||||||
IF( a.qpublish = '2', '全部完成', '未全部完成' ) as sfwc,
|
IF( a.qpublish = '2', '全部完成', '未全部完成' ) as sfwc,
|
||||||
IF( a.qpublish = '0', '未发布', '已发布' ) as sffb
|
IF( a.qpublish = '0', '未发布', '已发布' ) as sffb
|
||||||
from wjx_wjxx a,
|
from wjx_wjxx a,
|
||||||
(select skjs,jgh,kcmc,kcbh,xkrs,kkdw,rwbh,kcxz,zc from kc_kechengbiao where xqxn = #{zyInfoSys.xqxn} and flag = '0' GROUP BY skjs,jgh,kcmc,kcbh,xkrs,kkdw, rwbh,kcxz,zc) b
|
(select skjs,jgh,kcmc,kcbh,xkrs,kkdw,rwbh,kcxz,zc from kc_kechengbiao where xqxn = #{zyInfoSys.xqxn} and flag =
|
||||||
where a.rwbh = b.rwbh and a.create_by = b.jgh and a.xqxn = #{zyInfoSys.xqxn} and a.qpublish in (1,2)
|
'0' GROUP BY skjs,jgh,kcmc,kcbh,xkrs,kkdw, rwbh,kcxz,zc) b
|
||||||
|
where a.rwbh = b.rwbh and a.create_by = b.jgh and a.xqxn = #{zyInfoSys.xqxn} and a.qpublish in (1,2)
|
||||||
<if test="zyInfoSys.kcmc != null and zyInfoSys.kcmc != ''">
|
<if test="zyInfoSys.kcmc != null and zyInfoSys.kcmc != ''">
|
||||||
and a.kcmc like concat('%',#{zyInfoSys.kcmc},'%')
|
and a.kcmc like concat('%',#{zyInfoSys.kcmc},'%')
|
||||||
</if>
|
</if>
|
||||||
|
@ -502,11 +679,62 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="listKhcl" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
|
<select id="listKhcl" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
|
||||||
SELECT
|
SELECT *
|
||||||
*
|
FROM zy_info ${ew.customSqlSegment}
|
||||||
FROM
|
|
||||||
zy_info
|
|
||||||
${ew.customSqlSegment}
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getxzxx" resultMap="ZyXzInfoResultMap">
|
||||||
|
SELECT zxi.id AS zxi_id,
|
||||||
|
zxi.zyinfo_id,
|
||||||
|
zxi.xzmc,
|
||||||
|
zxi.sort,
|
||||||
|
zxi.create_by,
|
||||||
|
zxi.create_time,
|
||||||
|
zxri.id AS ry_id,
|
||||||
|
zxri.zyinfo_id as ryzyinfoid,
|
||||||
|
zxri.xm,
|
||||||
|
zxri.xh,
|
||||||
|
zxri.sfzz
|
||||||
|
FROM zy_xz_info zxi
|
||||||
|
LEFT JOIN
|
||||||
|
zy_xzry_info zxri ON zxi.id = zxri.zyxzinfo_id
|
||||||
|
WHERE zxi.zyinfo_id = #{dto.id}
|
||||||
|
group by zxi.id,
|
||||||
|
zxi.zyinfo_id,
|
||||||
|
zxi.xzmc,
|
||||||
|
zxi.sort,
|
||||||
|
zxi.create_by,
|
||||||
|
zxi.create_time,
|
||||||
|
zxri.id,
|
||||||
|
zxri.zyinfo_id,
|
||||||
|
zxri.xm,
|
||||||
|
zxri.xh,
|
||||||
|
zxri.sfzz
|
||||||
|
order by zxi.sort
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertBatchzyxz" parameterType="java.util.List">
|
||||||
|
INSERT INTO zy_xz_info (id, zyinfo_id, create_by, create_time, xzmc, sort)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(#{item.id}, #{item.zyinfoId}, #{item.createBy}, #{item.createTime}, #{item.xzmc}, #{item.sort})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertBatchzyxzry" parameterType="java.util.List">
|
||||||
|
INSERT INTO zy_xzry_info (id,zyinfo_id, zyxzinfo_id, xm, xh, sfzz)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(#{item.id},#{item.zyinfoId}, #{item.zyxzinfoId}, #{item.xm}, #{item.xh}, #{item.sfzz})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<delete id="deleteXzxx" >
|
||||||
|
delete from zy_xz_info where zyinfo_id = #{zyinfoId};
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteXzryxx" >
|
||||||
|
delete from zy_xzry_info where zyinfo_id = #{zyinfoId};
|
||||||
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
package org.jeecg.modules.kc.zyInfo.pojo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.jeecg.modules.kc.zyInfo.entity.ZyXzInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class XzReq {
|
||||||
|
|
||||||
|
private String zyinfoId;
|
||||||
|
private Integer rs;
|
||||||
|
private List<ZyXzInfo> list;
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ import org.jeecg.modules.kc.zyInfo.entity.CyInfoSys;
|
||||||
import org.jeecg.modules.kc.zyInfo.entity.ZyInfo;
|
import org.jeecg.modules.kc.zyInfo.entity.ZyInfo;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys;
|
import org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys;
|
||||||
|
import org.jeecg.modules.kc.zyInfo.entity.ZyXzInfo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -14,7 +15,7 @@ import java.util.Map;
|
||||||
/**
|
/**
|
||||||
* @Description: 作业发布
|
* @Description: 作业发布
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
* @Date: 2024-05-06
|
* @Date: 2024-05-06
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
public interface IZyInfoService extends IService<ZyInfo> {
|
public interface IZyInfoService extends IService<ZyInfo> {
|
||||||
|
@ -35,9 +36,9 @@ public interface IZyInfoService extends IService<ZyInfo> {
|
||||||
|
|
||||||
IPage<ZyInfo> listOther(Page<ZyInfo> page, ZyInfo zyInfo);
|
IPage<ZyInfo> listOther(Page<ZyInfo> page, ZyInfo zyInfo);
|
||||||
|
|
||||||
Map<String,Object> sysStaticNo(ZyInfoSys zyInfoSys);
|
Map<String, Object> sysStaticNo(ZyInfoSys zyInfoSys);
|
||||||
|
|
||||||
List<ZyInfoSys> getPHData(ZyInfoSys zyInfoSys,String tag);
|
List<ZyInfoSys> getPHData(ZyInfoSys zyInfoSys, String tag);
|
||||||
|
|
||||||
IPage<ZyInfoSys> sysStaticZyList(Page<ZyInfoSys> page, ZyInfoSys zyInfoSys);
|
IPage<ZyInfoSys> sysStaticZyList(Page<ZyInfoSys> page, ZyInfoSys zyInfoSys);
|
||||||
|
|
||||||
|
@ -46,4 +47,8 @@ public interface IZyInfoService extends IService<ZyInfo> {
|
||||||
List<CyInfoSys> getStaticCyExportUrl(CyInfoSys cyInfoSys);
|
List<CyInfoSys> getStaticCyExportUrl(CyInfoSys cyInfoSys);
|
||||||
|
|
||||||
IPage<ZyInfo> listKhcl(Page<ZyInfo> page, QueryWrapper<ZyInfo> queryWrapper);
|
IPage<ZyInfo> listKhcl(Page<ZyInfo> page, QueryWrapper<ZyInfo> queryWrapper);
|
||||||
|
|
||||||
|
List<ZyXzInfo> getxzxx(ZyInfo zyInfo);
|
||||||
|
|
||||||
|
int saveData(String zyinfoId, Integer rs, List<ZyXzInfo> list);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package org.jeecg.modules.kc.zyInfo.service.impl;
|
package org.jeecg.modules.kc.zyInfo.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
@ -16,9 +17,7 @@ import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao;
|
||||||
import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoService;
|
import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoService;
|
||||||
import org.jeecg.modules.kc.zyDbtx.entity.ZyDbtx;
|
import org.jeecg.modules.kc.zyDbtx.entity.ZyDbtx;
|
||||||
import org.jeecg.modules.kc.zyDbtx.service.IZyDbtxService;
|
import org.jeecg.modules.kc.zyDbtx.service.IZyDbtxService;
|
||||||
import org.jeecg.modules.kc.zyInfo.entity.CyInfoSys;
|
import org.jeecg.modules.kc.zyInfo.entity.*;
|
||||||
import org.jeecg.modules.kc.zyInfo.entity.ZyInfo;
|
|
||||||
import org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys;
|
|
||||||
import org.jeecg.modules.kc.zyInfo.mapper.ZyInfoMapper;
|
import org.jeecg.modules.kc.zyInfo.mapper.ZyInfoMapper;
|
||||||
import org.jeecg.modules.kc.zyInfo.service.IZyInfoService;
|
import org.jeecg.modules.kc.zyInfo.service.IZyInfoService;
|
||||||
import org.jeecg.modules.tools.DateUtils;
|
import org.jeecg.modules.tools.DateUtils;
|
||||||
|
@ -27,9 +26,11 @@ import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 作业发布
|
* @Description: 作业发布
|
||||||
|
@ -253,12 +254,12 @@ public class ZyInfoServiceImpl extends ServiceImpl<ZyInfoMapper, ZyInfo> impleme
|
||||||
map.put("jr_zy_ywczcs", jr_zy_ywczcs);//今日作业已完成总次数:
|
map.put("jr_zy_ywczcs", jr_zy_ywczcs);//今日作业已完成总次数:
|
||||||
map.put("jr_cy_syzcs", jr_cy_syzcs);//今日测验使用总次数:
|
map.put("jr_cy_syzcs", jr_cy_syzcs);//今日测验使用总次数:
|
||||||
map.put("jr_cy_ywczcs", jr_cy_ywczcs);//今日测验已完成总次数:
|
map.put("jr_cy_ywczcs", jr_cy_ywczcs);//今日测验已完成总次数:
|
||||||
map.put("xn_kc_zyzxsrc",xn_kc_zyzxsrc );//使用课程作业总学生人次
|
map.put("xn_kc_zyzxsrc", xn_kc_zyzxsrc);//使用课程作业总学生人次
|
||||||
map.put("xn_kc_zyhp",xn_kc_zyhp );//使用课程作业互评总学生人次
|
map.put("xn_kc_zyhp", xn_kc_zyhp);//使用课程作业互评总学生人次
|
||||||
map.put("xn_kc_zycc",xn_kc_zycc );//使用课程作业查重总学生人次
|
map.put("xn_kc_zycc", xn_kc_zycc);//使用课程作业查重总学生人次
|
||||||
map.put("xn_kc_zywczxsrc",xn_kc_zywczxsrc );//完成课程作业总学生人次
|
map.put("xn_kc_zywczxsrc", xn_kc_zywczxsrc);//完成课程作业总学生人次
|
||||||
map.put("xn_kc_ktcy",xn_kc_ktcy );//使用课堂测验总学生人次
|
map.put("xn_kc_ktcy", xn_kc_ktcy);//使用课堂测验总学生人次
|
||||||
map.put("xn_kc_wccy",xn_kc_wccy );//完成课堂测验总学生人次
|
map.put("xn_kc_wccy", xn_kc_wccy);//完成课堂测验总学生人次
|
||||||
map.put("xntop10", list1);//本学年作业使用排行TOP10
|
map.put("xntop10", list1);//本学年作业使用排行TOP10
|
||||||
map.put("jrtop10", list2);//本学年测验使用排行TOP10
|
map.put("jrtop10", list2);//本学年测验使用排行TOP10
|
||||||
map.put("kctop10", list3);//本学年课程使用排行TOP10
|
map.put("kctop10", list3);//本学年课程使用排行TOP10
|
||||||
|
@ -269,18 +270,18 @@ public class ZyInfoServiceImpl extends ServiceImpl<ZyInfoMapper, ZyInfo> impleme
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ZyInfoSys> getPHData(ZyInfoSys zyInfoSys,String tag) {
|
public List<ZyInfoSys> getPHData(ZyInfoSys zyInfoSys, String tag) {
|
||||||
List<ZyInfoSys> list = Lists.newArrayList();
|
List<ZyInfoSys> list = Lists.newArrayList();
|
||||||
if("xntop10".equals(tag)){
|
if ("xntop10".equals(tag)) {
|
||||||
list = baseMapper.getZyList(zyInfoSys);
|
list = baseMapper.getZyList(zyInfoSys);
|
||||||
}
|
}
|
||||||
if("jrtop10".equals(tag)){
|
if ("jrtop10".equals(tag)) {
|
||||||
list = baseMapper.getCyList(zyInfoSys);
|
list = baseMapper.getCyList(zyInfoSys);
|
||||||
}
|
}
|
||||||
if("kctop10".equals(tag)){
|
if ("kctop10".equals(tag)) {
|
||||||
list = baseMapper.getXnKcList(zyInfoSys);
|
list = baseMapper.getXnKcList(zyInfoSys);
|
||||||
}
|
}
|
||||||
if("jstop10".equals(tag)){
|
if ("jstop10".equals(tag)) {
|
||||||
list = baseMapper.getXnJsList(zyInfoSys);
|
list = baseMapper.getXnJsList(zyInfoSys);
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
|
@ -306,6 +307,48 @@ public class ZyInfoServiceImpl extends ServiceImpl<ZyInfoMapper, ZyInfo> impleme
|
||||||
return baseMapper.listKhcl(page, queryWrapper);
|
return baseMapper.listKhcl(page, queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ZyXzInfo> getxzxx(ZyInfo zyInfo) {
|
||||||
|
return baseMapper.getxzxx(zyInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public int saveData(String zyinfoId, Integer rs, List<ZyXzInfo> list) {
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
|
||||||
|
//先清除小组信息 然后重新插入
|
||||||
|
baseMapper.deleteXzxx(zyinfoId);
|
||||||
|
baseMapper.deleteXzryxx(zyinfoId);
|
||||||
|
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
list.stream().forEach(xz -> {
|
||||||
|
xz.setId(IdUtil.simpleUUID());
|
||||||
|
xz.setCreateBy(sysUser.getUsername());
|
||||||
|
xz.setCreateTime(new Date());
|
||||||
|
});
|
||||||
|
this.baseMapper.insertBatchzyxz(list);
|
||||||
|
|
||||||
|
List<ZyXzryInfo> childTableList = list.stream()
|
||||||
|
.flatMap(zyXzInfo -> zyXzInfo.getStudents().stream()
|
||||||
|
.peek(student -> {
|
||||||
|
student.setId(IdUtil.simpleUUID());
|
||||||
|
student.setZyxzinfoId(zyXzInfo.getId());
|
||||||
|
}))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
if (!childTableList.isEmpty()) {
|
||||||
|
baseMapper.insertBatchzyxzry(childTableList);
|
||||||
|
}
|
||||||
|
ZyInfo zyInfo = new ZyInfo().setId(zyinfoId).setSfpzgxzxx("Y").setXzrs(rs);
|
||||||
|
baseMapper.updateById(zyInfo);
|
||||||
|
} else {
|
||||||
|
ZyInfo zyInfo = new ZyInfo().setId(zyinfoId).setSfpzgxzxx("N").setXzrs(rs);
|
||||||
|
baseMapper.updateById(zyInfo);
|
||||||
|
}
|
||||||
|
return list.size();
|
||||||
|
}
|
||||||
|
|
||||||
// appId
|
// appId
|
||||||
private static final String appId = "wx031697a8ca09a5ce";//东师
|
private static final String appId = "wx031697a8ca09a5ce";//东师
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
@ -28,6 +29,7 @@ import org.jeecg.modules.kc.zyCcjg.service.IZyCcjgService;
|
||||||
import org.jeecg.modules.kc.zyDbtx.entity.ZyDbtx;
|
import org.jeecg.modules.kc.zyDbtx.entity.ZyDbtx;
|
||||||
import org.jeecg.modules.kc.zyDbtx.service.IZyDbtxService;
|
import org.jeecg.modules.kc.zyDbtx.service.IZyDbtxService;
|
||||||
import org.jeecg.modules.kc.zyInfo.entity.ZyInfo;
|
import org.jeecg.modules.kc.zyInfo.entity.ZyInfo;
|
||||||
|
import org.jeecg.modules.kc.zyInfo.entity.ZyXzryInfo;
|
||||||
import org.jeecg.modules.kc.zyInfo.service.IZyInfoService;
|
import org.jeecg.modules.kc.zyInfo.service.IZyInfoService;
|
||||||
import org.jeecg.modules.kc.zyInfoScjl.entity.ZyInfoScjl;
|
import org.jeecg.modules.kc.zyInfoScjl.entity.ZyInfoScjl;
|
||||||
import org.jeecg.modules.kc.zyInfoScjl.service.IZyInfoScjlService;
|
import org.jeecg.modules.kc.zyInfoScjl.service.IZyInfoScjlService;
|
||||||
|
@ -57,12 +59,9 @@ import org.springframework.web.servlet.ModelAndView;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Arrays;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 学生提交作业
|
* @Description: 学生提交作业
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
* @Date: 2024-05-06
|
* @Date: 2024-05-06
|
||||||
|
@ -252,7 +251,7 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
||||||
}
|
}
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
*
|
*
|
||||||
|
@ -266,7 +265,7 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
||||||
zyInfoStudentService.save(zyInfoStudent);
|
zyInfoStudentService.save(zyInfoStudent);
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
*
|
*
|
||||||
|
@ -384,7 +383,7 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
||||||
zyInfoStudentService.removeById(id);
|
zyInfoStudentService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量发布
|
* 批量发布
|
||||||
*
|
*
|
||||||
|
@ -638,7 +637,7 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
||||||
this.zyInfoStudentService.removeByIds(Arrays.asList(ids.split(",")));
|
this.zyInfoStudentService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询
|
* 通过id查询
|
||||||
*
|
*
|
||||||
|
@ -846,7 +845,7 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
||||||
@AutoLog(value = "作业驳回")
|
@AutoLog(value = "作业驳回")
|
||||||
@ApiOperation(value="作业驳回", notes="作业驳回")
|
@ApiOperation(value="作业驳回", notes="作业驳回")
|
||||||
@RequestMapping(value = "/editBohui", method = {RequestMethod.PUT,RequestMethod.POST})
|
@RequestMapping(value = "/editBohui", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
public Result<String> editBohui(@RequestBody ZyInfoStudent zyInfoStudent, HttpServletResponse response) {
|
public Result<Map> editBohui(@RequestBody ZyInfoStudent zyInfoStudent, HttpServletResponse response) {
|
||||||
UpdateWrapper<ZyInfoStudent> updateWrapper = new UpdateWrapper<>();
|
UpdateWrapper<ZyInfoStudent> updateWrapper = new UpdateWrapper<>();
|
||||||
updateWrapper.set("file_path",null);
|
updateWrapper.set("file_path",null);
|
||||||
updateWrapper.set("pdf_path",null);
|
updateWrapper.set("pdf_path",null);
|
||||||
|
@ -886,10 +885,9 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
||||||
zyDbtxService.save(zyDbtx);
|
zyDbtxService.save(zyDbtx);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//查重前删除原来的查重数据
|
//查重前删除原来的查重数据
|
||||||
// zyCcjgService.deleteByZystuid(zyInfoStudent.getId(),response);
|
// zyCcjgService.deleteByZystuid(zyInfoStudent.getId(),response);
|
||||||
return Result.OK("作业驳回成功!");
|
return Result.OK(new HashMap());
|
||||||
}
|
}
|
||||||
|
|
||||||
@AutoLog(value = "设置作业存档类型")
|
@AutoLog(value = "设置作业存档类型")
|
||||||
|
@ -1235,4 +1233,21 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
||||||
return Result.OK(zyInfoStudent);
|
return Result.OK(zyInfoStudent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取同小组人员作业标识
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/getZyStuId")
|
||||||
|
public Result<List<ZyInfoStudent>> getZyStuId(@RequestBody ZyXzryInfo zyXzryInfo) {
|
||||||
|
return Result.OK(zyInfoStudentService.getZyStuId(zyXzryInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取同小组人员作业标识
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/getZyStuIdById")
|
||||||
|
public Result<List<ZyInfoStudent>> getZyStuIdById(@RequestBody ZyXzryInfo zyXzryInfo) {
|
||||||
|
return Result.OK(zyInfoStudentService.getZyStuIdById(zyXzryInfo));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,5 +226,7 @@ public class ZyInfoStudent implements Serializable {
|
||||||
private String ywid;//业务id
|
private String ywid;//业务id
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String stuId;//学生作业临时id
|
private String stuId;//学生作业临时id
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String sfzz;//是否是组长
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.jeecg.modules.kc.zyInfo.entity.ZyInfo;
|
import org.jeecg.modules.kc.zyInfo.entity.ZyInfo;
|
||||||
|
import org.jeecg.modules.kc.zyInfo.entity.ZyXzryInfo;
|
||||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
|
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
|
||||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys;
|
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys;
|
||||||
import org.jeecg.modules.kc.zyInfoStudentPcz.entity.ZyInfoStudentPcz;
|
import org.jeecg.modules.kc.zyInfoStudentPcz.entity.ZyInfoStudentPcz;
|
||||||
|
@ -50,4 +51,8 @@ public interface ZyInfoStudentMapper extends BaseMapper<ZyInfoStudent> {
|
||||||
List<ZyInfoStudent> cxccByZyId(@Param("zyInfoStudent") ZyInfoStudent zyInfoStudent2);
|
List<ZyInfoStudent> cxccByZyId(@Param("zyInfoStudent") ZyInfoStudent zyInfoStudent2);
|
||||||
|
|
||||||
List<ZyInfoStudent> cxtjByJccsbz();
|
List<ZyInfoStudent> cxtjByJccsbz();
|
||||||
|
|
||||||
|
List<ZyInfoStudent> getZyStuId(@Param("dto") ZyXzryInfo zyXzryInfo);
|
||||||
|
|
||||||
|
List<ZyInfoStudent> getZyStuIdById(@Param("dto") ZyXzryInfo zyXzryInfo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,4 +180,54 @@
|
||||||
select a.* from zy_info_student a ,
|
select a.* from zy_info_student a ,
|
||||||
(select distinct zy_stu_id from zy_ccjg where message = '大学生版,检测次数不足') b where a.id = b.zy_stu_id and a.file_path is not null
|
(select distinct zy_stu_id from zy_ccjg where message = '大学生版,检测次数不足') b where a.id = b.zy_stu_id and a.file_path is not null
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
<select id="getZyStuId" resultType="org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent">
|
||||||
|
SELECT
|
||||||
|
a.id,b.sfzz
|
||||||
|
FROM
|
||||||
|
zy_info_student a
|
||||||
|
LEFT JOIN zy_xzry_info b ON a.main_id = b.zyinfo_id
|
||||||
|
AND a.create_by = b.xh
|
||||||
|
WHERE
|
||||||
|
main_id = #{dto.zyinfoId}
|
||||||
|
|
||||||
|
AND create_by IN (
|
||||||
|
SELECT
|
||||||
|
xh
|
||||||
|
FROM
|
||||||
|
zy_xzry_info
|
||||||
|
WHERE
|
||||||
|
zyxzinfo_id = (
|
||||||
|
SELECT
|
||||||
|
zyxzinfo_id
|
||||||
|
FROM
|
||||||
|
zy_xzry_info
|
||||||
|
WHERE
|
||||||
|
zyinfo_id = #{dto.zyinfoId} AND xh = (select create_by from zy_info_student where id = #{dto.xh}) ))
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getZyStuIdById" resultType="org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent">
|
||||||
|
SELECT
|
||||||
|
a.id,
|
||||||
|
b.sfzz
|
||||||
|
FROM
|
||||||
|
zy_info_student a
|
||||||
|
LEFT JOIN zy_xzry_info b ON a.main_id = b.zyinfo_id
|
||||||
|
AND a.create_by = b.xh
|
||||||
|
WHERE
|
||||||
|
main_id = #{dto.zyinfoId}
|
||||||
|
|
||||||
|
AND create_by IN (
|
||||||
|
SELECT
|
||||||
|
xh
|
||||||
|
FROM
|
||||||
|
zy_xzry_info
|
||||||
|
WHERE
|
||||||
|
zyxzinfo_id = (
|
||||||
|
SELECT
|
||||||
|
zyxzinfo_id
|
||||||
|
FROM
|
||||||
|
zy_xzry_info
|
||||||
|
WHERE
|
||||||
|
zyinfo_id = #{dto.zyinfoId} AND xh = #{dto.xh}))
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.jeecg.modules.kc.zyInfo.entity.ZyXzryInfo;
|
||||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
|
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys;
|
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys;
|
||||||
|
@ -16,7 +17,7 @@ import java.util.Map;
|
||||||
/**
|
/**
|
||||||
* @Description: 学生提交作业
|
* @Description: 学生提交作业
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
* @Date: 2024-05-06
|
* @Date: 2024-05-06
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
public interface IZyInfoStudentService extends IService<ZyInfoStudent> {
|
public interface IZyInfoStudentService extends IService<ZyInfoStudent> {
|
||||||
|
@ -41,7 +42,7 @@ public interface IZyInfoStudentService extends IService<ZyInfoStudent> {
|
||||||
|
|
||||||
boolean stuWpKsjc(ZyInfoStudent zyInfoStudent, HttpServletResponse response);
|
boolean stuWpKsjc(ZyInfoStudent zyInfoStudent, HttpServletResponse response);
|
||||||
|
|
||||||
IPage<ZyInfoStudent> getHpxxList(Page<ZyInfoStudent> page, QueryWrapper<ZyInfoStudent> queryWrapper,String zyStuId);
|
IPage<ZyInfoStudent> getHpxxList(Page<ZyInfoStudent> page, QueryWrapper<ZyInfoStudent> queryWrapper, String zyStuId);
|
||||||
|
|
||||||
void batchKhcl(List<String> list);
|
void batchKhcl(List<String> list);
|
||||||
|
|
||||||
|
@ -64,4 +65,8 @@ public interface IZyInfoStudentService extends IService<ZyInfoStudent> {
|
||||||
List<JSONObject> getWpSycccs();
|
List<JSONObject> getWpSycccs();
|
||||||
|
|
||||||
void getWpcccs();
|
void getWpcccs();
|
||||||
|
|
||||||
|
List<ZyInfoStudent> getZyStuId(ZyXzryInfo zyXzryInfo);
|
||||||
|
|
||||||
|
List<ZyInfoStudent> getZyStuIdById(ZyXzryInfo zyXzryInfo);
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -114,7 +114,7 @@ public class LoginController {
|
||||||
// return result;
|
// return result;
|
||||||
// }
|
// }
|
||||||
//update-end-author:taoyan date:20190828 for:校验验证码
|
//update-end-author:taoyan date:20190828 for:校验验证码
|
||||||
|
|
||||||
//1. 校验用户是否有效
|
//1. 校验用户是否有效
|
||||||
//update-begin-author:wangshuai date:20200601 for: 登录代码验证用户是否注销bug,if条件永远为false
|
//update-begin-author:wangshuai date:20200601 for: 登录代码验证用户是否注销bug,if条件永远为false
|
||||||
LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
@ -129,7 +129,9 @@ public class LoginController {
|
||||||
//2. 校验用户名或密码是否正确
|
//2. 校验用户名或密码是否正确
|
||||||
String userpassword = PasswordUtil.encrypt(username, password, sysUser.getSalt());
|
String userpassword = PasswordUtil.encrypt(username, password, sysUser.getSalt());
|
||||||
String syspassword = sysUser.getPassword();
|
String syspassword = sysUser.getPassword();
|
||||||
if (!syspassword.equals(userpassword)) {
|
//TODO admin账号 忘记密码就把下面的判断条件改为false
|
||||||
|
if (1==2) {
|
||||||
|
// if (!syspassword.equals(userpassword)) {
|
||||||
//update-begin-author:taoyan date:2022-11-7 for: issues/4109 平台用户登录失败锁定用户
|
//update-begin-author:taoyan date:2022-11-7 for: issues/4109 平台用户登录失败锁定用户
|
||||||
addLoginFailOvertimes(username);
|
addLoginFailOvertimes(username);
|
||||||
//update-end-author:taoyan date:2022-11-7 for: issues/4109 平台用户登录失败锁定用户
|
//update-end-author:taoyan date:2022-11-7 for: issues/4109 平台用户登录失败锁定用户
|
||||||
|
@ -226,7 +228,7 @@ public class LoginController {
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退出登录
|
* 退出登录
|
||||||
* @param request
|
* @param request
|
||||||
|
@ -260,7 +262,7 @@ public class LoginController {
|
||||||
return Result.error("Token无效!");
|
return Result.error("Token无效!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取访问量
|
* 获取访问量
|
||||||
* @return
|
* @return
|
||||||
|
@ -291,7 +293,7 @@ public class LoginController {
|
||||||
result.success("登录成功");
|
result.success("登录成功");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取访问量
|
* 获取访问量
|
||||||
* @return
|
* @return
|
||||||
|
@ -312,8 +314,8 @@ public class LoginController {
|
||||||
result.setResult(oConvertUtils.toLowerCasePageList(list));
|
result.setResult(oConvertUtils.toLowerCasePageList(list));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登陆成功选择用户当前部门
|
* 登陆成功选择用户当前部门
|
||||||
* @param user
|
* @param user
|
||||||
|
@ -327,7 +329,7 @@ public class LoginController {
|
||||||
LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
|
||||||
username = sysUser.getUsername();
|
username = sysUser.getUsername();
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取登录部门
|
//获取登录部门
|
||||||
String orgCode= user.getOrgCode();
|
String orgCode= user.getOrgCode();
|
||||||
//获取登录租户
|
//获取登录租户
|
||||||
|
@ -342,7 +344,7 @@ public class LoginController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 短信登录接口
|
* 短信登录接口
|
||||||
*
|
*
|
||||||
* @param jsonObject
|
* @param jsonObject
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -358,12 +360,12 @@ public class LoginController {
|
||||||
result.setSuccess(false);
|
result.setSuccess(false);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
//update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
||||||
String redisKey = CommonConstant.PHONE_REDIS_KEY_PRE+mobile;
|
String redisKey = CommonConstant.PHONE_REDIS_KEY_PRE+mobile;
|
||||||
Object object = redisUtil.get(redisKey);
|
Object object = redisUtil.get(redisKey);
|
||||||
//update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
//update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
||||||
|
|
||||||
if (object != null) {
|
if (object != null) {
|
||||||
result.setMessage("验证码10分钟内,仍然有效!");
|
result.setMessage("验证码10分钟内,仍然有效!");
|
||||||
result.setSuccess(false);
|
result.setSuccess(false);
|
||||||
|
@ -397,7 +399,7 @@ public class LoginController {
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* smsmode 短信模板方式 0 .登录模板、1.注册模板、2.忘记密码模板
|
* smsmode 短信模板方式 0 .登录模板、1.注册模板、2.忘记密码模板
|
||||||
*/
|
*/
|
||||||
|
@ -415,12 +417,12 @@ public class LoginController {
|
||||||
result.setSuccess(false);
|
result.setSuccess(false);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
//update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
||||||
//验证码10分钟内有效
|
//验证码10分钟内有效
|
||||||
redisUtil.set(redisKey, captcha, 600);
|
redisUtil.set(redisKey, captcha, 600);
|
||||||
//update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
//update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
||||||
|
|
||||||
//update-begin--Author:scott Date:20190812 for:issues#391
|
//update-begin--Author:scott Date:20190812 for:issues#391
|
||||||
//result.setResult(captcha);
|
//result.setResult(captcha);
|
||||||
//update-end--Author:scott Date:20190812 for:issues#391
|
//update-end--Author:scott Date:20190812 for:issues#391
|
||||||
|
@ -433,11 +435,11 @@ public class LoginController {
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手机号登录接口
|
* 手机号登录接口
|
||||||
*
|
*
|
||||||
* @param jsonObject
|
* @param jsonObject
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -457,7 +459,7 @@ public class LoginController {
|
||||||
if(!result.isSuccess()) {
|
if(!result.isSuccess()) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
String smscode = jsonObject.getString("captcha");
|
String smscode = jsonObject.getString("captcha");
|
||||||
|
|
||||||
//update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
//update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
||||||
|
@ -509,7 +511,7 @@ public class LoginController {
|
||||||
|
|
||||||
//3.设置登录用户信息
|
//3.设置登录用户信息
|
||||||
obj.put("userInfo", sysUser);
|
obj.put("userInfo", sysUser);
|
||||||
|
|
||||||
//4.设置登录部门
|
//4.设置登录部门
|
||||||
List<SysDepart> departs = sysDepartService.queryUserDeparts(sysUser.getId());
|
List<SysDepart> departs = sysDepartService.queryUserDeparts(sysUser.getId());
|
||||||
obj.put("departs", departs);
|
obj.put("departs", departs);
|
||||||
|
@ -576,13 +578,13 @@ public class LoginController {
|
||||||
String code = RandomUtil.randomString(BASE_CHECK_CODES,4);
|
String code = RandomUtil.randomString(BASE_CHECK_CODES,4);
|
||||||
//存到redis中
|
//存到redis中
|
||||||
String lowerCaseCode = code.toLowerCase();
|
String lowerCaseCode = code.toLowerCase();
|
||||||
|
|
||||||
//update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
//update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
||||||
// 加入密钥作为混淆,避免简单的拼接,被外部利用,用户自定义该密钥即可
|
// 加入密钥作为混淆,避免简单的拼接,被外部利用,用户自定义该密钥即可
|
||||||
String origin = lowerCaseCode+key+jeecgBaseConfig.getSignatureSecret();
|
String origin = lowerCaseCode+key+jeecgBaseConfig.getSignatureSecret();
|
||||||
String realKey = Md5Util.md5Encode(origin, "utf-8");
|
String realKey = Md5Util.md5Encode(origin, "utf-8");
|
||||||
//update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
//update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
||||||
|
|
||||||
redisUtil.set(realKey, lowerCaseCode, 60);
|
redisUtil.set(realKey, lowerCaseCode, 60);
|
||||||
log.info("获取验证码,Redis key = {},checkCode = {}", realKey, code);
|
log.info("获取验证码,Redis key = {},checkCode = {}", realKey, code);
|
||||||
//返回前端
|
//返回前端
|
||||||
|
@ -607,7 +609,7 @@ public class LoginController {
|
||||||
sysPermissionService.switchVue3Menu();
|
sysPermissionService.switchVue3Menu();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* app登录
|
* app登录
|
||||||
* @param sysLoginModel
|
* @param sysLoginModel
|
||||||
|
@ -620,7 +622,7 @@ public class LoginController {
|
||||||
String username = sysLoginModel.getUsername();
|
String username = sysLoginModel.getUsername();
|
||||||
String password = sysLoginModel.getPassword();
|
String password = sysLoginModel.getPassword();
|
||||||
JSONObject obj = new JSONObject();
|
JSONObject obj = new JSONObject();
|
||||||
|
|
||||||
//update-begin-author:taoyan date:2022-11-7 for: issues/4109 平台用户登录失败锁定用户
|
//update-begin-author:taoyan date:2022-11-7 for: issues/4109 平台用户登录失败锁定用户
|
||||||
if(isLoginFailOvertimes(username)){
|
if(isLoginFailOvertimes(username)){
|
||||||
return result.error500("该用户登录失败次数过多,请于10分钟后再次登录!");
|
return result.error500("该用户登录失败次数过多,请于10分钟后再次登录!");
|
||||||
|
@ -632,7 +634,7 @@ public class LoginController {
|
||||||
if(!result.isSuccess()) {
|
if(!result.isSuccess()) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//2. 校验用户名或密码是否正确
|
//2. 校验用户名或密码是否正确
|
||||||
String userpassword = PasswordUtil.encrypt(username, password, sysUser.getSalt());
|
String userpassword = PasswordUtil.encrypt(username, password, sysUser.getSalt());
|
||||||
String syspassword = sysUser.getPassword();
|
String syspassword = sysUser.getPassword();
|
||||||
|
@ -643,7 +645,7 @@ public class LoginController {
|
||||||
result.error500("用户名或密码错误");
|
result.error500("用户名或密码错误");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//3.设置登录部门
|
//3.设置登录部门
|
||||||
String orgCode = sysUser.getOrgCode();
|
String orgCode = sysUser.getOrgCode();
|
||||||
if(oConvertUtils.isEmpty(orgCode)) {
|
if(oConvertUtils.isEmpty(orgCode)) {
|
||||||
|
@ -669,7 +671,7 @@ public class LoginController {
|
||||||
|
|
||||||
//5. 设置登录用户信息
|
//5. 设置登录用户信息
|
||||||
obj.put("userInfo", sysUser);
|
obj.put("userInfo", sysUser);
|
||||||
|
|
||||||
//6. 生成token
|
//6. 生成token
|
||||||
String token = JwtUtil.sign(username, syspassword);
|
String token = JwtUtil.sign(username, syspassword);
|
||||||
// 设置超时时间
|
// 设置超时时间
|
||||||
|
@ -791,4 +793,4 @@ public class LoginController {
|
||||||
redisUtil.set(key, ++val, 3600);
|
redisUtil.set(key, ++val, 3600);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,8 @@ spring:
|
||||||
strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
|
strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
|
||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://127.0.0.1:3306/course_information_center_jeecg_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
# url: jdbc:mysql://127.0.0.1:3306/course_information_center_jeecg_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
|
url: jdbc:mysql://127.0.0.1:3306/course_information_center_jeecg_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&sessionVariables=sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
# url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
|
@ -366,4 +367,4 @@ sftp:
|
||||||
password: sftp
|
password: sftp
|
||||||
timeout: 1000
|
timeout: 1000
|
||||||
uploadpath: kczx
|
uploadpath: kczx
|
||||||
fullpath: /data
|
fullpath: /data
|
||||||
|
|
Loading…
Reference in New Issue