Explorar el Código

打印按钮样式

lxp hace 1 año
padre
commit
6e6a5a71df

+ 8 - 3
yinet-admin/src/main/java/com/yinet/web/controller/rlzy/RlzyApplyPrintController.java

@@ -17,6 +17,7 @@ import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.Date;
 import java.util.List;
 
 @Controller
@@ -56,10 +57,14 @@ public class RlzyApplyPrintController extends BaseController {
     @ResponseBody
     public AjaxResult addSave(RlzyApply rlzyApply)
     {
-        rlzyApply.setCreateTime(DateUtils.getNowDate());
+        Date nowTime = DateUtils.getNowDate();
+        Date later5 = DateUtils.later5();
+        rlzyApply.setCreateTime(nowTime);
         rlzyApply.setIszprint("0");
         rlzyApply.setIsfprint("0");
         rlzyApply.setStatus("0");
+        rlzyApply.setOpeningDate(nowTime);
+        rlzyApply.setEfficaciousDate(later5);
         return toAjax(rlzyApplyService.insert(rlzyApply));
     }
     @GetMapping("/{idcard}")
@@ -109,9 +114,9 @@ public class RlzyApplyPrintController extends BaseController {
     public AjaxResult updateApply(Long applyId ,String type){
         RlzyApply build = null;
         if("zhengben".equals(type)){
-            build = RlzyApply.builder().iszprint("1").id(applyId).build();
+            build = RlzyApply.builder().iszprint("1").zprintTime(DateUtils.getNowDate()).id(applyId).build();
         }else if("fuben".equals(type)){
-            build = RlzyApply.builder().isfprint("1").id(applyId).build();
+            build = RlzyApply.builder().isfprint("1").fprintTime(DateUtils.getNowDate()).id(applyId).build();
         }
         return  AjaxResult.success(rlzyApplyService.updateById(build));
     }

+ 2 - 2
yinet-admin/src/main/resources/templates/rlzy/apply/apply.html

@@ -137,7 +137,7 @@
                         if(row.status=="1" || row.status==1){
                             actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="show(\'' + row.id + '\')"><i class="fa fa-street-view"></i>查看</a>');
                         }else{
-                            actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="transact(\'' + row.id + '\')"><i class="fa fa-edit"></i>办理</a> ');
+                            actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="transact(\'' + row.id + '\')"><i class="fa fa-edit"></i>审核通过</a> ');
                         }
                         actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                         return actions.join('');
@@ -148,7 +148,7 @@
         });
         function transact(id){
             $.modal.open("申请办理","/rlzy/apply/edit/"+id,1305,895);
-            $('.layui-layer-btn0').text("办理")
+            $('.layui-layer-btn0').text("审核通过")
             $('.layui-layer-btn1').text("取消")
         }
         function show(id){

+ 10 - 0
yinet-common/src/main/java/com/yinet/common/utils/DateUtils.java

@@ -67,6 +67,16 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
         return new SimpleDateFormat(format).format(date);
     }
 
+    public static final Date later5(){
+        String nowTime = getDate();
+        Calendar thisDay = Calendar.getInstance();
+        thisDay.set(Calendar.YEAR, Integer.valueOf(nowTime.substring(0,4)));
+        thisDay.set(Calendar.MONTH, Integer.valueOf(nowTime.substring(5,7))-1);	//月份 从0 开始
+        thisDay.set(Calendar.DAY_OF_MONTH, Integer.valueOf(nowTime.substring(8,10)));
+        thisDay.add(Calendar.YEAR,5);
+        Date time5 = thisDay.getTime();
+        return time5;
+    }
     public static final Date dateTime(final String format, final String ts) {
         try {
             return new SimpleDateFormat(format).parse(ts);

+ 8 - 0
yinet-system/src/main/java/com/yinet/rlzy/domain/RlzyApply.java

@@ -151,6 +151,14 @@ public class RlzyApply extends BaseEntity {
     @Column(name = "chengnuoshu")
     private String chengnuoshu;
 
+    @Excel(name = "正本打印时间")
+    @Column(name = "zprint_time")
+    private Date zprintTime;
+
+    @Excel(name = "副本打印时间")
+    @Column(name = "fprint_time")
+    private Date fprintTime;
+
     @Column(name = "create_by")
     private String createBy;
 

+ 5 - 1
yinet-system/src/main/resources/mapper/rlzy/RlzyApplyMapper.xml

@@ -27,6 +27,8 @@
         <result property="openingDate" column="opening_date"/>
         <result property="efficaciousDate" column="efficacious_date"/>
         <result property="chengnuoshu" column="chengnuoshu"/>
+        <result property="zprintTime" column="zprint_time"/>
+        <result property="fprintTime" column="fprint_time"/>
         <result property="file" column="file"/>
         <result property="createBy" column="create_by"/>
         <result property="createTime" column="create_time"/>
@@ -55,6 +57,8 @@
                opening_date,
                efficacious_date,
                chengnuoshu,
+               zprint_time,
+               fprint_time,
                status,
                create_by,
                create_time,
@@ -136,7 +140,7 @@
             <if test="chengnuoshu != null and chengnuoshu != ''">
                 and chengnuoshu = #{chengnuoshu}
             </if>
-            and  status = 1
+            /*and  status = 1*/
         </where>
     </select>
     <delete id="deleteRlzyApplyByIds" parameterType="String">