| | |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.support.HttpKit; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.CourseCounsum; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.service.ICoursePackageService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | */ |
| | | @Override |
| | | public void updateCoursePackage(TCoursePackage coursePackage, String coursePackagePaymentConfig) { |
| | | String holitime = coursePackage.getHolitime(); |
| | | String[] split = holitime.split(" - "); |
| | | String startTime = split[0]; |
| | | String endTime = split[1]; |
| | | SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | Date parse1 = format1.parse(startTime); |
| | | parse1.setHours(0); |
| | | parse1.setMinutes(0); |
| | | parse1.setSeconds(0); |
| | | Date parse2 = format2.parse(endTime); |
| | | parse2.setHours(23); |
| | | parse2.setMinutes(59); |
| | | parse2.setSeconds(59); |
| | | coursePackage.setStartTime(parse1); |
| | | coursePackage.setEndTime(parse2); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | coursePackageClient.updateCoursePackage(coursePackage); |
| | | coursePackagePaymentConfigClient.delCoursePackagePaymentConfig(coursePackage.getId()); |
| | | JSONArray jsonArray = JSON.parseArray(coursePackagePaymentConfig); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 上传消课凭证 |
| | | * @param id |
| | |
| | | */ |
| | | @Override |
| | | public ResultUtil cancellationRecord(Long id, String cancelClasses, Integer deductClassHour) { |
| | | CoursePackageScheduling coursePackageScheduling = coursePackageSchedulingClient.queryCoursePackageSchedulingById(id); |
| | | // CoursePackageScheduling coursePackageScheduling = coursePackageSchedulingClient.queryCoursePackageSchedulingById(id); |
| | | |
| | | List<CoursePackageScheduling> coursePackageSchedulings = coursePackageSchedulingClient.queryCoursePackageSchedulingsById(id); |
| | | |
| | | for (CoursePackageScheduling coursePackageScheduling : coursePackageSchedulings) { |
| | | |
| | | if(coursePackageScheduling.getStatus() == 1 || coursePackageScheduling.getStatus() == 4){ |
| | | return ResultUtil.error("不能添加消课凭证"); |
| | | } |
| | |
| | | cancelledClasses.setCancelledClassesNumber(deductClassHour);} |
| | | cancelledClasses.setInsertTime(new Date()); |
| | | cancelledClassesClient.addCancelledClasses(cancelledClasses); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | return ResultUtil.success(); |
| | | } |
| | | |