Commit d958118e by ilal Committed by chenzg

临时提交

parent 8c8e2c62
...@@ -56,5 +56,12 @@ public class XcglAssoXcjsgz extends Model<XcglAssoXcjsgz> { ...@@ -56,5 +56,12 @@ public class XcglAssoXcjsgz extends Model<XcglAssoXcjsgz> {
@ApiModelProperty(value = "", example = "") @ApiModelProperty(value = "", example = "")
private Integer optionid; private Integer optionid;
@ApiModelProperty(value = "", example = "")
private String dygkText;
@ApiModelProperty(value = "", example = "")
private String degkText;
@ApiModelProperty(value = "", example = "")
private Integer rulestate;
} }
\ No newline at end of file
...@@ -8,6 +8,7 @@ import java.util.Date; ...@@ -8,6 +8,7 @@ import java.util.Date;
public class SalaryTool { public class SalaryTool {
static SimpleDateFormat mat = new SimpleDateFormat("yyyy-MM-dd"); static SimpleDateFormat mat = new SimpleDateFormat("yyyy-MM-dd");
static SimpleDateFormat matM = new SimpleDateFormat("yyyy-MM");
public static Date strToDateLong(String strDate) { public static Date strToDateLong(String strDate) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
...@@ -119,6 +120,28 @@ public class SalaryTool { ...@@ -119,6 +120,28 @@ public class SalaryTool {
return mat.format(calendar.getTime()); return mat.format(calendar.getTime());
} }
// 下个月
public static String getfirstnextMo(String time) {
String firstnext;
Calendar c1 = Calendar.getInstance();
c1.setTime(strToDateLong(time)); // 设置为当前时间
c1.add(Calendar.MONTH, 1);
c1.set(Calendar.DAY_OF_MONTH, 1);
firstnext = matM.format(c1.getTime());
return firstnext;
}
// 上个月
public static String getfirstlastMo(String time) {
String firstnext;
Calendar c1 = Calendar.getInstance();
c1.setTime(strToDateLong(time)); // 设置为当前时间
c1.add(Calendar.MONTH, -1);
c1.set(Calendar.DAY_OF_MONTH, 1);
firstnext = matM.format(c1.getTime());
return firstnext;
}
//################################################################################################################################## //##################################################################################################################################
// 上个月 // 上个月
......
...@@ -34,4 +34,10 @@ public interface XcglAssoXzbMapper extends BaseMapper<XcglAssoXzb> { ...@@ -34,4 +34,10 @@ public interface XcglAssoXzbMapper extends BaseMapper<XcglAssoXzb> {
int ModifyImportedSalary(XcglAssoXzb xcglassoxzb); int ModifyImportedSalary(XcglAssoXzb xcglassoxzb);
void updateBatchXzxjg(List<XcglAssoXzb> list); void updateBatchXzxjg(List<XcglAssoXzb> list);
double Holidayamount(int orgcode,String apptime,int rules_type,int userid);
int NumberOvertime(int orgcode,String apptime,int userid);
int PeriodsOvertime(int orgcode,String apptime,int overtimetypeid,int userid);
} }
...@@ -10,7 +10,7 @@ import lombok.NoArgsConstructor; ...@@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class CalculatingCompensationDto { public class CalculatingCompensationDto {
private String salary_month;//薪资月 // private String salary_month;//薪资月
private Integer pay_group_id;//薪资组id private Integer pay_group_id;//薪资组id
} }
...@@ -15,5 +15,5 @@ public class ModifysalaryruleDto { ...@@ -15,5 +15,5 @@ public class ModifysalaryruleDto {
private Integer xcjsgzid;// 薪酬计算规则公式id private Integer xcjsgzid;// 薪酬计算规则公式id
private String formula;// 公式 private String formula;// 公式
} }
...@@ -126,6 +126,10 @@ ...@@ -126,6 +126,10 @@
</foreach> </foreach>
</insert> </insert>
<delete id="deleteBycbfaid" >
DELETE FROM sbgjj_asso_cbfzmx
WHERE cbfaid = #{cbfaid}
</delete>
<!-- <insert id="insert" parameterType="cn.timer.api.bean.sbgjj.SbgjjAssoCbfzmx" useGeneratedKeys="true" keyProperty="id"> <!-- <insert id="insert" parameterType="cn.timer.api.bean.sbgjj.SbgjjAssoCbfzmx" useGeneratedKeys="true" keyProperty="id">
INSERT INTO sbgjj_asso_cbfzmx INSERT INTO sbgjj_asso_cbfzmx
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
......
...@@ -11,6 +11,10 @@ ...@@ -11,6 +11,10 @@
<result column="degk" property="degk" /> <result column="degk" property="degk" />
<result column="type" property="type" /> <result column="type" property="type" />
<result column="optionid" property="optionid" /> <result column="optionid" property="optionid" />
<result column="dygk_text" property="dygkText" />
<result column="degk_text" property="degkText" />
<result column="rulestate" property="rulestate" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
......
...@@ -52,6 +52,36 @@ ...@@ -52,6 +52,36 @@
xzxjg XcglAssoXzb_xzxjg, xzxjg XcglAssoXzb_xzxjg,
qyid XcglAssoXzb_qyid qyid XcglAssoXzb_qyid
</sql> </sql>
<select id="Holidayamount">
select IFNULL(SUM(su.duration),0)
from kqgl_asso_relation_summary su
where su.approval_type = 2
and su.org_code = #{orgcode}
and su.ordernum = 1
and SUBSTR(su.app_time,1,7) = #{apptime}
and su.leave_type_id = (select ru.id from kqgl_asso_leave_rules ru where ru.org_code = #{orgcode} and ru.rules_type = #{rules_type})
and su.user_id = #{userid}
</select>
<select id="NumberOvertime">
select COUNT(*)
from kqgl_asso_relation_summary su
where su.approval_type = 5
and su.org_code = #{orgcode}
and SUBSTR(su.app_time,1,7) = #{apptime}
and su.user_id = #{userid}
</select>
<select id="PeriodsOvertime">
select IFNULL(SUM(su.duration),0)
from kqgl_asso_relation_summary su
where su.approval_type = 1
and su.org_code = #{orgcode}
and SUBSTR(su.app_time,1,7) = #{apptime}
and su.overtime_type_id = #{overtimetypeid}
and su.user_id = #{userid}
</select>
<select id="CalculationResults" resultMap="CalculationDtoMap"> <select id="CalculationResults" resultMap="CalculationDtoMap">
select aa.orgcode,aa.empid,aa.empnum,aa.empname,aa.xzbid,aa.xzyf, select aa.orgcode,aa.empid,aa.empnum,aa.empname,aa.xzbid,aa.xzyf,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment